From b9a0c8804a61c14bc31d9ee5eacfbaf980780ba6 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 17 Dec 2010 11:56:43 +0300 Subject: [PATCH 01/20] BUG#58948 - Valgrind warning in do_handle_one_connection() Fixed that proxy_user may be used uninitialized. sql/sql_class.cc: Fixed that proxy_user may be used uninitialized. --- sql/sql_class.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index c4aa4ba7efb..c058e66df97 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -3007,7 +3007,7 @@ void Security_context::init() { host= user= ip= external_user= 0; host_or_ip= "connecting host"; - priv_user[0]= priv_host[0]= '\0'; + priv_user[0]= priv_host[0]= proxy_user[0]= '\0'; master_access= 0; #ifndef NO_EMBEDDED_ACCESS_CHECKS db_access= NO_ACCESS; From c406c797976ff856a9729d2f7d05ae0f2547fedc Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Fri, 17 Dec 2010 11:30:59 +0100 Subject: [PATCH 02/20] some more if stmt simplifications --- mysql-test/extra/rpl_tests/rpl_stop_slave.test | 2 +- mysql-test/include/check_ftwrl_compatible.inc | 8 ++++---- mysql-test/include/check_ftwrl_incompatible.inc | 14 +++++++------- mysql-test/include/show_slave_status.inc | 2 +- mysql-test/suite/innodb/t/innodb_bug42419.test | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_stop_slave.test index 7c88afe3532..cd427077570 100644 --- a/mysql-test/extra/rpl_tests/rpl_stop_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_stop_slave.test @@ -9,7 +9,7 @@ # --source extra/rpl_tests/rpl_stop_slave.test # -if (`SELECT "$tmp_table_stm" = ''`) +if (!$tmp_table_stm) { --echo \$tmp_table_stm is NULL --die $tmp_table_stm is NULL diff --git a/mysql-test/include/check_ftwrl_compatible.inc b/mysql-test/include/check_ftwrl_compatible.inc index 76c1915957c..200f8cd3d8a 100644 --- a/mysql-test/include/check_ftwrl_compatible.inc +++ b/mysql-test/include/check_ftwrl_compatible.inc @@ -34,7 +34,7 @@ if (!$err) { --echo Success: Was able to run '$statement' under FTWRL. unlock tables; -if (`SELECT "$cleanup_stmt" <> ""`) +if ($cleanup_stmt) { --eval $cleanup_stmt; } @@ -91,12 +91,12 @@ connection default; --reap } -if (`SELECT "$cleanup_stmt" <> ""`) +if ($cleanup_stmt) { --eval $cleanup_stmt; } -if (`SELECT "$skip_3rd_check" = ""`) +if (!$skip_3rd_check) { # # Finally, let us check that FTWRL will succeed if this statement @@ -147,7 +147,7 @@ connection default; } set debug_sync= "RESET"; -if (`SELECT "$cleanup_stmt" <> ""`) +if ($cleanup_stmt) { --eval $cleanup_stmt; } diff --git a/mysql-test/include/check_ftwrl_incompatible.inc b/mysql-test/include/check_ftwrl_incompatible.inc index 56deef8e92f..4787a69ea9c 100644 --- a/mysql-test/include/check_ftwrl_incompatible.inc +++ b/mysql-test/include/check_ftwrl_incompatible.inc @@ -41,11 +41,11 @@ if (!$err) { --echo Error: Was able to run '$statement' under FTWRL! unlock tables; -if (`SELECT "$cleanup_stmt1" <> ""`) +if ($cleanup_stmt1) { --eval $cleanup_stmt1; } -if (`SELECT "$cleanup_stmt2" <> ""`) +if ($cleanup_stmt2) { --eval $cleanup_stmt2; } @@ -88,16 +88,16 @@ unlock tables; connection default; --reap -if (`SELECT "$cleanup_stmt1" <> ""`) +if ($cleanup_stmt1) { --eval $cleanup_stmt1; } -if (`SELECT "$cleanup_stmt2" <> ""`) +if ($cleanup_stmt2) { --eval $cleanup_stmt2; } -if (`SELECT "$skip_3rd_check" = ""`) +if (!$skip_3rd_check) { # # Finally, let us check that FTWRL will not succeed if this @@ -141,11 +141,11 @@ connection default; set debug_sync= "RESET"; -if (`SELECT "$cleanup_stmt1" <> ""`) +if ($cleanup_stmt1) { --eval $cleanup_stmt1; } -if (`SELECT "$cleanup_stmt2" <> ""`) +if ($cleanup_stmt2) { --eval $cleanup_stmt2; } diff --git a/mysql-test/include/show_slave_status.inc b/mysql-test/include/show_slave_status.inc index d66c068e19b..5cc04993487 100644 --- a/mysql-test/include/show_slave_status.inc +++ b/mysql-test/include/show_slave_status.inc @@ -10,7 +10,7 @@ if (`SELECT "XX$status_items" = "XX"`) --disable_query_log --vertical_results -while (`SELECT "XX$_items" <> "XX"`) +while ($_items) { --let $_name= `SELECT SUBSTRING_INDEX('$_items', ',', 1)` --let $_items= `SELECT LTRIM(SUBSTRING('$_items', LENGTH('$_name') + 2))` diff --git a/mysql-test/suite/innodb/t/innodb_bug42419.test b/mysql-test/suite/innodb/t/innodb_bug42419.test index 93c4764252a..46f357c1777 100644 --- a/mysql-test/suite/innodb/t/innodb_bug42419.test +++ b/mysql-test/suite/innodb/t/innodb_bug42419.test @@ -7,7 +7,7 @@ --source include/have_innodb.inc let $innodb_lock_wait_timeout= query_get_value(SHOW VARIABLES LIKE 'innodb_lock_wait_timeout%', Value, 1); -if (`SELECT $innodb_lock_wait_timeout < 10`) +if ($innodb_lock_wait_timeout < 10) { --echo # innodb_lock_wait_timeout must be >= 10 seconds --echo # so that this test can work all time fine on an overloaded testing box From 883a36340b1ffad3c35f914243a209ba118b7702 Mon Sep 17 00:00:00 2001 From: Jorgen Loland Date: Fri, 17 Dec 2010 13:52:39 +0100 Subject: [PATCH 03/20] BUG#58985: Assertion tab->quick->index != 64 failed in make_join_select() in sql_select.cc Follow-up patch. Add sanity check for quick select when it is decided that it should be used. sql/opt_range.h: Add is_valid() to QUICK_SELECT* sql/sql_select.cc: Add sanity check for quick select when it is decided that it should be used. --- sql/opt_range.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++ sql/sql_select.cc | 1 + 2 files changed, 56 insertions(+) diff --git a/sql/opt_range.h b/sql/opt_range.h index 6da4d1c2776..caff3c622b8 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -336,6 +336,13 @@ public: */ virtual bool is_keys_used(const MY_BITMAP *fields); + /** + Simple sanity check that the quick select has been set up + correctly. Function is overridden by quick selects that merge + indices. + */ + virtual bool is_valid() { return index != MAX_KEY; }; + /* rowid of last row retrieved by this quick select. This is used only when doing ROR-index_merge selects @@ -556,6 +563,22 @@ public: bool clustered_pk_range() { return test(pk_quick_select); } + virtual bool is_valid() + { + List_iterator_fast it(quick_selects); + QUICK_RANGE_SELECT *quick; + bool valid= true; + while ((quick= it++)) + { + if (!quick->is_valid()) + { + valid= false; + break; + } + } + return valid; + } + /* used to get rows collected in Unique */ READ_RECORD read_record; }; @@ -608,6 +631,22 @@ public: */ List quick_selects; + virtual bool is_valid() + { + List_iterator_fast it(quick_selects); + QUICK_RANGE_SELECT *quick; + bool valid= true; + while ((quick= it++)) + { + if (!quick->is_valid()) + { + valid= false; + break; + } + } + return valid; + } + /* Merged quick select that uses Clustered PK, if there is one. This quick select is not used for row retrieval, it is used for row retrieval. @@ -658,6 +697,22 @@ public: List quick_selects; /* Merged quick selects */ + virtual bool is_valid() + { + List_iterator_fast it(quick_selects); + QUICK_SELECT_I *quick; + bool valid= true; + while ((quick= it++)) + { + if (!quick->is_valid()) + { + valid= false; + break; + } + } + return valid; + } + QUEUE queue; /* Priority queue for merge operation */ MEM_ROOT alloc; /* Memory pool for this and merged quick selects data. */ diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 6e42b65175a..e14b872d18e 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6504,6 +6504,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) ((tab->type != JT_CONST && tab->type != JT_REF) || (uint)tab->ref.key == tab->quick->index)) { + DBUG_ASSERT(tab->quick->is_valid()); sel->quick=tab->quick; // Use value from get_quick_... sel->quick_keys.clear_all(); sel->needed_reg.clear_all(); From b1b89865c6ee1ccf919642aa4ea275f68866dae9 Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Fri, 17 Dec 2010 23:03:23 +0000 Subject: [PATCH 04/20] bug#51264: MySQL.prefPane fails to run @prefix@ was erroneously set to '.' with the STANDALONE install layout, when it should instead be set to CMAKE_INSTALL_PREFIX, this was likely accidentally copied from scripts/CMakeLists.txt which has similar handling specifically for mysql_install_db.sh mysql.server init script can now find the install, assuming the defaults have been chosen. --- support-files/CMakeLists.txt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 2d1d1e83b8b..f8a65e75d4d 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -48,14 +48,7 @@ FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small) ENDFOREACH() IF(UNIX) - # XXX: again, used elsewhere (scripts/), should be standardised in - # XXX: install_layout.cmake - IF(INSTALL_LAYOUT MATCHES "STANDALONE") - SET(prefix ".") - ELSE() - SET(prefix ${CMAKE_INSTALL_PREFIX}) - ENDIF() - + SET(prefix ${CMAKE_INSTALL_PREFIX}) FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure config.medium.ini config.small.ini config.huge.ini ndb-config-2-node.ini) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${script}.sh From 30cfda089fdbeb2915c35e0609984189a9855b73 Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Fri, 17 Dec 2010 23:08:43 +0000 Subject: [PATCH 05/20] bug#51925: 5.5 installed header file layout is incorrect The 'mysql' include sub-directory was copied directly into include/ rather than retaining its own directory. Fix this, and update mysql_config which needs additional logic to detect the correct prefix for includes. --- include/CMakeLists.txt | 4 +--- scripts/mysql_config.sh | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 5334fc0f5ae..e89929d159d 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -59,6 +59,4 @@ SET(HEADERS ) INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development) -INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development FILES_MATCHING PATTERN "*.h" ) - - +INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/mysql COMPONENT Development FILES_MATCHING PATTERN "*.h") diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index 69ec88d6724..97a8a723043 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -92,7 +92,11 @@ plugindir_rel=`echo $plugindir | sed -e "s;^$basedir/;;"` fix_path plugindir $plugindir_rel lib/mysql/plugin lib/plugin pkgincludedir='@pkgincludedir@' -fix_path pkgincludedir include/mysql include +if [ -f $basedir/include/mysql/mysql.h ]; then + pkgincludedir="$basedir/include/mysql" +elif [ -f $basedir/include/mysql.h ]; then + pkgincludedir="$basedir/include" +fi version='@VERSION@' socket='@MYSQL_UNIX_ADDR@' From da97e272194fedddec730d1ed02bd98ae73d1768 Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Fri, 17 Dec 2010 23:13:33 +0000 Subject: [PATCH 06/20] bug#51925: 5.5 installed header file layout is incorrect Additional space-in-directory-name protection. --- scripts/mysql_config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index 97a8a723043..67484ec13b7 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -92,9 +92,9 @@ plugindir_rel=`echo $plugindir | sed -e "s;^$basedir/;;"` fix_path plugindir $plugindir_rel lib/mysql/plugin lib/plugin pkgincludedir='@pkgincludedir@' -if [ -f $basedir/include/mysql/mysql.h ]; then +if [ -f "$basedir/include/mysql/mysql.h" ]; then pkgincludedir="$basedir/include/mysql" -elif [ -f $basedir/include/mysql.h ]; then +elif [ -f "$basedir/include/mysql.h" ]; then pkgincludedir="$basedir/include" fi From 8b27f9a05e2f49191b57b8717a31753573981fe7 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Sun, 19 Dec 2010 18:07:28 +0100 Subject: [PATCH 07/20] BUG#49978: Replication tests don't clean up replication state at the end Major replication test framework cleanup. This does the following: - Ensure that all tests clean up the replication state when they finish, by making check-testcase check the output of SHOW SLAVE STATUS. This implies: - Slave must not be running after test finished. This is good because it removes the risk for sporadic errors in subsequent tests when a test forgets to sync correctly. - Slave SQL and IO errors must be cleared when test ends. This is good because we will notice if a test gets an unexpected error in the slave threads near the end. - We no longer have to clean up before a test starts. - Ensure that all tests that wait for an error in one of the slave threads waits for a specific error. It is no longer possible to source wait_for_slave_[sql|io]_to_stop.inc when there is an error in one of the slave threads. This is good because: - If a test expects an error but there is a bug that causes another error to happen, or if it stops the slave thread without an error, then we will notice. - When developing tests, wait_for_*_to_[start|stop].inc will fail immediately if there is an error in the relevant slave thread. Before this patch, we had to wait for the timeout. - Remove duplicated and repeated code for setting up unusual replication topologies. Now, there is a single file that is capable of setting up arbitrary topologies (include/rpl_init.inc, but include/master-slave.inc is still available for the most common topology). Tests can now end with include/rpl_end.inc, which will clean up correctly no matter what topology is used. The topology can be changed with include/rpl_change_topology.inc. - Improved debug information when tests fail. This includes: - debug info is printed on all servers configured by include/rpl_init.inc - User can set $rpl_debug=1, which makes auxiliary replication files print relevant debug info. - Improved documentation for all auxiliary replication files. Now they describe purpose, usage, parameters, and side effects. - Many small code cleanups: - Made have_innodb.inc output a sensible error message. - Moved contents of rpl000017-slave.sh into rpl000017.test - Added mysqltest variables that expose the current state of disable_warnings/enable_warnings and friends. - Too many to list here: see per-file comments for details. client/mysqltest.cc: Added the following variables: $ENABLED_WARNINGS $ENABLED_QUERY_LOG $ENABLED_RESULT_LOG $ENABLED_ABORT_ON_ERROR $ENABLED_INFO $ENABLED_METADATA Each variable is 0 or 1, depending on if the corresponding mysqltest feature is on or off. mysql-test/extra/rpl_tests/rpl_EE_err.test: Made test clean up after itself and removed outdated comments. mysql-test/extra/rpl_tests/rpl_auto_increment.test: - Use rpl_reset.inc instead of master-slave-reset.inc - diff_tables.inc now takes only one parameter. Made test clean up after itself and removed outdated comments. mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test: diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test: diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test: diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_charset.test: Made test clean up after itself and removed unnecessary cleanup in beginning. mysql-test/extra/rpl_tests/rpl_commit_after_flush.test: cosmetic fixes mysql-test/extra/rpl_tests/rpl_conflicts.test: cosmetic fixes mysql-test/extra/rpl_tests/rpl_ddl.test: Don't clean up replication here since this file does not setup replication. The main test now has to both setup and clean up replication. cosmetic fixes mysql-test/extra/rpl_tests/rpl_deadlock.test: make test clean up after itself mysql-test/extra/rpl_tests/rpl_extra_col_master.test: cosmetic fixes mysql-test/extra/rpl_tests/rpl_extra_col_slave.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_failed_optimize.test: made test clean up after itself mysql-test/extra/rpl_tests/rpl_flsh_tbls.test: made test clean up after itself mysql-test/extra/rpl_tests/rpl_foreign_key.test: made test clean up after itself mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test: - Replace 'start slave; wait_for_slave_to_start.inc' by include/start_slave.inc. - Use new file rpl_connect.inc to reconnect on all connections, since the connections are used by rpl_end.inc. - Use wait_for_slave_param.inc instead of wait_for_slave_io_to_start.inc, since wait_for_slave_io_to_start.inc now fails if the IO thread has an error. In this particular test case, it is normal that the IO thread has an error. - Changed wait_for_slave_io_error.inc so that it waits for the IO thread to stop. However, in this test case, the IO thread only gets a non-fatal error, so it does not stop. So we set $slave_io_error_is_nonfatal=1 to prevent wait_for_slave_io_error.inc from waiting. mysql-test/extra/rpl_tests/rpl_insert_id.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_insert_id_pk.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_loaddata.test: - Use wait_for_slave_sql_error.inc to wait for errors instead of wait_for_slave_sql_to_stop.inc - Use check_slave_no_error.inc instead of print errors to the log. - Use rpl_reset.inc instead of master-slave-reset.inc This means we have to clear the error from the slave threads by calling RESET SLAVE explicitly. - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_log.test: replace master-slave-reset.inc by rpl_reset.inc mysql-test/extra/rpl_tests/rpl_max_relay_size.test: made test clean up after itself cosmetic fix mysql-test/extra/rpl_tests/rpl_multi_query.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_multi_update.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test: replace master-slave-reset.inc by rpl_reset.inc mysql-test/extra/rpl_tests/rpl_not_null.test: - replace master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_record_compare.test: - replace master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_reset_slave.test: - replace wait_for_slave_io_error.inc+stop_slave.inc by wait_for_slave_io_error_and_stop.inc+stop_slave_sql.inc since stop_slave.inc now fails when the io thread has an error. - replace stop_slave.inc by STOP SLAVE + wait_for_slave_sql_to_stop.inc + wait_for_slave_param. stop_slave.inc would fail since the IO thread has an error. - add include/rpl_end.inc to clean up replication state mysql-test/extra/rpl_tests/rpl_row_UUID.test: Don't clean up replication here since this file does not setup replication. The main test now has to both setup and clean up replication. mysql-test/extra/rpl_tests/rpl_row_basic.test: - replaced reset_master_and_slave.inc by rpl_reset.inc - replaced sequence of reset master+reset slave by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_row_sp002.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_row_sp007.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_set_null.test: - replaced master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test: - Made test clean up replication state. mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test: replaced rpl_diff_tables.inc by diff_tables.inc mysql-test/extra/rpl_tests/rpl_stop_slave.test: changed protocol for diff_tables.inc mysql-test/extra/rpl_tests/rpl_sv_relay_space.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_test_framework.inc: Auxiliary file used by rpl_test_framework.test. This checks that rpl_change_topology.inc works correctly. mysql-test/extra/rpl_tests/rpl_truncate.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_truncate_helper.test: - replace reset_master_and_slave.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/include/analyze-sync_with_master.test: - improved debug output printed when sync_slave_with_master or sync_with_master fails - Added documentation mysql-test/include/assert.inc: Added file to facilitate assertions. mysql-test/include/begin_include_file.inc: New auxiliary file to be used by replication helper files like rpl_init.inc, stop_slave.inc, wait_for_slave_*.inc, etc. Such helper files should source rpl_begin_include_file.inc at the beginning and rpl_end_include_file.inc at the end. That adds the following features: - When a test sources the file, the file name is printed to the result file. This is good because it makes result files easier to follow. - When a helper file sources a second helper file recursively, then the name of the second file is not printed. This is good because it would make the result file harder to follow if all the internal calls of all helper files were printed. - When $rpl_debug is set, all internal calls are printed to the result file. This is good because it helps when debugging test cases. (With $rpl_debug=1, many of the helper files now print other relevant debug info too.) - When a file needs to turn off the query log or the warning log (disable_query_log/disable_warnings), then the file can tell rpl_begin_include_file.inc about it. Then rpl_begin_include_file.inc will turn off the log correctly, and rpl_end_include_file.inc will turn on the log correctly. Note that if rpl_a.inc sources rpl_b.inc and both files need to turn off the log, then the log is not turned on when rpl_b.inc ends (because rpl_a.inc still needs the log off). This makes it easier to program replication helper files. mysql-test/include/check-testcase.test: Made check-testcase ensure that the slave status is reset after the test has finished. mysql-test/include/check_slave_is_running.inc: - Use existing framework (check_slave_param.inc) instead of ad-hoc code to check value of slave parameters. - Use rpl_begin_include_file.inc to improve debug capabilities. - improve documentation. mysql-test/include/check_slave_no_error.inc: - Use rpl_begin_include_file.inc to improve debug capabilities. - improve documentation. mysql-test/include/check_slave_param.inc: - Use rpl_begin_include_file.inc to improve debug capabilities. - improve documentation. mysql-test/include/cleanup_fake_relay_log.inc: - Use RESET SLAVE instead of manual file removal. This also resets other replication state. - verify that RESET SLAVE correctly removed files. mysql-test/include/diff_tables.inc: - Use rpl_begin_include_file.inc to improve debug capabilities. - Improved documentation. - file now supports an arbitrary number of tables (not just two). The tables are now given as a comma-separated list instead of as two variables. - You no longer have to specify database name for each table. If no database is specified, it defaults to the current database. - File now restores the connection at the end. mysql-test/include/end_include_file.inc: New file to be sourced at the end of auxiliary replication include files. See include/rpl_begin_include_file.inc for details. mysql-test/include/file_does_not_exist.inc: Added .inc file to check that a given file is removed. mysql-test/include/force_restart.inc: Added file to force server restart after test mysql-test/include/force_restart_if_skipped.inc: Added file to force server restart after test, if the test is skipped mysql-test/include/have_innodb.inc: Made have_innodb.inc print sensible message when innodb is not supported. mysql-test/include/io_thd_fault_injection.inc: Use rpl_server_restart.inc instead of restart_mysqld.inc in rpl tests mysql-test/include/kill_query_and_diff_master_slave.inc: Renamed diff_master_slave.inc to rpl_diff.inc mysql-test/include/master-slave.inc: - Use new rpl_init.inc file - Now, we don't do 'drop table' in master-slave.inc any more. That's good because drop table has nothing to do with configuring replication servers. - master-slave.inc now supports the additional parameter $rpl_server_count. By default, master-slave.inc only configures two servers; if $rpl_server_count is set, it configures that many servers. Only the second server is a slave; the rest are not part of the replication topology. mysql-test/include/mtr_check.sql: Removed unneeded SP (use include/force_restart.inc instead) mysql-test/include/mysqldump.inc: diff_tables.inc now takes only one parameter. mysql-test/include/ndb_master-slave.inc: use master-slave.inc instead of ad-hoc calls to 'connect' mysql-test/include/ndb_master-slave_2ch.inc: use rpl_init.inc instead of ad-hoc setup mysql-test/include/ndb_not_readonly.inc: turn off query log while executing this script. this was previously done by the caller. now it's done in the script. mysql-test/include/report-features.test: add newline at end of file mysql-test/include/reset_master_and_slave.inc: rpl_reset.inc replaces this file mysql-test/include/restart_mysqld.inc: force caller to use rpl_restart_server.inc instead if replication is configured mysql-test/include/rpl_change_topology.inc: New file to change replication topology on the fly. This is used by rpl_init.inc internally, but is also used by test cases that need to change topology (e.g., rpl.rpl_circular_for_4_hosts, which reconfigures the topology to make a failover). mysql-test/include/rpl_connect.inc: New file to create a named connection. This file knows about a number of "standard" connections (master, slave, server_1, etc), and knows how each of them should normally be created. This is mostly used internally (e.g., by rpl_init.inc, master-slave.inc, ndb_master-slave_2ch.inc etc), but can also be used by tests that need to bring a connection up after disconnecting. mysql-test/include/rpl_connection.inc: New file to change connection. This prints the name of the connection. However, for files that source rpl_begin_include_file.inc, it does not print the name of the connection unless $rpl_debug=1. This is good because printing something every time the .inc file changed connection would make the result log harder to read. mysql-test/include/rpl_diff.inc: - Made file capable to compare many servers - Hence renamed it to rpl_diff.inc - If no server list is specified, use all servers from server_1 to server_$rpl_server_count - It now writes the statement to file before executing it. That means it will be subject to SQL string interpolation, but not shell string interpolation (which may be platform-dependent) mysql-test/include/rpl_diff_tables.inc: Removed this file, since its functionality has been merged into diff_tables.inc. mysql-test/include/rpl_end.inc: Renamed master-slave-end.inc to rpl_end.inc, and made it work with arbitrary replication topologies (as configured with rpl_init.inc and possibly rpl_change_topology.inc). Also made it assert that no slave thread has an error. Made it assert that no slave thread is stopped, unless $rpl_only_running_threads=1. mysql-test/include/rpl_for_each_slave.inc: New test script that executes a command once for each slave. This is used by include/rpl_start_slaves.inc and include/rpl_stop_slaves.inc and could possibly be useful for other custom scripts too. mysql-test/include/rpl_generate_sync_chain.inc: New file that computes the variable $rpl_sync_chain. This variable determines in what order slaves are synced by include/rpl_sync.inc. The variable is recomputed the first time that include/rpl_sync.inc is called after rpl_change_topology.inc. mysql-test/include/rpl_init.inc: Made file work for arbitrary topologies instead of just 4-server circle. This file is used by master-slave.inc, rpl_master-slave_2ch.inc etc, and also by tests that need other specific replication topologies. mysql-test/include/rpl_reconnect.inc: New auxiliary file that will reconnect many clients to a given server. All clients configured by rpl_init.inc will reconnect. mysql-test/include/rpl_reset.inc: Made file work for arbitrary replication topologies, check for errors, and sync all threads. Also removed 'drop table' because that has nothing to do with replication. mysql-test/include/rpl_restart_server.inc: New auxiliary file that restarts a server. mysql-test/include/rpl_start_server.inc: New auxiliary file that starts a server that has been shut down. mysql-test/include/rpl_start_slaves.inc: New auxiliary file to start all slaves configured by rpl_init.inc This is used internally by rpl_init.inc but may also be used by tests that want to bring all slaves up. mysql-test/include/rpl_stop_server.inc: New auxiliary file that shuts down a server. mysql-test/include/rpl_stop_slaves.inc: New auxiliary file to stop all slaves configured rpl_init.inc. This is used internally by rpl_end.inc, but may also be used by tests that want to stop all slaves. mysql-test/include/rpl_sync.inc: Made file work for arbitrary replication topologies (as configured by rpl_init.inc and possibly rpl_change_topology.inc) instead of just 4-server circle. mysql-test/include/save_master_pos.inc: Auxiliary file to save the master position. mysql-test/include/setup_fake_relay_log.inc: - Moved complicated logic to write to file into write_var_to_file.inc, so that it can be re-used by other tests. - Added call to show_rpl_debug_info and die in error case. mysql-test/include/show_rpl_debug_info.inc: - Made file print NOW() - Made file print both SHOW MASTER STATUS, SHOW SLAVE HOSTS, and SHOW SLAVE STATUS. - Made file print debug info for all servers configured by rpl_init.inc mysql-test/include/show_slave_status.inc: - Made file use echo instead of SELECT to print variables. - Improved comments. - Use variable names that are less likely to be used by other tests. mysql-test/include/start_slave.inc: - Made test use rpl_begin_include_file.inc to improve debug capabilities. - improved documentation mysql-test/include/stop_slave.inc: - Made script capable to detect which threads are running and stop only those. - Improved documentation mysql-test/include/stop_slave_io.inc: Added file to stop the slave IO thread. mysql-test/include/stop_slave_sql.inc: Added file to stop the slave SQL thread. mysql-test/include/sync_io_with_master.inc: Added file to sync the IO thread of the current connection, up to a previously saved position. mysql-test/include/sync_slave_io_with_master.inc: - Made file work with arbitrarily-named connections. - Made file use rpl_begin_include_file.inc to improve debug capabilities. mysql-test/include/sync_slave_sql_with_io.inc: Added file to sync only the SQL thread, up to the position copied in the IO thread. mysql-test/include/wait_for_query_to_fail.inc: Added file to wait for a query to fail. mysql-test/include/wait_for_slave_io_error.inc: - Use rpl_begin_include_file.inc to improve debug capabilities. - Use existing atom include/show_slave_status.inc to print error message. - Improve comments. ****** - This file now waits until the slave IO thread has completely stopped (to avoid races in tests). - Some IO thread errors are non-fatal and don't cause the slave IO thread to stop. To allow tests to wait for such errors, we add the parameters $slave_io_error_is_nonfatal. If $slave_io_error_is_nonfatal is set, this script does not wait for the IO thread to stop. mysql-test/include/wait_for_slave_io_to_start.inc: - Made script fail if the IO thread has an error. - Use rpl_begin_include_file.inc to improve debug capabilities. - Improved documentation. mysql-test/include/wait_for_slave_io_to_stop.inc: - Fail if server is not configured as slave. Previously, the script accepted servers not configured as slave because there was cleanup code called from master-slave.inc that would execute STOP SLAVE on both master and slave. Now all tests have to clean up after themselves, so we don't have to call stop slave at the beginning of tests. Hence, we disallow calling this script on servers not configured as slaves. - Use rpl_begin_include_file.inc to improve debug capabilities. - Improved documentation. mysql-test/include/wait_for_slave_param.inc: - Added $slave_error_param. This variable can be set to Slave_IO_Errno or Slave_SQL_Errno, in which case the script fails if the corresponding column in the output from SHOW SLAVE STATUS is nonzero. - Replaced exit by die. - Made it print timeout seconds correctly in error message. - Removed $slave_error_message. This is not needed. - Use rpl_begin_include_file.inc for better debug capabilities. mysql-test/include/wait_for_slave_sql_error.inc: - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation - Use existing atom show_slave_status.inc to print error. mysql-test/include/wait_for_slave_sql_error_and_skip.inc: - Use rpl_begin_include_file.inc and rpl_connection.inc for better debug capabilities. - Improve documentation mysql-test/include/wait_for_slave_sql_to_start.inc: - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation mysql-test/include/wait_for_slave_sql_to_stop.inc: - Fail if Last_SQL_Errno is nonzero. - Fail if server is not configured as slave. Previously, the script accepted servers not configured as slave because there was cleanup code called from master-slave.inc that would execute STOP SLAVE on both master and slave. Now all tests have to clean up after themselves, so we don't have to call stop slave at the beginning of tests. Hence, we disallow calling this script on servers not configured as slaves. - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation mysql-test/include/wait_for_slave_to_start.inc: - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation mysql-test/include/wait_for_slave_to_stop.inc: - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation mysql-test/include/write_var_to_file.inc: Added file to write contents of a mysqltest variable to file. (This was previously in setup_fake_relay_log.inc) mysql-test/mysql-test-run.pl: Allow tests to require restart in case the test is skipped. mysql-test/r/init_file.result: updated result file mysql-test/r/mysqldump_restore.result: update result file mysql-test/suite/binlog/r/binlog_drop_if_exists.result: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/r/binlog_old_versions.result: updated result file mysql-test/suite/binlog/r/binlog_query_filter_rules.result: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/r/binlog_server_id.result: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/r/binlog_sf.result: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/r/binlog_sql_mode.result: updated result file mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt: This test replicates, so it should be in the rpl suite. Then we can remove this .opt file too. mysql-test/suite/binlog/t/binlog_drop_if_exists.test: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/t/binlog_old_versions.test: cosmetic fixes mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/t/binlog_query_filter_rules.test: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/t/binlog_server_id.test: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/t/binlog_sf.test: Moved test that does not use replication to binlog suite. Since test sets binlog_format internally, it's useless to re-run it. Hence we source have_binlog_format_statement.inc mysql-test/suite/binlog/t/binlog_sql_mode.test: - Test does not use replication, so we remove master-slave.inc. - mysqltest magically adds --force-if-open to $MYSQL_BINLOG in test files that source master-slave.inc. So now we have to add --force-if-open explicitly. mysql-test/suite/bugs/t/rpl_bug12691.test: made test clean up after itself cosmetic fixes mysql-test/suite/bugs/t/rpl_bug23533.test: made test clean up after itself cosmetic fixes mysql-test/suite/bugs/t/rpl_bug31582.test: made test clean up after itself mysql-test/suite/bugs/t/rpl_bug31583.test: made test clean up after itself mysql-test/suite/bugs/t/rpl_bug33029.test: made test clean up after itself mysql-test/suite/bugs/t/rpl_bug36391.test: made test clean up after itself cosmetic fixes mysql-test/suite/bugs/t/rpl_bug37426.test: made test clean up after itself cosmetic fixes mysql-test/suite/bugs/t/rpl_bug38205.test: made test clean up after itself mysql-test/suite/manual/t/rpl_replication_delay.test: made test clean up after itself cosmetic fixes mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test: made test clean up after itself cosmetic fixes mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test: made test clean up after itself mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test: made test clean up after itself cosmetic fixes mysql-test/suite/parts/r/rpl_partition.result: updated result file mysql-test/suite/parts/t/rpl_partition.test: Make test clean up replication state. cosmetic fixes mysql-test/suite/rpl/include/rpl_mixed_ddl.inc: made test clean up after itself cosmetic fixes mysql-test/suite/rpl/include/rpl_mixed_dml.inc: made test clean up after itself cosmetic fixes mysql-test/suite/rpl/r/rpl_000010.result: update result file mysql-test/suite/rpl/r/rpl_000011.result: update result file mysql-test/suite/rpl/r/rpl_000013.result: update result file mysql-test/suite/rpl/r/rpl_000017.result: update result file mysql-test/suite/rpl/r/rpl_EE_err.result: update result file mysql-test/suite/rpl/r/rpl_LD_INFILE.result: update result file mysql-test/suite/rpl/r/rpl_alter.result: update result file mysql-test/suite/rpl/r/rpl_alter_db.result: update result file mysql-test/suite/rpl/r/rpl_auto_increment.result: update result file mysql-test/suite/rpl/r/rpl_auto_increment_11932.result: update result file mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result: update result file mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result: update result file mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result: update result file mysql-test/suite/rpl/r/rpl_binlog_corruption.result: Updated result file mysql-test/suite/rpl/r/rpl_binlog_errors.result: updated result file mysql-test/suite/rpl/r/rpl_binlog_grant.result: update result file mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result: Updated result file mysql-test/suite/rpl/r/rpl_bit.result: update result file mysql-test/suite/rpl/r/rpl_bit_npk.result: update result file mysql-test/suite/rpl/r/rpl_blackhole.result: update result file mysql-test/suite/rpl/r/rpl_bug26395.result: update result file mysql-test/suite/rpl/r/rpl_bug31076.result: update result file mysql-test/suite/rpl/r/rpl_bug33931.result: updated result file mysql-test/suite/rpl/r/rpl_bug38694.result: update result file mysql-test/suite/rpl/r/rpl_change_master.result: update result file mysql-test/suite/rpl/r/rpl_charset.result: update result file mysql-test/suite/rpl/r/rpl_charset_sjis.result: update result file mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result: Updated result file mysql-test/suite/rpl/r/rpl_colSize.result: update result file mysql-test/suite/rpl/r/rpl_commit_after_flush.result: update result file mysql-test/suite/rpl/r/rpl_concurrency_error.result: update result file mysql-test/suite/rpl/r/rpl_conditional_comments.result: update result file mysql-test/suite/rpl/r/rpl_create_database.result: update result file mysql-test/suite/rpl/r/rpl_create_if_not_exists.result: update result file mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result: update result file mysql-test/suite/rpl/r/rpl_cross_version.result: Updated result file mysql-test/suite/rpl/r/rpl_current_user.result: update result file mysql-test/suite/rpl/r/rpl_deadlock_innodb.result: update result file mysql-test/suite/rpl/r/rpl_delete_no_where.result: update result file mysql-test/suite/rpl/r/rpl_do_grant.result: updated result file mysql-test/suite/rpl/r/rpl_drop.result: update result file mysql-test/suite/rpl/r/rpl_drop_db.result: update result file mysql-test/suite/rpl/r/rpl_drop_temp.result: update result file mysql-test/suite/rpl/r/rpl_drop_view.result: update result file mysql-test/suite/rpl/r/rpl_dual_pos_advance.result: update result file mysql-test/suite/rpl/r/rpl_empty_master_crash.result: update result file mysql-test/suite/rpl/r/rpl_err_ignoredtable.result: update result file mysql-test/suite/rpl/r/rpl_events.result: update result file mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result: update result file mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result: update result file mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result: update result file mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result: update result file mysql-test/suite/rpl/r/rpl_failed_optimize.result: update result file mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result: update result file mysql-test/suite/rpl/r/rpl_flushlog_loop.result: update result file mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result: update result file mysql-test/suite/rpl/r/rpl_found_rows.result: update result file mysql-test/suite/rpl/r/rpl_free_items.result: update result file mysql-test/suite/rpl/r/rpl_geometry.result: update result file mysql-test/suite/rpl/r/rpl_get_lock.result: update result file mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result: update result file mysql-test/suite/rpl/r/rpl_grant.result: update result file mysql-test/suite/rpl/r/rpl_idempotency.result: update result file mysql-test/suite/rpl/r/rpl_ignore_grant.result: update result file mysql-test/suite/rpl/r/rpl_ignore_revoke.result: update result file mysql-test/suite/rpl/r/rpl_ignore_table.result: update result file mysql-test/suite/rpl/r/rpl_ignore_table_update.result: update result file mysql-test/suite/rpl/r/rpl_incident.result: update result file mysql-test/suite/rpl/r/rpl_init_slave.result: update result file mysql-test/suite/rpl/r/rpl_init_slave_errors.result: update result file mysql-test/suite/rpl/r/rpl_innodb.result: update result file mysql-test/suite/rpl/r/rpl_innodb_bug28430.result: update result file mysql-test/suite/rpl/r/rpl_innodb_bug30888.result: update result file mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result: update result file mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: update result file mysql-test/suite/rpl/r/rpl_insert.result: update result file mysql-test/suite/rpl/r/rpl_insert_id.result: update result file mysql-test/suite/rpl/r/rpl_insert_id_pk.result: update result file mysql-test/suite/rpl/r/rpl_insert_ignore.result: update result file mysql-test/suite/rpl/r/rpl_insert_select.result: update result file mysql-test/suite/rpl/r/rpl_invoked_features.result: update result file mysql-test/suite/rpl/r/rpl_killed_ddl.result: update result file mysql-test/suite/rpl/r/rpl_known_bugs_detection.result: update result file mysql-test/suite/rpl/r/rpl_load_from_master.result: update result file mysql-test/suite/rpl/r/rpl_load_table_from_master.result: update result file mysql-test/suite/rpl/r/rpl_loaddata.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_charset.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_fatal.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_m.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_map.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_s.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_simple.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_symlink.result: update result file mysql-test/suite/rpl/r/rpl_loaddatalocal.result: update result file mysql-test/suite/rpl/r/rpl_loadfile.result: update result file mysql-test/suite/rpl/r/rpl_locale.result: update result file mysql-test/suite/rpl/r/rpl_log_pos.result: update result file mysql-test/suite/rpl/r/rpl_manual_change_index_file.result: update result file mysql-test/suite/rpl/r/rpl_many_optimize.result: update result file mysql-test/suite/rpl/r/rpl_master_pos_wait.result: update result file mysql-test/suite/rpl/r/rpl_misc_functions.result: update result file mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result: update result file mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result: update result file mysql-test/suite/rpl/r/rpl_multi_delete.result: update result file mysql-test/suite/rpl/r/rpl_multi_delete2.result: update result file mysql-test/suite/rpl/r/rpl_multi_engine.result: update result file mysql-test/suite/rpl/r/rpl_multi_update.result: update result file mysql-test/suite/rpl/r/rpl_multi_update2.result: update result file mysql-test/suite/rpl/r/rpl_multi_update3.result: update result file mysql-test/suite/rpl/r/rpl_multi_update4.result: update result file mysql-test/suite/rpl/r/rpl_mysql_upgrade.result: update result file mysql-test/suite/rpl/r/rpl_name_const.result: update result file mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result: update result file mysql-test/suite/rpl/r/rpl_not_null_innodb.result: update result file mysql-test/suite/rpl/r/rpl_not_null_myisam.result: update result file mysql-test/suite/rpl/r/rpl_optimize.result: update result file mysql-test/suite/rpl/r/rpl_packet.result: update result file mysql-test/suite/rpl/r/rpl_plugin_load.result: update result file mysql-test/suite/rpl/r/rpl_ps.result: update result file mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result: update result file mysql-test/suite/rpl/r/rpl_read_only.result: update result file mysql-test/suite/rpl/r/rpl_relay_space_innodb.result: update result file mysql-test/suite/rpl/r/rpl_relay_space_myisam.result: update result file mysql-test/suite/rpl/r/rpl_relayrotate.result: update result file mysql-test/suite/rpl/r/rpl_relayspace.result: update result file mysql-test/suite/rpl/r/rpl_replicate_do.result: update result file mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result: update result file mysql-test/suite/rpl/r/rpl_report.result: update result file mysql-test/suite/rpl/r/rpl_rewrt_db.result: update result file mysql-test/suite/rpl/r/rpl_rotate_logs.result: update result file mysql-test/suite/rpl/r/rpl_row_001.result: update result file mysql-test/suite/rpl/r/rpl_row_4_bytes.result: update result file mysql-test/suite/rpl/r/rpl_row_NOW.result: update result file mysql-test/suite/rpl/r/rpl_row_USER.result: update result file mysql-test/suite/rpl/r/rpl_row_UUID.result: update result file mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: update result file mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result: update result file mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_basic_8partition.result: update result file mysql-test/suite/rpl/r/rpl_row_blob_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_blob_myisam.result: update result file mysql-test/suite/rpl/r/rpl_row_colSize.result: update result file mysql-test/suite/rpl/r/rpl_row_conflicts.result: update result file mysql-test/suite/rpl/r/rpl_row_delayed_ins.result: update result file mysql-test/suite/rpl/r/rpl_row_drop.result: update result file mysql-test/suite/rpl/r/rpl_row_find_row.result: update result file mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result: update result file mysql-test/suite/rpl/r/rpl_row_func001.result: update result file mysql-test/suite/rpl/r/rpl_row_func002.result: update result file mysql-test/suite/rpl/r/rpl_row_func003.result: update result file mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: updated result file mysql-test/suite/rpl/r/rpl_row_insert_delayed.result: update result file mysql-test/suite/rpl/r/rpl_row_log.result: update result file mysql-test/suite/rpl/r/rpl_row_log_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_max_relay_size.result: update result file mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result: update result file mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result: update result file mysql-test/suite/rpl/r/rpl_row_reset_slave.result: update result file mysql-test/suite/rpl/r/rpl_row_sp001.result: update result file mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_sp003.result: update result file mysql-test/suite/rpl/r/rpl_row_sp005.result: update result file mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result: update result file mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_sp008.result: update result file mysql-test/suite/rpl/r/rpl_row_sp009.result: update result file mysql-test/suite/rpl/r/rpl_row_sp010.result: update result file mysql-test/suite/rpl/r/rpl_row_sp011.result: update result file mysql-test/suite/rpl/r/rpl_row_sp012.result: update result file mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result: update result file mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result: update result file mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result: update result file mysql-test/suite/rpl/r/rpl_row_trig001.result: update result file mysql-test/suite/rpl/r/rpl_row_trig002.result: update result file mysql-test/suite/rpl/r/rpl_row_trig003.result: update result file mysql-test/suite/rpl/r/rpl_row_trig004.result: update result file mysql-test/suite/rpl/r/rpl_row_trunc_temp.result: update result file mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result: update result file mysql-test/suite/rpl/r/rpl_row_until.result: update result file mysql-test/suite/rpl/r/rpl_row_view01.result: update result file mysql-test/suite/rpl/r/rpl_row_wide_table.result: update result file mysql-test/suite/rpl/r/rpl_server_id1.result: update result file mysql-test/suite/rpl/r/rpl_server_id2.result: update result file mysql-test/suite/rpl/r/rpl_session_var.result: update result file mysql-test/suite/rpl/r/rpl_set_charset.result: update result file mysql-test/suite/rpl/r/rpl_set_null_innodb.result: update result file mysql-test/suite/rpl/r/rpl_set_null_myisam.result: update result file mysql-test/suite/rpl/r/rpl_show_slave_running.result: update result file mysql-test/suite/rpl/r/rpl_skip_error.result: update result file mysql-test/suite/rpl/r/rpl_slave_grp_exec.result: update result file mysql-test/suite/rpl/r/rpl_slave_load_in.result: update result file mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result: Updated result file mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result: updated result file mysql-test/suite/rpl/r/rpl_slave_skip.result: update result file mysql-test/suite/rpl/r/rpl_slave_status.result: update result file mysql-test/suite/rpl/r/rpl_slow_query_log.result: update result file mysql-test/suite/rpl/r/rpl_sp.result: update result file mysql-test/suite/rpl/r/rpl_sp004.result: update result file mysql-test/suite/rpl/r/rpl_sp_effects.result: update result file mysql-test/suite/rpl/r/rpl_sporadic_master.result: update result file mysql-test/suite/rpl/r/rpl_ssl.result: update result file mysql-test/suite/rpl/r/rpl_ssl1.result: update result file mysql-test/suite/rpl/r/rpl_start_stop_slave.result: update result file mysql-test/suite/rpl/r/rpl_stm_000001.result: update result file mysql-test/suite/rpl/r/rpl_stm_EE_err2.result: updated result file mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result: update result file mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result: update result file mysql-test/suite/rpl/r/rpl_stm_conflicts.result: update result file mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result: update result file mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result: update result file mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result: update result file mysql-test/suite/rpl/r/rpl_stm_loadfile.result: update result file mysql-test/suite/rpl/r/rpl_stm_log.result: update result file mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result: update result file mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result: update result file mysql-test/suite/rpl/r/rpl_stm_multi_query.result: update result file mysql-test/suite/rpl/r/rpl_stm_no_op.result: update result file mysql-test/suite/rpl/r/rpl_stm_reset_slave.result: update result file mysql-test/suite/rpl/r/rpl_stm_sql_mode.result: update result file mysql-test/suite/rpl/r/rpl_stm_until.result: update result file mysql-test/suite/rpl/r/rpl_stop_slave.result: update result file mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result: update result file mysql-test/suite/rpl/r/rpl_temp_table.result: update result file mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result: update result file mysql-test/suite/rpl/r/rpl_temporary.result: update result file mysql-test/suite/rpl/r/rpl_temporary_errors.result: update result file mysql-test/suite/rpl/r/rpl_test_framework.result: updated result file mysql-test/suite/rpl/r/rpl_timezone.result: Updated result file mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result: update result file mysql-test/suite/rpl/r/rpl_trigger.result: update result file mysql-test/suite/rpl/r/rpl_trunc_temp.result: update result file mysql-test/suite/rpl/r/rpl_truncate_2myisam.result: update result file mysql-test/suite/rpl/r/rpl_truncate_3innodb.result: update result file mysql-test/suite/rpl/r/rpl_typeconv_innodb.result: update result file mysql-test/suite/rpl/r/rpl_udf.result: update result file mysql-test/suite/rpl/r/rpl_user.result: update result file mysql-test/suite/rpl/r/rpl_user_variables.result: update result file mysql-test/suite/rpl/r/rpl_variables.result: update result file mysql-test/suite/rpl/r/rpl_variables_stm.result: update result file mysql-test/suite/rpl/r/rpl_view.result: update result file mysql-test/suite/rpl/t/rpl000017-slave.sh: Moved contents of -slave.sh into test. mysql-test/suite/rpl/t/rpl_000010-slave.opt: make all rpl tests use prefix rpl_ mysql-test/suite/rpl/t/rpl_000010.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_000011.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_000013.test: Made test clean up replication state. Replaced save_master_pos/connection slave/sync_with_master by sync_slave_with_master. mysql-test/suite/rpl/t/rpl_000017-slave.opt: make all rpl tests use prefix rpl_ mysql-test/suite/rpl/t/rpl_000017.test: Moved contents of -slave.sh into .test Made test clean up replication state. mysql-test/suite/rpl/t/rpl_EE_err.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_LD_INFILE.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_alter.test: made test clean up after itself replaced rpl_diff_tables by diff_tables cosmetic fixes mysql-test/suite/rpl/t/rpl_alter_db.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_auto_increment.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_auto_increment_11932.test: Made test clean up replication state. don't drop database twice mysql-test/suite/rpl/t/rpl_auto_increment_bug33029.test: - This test replicates, so moved it to rpl suite. - This test uses a fake relay log, so use include/setup_fake_relay_log.inc and cleanup_fake_relay_log.inc instead of ad-hoc code. - Made test clean up replication state (rpl_end.inc) mysql-test/suite/rpl/t/rpl_auto_increment_update_failure.test: - Made test clean up replication state. - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test: renamed rpl_end.inc to master-slave-end.inc mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt: Got rid of useless -master.opt file. mysql-test/suite/rpl/t/rpl_binlog_corruption.test: Made test clean up replication state. Made test execute on slave connection instead of on master connection. This allows us to get rid of -master.opt file. mysql-test/suite/rpl/t/rpl_binlog_errors.test: made test use rpl_restart_server.inc instead of restart_mysqld.inc mysql-test/suite/rpl/t/rpl_binlog_grant.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test: - Made test clean up replication state. - replaced wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error_and_skip.inc - renamed diff_master_slave.inc to rpl_diff.inc and renamed $diff_statement to $rpl_diff_statement mysql-test/suite/rpl/t/rpl_bit.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_bit_npk.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_blackhole.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_bug26395.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_bug31076.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_bug33931.test: Made test clean up replication state. Made test use source include/master-slave.inc instead of ad-hoc setup. mysql-test/suite/rpl/t/rpl_bug38694.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_change_master.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_charset.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_charset_sjis.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf: Use new names of mtr variables (introduced by the changes in include/circular_rpl_init.inc). mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test: - Use rpl_init.inc instead of circular_rpl_for_4_hosts.inc. Connections have been renamed (server_[1234] instead of master_[abcd]), we use rpl_sync.inc instead of circular_rpl_for_4_hosts_sync.inc, we use the new rpl_end.inc to clean up instead of doing it manually, and we use rpl_change_topology.inc instead of manual reconfiguration. - Added comment to make test understandable. - the test contained a race condition. server_4 was not sync'ed. This could cause sql_slave_skip_counter to have the value 1 when the test ended, so check-testcase would complain. Added 'sync_slave_with_master server_4'. mysql-test/suite/rpl/t/rpl_colSize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_commit_after_flush.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_concurrency_error.test: - Made test clean up replication state. - renamed diff_master_slave.inc to rpl_diff.inc and renamed $diff_statement to $rpl_diff_statement mysql-test/suite/rpl/t/rpl_conditional_comments.test: made test clean up after itself new protocol for diff_tables.inc mysql-test/suite/rpl/t/rpl_create_database.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_create_if_not_exists.test: renamed master-slave-end.inc to rpl_end.inc mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test: renamed master-slave-end.inc to rpl_end.inc mysql-test/suite/rpl/t/rpl_critical_errors.test: Made test clean up replication state. Fixed syntax error in test. mysql-test/suite/rpl/t/rpl_cross_version.test: Made test clean up replication state. Made test execute on slave connection instead of on master connection. This allows us to get rid of -master.opt file. mysql-test/suite/rpl/t/rpl_current_user.cnf: use environment variables recognized by rpl_init.inc mysql-test/suite/rpl/t/rpl_current_user.test: - Use rpl_init.inc instead of ad-hoc three-server setup. Hence, rename connection slave2 to server_3 - don't drop lots of things at the beginning of the test - rpl_diff_tables.inc does not sync any more, so we have to sync here instead - renamed $diff_table to $rpl_diff_table and $diff_table_list to $rpl_diff_table_list - use diff_tables.inc instead of rpl_diff_tables.inc mysql-test/suite/rpl/t/rpl_ddl.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_deadlock_innodb.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_delete_no_where.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_do_grant.test: Made test clean up replication state. renamed master-slave-end.inc to rpl_end.inc use include/check_slave_no_error.inc instead of ad-hoc construction mysql-test/suite/rpl/t/rpl_drop.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_drop_db.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_drop_temp.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_drop_view.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_dual_pos_advance.test: Made test use the new framework for circular replication, instead of ad-hoc setup. mysql-test/suite/rpl/t/rpl_empty_master_crash.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_err_ignoredtable.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_events.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_failed_optimize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test: renamed master-slave-end.inc to rpl_end.inc mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt: Removed useless options from -master.opt file. mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh: Removed useless -master.sh file mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt: Removed useless options from -slave.opt file mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh: Removed useless -slave.sh file mysql-test/suite/rpl/t/rpl_flushlog_loop.test: Made test use new framework for circular replication, instead of ad-hoc setup. Made test clean up replication state. mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_found_rows.test: Made test clean up replication state. replaced reset_master_and_slave.inc by rpl_reset.inc mysql-test/suite/rpl/t/rpl_free_items.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_geometry.test: replaced master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_get_lock.test: Made test clean up replication state. Replaced save_master_pos+connection slave+sync_with_master by sync_slave_with_master. mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test: Made test clean up replication state. Removed last part of test, because it was verbatim identical to rpl_server_id1.test mysql-test/suite/rpl/t/rpl_grant.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_idempotency.test: use check_slave_no_error.inc instead of ad-hoc tests use wait_for_slave_sql_error.inc instead of wait_for_slave_to_stop.inc replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_ignore_grant.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ignore_revoke.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ignore_table.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ignore_table_update.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_incident.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_init_slave.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_init_slave_errors.test: Made test clean up replication state. Also replaced call to wait_for_slave_sql_to_stop.inc by call to wait_for_slave_sql_error.inc mysql-test/suite/rpl/t/rpl_innodb.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_innodb_bug28430.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_innodb_bug30888.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_insert.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_insert_id.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_insert_id_pk.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_insert_ignore.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_insert_select.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_invoked_features.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_killed_ddl.test: - Made test clean up replication state. - renamed diff_master_slave.inc to rpl_diff.inc and renamed $diff_statement to $rpl_diff_statement mysql-test/suite/rpl/t/rpl_known_bugs_detection.test: - Made test clean up replication state. - removed wait_for_slave_sql_to_stop.inc, because it already does wait_for_slave_sql_error.inc mysql-test/suite/rpl/t/rpl_load_from_master.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_load_table_from_master.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_loaddata_charset.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_fatal.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_m.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_map.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_s.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_simple.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_symlink.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddatalocal.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loadfile.test: - Made test clean up replication state. - replace reset_master_and_slave.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. - diff_tables.inc also restores the connection to what it was before, so in this test we have to manually change connection after sourcing diff_tables.inc mysql-test/suite/rpl/t/rpl_locale.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_log_pos.test: Made test clean up replication state. replace stop_slave.inc by stop_slave_sql.inc since the io thread is already stopped. mysql-test/suite/rpl/t/rpl_manual_change_index_file.test: use wait_for_slave_io_error.inc instead of wait_for_slave_to_stop.inc replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_many_optimize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_master_pos_wait.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_misc_functions.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_delete.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_delete2.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_engine.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_update.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_multi_update2.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_update3.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_update4.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_mysql_upgrade.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_name_const.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test: - Made test clean up replication state. - diff_tables.inc now takes only one parameter. - diff_tables.inc also restores the connection to what it was before, so in this test we have to manually change connection after sourcing diff_tables.inc mysql-test/suite/rpl/t/rpl_not_null_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_not_null_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_optimize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_packet.test: - Made test clean up replication state. - replace wait_for_slave_io_to_stop.inc by wait_for_slave_io_error.inc - replace master-slave-reset.inc by rpl_reset.inc + drop table t1. - replaced save_master_pos/connection slave/sync_with_master by sync_slave_with_master. - added comment explaining why we need stop_slave_sql.inc (we shouldn't need it, it's a bug) mysql-test/suite/rpl/t/rpl_plugin_load.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_ps.test: Made test clean up replication state. removed lots os useless junk mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_read_only.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_relay_space_innodb.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_relay_space_myisam.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_relayrotate.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_relayspace.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_replicate_do.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_report.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_rewrt_db.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt: Got rid of unnecessary -slave.opt file mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh: Got rid of unnecessary -slave.sh file mysql-test/suite/rpl/t/rpl_rotate_logs.test: - Made test clean up replication state. - replaced wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error_and_skip.inc - removed useless cleanup at beginning of test - did not make test use the standard replication framework (master-slave.inc + rpl_end.inc), because it won't work. i don't know why. mysql-test/suite/rpl/t/rpl_row_001.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_4_bytes.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_NOW.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_USER.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_UUID.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test: Made test clean up replication state. Removed unnecessary 'set binlog_format'. replaced master-slave-reset.inc by rpl_reset.inc mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_basic_8partition.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_blob_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_blob_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_colSize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_conflicts.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_row_create_table.test: replace master-slave-end.inc by rpl_end.inc replace master-slave-reset.inc by rpl_reset.inc replace long sequence of reset master+reset slave by rpl_reset.inc mysql-test/suite/rpl/t/rpl_row_delayed_ins.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_row_drop.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_find_row.test: - Made test clean up replication state. - replace master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_row_func001.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_func002.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_func003.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test: Made test clean up replication state. replace wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error.inc mysql-test/suite/rpl/t/rpl_row_insert_delayed.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_log.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_log_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test: Made test clean up replication state mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test: - replace master-slave-reset.inc by rpl_reset.inc - Made test clean up replication state - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_row_sp001.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_row_sp003.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp005.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_row_sp008.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp009.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp010.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp011.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp012.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test: - replaced master-slave-reset.inc by rpl_reset.inc - replaced master-slave-end.inc by rpl_end.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_row_trig001.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_trig002.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_trig003.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_trig004.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_trunc_temp.test: replaced master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_until.test: Made test clean up replication state. Removed unused mtr variable $VERSION. mysql-test/suite/rpl/t/rpl_row_view01.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_wide_table.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_server_id1.test: - Replaced ad-hoc setup of circular replication by call to rpl_init.inc - Made test clean up replication state. - Replaced ad-hoc use of wait_for_slave_param.inc by wait_for_slave_io_error.inc mysql-test/suite/rpl/t/rpl_server_id2.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_session_var.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_set_charset.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_set_null_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_set_null_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_show_slave_running.test: made test clean up replication state mysql-test/suite/rpl/t/rpl_skip_error.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_slave_grp_exec.test: - Made test clean up replication state. - replaced wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error.inc - replaced stop_slave.inc by stop_slave_io.inc where the sql thread was already stopped. mysql-test/suite/rpl/t/rpl_slave_load_in.test: - Made test clean up replication state. - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test: - Made test clean up replication state. - Replaced call to wait_for_slave_sql_to_stop.inc by call to wait_for_slave_sql_error.inc - Replaced ad-hoc repliction setup by call to master-slave.inc mysql-test/suite/rpl/t/rpl_slave_skip.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_slave_status.test: Made test clean up replication state. replaced check that IO thread has stopped by wait_for_slave_io_error.inc simplified cleanup code mysql-test/suite/rpl/t/rpl_slow_query_log.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_sp.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_sp004.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_sp_effects.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_sporadic_master.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ssl.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ssl1.test: Made test clean up replication state. Replaced save_master_pos+connection slave+sync_slave_with_master by sync_slave_with_master mysql-test/suite/rpl/t/rpl_start_stop_slave.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_000001.test: The include file extra/rpl_tests/rpl_stm_000001.test was only sourced once, in suite/rpl/t/rpl_stm_000001.test. Moved extra/rpl_tests/rpl_stm_000001.test to suite/rpl/t/rpl_stm_000001.test and removed the old suite/rpl/t/rpl_stm_000001.test. Also made test clean up replication state, and replaced wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error_and_skip.inc mysql-test/suite/rpl/t/rpl_stm_000001.test: - The include file extra/rpl_tests/rpl_stm_000001.test was only sourced once, in suite/rpl/t/rpl_stm_000001.test. Moved extra/rpl_tests/rpl_stm_000001.test to suite/rpl/t/rpl_stm_000001.test and removed the old suite/rpl/t/rpl_stm_000001.test. mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_conflicts.test: replaced master-slave-end.inc by rpl_end.inc cosmetic fixes mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test: use rpl_end instead of master-slave-end. mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_loadfile.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_log.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test: - replaced master-slave-end.inc by rpl_end.inc - replaced master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_stm_multi_query.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_stm_no_op.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_sql_mode.test: made test clean up replication state mysql-test/suite/rpl/t/rpl_stm_until.test: - Made test clean up replication state. - replaced master-slave-reset.inc by rpl_reset.inc - the relay log is now called slave-relay-bin.000003 instead of .000004, because master-slave.inc doesn't rotate it as much as before. mysql-test/suite/rpl/t/rpl_stop_slave.test: use rpl_end instead of master-slav-end mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_temp_table.test: Made test clean up replication state. Replaced save_master_pos/connection slave/sync_with_master by sync_slave_with_master. mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test: Made test clean up replication state. replaced ad-hoc call to 'connect' by include/rpl_connect.inc replaced master-slave-reset.inc by rpl_reset.inc mysql-test/suite/rpl/t/rpl_temporary.test: - Made test clean up replication state. - This test sources include/delete_anonymous_users.inc on master. This means it updates the user table in the mysql database manually on the master. This causes failure in the slave sql thread when binlog_format=row. Hence, we stop the slave first and source include/delete_anonymous_users.inc on both master and slave. mysql-test/suite/rpl/t/rpl_temporary_errors.test: Made test clean up replication state. cosmetic fixes mysql-test/suite/rpl/t/rpl_test_framework.cnf: new cfg file for new test mysql-test/suite/rpl/t/rpl_test_framework.test: new test case that verifies that include/rpl_change_topology.inc works mysql-test/suite/rpl/t/rpl_timezone.test: - Made test clean up replication state. - stop slave before last sub-test, because that test does not use the slave connection. mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_trigger.test: - Made test clean up replication state. - replace master-slave-reset.inc by rpl_reset.inc - use new file rpl_reconnect.inc instead of ad-hoc code - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_trunc_temp.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_truncate_2myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_truncate_3innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_typeconv_innodb.test: - made test clean up replication state - removed unnecessary call to master-slave-reset.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_udf.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_user.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_user_variables.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_variables.test: - Made test clean up replication state. - replaced reset_master_and_slave.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_variables_stm.test: - Made test clean up replication state. - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_view.test: Made test clean up replication state. mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result: updated result file mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test: - replaced master-slave-end.inc by rpl_end.inc - removed wait_for_slave_sql_to_stop since it is followed by wait_for_slave_sql_error.inc mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test: made test use rpl_init.inc to setup circular replication, instead of ad-hoc setup made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf: removed automatic configuration of server as slave. this is not needed because rpl_init.inc does it. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test: - made test clean up replication state - it seems that sync_slave_with_master does not work deterministically here, so instead we wait for 'drop table' to replicate by checking when the table disappears on slave. - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test: make test clean up replication state use rpl_change_topology.inc to reconfigure replication topology, instead of ad-hoc call to change master mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test: - replace master-slave-end.inc by rpl_end.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test: - make test clean up replication state - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test: - make test clean up replication state - use rpl_change_topology.inc to change replication topology, instead of ad-hoc calls to change master mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test: make test clean up replication state mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: made test clean up after itself mysql-test/t/init_file.test: use new file force_restart.inc instead of SP --- client/mysqltest.cc | 78 ++++- mysql-test/extra/rpl_tests/rpl_EE_err.test | 9 +- .../extra/rpl_tests/rpl_auto_increment.test | 26 +- .../rpl_auto_increment_insert_view.test | 3 +- .../rpl_auto_increment_invoke_trigger.test | 9 +- .../rpl_autoinc_func_invokes_trigger.test | 6 +- mysql-test/extra/rpl_tests/rpl_charset.test | 6 +- .../rpl_tests/rpl_commit_after_flush.test | 8 +- mysql-test/extra/rpl_tests/rpl_conflicts.test | 11 +- mysql-test/extra/rpl_tests/rpl_ddl.test | 11 - mysql-test/extra/rpl_tests/rpl_deadlock.test | 1 + ...ter_Col.test => rpl_extra_col_master.test} | 22 -- ...lave_Col.test => rpl_extra_col_slave.test} | 33 +- .../extra/rpl_tests/rpl_failed_optimize.test | 3 +- mysql-test/extra/rpl_tests/rpl_flsh_tbls.test | 3 +- .../extra/rpl_tests/rpl_foreign_key.test | 4 +- .../rpl_get_master_version_and_clock.test | 42 +-- mysql-test/extra/rpl_tests/rpl_insert_id.test | 28 +- .../extra/rpl_tests/rpl_insert_id_pk.test | 20 +- mysql-test/extra/rpl_tests/rpl_loaddata.test | 62 ++-- mysql-test/extra/rpl_tests/rpl_log.test | 2 +- .../extra/rpl_tests/rpl_max_relay_size.test | 4 +- .../extra/rpl_tests/rpl_multi_query.test | 6 +- .../extra/rpl_tests/rpl_multi_update.test | 7 +- .../extra/rpl_tests/rpl_ndb_apply_status.test | 2 +- mysql-test/extra/rpl_tests/rpl_not_null.test | 14 +- .../extra/rpl_tests/rpl_record_compare.test | 15 +- .../extra/rpl_tests/rpl_reset_slave.test | 11 +- mysql-test/extra/rpl_tests/rpl_row_UUID.test | 2 - mysql-test/extra/rpl_tests/rpl_row_basic.test | 60 ++-- .../extra/rpl_tests/rpl_row_delayed_ins.test | 5 +- mysql-test/extra/rpl_tests/rpl_row_sp002.test | 56 +--- mysql-test/extra/rpl_tests/rpl_row_sp007.test | 25 +- mysql-test/extra/rpl_tests/rpl_set_null.test | 16 +- .../extra/rpl_tests/rpl_stm_000001.test | 131 -------- .../extra/rpl_tests/rpl_stm_EE_err2.test | 5 + .../rpl_stm_create_if_not_exists.test | 73 +++-- .../extra/rpl_tests/rpl_stop_slave.test | 3 +- .../extra/rpl_tests/rpl_sv_relay_space.test | 11 +- .../extra/rpl_tests/rpl_test_framework.inc | 86 ++++++ mysql-test/extra/rpl_tests/rpl_truncate.test | 7 +- .../extra/rpl_tests/rpl_truncate_helper.test | 8 +- .../include/analyze-sync_with_master.test | 13 +- mysql-test/include/assert.inc | 175 +++++++++++ mysql-test/include/begin_include_file.inc | 82 +++++ mysql-test/include/check-testcase.test | 6 +- mysql-test/include/check_slave_is_running.inc | 30 +- mysql-test/include/check_slave_no_error.inc | 22 +- mysql-test/include/check_slave_param.inc | 26 +- .../include/circular_rpl_for_4_hosts_init.inc | 130 -------- .../include/circular_rpl_for_4_hosts_sync.inc | 23 -- mysql-test/include/cleanup_fake_relay_log.inc | 24 +- mysql-test/include/diff_master_slave.inc | 21 -- mysql-test/include/diff_tables.inc | 204 +++++++++---- mysql-test/include/end_include_file.inc | 79 +++++ mysql-test/include/file_does_not_exist.inc | 17 ++ mysql-test/include/force_restart.inc | 17 ++ .../include/force_restart_if_skipped.inc | 17 ++ mysql-test/include/have_innodb.inc | 8 +- mysql-test/include/io_thd_fault_injection.inc | 4 +- .../kill_query_and_diff_master_slave.inc | 8 +- mysql-test/include/master-slave-end.inc | 6 - mysql-test/include/master-slave-reset.inc | 36 --- mysql-test/include/master-slave.inc | 69 ++++- mysql-test/include/mtr_check.sql | 10 - mysql-test/include/mysqldump.inc | 3 +- mysql-test/include/ndb_master-slave.inc | 10 +- mysql-test/include/ndb_master-slave_2ch.inc | 163 +++------- mysql-test/include/ndb_not_readonly.inc | 6 + mysql-test/include/report-features.test | 2 +- mysql-test/include/reset_master_and_slave.inc | 8 - mysql-test/include/restart_mysqld.inc | 8 + mysql-test/include/rpl_change_topology.inc | 248 +++++++++++++++ mysql-test/include/rpl_connect.inc | 58 ++++ mysql-test/include/rpl_connection.inc | 47 +++ mysql-test/include/rpl_diff.inc | 118 ++++++++ mysql-test/include/rpl_diff_tables.inc | 36 --- mysql-test/include/rpl_end.inc | 103 +++++++ mysql-test/include/rpl_for_each_slave.inc | 39 +++ .../include/rpl_generate_sync_chain.inc | 122 ++++++++ mysql-test/include/rpl_init.inc | 242 +++++++++++++++ mysql-test/include/rpl_reconnect.inc | 132 ++++++++ mysql-test/include/rpl_reset.inc | 81 +++++ mysql-test/include/rpl_restart_server.inc | 39 +++ mysql-test/include/rpl_start_server.inc | 54 ++++ mysql-test/include/rpl_start_slaves.inc | 32 ++ mysql-test/include/rpl_stop_server.inc | 63 ++++ mysql-test/include/rpl_stop_slaves.inc | 33 ++ mysql-test/include/rpl_sync.inc | 153 ++++++++++ mysql-test/include/save_master_pos.inc | 33 ++ mysql-test/include/setup_fake_relay_log.inc | 50 ++- mysql-test/include/show_rpl_debug_info.inc | 133 ++++---- mysql-test/include/show_slave_status.inc | 82 ++++- mysql-test/include/start_slave.inc | 32 +- mysql-test/include/stop_slave.inc | 89 +++++- mysql-test/include/stop_slave_io.inc | 43 +++ mysql-test/include/stop_slave_sql.inc | 41 +++ mysql-test/include/sync_io_with_master.inc | 46 +++ .../include/sync_slave_io_with_master.inc | 50 +-- mysql-test/include/sync_slave_sql_with_io.inc | 50 +++ mysql-test/include/wait_for_query_to_fail.inc | 25 ++ .../include/wait_for_slave_io_error.inc | 88 ++++-- .../include/wait_for_slave_io_to_start.inc | 27 +- .../include/wait_for_slave_io_to_stop.inc | 50 +-- mysql-test/include/wait_for_slave_param.inc | 121 +++++--- .../include/wait_for_slave_sql_error.inc | 68 +++-- .../wait_for_slave_sql_error_and_skip.inc | 64 ++-- .../include/wait_for_slave_sql_to_start.inc | 30 +- .../include/wait_for_slave_sql_to_stop.inc | 50 +-- .../include/wait_for_slave_to_start.inc | 30 +- mysql-test/include/wait_for_slave_to_stop.inc | 46 +-- mysql-test/include/write_var_to_file.inc | 57 ++++ mysql-test/mysql-test-run.pl | 14 +- mysql-test/r/init_file.result | 1 - mysql-test/r/mysqldump_restore.result | 10 +- .../r/binlog_auto_increment_bug33029.result | 42 --- .../r/binlog_drop_if_exists.result} | 0 .../suite/binlog/r/binlog_old_versions.result | 1 - .../r/binlog_query_filter_rules.result} | 0 .../r/binlog_server_id.result} | 0 .../r/binlog_sf.result} | 0 .../suite/binlog/r/binlog_sql_mode.result | 8 +- .../binlog_auto_increment_bug33029-master.opt | 1 - .../t/binlog_drop_if_exists.test} | 0 .../suite/binlog/t/binlog_old_versions.test | 4 +- .../t/binlog_query_filter_rules-master.opt} | 0 .../t/binlog_query_filter_rules.test} | 0 .../t/binlog_server_id.test} | 0 .../t/rpl_sf.test => binlog/t/binlog_sf.test} | 4 + .../suite/binlog/t/binlog_sql_mode.test | 5 +- mysql-test/suite/bugs/t/rpl_bug12691.test | 4 +- mysql-test/suite/bugs/t/rpl_bug23533.test | 9 +- mysql-test/suite/bugs/t/rpl_bug31582.test | 2 +- mysql-test/suite/bugs/t/rpl_bug31583.test | 2 +- mysql-test/suite/bugs/t/rpl_bug33029.test | 1 + mysql-test/suite/bugs/t/rpl_bug36391.test | 3 +- mysql-test/suite/bugs/t/rpl_bug37426.test | 3 +- mysql-test/suite/bugs/t/rpl_bug38205.test | 2 +- .../suite/manual/t/rpl_replication_delay.test | 12 +- .../suite/ndb_team/t/rpl_ndb_dd_advance.test | 8 +- .../ndb_team/t/rpl_ndb_extraColMaster.test | 2 + .../suite/ndb_team/t/rpl_ndb_mix_innodb.test | 3 +- mysql-test/suite/parts/r/rpl_partition.result | 21 +- mysql-test/suite/parts/t/rpl_partition.test | 18 +- .../suite/rpl/include/rpl_mixed_ddl.inc | 3 +- .../suite/rpl/include/rpl_mixed_dml.inc | 3 +- mysql-test/suite/rpl/r/rpl000011.result | 16 - .../r/{rpl000010.result => rpl_000010.result} | 9 +- mysql-test/suite/rpl/r/rpl_000011.result | 13 + .../r/{rpl000013.result => rpl_000013.result} | 9 +- .../r/{rpl000017.result => rpl_000017.result} | 13 +- mysql-test/suite/rpl/r/rpl_EE_err.result | 9 +- mysql-test/suite/rpl/r/rpl_LD_INFILE.result | 9 +- mysql-test/suite/rpl/r/rpl_alter.result | 14 +- mysql-test/suite/rpl/r/rpl_alter_db.result | 9 +- .../suite/rpl/r/rpl_auto_increment.result | 24 +- .../rpl/r/rpl_auto_increment_11932.result | 10 +- .../rpl/r/rpl_auto_increment_bug33029.result | 45 +++ .../rpl_auto_increment_update_failure.result | 65 ++-- .../rpl/r/rpl_begin_commit_rollback.result | 12 +- .../suite/rpl/r/rpl_binlog_corruption.result | 9 +- .../suite/rpl/r/rpl_binlog_errors.result | 40 +-- .../suite/rpl/r/rpl_binlog_grant.result | 9 +- .../rpl/r/rpl_binlog_max_cache_size.result | 34 +-- mysql-test/suite/rpl/r/rpl_bit.result | 9 +- mysql-test/suite/rpl/r/rpl_bit_npk.result | 9 +- mysql-test/suite/rpl/r/rpl_blackhole.result | 9 +- mysql-test/suite/rpl/r/rpl_bug26395.result | 10 +- mysql-test/suite/rpl/r/rpl_bug31076.result | 9 +- mysql-test/suite/rpl/r/rpl_bug33931.result | 10 +- mysql-test/suite/rpl/r/rpl_bug38694.result | 9 +- .../suite/rpl/r/rpl_change_master.result | 10 +- mysql-test/suite/rpl/r/rpl_charset.result | 11 +- .../suite/rpl/r/rpl_charset_sjis.result | 9 +- .../rpl/r/rpl_circular_for_4_hosts.result | 80 +---- mysql-test/suite/rpl/r/rpl_colSize.result | 9 +- .../suite/rpl/r/rpl_commit_after_flush.result | 9 +- .../suite/rpl/r/rpl_concurrency_error.result | 13 +- .../rpl/r/rpl_conditional_comments.result | 15 +- .../suite/rpl/r/rpl_create_database.result | 9 +- .../rpl/r/rpl_create_if_not_exists.result | 9 +- .../rpl_create_tmp_table_if_not_exists.result | 9 +- .../suite/rpl/r/rpl_cross_version.result | 11 +- .../suite/rpl/r/rpl_current_user.result | 86 +++--- .../suite/rpl/r/rpl_deadlock_innodb.result | 17 +- .../suite/rpl/r/rpl_delete_no_where.result | 9 +- mysql-test/suite/rpl/r/rpl_do_grant.result | 45 +-- mysql-test/suite/rpl/r/rpl_drop.result | 10 +- mysql-test/suite/rpl/r/rpl_drop_db.result | 10 +- mysql-test/suite/rpl/r/rpl_drop_temp.result | 9 +- mysql-test/suite/rpl/r/rpl_drop_view.result | 9 +- .../suite/rpl/r/rpl_dual_pos_advance.result | 18 +- .../suite/rpl/r/rpl_empty_master_crash.result | 9 +- .../suite/rpl/r/rpl_err_ignoredtable.result | 9 +- mysql-test/suite/rpl/r/rpl_events.result | 9 +- ...ult => rpl_extra_col_master_innodb.result} | 87 +++--- ...ult => rpl_extra_col_master_myisam.result} | 87 +++--- ...sult => rpl_extra_col_slave_innodb.result} | 59 ++-- ...sult => rpl_extra_col_slave_myisam.result} | 59 ++-- .../suite/rpl/r/rpl_failed_optimize.result | 9 +- .../rpl/r/rpl_filter_tables_not_exist.result | 105 +++---- .../suite/rpl/r/rpl_flushlog_loop.result | 22 +- .../suite/rpl/r/rpl_foreign_key_innodb.result | 9 +- mysql-test/suite/rpl/r/rpl_found_rows.result | 15 +- mysql-test/suite/rpl/r/rpl_free_items.result | 9 +- mysql-test/suite/rpl/r/rpl_geometry.result | 9 +- mysql-test/suite/rpl/r/rpl_get_lock.result | 9 +- .../r/rpl_get_master_version_and_clock.result | 31 +- mysql-test/suite/rpl/r/rpl_grant.result | 9 +- mysql-test/suite/rpl/r/rpl_idempotency.result | 39 +-- .../suite/rpl/r/rpl_ignore_grant.result | 9 +- .../suite/rpl/r/rpl_ignore_revoke.result | 9 +- .../suite/rpl/r/rpl_ignore_table.result | 10 +- .../rpl/r/rpl_ignore_table_update.result | 9 +- mysql-test/suite/rpl/r/rpl_incident.result | 14 +- mysql-test/suite/rpl/r/rpl_init_slave.result | 10 +- .../suite/rpl/r/rpl_init_slave_errors.result | 18 +- mysql-test/suite/rpl/r/rpl_innodb.result | 9 +- .../suite/rpl/r/rpl_innodb_bug28430.result | 9 +- .../suite/rpl/r/rpl_innodb_bug30888.result | 9 +- .../suite/rpl/r/rpl_innodb_mixed_ddl.result | 9 +- .../suite/rpl/r/rpl_innodb_mixed_dml.result | 9 +- mysql-test/suite/rpl/r/rpl_insert.result | 9 +- mysql-test/suite/rpl/r/rpl_insert_id.result | 10 +- .../suite/rpl/r/rpl_insert_id_pk.result | 9 +- .../suite/rpl/r/rpl_insert_ignore.result | 9 +- .../suite/rpl/r/rpl_insert_select.result | 9 +- .../suite/rpl/r/rpl_invoked_features.result | 9 +- mysql-test/suite/rpl/r/rpl_killed_ddl.result | 59 ++-- .../rpl/r/rpl_known_bugs_detection.result | 19 +- .../suite/rpl/r/rpl_load_from_master.result | 9 +- .../rpl/r/rpl_load_table_from_master.result | 9 +- mysql-test/suite/rpl/r/rpl_loaddata.result | 47 +-- .../suite/rpl/r/rpl_loaddata_charset.result | 9 +- .../rpl/r/rpl_loaddata_concurrent.result | 47 +-- .../suite/rpl/r/rpl_loaddata_fatal.result | 15 +- mysql-test/suite/rpl/r/rpl_loaddata_m.result | 9 +- .../suite/rpl/r/rpl_loaddata_map.result | 9 +- mysql-test/suite/rpl/r/rpl_loaddata_s.result | 9 +- .../suite/rpl/r/rpl_loaddata_simple.result | 9 +- .../suite/rpl/r/rpl_loaddata_symlink.result | 9 +- .../suite/rpl/r/rpl_loaddatalocal.result | 9 +- mysql-test/suite/rpl/r/rpl_loadfile.result | 17 +- mysql-test/suite/rpl/r/rpl_locale.result | 9 +- mysql-test/suite/rpl/r/rpl_log_pos.result | 16 +- .../rpl/r/rpl_manual_change_index_file.result | 14 +- .../suite/rpl/r/rpl_many_optimize.result | 9 +- .../suite/rpl/r/rpl_master_pos_wait.result | 9 +- .../suite/rpl/r/rpl_misc_functions.result | 9 +- .../suite/rpl/r/rpl_mixed_bit_pk.result | 9 +- .../suite/rpl/r/rpl_mixed_ddl_dml.result | 9 +- .../suite/rpl/r/rpl_multi_delete.result | 9 +- .../suite/rpl/r/rpl_multi_delete2.result | 9 +- .../suite/rpl/r/rpl_multi_engine.result | 9 +- .../suite/rpl/r/rpl_multi_update.result | 9 +- .../suite/rpl/r/rpl_multi_update2.result | 9 +- .../suite/rpl/r/rpl_multi_update3.result | 9 +- .../suite/rpl/r/rpl_multi_update4.result | 9 +- .../suite/rpl/r/rpl_mysql_upgrade.result | 10 +- mysql-test/suite/rpl/r/rpl_name_const.result | 9 +- .../r/rpl_nondeterministic_functions.result | 11 +- .../suite/rpl/r/rpl_not_null_innodb.result | 17 +- .../suite/rpl/r/rpl_not_null_myisam.result | 17 +- mysql-test/suite/rpl/r/rpl_optimize.result | 9 +- mysql-test/suite/rpl/r/rpl_packet.result | 31 +- mysql-test/suite/rpl/r/rpl_plugin_load.result | 9 +- mysql-test/suite/rpl/r/rpl_ps.result | 37 +-- mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result | 9 +- mysql-test/suite/rpl/r/rpl_read_only.result | 9 +- .../suite/rpl/r/rpl_relay_space_innodb.result | 9 +- .../suite/rpl/r/rpl_relay_space_myisam.result | 9 +- mysql-test/suite/rpl/r/rpl_relayrotate.result | 9 +- mysql-test/suite/rpl/r/rpl_relayspace.result | 10 +- .../suite/rpl/r/rpl_replicate_do.result | 11 +- .../rpl/r/rpl_replicate_ignore_db.result | 9 +- mysql-test/suite/rpl/r/rpl_report.result | 9 +- mysql-test/suite/rpl/r/rpl_rewrt_db.result | 9 +- mysql-test/suite/rpl/r/rpl_rotate_logs.result | 25 +- mysql-test/suite/rpl/r/rpl_row_001.result | 9 +- mysql-test/suite/rpl/r/rpl_row_4_bytes.result | 9 +- mysql-test/suite/rpl/r/rpl_row_NOW.result | 9 +- mysql-test/suite/rpl/r/rpl_row_USER.result | 9 +- mysql-test/suite/rpl/r/rpl_row_UUID.result | 9 +- .../suite/rpl/r/rpl_row_basic_11bugs.result | 45 +-- .../suite/rpl/r/rpl_row_basic_2myisam.result | 57 ++-- .../suite/rpl/r/rpl_row_basic_3innodb.result | 57 ++-- .../rpl/r/rpl_row_basic_8partition.result | 9 +- .../suite/rpl/r/rpl_row_blob_innodb.result | 9 +- .../suite/rpl/r/rpl_row_blob_myisam.result | 9 +- mysql-test/suite/rpl/r/rpl_row_colSize.result | 48 +-- .../suite/rpl/r/rpl_row_conflicts.result | 17 +- .../suite/rpl/r/rpl_row_delayed_ins.result | 9 +- mysql-test/suite/rpl/r/rpl_row_drop.result | 9 +- .../suite/rpl/r/rpl_row_find_row.result | 25 +- .../suite/rpl/r/rpl_row_flsh_tbls.result | 11 +- mysql-test/suite/rpl/r/rpl_row_func001.result | 9 +- mysql-test/suite/rpl/r/rpl_row_func002.result | 9 +- mysql-test/suite/rpl/r/rpl_row_func003.result | 9 +- .../suite/rpl/r/rpl_row_inexist_tbl.result | 14 +- .../suite/rpl/r/rpl_row_insert_delayed.result | 9 +- mysql-test/suite/rpl/r/rpl_row_log.result | 18 +- .../suite/rpl/r/rpl_row_log_innodb.result | 18 +- .../suite/rpl/r/rpl_row_max_relay_size.result | 19 +- .../suite/rpl/r/rpl_row_mysqlbinlog.result | 9 +- .../rpl/r/rpl_row_rec_comp_innodb.result | 36 +-- .../rpl/r/rpl_row_rec_comp_myisam.result | 45 +-- .../suite/rpl/r/rpl_row_reset_slave.result | 34 ++- mysql-test/suite/rpl/r/rpl_row_sp001.result | 9 +- .../suite/rpl/r/rpl_row_sp002_innodb.result | 27 +- mysql-test/suite/rpl/r/rpl_row_sp003.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp005.result | 9 +- .../suite/rpl/r/rpl_row_sp006_InnoDB.result | 9 +- .../suite/rpl/r/rpl_row_sp007_innodb.result | 15 +- mysql-test/suite/rpl/r/rpl_row_sp008.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp009.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp010.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp011.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp012.result | 9 +- .../rpl/r/rpl_row_stop_middle_update.result | 11 +- .../rpl/r/rpl_row_tabledefs_2myisam.result | 31 +- .../rpl/r/rpl_row_tabledefs_3innodb.result | 31 +- .../suite/rpl/r/rpl_row_tbl_metadata.result | 38 +-- mysql-test/suite/rpl/r/rpl_row_trig001.result | 9 +- mysql-test/suite/rpl/r/rpl_row_trig002.result | 9 +- mysql-test/suite/rpl/r/rpl_row_trig003.result | 9 +- mysql-test/suite/rpl/r/rpl_row_trig004.result | 9 +- .../suite/rpl/r/rpl_row_trunc_temp.result | 9 +- .../suite/rpl/r/rpl_row_unsafe_funcs.result | 9 +- mysql-test/suite/rpl/r/rpl_row_until.result | 21 +- mysql-test/suite/rpl/r/rpl_row_view01.result | 9 +- .../suite/rpl/r/rpl_row_wide_table.result | 9 +- mysql-test/suite/rpl/r/rpl_server_id1.result | 20 +- mysql-test/suite/rpl/r/rpl_server_id2.result | 11 +- mysql-test/suite/rpl/r/rpl_session_var.result | 9 +- mysql-test/suite/rpl/r/rpl_set_charset.result | 9 +- .../suite/rpl/r/rpl_set_null_innodb.result | 31 +- .../suite/rpl/r/rpl_set_null_myisam.result | 31 +- .../suite/rpl/r/rpl_show_slave_running.result | 11 +- mysql-test/suite/rpl/r/rpl_skip_error.result | 13 +- .../suite/rpl/r/rpl_slave_grp_exec.result | 18 +- .../suite/rpl/r/rpl_slave_load_in.result | 13 +- .../r/rpl_slave_load_remove_tmpfile.result | 13 +- .../r/rpl_slave_load_tmpdir_not_exist.result | 11 +- mysql-test/suite/rpl/r/rpl_slave_skip.result | 13 +- .../suite/rpl/r/rpl_slave_status.result | 16 +- .../suite/rpl/r/rpl_slow_query_log.result | 16 +- mysql-test/suite/rpl/r/rpl_sp.result | 9 +- mysql-test/suite/rpl/r/rpl_sp004.result | 9 +- mysql-test/suite/rpl/r/rpl_sp_effects.result | 9 +- .../suite/rpl/r/rpl_sporadic_master.result | 9 +- mysql-test/suite/rpl/r/rpl_ssl.result | 41 +-- mysql-test/suite/rpl/r/rpl_ssl1.result | 53 ++-- .../suite/rpl/r/rpl_start_stop_slave.result | 11 +- mysql-test/suite/rpl/r/rpl_stm_000001.result | 12 +- mysql-test/suite/rpl/r/rpl_stm_EE_err2.result | 12 +- .../r/rpl_stm_auto_increment_bug33029.result | 9 +- .../suite/rpl/r/rpl_stm_binlog_direct.result | 9 +- .../suite/rpl/r/rpl_stm_conflicts.result | 11 +- .../rpl/r/rpl_stm_create_if_not_exists.result | 29 +- .../suite/rpl/r/rpl_stm_flsh_tbls.result | 11 +- .../suite/rpl/r/rpl_stm_insert_delayed.result | 9 +- .../suite/rpl/r/rpl_stm_loadfile.result | 9 +- mysql-test/suite/rpl/r/rpl_stm_log.result | 18 +- .../suite/rpl/r/rpl_stm_max_relay_size.result | 19 +- .../suite/rpl/r/rpl_stm_mixing_engines.result | 18 +- .../suite/rpl/r/rpl_stm_multi_query.result | 11 +- mysql-test/suite/rpl/r/rpl_stm_no_op.result | 9 +- .../suite/rpl/r/rpl_stm_reset_slave.result | 34 ++- .../suite/rpl/r/rpl_stm_sql_mode.result | 9 +- mysql-test/suite/rpl/r/rpl_stm_until.result | 37 +-- mysql-test/suite/rpl/r/rpl_stop_slave.result | 25 +- .../rpl/r/rpl_switch_stm_row_mixed.result | 9 +- mysql-test/suite/rpl/r/rpl_temp_table.result | 9 +- .../suite/rpl/r/rpl_temp_table_mix_row.result | 20 +- mysql-test/suite/rpl/r/rpl_temporary.result | 12 +- .../suite/rpl/r/rpl_temporary_errors.result | 14 +- .../suite/rpl/r/rpl_test_framework.result | 170 +++++++++++ mysql-test/suite/rpl/r/rpl_timezone.result | 10 +- .../suite/rpl/r/rpl_tmp_table_and_DDL.result | 9 +- mysql-test/suite/rpl/r/rpl_trigger.result | 24 +- mysql-test/suite/rpl/r/rpl_trunc_temp.result | 9 +- .../suite/rpl/r/rpl_truncate_2myisam.result | 29 +- .../suite/rpl/r/rpl_truncate_3innodb.result | 29 +- .../suite/rpl/r/rpl_typeconv_innodb.result | 16 +- mysql-test/suite/rpl/r/rpl_udf.result | 9 +- mysql-test/suite/rpl/r/rpl_user.result | 9 +- .../suite/rpl/r/rpl_user_variables.result | 10 +- mysql-test/suite/rpl/r/rpl_variables.result | 26 +- .../suite/rpl/r/rpl_variables_stm.result | 19 +- mysql-test/suite/rpl/r/rpl_view.result | 9 +- mysql-test/suite/rpl/t/rpl000017-slave.sh | 12 - mysql-test/suite/rpl/t/rpl000017.test | 22 -- ...l000010-slave.opt => rpl_000010-slave.opt} | 0 .../rpl/t/{rpl000010.test => rpl_000010.test} | 1 + .../rpl/t/{rpl000011.test => rpl_000011.test} | 1 + .../rpl/t/{rpl000013.test => rpl_000013.test} | 10 +- ...l000017-slave.opt => rpl_000017-slave.opt} | 0 mysql-test/suite/rpl/t/rpl_000017.test | 48 +++ mysql-test/suite/rpl/t/rpl_EE_err.test | 4 - mysql-test/suite/rpl/t/rpl_LD_INFILE.test | 1 + mysql-test/suite/rpl/t/rpl_alter.test | 15 +- mysql-test/suite/rpl/t/rpl_alter_db.test | 1 + .../suite/rpl/t/rpl_auto_increment.test | 4 - .../suite/rpl/t/rpl_auto_increment_11932.test | 2 +- .../t/rpl_auto_increment_bug33029.test} | 51 ++-- .../t/rpl_auto_increment_update_failure.test | 13 +- .../rpl/t/rpl_begin_commit_rollback.test | 2 +- .../rpl/t/rpl_binlog_corruption-master.opt | 1 - .../suite/rpl/t/rpl_binlog_corruption.test | 9 +- mysql-test/suite/rpl/t/rpl_binlog_errors.test | 24 +- mysql-test/suite/rpl/t/rpl_binlog_grant.test | 1 + .../rpl/t/rpl_binlog_max_cache_size.test | 56 ++-- mysql-test/suite/rpl/t/rpl_bit.test | 1 + mysql-test/suite/rpl/t/rpl_bit_npk.test | 1 + mysql-test/suite/rpl/t/rpl_blackhole.test | 1 + mysql-test/suite/rpl/t/rpl_bug26395.test | 2 + mysql-test/suite/rpl/t/rpl_bug31076.test | 1 + mysql-test/suite/rpl/t/rpl_bug33931.test | 25 +- mysql-test/suite/rpl/t/rpl_bug38694.test | 1 + mysql-test/suite/rpl/t/rpl_change_master.test | 1 + mysql-test/suite/rpl/t/rpl_charset.test | 1 - mysql-test/suite/rpl/t/rpl_charset_sjis.test | 1 + .../suite/rpl/t/rpl_circular_for_4_hosts.cnf | 11 +- .../suite/rpl/t/rpl_circular_for_4_hosts.test | 285 +++++++++--------- mysql-test/suite/rpl/t/rpl_colSize.test | 1 + .../suite/rpl/t/rpl_commit_after_flush.test | 8 +- .../suite/rpl/t/rpl_concurrency_error.test | 11 +- .../suite/rpl/t/rpl_conditional_comments.test | 20 +- .../suite/rpl/t/rpl_create_database.test | 1 + .../suite/rpl/t/rpl_create_if_not_exists.test | 2 +- .../t/rpl_create_tmp_table_if_not_exists.test | 2 +- .../suite/rpl/t/rpl_critical_errors.test | 3 +- mysql-test/suite/rpl/t/rpl_cross_version.test | 10 +- mysql-test/suite/rpl/t/rpl_current_user.cnf | 7 +- mysql-test/suite/rpl/t/rpl_current_user.test | 131 ++++---- mysql-test/suite/rpl/t/rpl_ddl.test | 1 + .../suite/rpl/t/rpl_deadlock_innodb.test | 7 - .../suite/rpl/t/rpl_delete_no_where.test | 1 + mysql-test/suite/rpl/t/rpl_do_grant.test | 22 +- mysql-test/suite/rpl/t/rpl_drop.test | 11 +- mysql-test/suite/rpl/t/rpl_drop_db.test | 3 +- mysql-test/suite/rpl/t/rpl_drop_temp.test | 1 + mysql-test/suite/rpl/t/rpl_drop_view.test | 1 + .../suite/rpl/t/rpl_dual_pos_advance.test | 41 +-- .../suite/rpl/t/rpl_empty_master_crash.test | 1 + .../suite/rpl/t/rpl_err_ignoredtable.test | 3 + mysql-test/suite/rpl/t/rpl_events.test | 1 + .../suite/rpl/t/rpl_extraCol_innodb.test | 13 - .../suite/rpl/t/rpl_extraCol_myisam.test | 12 - ....test => rpl_extra_col_master_innodb.test} | 7 +- ....test => rpl_extra_col_master_myisam.test} | 7 +- .../rpl/t/rpl_extra_col_slave_innodb.test | 6 + .../rpl/t/rpl_extra_col_slave_myisam.test | 5 + .../suite/rpl/t/rpl_failed_optimize.test | 7 - .../rpl/t/rpl_filter_tables_not_exist.test | 2 +- .../suite/rpl/t/rpl_flushlog_loop-master.opt | 2 +- .../suite/rpl/t/rpl_flushlog_loop-master.sh | 5 - .../suite/rpl/t/rpl_flushlog_loop-slave.opt | 2 +- .../suite/rpl/t/rpl_flushlog_loop-slave.sh | 4 - mysql-test/suite/rpl/t/rpl_flushlog_loop.test | 39 +-- .../suite/rpl/t/rpl_foreign_key_innodb.test | 7 - mysql-test/suite/rpl/t/rpl_found_rows.test | 4 +- mysql-test/suite/rpl/t/rpl_free_items.test | 1 + mysql-test/suite/rpl/t/rpl_geometry.test | 2 +- mysql-test/suite/rpl/t/rpl_get_lock.test | 11 +- .../t/rpl_get_master_version_and_clock.test | 21 +- mysql-test/suite/rpl/t/rpl_grant.test | 2 + mysql-test/suite/rpl/t/rpl_idempotency.test | 80 ++--- mysql-test/suite/rpl/t/rpl_ignore_grant.test | 1 + mysql-test/suite/rpl/t/rpl_ignore_revoke.test | 1 + mysql-test/suite/rpl/t/rpl_ignore_table.test | 4 +- .../suite/rpl/t/rpl_ignore_table_update.test | 1 + mysql-test/suite/rpl/t/rpl_incident.test | 1 + mysql-test/suite/rpl/t/rpl_init_slave.test | 2 +- .../suite/rpl/t/rpl_init_slave_errors.test | 26 +- mysql-test/suite/rpl/t/rpl_innodb.test | 2 +- .../suite/rpl/t/rpl_innodb_bug28430.test | 2 +- .../suite/rpl/t/rpl_innodb_bug30888.test | 2 +- .../suite/rpl/t/rpl_innodb_mixed_ddl.test | 5 - .../suite/rpl/t/rpl_innodb_mixed_dml.test | 5 - mysql-test/suite/rpl/t/rpl_insert.test | 1 + mysql-test/suite/rpl/t/rpl_insert_id.test | 4 - mysql-test/suite/rpl/t/rpl_insert_id_pk.test | 4 - mysql-test/suite/rpl/t/rpl_insert_ignore.test | 1 + mysql-test/suite/rpl/t/rpl_insert_select.test | 1 + .../suite/rpl/t/rpl_invoked_features.test | 1 + mysql-test/suite/rpl/t/rpl_killed_ddl.test | 21 +- .../suite/rpl/t/rpl_known_bugs_detection.test | 12 +- .../suite/rpl/t/rpl_load_from_master.test | 1 + .../rpl/t/rpl_load_table_from_master.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata.test | 4 - .../suite/rpl/t/rpl_loaddata_charset.test | 1 + .../suite/rpl/t/rpl_loaddata_fatal.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata_m.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata_map.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata_s.test | 1 + .../suite/rpl/t/rpl_loaddata_simple.test | 1 + .../suite/rpl/t/rpl_loaddata_symlink.test | 1 + mysql-test/suite/rpl/t/rpl_loaddatalocal.test | 1 + mysql-test/suite/rpl/t/rpl_loadfile.test | 10 +- mysql-test/suite/rpl/t/rpl_locale.test | 1 + mysql-test/suite/rpl/t/rpl_log_pos.test | 3 +- .../rpl/t/rpl_manual_change_index_file.test | 10 +- mysql-test/suite/rpl/t/rpl_many_optimize.test | 1 + .../suite/rpl/t/rpl_master_pos_wait.test | 2 + .../suite/rpl/t/rpl_misc_functions.test | 1 + mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test | 1 + mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test | 1 + mysql-test/suite/rpl/t/rpl_multi_delete.test | 1 + mysql-test/suite/rpl/t/rpl_multi_delete2.test | 1 + mysql-test/suite/rpl/t/rpl_multi_engine.test | 1 + mysql-test/suite/rpl/t/rpl_multi_update.test | 4 - mysql-test/suite/rpl/t/rpl_multi_update2.test | 1 + mysql-test/suite/rpl/t/rpl_multi_update3.test | 1 + mysql-test/suite/rpl/t/rpl_multi_update4.test | 1 + mysql-test/suite/rpl/t/rpl_mysql_upgrade.test | 2 + mysql-test/suite/rpl/t/rpl_name_const.test | 1 + .../rpl/t/rpl_nondeterministic_functions.test | 5 +- .../suite/rpl/t/rpl_not_null_innodb.test | 1 + .../suite/rpl/t/rpl_not_null_myisam.test | 1 + mysql-test/suite/rpl/t/rpl_optimize.test | 1 + mysql-test/suite/rpl/t/rpl_packet.test | 49 +-- mysql-test/suite/rpl/t/rpl_plugin_load.test | 2 +- mysql-test/suite/rpl/t/rpl_ps.test | 43 +-- mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test | 1 + mysql-test/suite/rpl/t/rpl_read_only.test | 1 + .../suite/rpl/t/rpl_relay_space_innodb.test | 18 -- .../suite/rpl/t/rpl_relay_space_myisam.test | 18 -- mysql-test/suite/rpl/t/rpl_relayrotate.test | 1 + mysql-test/suite/rpl/t/rpl_relayspace.test | 1 + mysql-test/suite/rpl/t/rpl_replicate_do.test | 1 + .../suite/rpl/t/rpl_replicate_ignore_db.test | 1 + mysql-test/suite/rpl/t/rpl_report.test | 1 + mysql-test/suite/rpl/t/rpl_rewrt_db.test | 1 + .../suite/rpl/t/rpl_rotate_logs-slave.opt | 1 - .../suite/rpl/t/rpl_rotate_logs-slave.sh | 2 - mysql-test/suite/rpl/t/rpl_rotate_logs.test | 17 +- mysql-test/suite/rpl/t/rpl_row_001.test | 1 + mysql-test/suite/rpl/t/rpl_row_4_bytes.test | 1 + mysql-test/suite/rpl/t/rpl_row_NOW.test | 1 + mysql-test/suite/rpl/t/rpl_row_USER.test | 1 + mysql-test/suite/rpl/t/rpl_row_UUID.test | 1 + .../suite/rpl/t/rpl_row_basic_11bugs.test | 33 +- .../suite/rpl/t/rpl_row_basic_2myisam.test | 1 + .../suite/rpl/t/rpl_row_basic_3innodb.test | 1 + .../suite/rpl/t/rpl_row_basic_8partition.test | 1 + .../suite/rpl/t/rpl_row_blob_innodb.test | 1 + .../suite/rpl/t/rpl_row_blob_myisam.test | 1 + mysql-test/suite/rpl/t/rpl_row_colSize.test | 1 + mysql-test/suite/rpl/t/rpl_row_conflicts.test | 4 +- .../suite/rpl/t/rpl_row_create_table.test | 34 +-- .../suite/rpl/t/rpl_row_delayed_ins.test | 4 - mysql-test/suite/rpl/t/rpl_row_drop.test | 1 + mysql-test/suite/rpl/t/rpl_row_find_row.test | 9 +- mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test | 1 - mysql-test/suite/rpl/t/rpl_row_func001.test | 1 + mysql-test/suite/rpl/t/rpl_row_func002.test | 1 + mysql-test/suite/rpl/t/rpl_row_func003.test | 1 + .../suite/rpl/t/rpl_row_inexist_tbl.test | 12 +- .../suite/rpl/t/rpl_row_insert_delayed.test | 1 + mysql-test/suite/rpl/t/rpl_row_log.test | 1 + .../suite/rpl/t/rpl_row_log_innodb.test | 1 + .../suite/rpl/t/rpl_row_mysqlbinlog.test | 1 + .../suite/rpl/t/rpl_row_rec_comp_innodb.test | 1 + .../suite/rpl/t/rpl_row_rec_comp_myisam.test | 6 +- mysql-test/suite/rpl/t/rpl_row_sp001.test | 1 + .../suite/rpl/t/rpl_row_sp002_innodb.test | 7 - mysql-test/suite/rpl/t/rpl_row_sp003.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp005.test | 1 + .../suite/rpl/t/rpl_row_sp006_InnoDB.test | 1 + .../suite/rpl/t/rpl_row_sp007_innodb.test | 7 - mysql-test/suite/rpl/t/rpl_row_sp008.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp009.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp010.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp011.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp012.test | 1 + .../rpl/t/rpl_row_stop_middle_update.test | 3 +- .../rpl/t/rpl_row_tabledefs_2myisam.test | 1 + .../rpl/t/rpl_row_tabledefs_3innodb.test | 1 + .../suite/rpl/t/rpl_row_tbl_metadata.test | 10 +- mysql-test/suite/rpl/t/rpl_row_trig001.test | 1 + mysql-test/suite/rpl/t/rpl_row_trig002.test | 1 + mysql-test/suite/rpl/t/rpl_row_trig003.test | 1 + mysql-test/suite/rpl/t/rpl_row_trig004.test | 1 + .../suite/rpl/t/rpl_row_trunc_temp.test | 2 +- .../suite/rpl/t/rpl_row_unsafe_funcs.test | 1 + mysql-test/suite/rpl/t/rpl_row_until.test | 10 +- mysql-test/suite/rpl/t/rpl_row_view01.test | 1 + .../suite/rpl/t/rpl_row_wide_table.test | 1 + mysql-test/suite/rpl/t/rpl_server_id1.test | 30 +- mysql-test/suite/rpl/t/rpl_server_id2.test | 1 + mysql-test/suite/rpl/t/rpl_session_var.test | 1 + mysql-test/suite/rpl/t/rpl_set_charset.test | 1 + .../suite/rpl/t/rpl_set_null_innodb.test | 1 + .../suite/rpl/t/rpl_set_null_myisam.test | 1 + .../suite/rpl/t/rpl_show_slave_running.test | 1 + mysql-test/suite/rpl/t/rpl_skip_error.test | 1 + .../suite/rpl/t/rpl_slave_grp_exec.test | 19 +- mysql-test/suite/rpl/t/rpl_slave_load_in.test | 7 +- .../rpl/t/rpl_slave_load_remove_tmpfile.test | 6 +- .../t/rpl_slave_load_tmpdir_not_exist.test | 25 +- mysql-test/suite/rpl/t/rpl_slave_skip.test | 1 + mysql-test/suite/rpl/t/rpl_slave_status.test | 17 +- .../suite/rpl/t/rpl_slow_query_log.test | 3 +- mysql-test/suite/rpl/t/rpl_sp.test | 1 + mysql-test/suite/rpl/t/rpl_sp004.test | 1 + mysql-test/suite/rpl/t/rpl_sp_effects.test | 1 + .../suite/rpl/t/rpl_sporadic_master.test | 1 + mysql-test/suite/rpl/t/rpl_ssl.test | 10 + mysql-test/suite/rpl/t/rpl_ssl1.test | 27 +- .../suite/rpl/t/rpl_start_stop_slave.test | 1 + mysql-test/suite/rpl/t/rpl_stm_000001.test | 130 +++++++- .../t/rpl_stm_auto_increment_bug33029.test | 1 + .../suite/rpl/t/rpl_stm_binlog_direct.test | 1 + mysql-test/suite/rpl/t/rpl_stm_conflicts.test | 7 +- .../rpl/t/rpl_stm_create_if_not_exists.test | 2 +- mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test | 3 - .../suite/rpl/t/rpl_stm_insert_delayed.test | 1 + mysql-test/suite/rpl/t/rpl_stm_loadfile.test | 1 + mysql-test/suite/rpl/t/rpl_stm_log.test | 1 + .../suite/rpl/t/rpl_stm_max_relay_size.test | 3 - .../suite/rpl/t/rpl_stm_mixing_engines.test | 7 +- .../suite/rpl/t/rpl_stm_multi_query.test | 5 - mysql-test/suite/rpl/t/rpl_stm_no_op.test | 1 + mysql-test/suite/rpl/t/rpl_stm_sql_mode.test | 1 + mysql-test/suite/rpl/t/rpl_stm_until.test | 11 +- mysql-test/suite/rpl/t/rpl_stop_slave.test | 2 +- .../suite/rpl/t/rpl_switch_stm_row_mixed.test | 1 + mysql-test/suite/rpl/t/rpl_temp_table.test | 7 +- .../suite/rpl/t/rpl_temp_table_mix_row.test | 17 +- mysql-test/suite/rpl/t/rpl_temporary.test | 15 +- .../suite/rpl/t/rpl_temporary_errors.test | 8 +- mysql-test/suite/rpl/t/rpl_test_framework.cnf | 46 +++ .../suite/rpl/t/rpl_test_framework.test | 143 +++++++++ mysql-test/suite/rpl/t/rpl_timezone.test | 5 + .../suite/rpl/t/rpl_tmp_table_and_DDL.test | 1 + mysql-test/suite/rpl/t/rpl_trigger.test | 27 +- mysql-test/suite/rpl/t/rpl_trunc_temp.test | 3 + .../suite/rpl/t/rpl_truncate_2myisam.test | 1 - .../suite/rpl/t/rpl_truncate_3innodb.test | 2 - .../suite/rpl/t/rpl_typeconv_innodb.test | 7 +- mysql-test/suite/rpl/t/rpl_udf.test | 1 + mysql-test/suite/rpl/t/rpl_user.test | 1 + .../suite/rpl/t/rpl_user_variables.test | 3 +- mysql-test/suite/rpl/t/rpl_variables.test | 30 +- mysql-test/suite/rpl/t/rpl_variables_stm.test | 25 +- mysql-test/suite/rpl/t/rpl_view.test | 1 + .../suite/rpl_ndb/r/rpl_ndb_2other.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_UUID.result | 9 +- .../rpl_ndb/r/rpl_ndb_apply_status.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_auto_inc.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_basic.result | 12 +- .../suite/rpl_ndb/r/rpl_ndb_blob.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_blob2.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_circular.result | 17 +- .../rpl_ndb/r/rpl_ndb_circular_2ch.result | 31 +- .../rpl_ndb/r/rpl_ndb_circular_simplex.result | 15 +- .../r/rpl_ndb_commit_afterflush.result | 9 +- .../rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_dd_basic.result | 9 +- .../rpl_ndb/r/rpl_ndb_dd_partitions.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result | 9 +- .../rpl_ndb/r/rpl_ndb_delete_nowhere.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_do_db.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_do_table.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_extraCol.result | 57 ++-- .../suite/rpl_ndb/r/rpl_ndb_func003.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_idempotent.result | 14 +- .../suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result | 9 +- .../rpl_ndb/r/rpl_ndb_innodb_trans.result | 9 +- .../rpl_ndb/r/rpl_ndb_insert_ignore.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result | 18 +- .../rpl_ndb_mixed_engines_transactions.result | 15 +- .../rpl_ndb/r/rpl_ndb_mixed_tables.result | 21 +- .../suite/rpl_ndb/r/rpl_ndb_multi.result | 17 +- .../rpl_ndb/r/rpl_ndb_multi_update2.result | 9 +- .../rpl_ndb/r/rpl_ndb_multi_update3.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_rep_ignore.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_row_001.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_set_null.result | 31 +- .../suite/rpl_ndb/r/rpl_ndb_sp003.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_sp006.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_stm_innodb.result | 16 +- .../suite/rpl_ndb/r/rpl_ndb_sync.result | 11 +- .../suite/rpl_ndb/r/rpl_ndb_trig004.result | 9 +- .../suite/rpl_ndb/r/rpl_row_basic_7ndb.result | 57 ++-- .../suite/rpl_ndb/r/rpl_truncate_7ndb.result | 9 +- .../suite/rpl_ndb/t/rpl_ndb_2innodb.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_2myisam.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_2other.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_apply_status.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_auto_inc.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test | 3 +- mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_circular.test | 18 +- .../suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf | 7 - .../suite/rpl_ndb/t/rpl_ndb_circular_2ch.test | 21 +- .../rpl_ndb/t/rpl_ndb_circular_simplex.test | 7 +- .../rpl_ndb/t/rpl_ndb_commit_afterflush.test | 1 + .../rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_dd_basic.test | 2 +- .../rpl_ndb/t/rpl_ndb_dd_partitions.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test | 1 + .../rpl_ndb/t/rpl_ndb_delete_nowhere.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_do_table.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_extraCol.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_func003.test | 2 +- .../suite/rpl_ndb/t/rpl_ndb_idempotent.test | 2 +- .../suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_innodb_trans.test | 1 + .../rpl_ndb/t/rpl_ndb_insert_ignore.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test | 1 + .../t/rpl_ndb_mixed_engines_transactions.test | 11 +- .../suite/rpl_ndb/t/rpl_ndb_mixed_tables.test | 19 +- mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test | 23 +- .../rpl_ndb/t/rpl_ndb_multi_update2.test | 1 + .../rpl_ndb/t/rpl_ndb_multi_update3.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_relayrotate.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_rep_ignore.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_row_001.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_set_null.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_stm_innodb.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test | 2 + .../suite/rpl_ndb/t/rpl_ndb_trig004.test | 1 + .../suite/rpl_ndb/t/rpl_ndbapi_multi.test | 1 + .../suite/rpl_ndb/t/rpl_row_basic_7ndb.test | 2 +- .../suite/rpl_ndb/t/rpl_truncate_7ndb.test | 2 +- .../suite/rpl_ndb/t/rpl_truncate_7ndb_2.test | 1 + .../suite/sys_vars/t/rpl_init_slave_func.test | 1 + mysql-test/t/init_file.test | 2 +- 740 files changed, 6994 insertions(+), 5608 deletions(-) rename mysql-test/extra/rpl_tests/{rpl_extraMaster_Col.test => rpl_extra_col_master.test} (97%) rename mysql-test/extra/rpl_tests/{rpl_extraSlave_Col.test => rpl_extra_col_slave.test} (98%) delete mode 100644 mysql-test/extra/rpl_tests/rpl_stm_000001.test create mode 100644 mysql-test/extra/rpl_tests/rpl_test_framework.inc create mode 100644 mysql-test/include/assert.inc create mode 100644 mysql-test/include/begin_include_file.inc delete mode 100644 mysql-test/include/circular_rpl_for_4_hosts_init.inc delete mode 100644 mysql-test/include/circular_rpl_for_4_hosts_sync.inc delete mode 100644 mysql-test/include/diff_master_slave.inc create mode 100644 mysql-test/include/end_include_file.inc create mode 100644 mysql-test/include/file_does_not_exist.inc create mode 100644 mysql-test/include/force_restart.inc create mode 100644 mysql-test/include/force_restart_if_skipped.inc delete mode 100644 mysql-test/include/master-slave-end.inc delete mode 100644 mysql-test/include/master-slave-reset.inc delete mode 100644 mysql-test/include/reset_master_and_slave.inc create mode 100644 mysql-test/include/rpl_change_topology.inc create mode 100644 mysql-test/include/rpl_connect.inc create mode 100644 mysql-test/include/rpl_connection.inc create mode 100644 mysql-test/include/rpl_diff.inc delete mode 100644 mysql-test/include/rpl_diff_tables.inc create mode 100644 mysql-test/include/rpl_end.inc create mode 100644 mysql-test/include/rpl_for_each_slave.inc create mode 100644 mysql-test/include/rpl_generate_sync_chain.inc create mode 100644 mysql-test/include/rpl_init.inc create mode 100644 mysql-test/include/rpl_reconnect.inc create mode 100644 mysql-test/include/rpl_reset.inc create mode 100644 mysql-test/include/rpl_restart_server.inc create mode 100644 mysql-test/include/rpl_start_server.inc create mode 100644 mysql-test/include/rpl_start_slaves.inc create mode 100644 mysql-test/include/rpl_stop_server.inc create mode 100644 mysql-test/include/rpl_stop_slaves.inc create mode 100644 mysql-test/include/rpl_sync.inc create mode 100644 mysql-test/include/save_master_pos.inc create mode 100644 mysql-test/include/stop_slave_io.inc create mode 100644 mysql-test/include/stop_slave_sql.inc create mode 100644 mysql-test/include/sync_io_with_master.inc create mode 100644 mysql-test/include/sync_slave_sql_with_io.inc create mode 100644 mysql-test/include/wait_for_query_to_fail.inc create mode 100644 mysql-test/include/write_var_to_file.inc delete mode 100644 mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result rename mysql-test/suite/{rpl/r/rpl_drop_if_exists.result => binlog/r/binlog_drop_if_exists.result} (100%) rename mysql-test/suite/{rpl/r/rpl_binlog_query_filter_rules.result => binlog/r/binlog_query_filter_rules.result} (100%) rename mysql-test/suite/{rpl/r/rpl_server_id.result => binlog/r/binlog_server_id.result} (100%) rename mysql-test/suite/{rpl/r/rpl_sf.result => binlog/r/binlog_sf.result} (100%) delete mode 100644 mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt rename mysql-test/suite/{rpl/t/rpl_drop_if_exists.test => binlog/t/binlog_drop_if_exists.test} (100%) rename mysql-test/suite/{rpl/t/rpl_binlog_query_filter_rules-master.opt => binlog/t/binlog_query_filter_rules-master.opt} (100%) rename mysql-test/suite/{rpl/t/rpl_binlog_query_filter_rules.test => binlog/t/binlog_query_filter_rules.test} (100%) rename mysql-test/suite/{rpl/t/rpl_server_id.test => binlog/t/binlog_server_id.test} (100%) rename mysql-test/suite/{rpl/t/rpl_sf.test => binlog/t/binlog_sf.test} (94%) delete mode 100644 mysql-test/suite/rpl/r/rpl000011.result rename mysql-test/suite/rpl/r/{rpl000010.result => rpl_000010.result} (50%) create mode 100644 mysql-test/suite/rpl/r/rpl_000011.result rename mysql-test/suite/rpl/r/{rpl000013.result => rpl_000013.result} (74%) rename mysql-test/suite/rpl/r/{rpl000017.result => rpl_000017.result} (60%) create mode 100644 mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result rename mysql-test/suite/rpl/r/{rpl_extraColmaster_innodb.result => rpl_extra_col_master_innodb.result} (95%) rename mysql-test/suite/rpl/r/{rpl_extraColmaster_myisam.result => rpl_extra_col_master_myisam.result} (95%) rename mysql-test/suite/rpl/r/{rpl_extraCol_innodb.result => rpl_extra_col_slave_innodb.result} (88%) rename mysql-test/suite/rpl/r/{rpl_extraCol_myisam.result => rpl_extra_col_slave_myisam.result} (88%) create mode 100644 mysql-test/suite/rpl/r/rpl_test_framework.result delete mode 100755 mysql-test/suite/rpl/t/rpl000017-slave.sh delete mode 100644 mysql-test/suite/rpl/t/rpl000017.test rename mysql-test/suite/rpl/t/{rpl000010-slave.opt => rpl_000010-slave.opt} (100%) rename mysql-test/suite/rpl/t/{rpl000010.test => rpl_000010.test} (94%) rename mysql-test/suite/rpl/t/{rpl000011.test => rpl_000011.test} (91%) rename mysql-test/suite/rpl/t/{rpl000013.test => rpl_000013.test} (92%) rename mysql-test/suite/rpl/t/{rpl000017-slave.opt => rpl_000017-slave.opt} (100%) create mode 100644 mysql-test/suite/rpl/t/rpl_000017.test rename mysql-test/suite/{binlog/t/binlog_auto_increment_bug33029.test => rpl/t/rpl_auto_increment_bug33029.test} (57%) delete mode 100644 mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt delete mode 100644 mysql-test/suite/rpl/t/rpl_extraCol_innodb.test delete mode 100644 mysql-test/suite/rpl/t/rpl_extraCol_myisam.test rename mysql-test/suite/rpl/t/{rpl_extraColmaster_innodb.test => rpl_extra_col_master_innodb.test} (66%) rename mysql-test/suite/rpl/t/{rpl_extraColmaster_myisam.test => rpl_extra_col_master_myisam.test} (64%) create mode 100644 mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test delete mode 100755 mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh delete mode 100755 mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh delete mode 100644 mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt delete mode 100755 mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh create mode 100644 mysql-test/suite/rpl/t/rpl_test_framework.cnf create mode 100644 mysql-test/suite/rpl/t/rpl_test_framework.test diff --git a/client/mysqltest.cc b/client/mysqltest.cc index b0ed1d88a51..a12c56c9657 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -7990,6 +7990,14 @@ int main(int argc, char **argv) var_set_int("$VIEW_PROTOCOL", view_protocol); var_set_int("$CURSOR_PROTOCOL", cursor_protocol); + var_set_int("$ENABLED_QUERY_LOG", 1); + var_set_int("$ENABLED_ABORT_ON_ERROR", 1); + var_set_int("$ENABLED_RESULT_LOG", 1); + var_set_int("$ENABLED_CONNECT_LOG", 0); + var_set_int("$ENABLED_WARNINGS", 1); + var_set_int("$ENABLED_INFO", 0); + var_set_int("$ENABLED_METADATA", 0); + DBUG_PRINT("info",("result_file: '%s'", result_file_name ? result_file_name : "")); verbose_msg("Results saved in '%s'.", @@ -8132,20 +8140,62 @@ int main(int argc, char **argv) case Q_RPL_PROBE: do_rpl_probe(command); break; case Q_ENABLE_RPL_PARSE: do_enable_rpl_parse(command); break; case Q_DISABLE_RPL_PARSE: do_disable_rpl_parse(command); break; - case Q_ENABLE_QUERY_LOG: disable_query_log=0; break; - case Q_DISABLE_QUERY_LOG: disable_query_log=1; break; - case Q_ENABLE_ABORT_ON_ERROR: abort_on_error=1; break; - case Q_DISABLE_ABORT_ON_ERROR: abort_on_error=0; break; - case Q_ENABLE_RESULT_LOG: disable_result_log=0; break; - case Q_DISABLE_RESULT_LOG: disable_result_log=1; break; - case Q_ENABLE_CONNECT_LOG: disable_connect_log=0; break; - case Q_DISABLE_CONNECT_LOG: disable_connect_log=1; break; - case Q_ENABLE_WARNINGS: disable_warnings=0; break; - case Q_DISABLE_WARNINGS: disable_warnings=1; break; - case Q_ENABLE_INFO: disable_info=0; break; - case Q_DISABLE_INFO: disable_info=1; break; - case Q_ENABLE_METADATA: display_metadata=1; break; - case Q_DISABLE_METADATA: display_metadata=0; break; + case Q_ENABLE_QUERY_LOG: + disable_query_log= 0; + var_set_int("$ENABLED_QUERY_LOG", 1); + break; + case Q_DISABLE_QUERY_LOG: + disable_query_log= 1; + var_set_int("$ENABLED_QUERY_LOG", 0); + break; + case Q_ENABLE_ABORT_ON_ERROR: + abort_on_error= 1; + var_set_int("$ENABLED_ABORT_ON_ERROR", 1); + break; + case Q_DISABLE_ABORT_ON_ERROR: + abort_on_error= 0; + var_set_int("$ENABLED_ABORT_ON_ERROR", 0); + break; + case Q_ENABLE_RESULT_LOG: + disable_result_log= 0; + var_set_int("$ENABLED_RESULT_LOG", 1); + break; + case Q_DISABLE_RESULT_LOG: + disable_result_log=1; + var_set_int("$ENABLED_RESULT_LOG", 0); + break; + case Q_ENABLE_CONNECT_LOG: + disable_connect_log=0; + var_set_int("$ENABLED_CONNECT_LOG", 1); + break; + case Q_DISABLE_CONNECT_LOG: + disable_connect_log=1; + var_set_int("$ENABLED_CONNECT_LOG", 0); + break; + case Q_ENABLE_WARNINGS: + disable_warnings= 0; + var_set_int("$ENABLED_WARNINGS", 1); + break; + case Q_DISABLE_WARNINGS: + disable_warnings= 1; + var_set_int("$ENABLED_WARNINGS", 0); + break; + case Q_ENABLE_INFO: + disable_info= 0; + var_set_int("$ENABLED_INFO", 1); + break; + case Q_DISABLE_INFO: + disable_info= 1; + var_set_int("$ENABLED_INFO", 0); + break; + case Q_ENABLE_METADATA: + display_metadata= 1; + var_set_int("$ENABLED_METADATA", 1); + break; + case Q_DISABLE_METADATA: + display_metadata= 0; + var_set_int("$ENABLED_METADATA", 0); + break; case Q_SOURCE: do_source(command); break; case Q_SLEEP: do_sleep(command, 0); break; case Q_REAL_SLEEP: do_sleep(command, 1); break; diff --git a/mysql-test/extra/rpl_tests/rpl_EE_err.test b/mysql-test/extra/rpl_tests/rpl_EE_err.test index 205bbe79dac..0b3fec1f605 100644 --- a/mysql-test/extra/rpl_tests/rpl_EE_err.test +++ b/mysql-test/extra/rpl_tests/rpl_EE_err.test @@ -9,10 +9,6 @@ # check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and # Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986). #################################### -# Change Author: JBM -# Change Date: 2006-01-11 -# Change: Split test per lars review -#################################### #"REQUIREMENT: A master DROP TABLE on a table with non-existing MYI # file must be correctly replicated to the slave" #################################### @@ -23,8 +19,5 @@ flush tables; let $MYSQLD_DATADIR= `select @@datadir`; remove_file $MYSQLD_DATADIR/test/t1.MYI ; drop table if exists t1; -save_master_pos; -connection slave; -sync_with_master; -# End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment.test b/mysql-test/extra/rpl_tests/rpl_auto_increment.test index abf3b4ec676..d81ab15a945 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment.test @@ -1,14 +1,6 @@ # # Test of auto_increment with offset # -##################################### -# By: JBM -# Date: 2006-02-10 -# Change: NDB does not support auto inc -# in this usage. Currently there is no -# plan to implment. Skipping test when -# NDB is default engine. -##################################### -- source include/not_ndb_default.inc -- source include/master-slave.inc @@ -169,7 +161,7 @@ drop table t1; # auto_increment fields if the values of them are 0. There is an inconsistency # between slave and master. When MODE_NO_AUTO_VALUE_ON_ZERO are masters treat # -source include/master-slave-reset.inc; +source include/rpl_reset.inc; connection master; --disable_warnings @@ -210,12 +202,10 @@ INSERT INTO t2 VALUES(4); FLUSH LOGS; sync_slave_with_master; -let $diff_table_1= master:test.t1; -let $diff_table_2= slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; -let $diff_table_1= master:test.t2; -let $diff_table_2= slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; connection master; @@ -228,16 +218,16 @@ let $MYSQLD_DATADIR= `SELECT @@DATADIR`; --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL test sync_slave_with_master; -let $diff_table_1= master:test.t1; -let $diff_table_2= slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; -let $diff_table_1= master:test.t2; -let $diff_table_2= slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; # End cleanup +--connection master DROP TABLE t1; DROP TABLE t2; SET SQL_MODE=''; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test b/mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test index 0bfa46de113..30b25955ecb 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test @@ -29,8 +29,7 @@ commit; sync_slave_with_master; --echo #Test if the results are consistent on master and slave --echo #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' -let $diff_table_1=master:test.t3; -let $diff_table_2=slave:test.t3; +let $diff_tables= master:t3, slave:t3; source include/diff_tables.inc; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test b/mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test index 614d79d9c2d..f93d435349f 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test @@ -60,14 +60,11 @@ connection master; sync_slave_with_master; --echo #Test if the results are consistent on master and slave --echo #for 'INVOKES A TRIGGER with $trigger_action action' -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; -let $diff_table_1=master:test.t4; -let $diff_table_2=slave:test.t4; +let $diff_tables= master:t4, slave:t4; source include/diff_tables.inc; -let $diff_table_1=master:test.t6; -let $diff_table_2=slave:test.t6; +let $diff_tables= master:t6, slave:t6; source include/diff_tables.inc; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test b/mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test index fece19b397d..d7c26ea42f1 100644 --- a/mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test +++ b/mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test @@ -41,11 +41,9 @@ connection master; sync_slave_with_master; --echo #Test if the results are consistent on master and slave --echo #for 'CALLS A FUNCTION which INVOKES A TRIGGER with $insert_action action' -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; -let $diff_table_1=master:test.t3; -let $diff_table_2=slave:test.t3; +let $diff_tables= master:t3, slave:t3; source include/diff_tables.inc; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_charset.test b/mysql-test/extra/rpl_tests/rpl_charset.test index 8bcb60b0227..e56642cbcb5 100644 --- a/mysql-test/extra/rpl_tests/rpl_charset.test +++ b/mysql-test/extra/rpl_tests/rpl_charset.test @@ -2,11 +2,7 @@ # This test will fail if the server/client does not support enough charsets. source include/master-slave.inc; ---disable_warnings set timestamp=1000000000; -drop database if exists mysqltest2; -drop database if exists mysqltest3; ---enable_warnings create database mysqltest2 character set latin2; set @@character_set_server=latin5; @@ -151,6 +147,6 @@ eval create table `t1` ( set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1; -sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test b/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test index 98638b0b1f6..7de4f421c35 100644 --- a/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test +++ b/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test @@ -1,16 +1,10 @@ -################################# -# Test updated to use a wrapper # -################################# - eval CREATE TABLE t1 (a INT) ENGINE=$engine_type; begin; insert into t1 values(1); flush tables with read lock; commit; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # cleanup connection master; unlock tables; diff --git a/mysql-test/extra/rpl_tests/rpl_conflicts.test b/mysql-test/extra/rpl_tests/rpl_conflicts.test index 8a98059b0ad..943d254736d 100644 --- a/mysql-test/extra/rpl_tests/rpl_conflicts.test +++ b/mysql-test/extra/rpl_tests/rpl_conflicts.test @@ -139,8 +139,13 @@ if (`SELECT @@global.binlog_format = 'ROW' AND @@global.slave_exec_mode = 'STRIC --echo ---- Wait until slave stops with an error ---- let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND source include/wait_for_slave_sql_error.inc; - let $err= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); - --echo Last_SQL_Error = $err (expected "can't find record" error) + + --let $err= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1) + --replace_regex /end_log_pos [0-9]+/end_log_pos END_LOG_POS/ + --disable_query_log + --eval SELECT "$err" as 'Last_SQL_Error (expected "duplicate key" error)' + --enable_query_log + SELECT * FROM t1; --echo ---- Resolve the conflict on the slave and restart SQL thread ---- @@ -165,4 +170,4 @@ connection master; DROP TABLE t1; --echo [on slave] -sync_slave_with_master; +--sync_slave_with_master diff --git a/mysql-test/extra/rpl_tests/rpl_ddl.test b/mysql-test/extra/rpl_tests/rpl_ddl.test index f1064dc268f..3b0348cc29f 100644 --- a/mysql-test/extra/rpl_tests/rpl_ddl.test +++ b/mysql-test/extra/rpl_tests/rpl_ddl.test @@ -136,14 +136,6 @@ sync_slave_with_master; connection master; SET AUTOCOMMIT = 1; # -# 1. DROP all objects, which probably already exist, but must be created here -# ---disable_warnings -DROP DATABASE IF EXISTS mysqltest1; -DROP DATABASE IF EXISTS mysqltest2; -DROP DATABASE IF EXISTS mysqltest3; ---enable_warnings -# # 2. CREATE all objects needed # working database is mysqltest1 # working table (transactional!) is mysqltest1.t1 @@ -619,6 +611,3 @@ connection master; DROP DATABASE mysqltest1; # mysqltest2 was alreday DROPPED some tests before. DROP DATABASE mysqltest3; ---enable_warnings - --- source include/master-slave-end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_deadlock.test b/mysql-test/extra/rpl_tests/rpl_deadlock.test index 607348ae97b..bd446c86943 100644 --- a/mysql-test/extra/rpl_tests/rpl_deadlock.test +++ b/mysql-test/extra/rpl_tests/rpl_deadlock.test @@ -131,3 +131,4 @@ sync_slave_with_master; SET global max_relay_log_size= @my_max_relay_log_size; --echo End of 5.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test similarity index 97% rename from mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test rename to mysql-test/extra/rpl_tests/rpl_extra_col_master.test index 16c4bc8e2da..eb50149655e 100644 --- a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test +++ b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test @@ -1,24 +1,7 @@ ############################################################# -# Author: Chuck -############################################################# # Purpose: To test having extra columns on the master WL#3915 # engine inspecific sourced part ############################################################# -# Change Author: Jeb -# Change: Cleanup and extend testing -############################################################# -# TODO: partition specific -# -- source include/have_partition.inc -# Note: Will be done in different test due to NDB using this -# test case. -############################################################ - -########### Clean up ################ ---disable_warnings ---disable_query_log -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t10,t11,t12,t13,t14,t15,t16,t17,t18,t31; ---enable_query_log ---enable_warnings # # Setup differently defined tables on master and slave @@ -1025,8 +1008,3 @@ SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; connection master; DROP TABLE t5; sync_slave_with_master; ---echo - -# END of 5.1 tests case - - diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test similarity index 98% rename from mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test rename to mysql-test/extra/rpl_tests/rpl_extra_col_slave.test index 3b8e7663ec7..882ef2c4e63 100644 --- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test +++ b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test @@ -1,19 +1,10 @@ ################################################# -# Author: Jeb -# Date: 2006-09-07 # Purpose: To test having extra columns on the slave. ################################################## # Some tests in here requre partitioning -- source include/have_partition.inc -########### Clean up ################ ---disable_warnings ---disable_query_log -DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17; ---enable_query_log ---enable_warnings - ################################################# ############ Different Table Def Test ########### ################################################# @@ -448,9 +439,9 @@ if (`SELECT $engine_type != 'NDB'`) } #--echo *** Drop t9 *** -#connection master; -#DROP TABLE t9; -#sync_slave_with_master; +connection master; +DROP TABLE t9; +sync_slave_with_master; ############################################ # More columns in slave at middle of table # @@ -725,6 +716,10 @@ sync_slave_with_master; --replace_column 5 CURRENT_TIMESTAMP SELECT * FROM t14a ORDER BY c1; +--connection master +DROP TABLE t14a; +--sync_slave_with_master + #################################################### # - Alter Master Dropping columns from the middle. # # Expect: columns dropped # @@ -912,17 +907,3 @@ connection slave; connection master; DROP TABLE t17; sync_slave_with_master; - -#### Clean Up #### ---disable_warnings ---disable_query_log -connection master; -DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17; -sync_slave_with_master; -connection master; ---enable_query_log ---enable_warnings - -# END 5.1 Test Case - - diff --git a/mysql-test/extra/rpl_tests/rpl_failed_optimize.test b/mysql-test/extra/rpl_tests/rpl_failed_optimize.test index cd81f2497b8..6817405b2d9 100644 --- a/mysql-test/extra/rpl_tests/rpl_failed_optimize.test +++ b/mysql-test/extra/rpl_tests/rpl_failed_optimize.test @@ -22,4 +22,5 @@ connection master; select * from t1; commit; drop table t1; --- sync_slave_with_master + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test index 0a1a4503975..5e4fca4a4b8 100644 --- a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test +++ b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test @@ -54,7 +54,6 @@ unlock tables; connection master; drop table t3, t4, t5; -sync_slave_with_master; - # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_foreign_key.test b/mysql-test/extra/rpl_tests/rpl_foreign_key.test index 8755bf5aa87..19cd1d783e1 100644 --- a/mysql-test/extra/rpl_tests/rpl_foreign_key.test +++ b/mysql-test/extra/rpl_tests/rpl_foreign_key.test @@ -60,6 +60,4 @@ select count(*) from t1 /* must be zero */; connection master; drop table t2,t1; -sync_slave_with_master; - - +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test index c7e3d1abc03..01036f72785 100644 --- a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test +++ b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test @@ -40,26 +40,16 @@ if (!$debug_sync_action) } # Restart slave ---disable_warnings -stop slave; -source include/wait_for_slave_to_stop.inc; +--source include/stop_slave.inc eval SET @@global.debug= "+d,$dbug_sync_point"; -start slave; -source include/wait_for_slave_to_start.inc; +--source include/start_slave.inc --echo slave is going to hang in get_master_version_and_clock -connection master; -# Write file to make mysql-test-run.pl expect the "crash", but don't start -# it until it's told to ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--let $rpl_server_number= 1 +--source include/rpl_stop_server.inc -# Send shutdown to the connected server and give -# it 10 seconds to die before zapping it -shutdown_server 10; - -connection slave; --echo slave is unblocked eval SET DEBUG_SYNC=$debug_sync_action; @@ -74,6 +64,7 @@ connection slave; # '1040' ER_CON_COUNT_ERROR # '1053' ER_SERVER_SHUTDOWN let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013; +--let $slave_io_error_is_nonfatal= 1 source include/wait_for_slave_io_error.inc; # deactivate the sync point of get_master_version_and_clock() @@ -82,19 +73,12 @@ source include/wait_for_slave_io_error.inc; # unset. eval set @@global.debug = "-d,$dbug_sync_point"; -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - -connection master; -# Turn on reconnect ---enable_reconnect - -# Call script that will poll the server waiting for it to be back online again ---source include/wait_until_connected_again.inc - -# Turn off reconnect again ---disable_reconnect - -connection slave; -source include/wait_for_slave_to_start.inc; +--let $rpl_server_number= 1 +--source include/rpl_start_server.inc +# We don't source include/wait_for_slave_io_to_start.inc, because the +# IO thread has an error and wait_for_slave_io_to_start.inc fails if +# the IO thread has an error. +--let $slave_param= Slave_IO_Running +--let $slave_param_value= Yes +--source include/wait_for_slave_param.inc diff --git a/mysql-test/extra/rpl_tests/rpl_insert_id.test b/mysql-test/extra/rpl_tests/rpl_insert_id.test index bd815d9de02..38dfc818041 100644 --- a/mysql-test/extra/rpl_tests/rpl_insert_id.test +++ b/mysql-test/extra/rpl_tests/rpl_insert_id.test @@ -1,6 +1,4 @@ ########################################################### -# 2006-02-01: By JBM: Added 1022, ORDER BY -########################################################### # See if queries that use both auto_increment and LAST_INSERT_ID() # are replicated well ############################################################ @@ -14,9 +12,6 @@ --echo # use test; ---disable_warnings -drop table if exists t1, t2, t3; ---enable_warnings --echo # --echo # See if queries that use both auto_increment and LAST_INSERT_ID() @@ -42,9 +37,7 @@ eval create table t2(b int auto_increment, c int, key(b)) engine=$engine_type; insert into t1 values (1),(2),(3); insert into t1 values (null); insert into t2 values (null,last_insert_id()); -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; @@ -63,9 +56,7 @@ insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 values (null,last_insert_id()); SET FOREIGN_KEY_CHECKS=1; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1; select * from t2; connection master; @@ -83,17 +74,13 @@ insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 (c) select * from t1 ORDER BY a; select * from t2 ORDER BY b; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; drop table t1; drop table t2; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; --echo # --echo # Bug#8412: Error codes reported in binary log for CHARACTER SET, @@ -208,9 +195,7 @@ call foo(); select * from t1; select * from t2; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1; select * from t2; connection master; @@ -548,4 +533,5 @@ connection master; drop table t1, t2; drop procedure foo; SET @@global.concurrent_insert= @old_concurrent_insert; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test index 844f93d0906..4b883ab90d7 100644 --- a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test +++ b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test @@ -1,6 +1,4 @@ ########################################################### -# 2006-02-08: By JBM: -########################################################### # See if queries that use both auto_increment and LAST_INSERT_ID() # are replicated well ############################################################ @@ -20,9 +18,7 @@ create table t2(b int auto_increment, c int, primary key(b)); insert into t1 values (1),(2),(3); insert into t1 values (null); insert into t2 values (null,last_insert_id()); -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; @@ -41,9 +37,7 @@ insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 values (null,last_insert_id()); SET FOREIGN_KEY_CHECKS=1; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1; select * from t2; connection master; @@ -59,17 +53,13 @@ insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 (c) select * from t1 ORDER BY a; select * from t2 ORDER BY b; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; drop table t1; drop table t2; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # # Bug#8412: Error codes reported in binary log for CHARACTER SET, @@ -86,3 +76,5 @@ sync_slave_with_master; connection master; drop table t1; # End of 4.1 tests + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index c4fa9f16dc7..4a21123e8a1 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -1,6 +1,3 @@ -# Requires statement logging --- source include/have_binlog_format_statement.inc - # See if replication of a "LOAD DATA in an autoincrement column" # Honours autoincrement values # i.e. if the master and slave have the same sequence @@ -14,13 +11,10 @@ # check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and # Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986) +-- source include/have_binlog_format_statement.inc -- source include/master-slave.inc source include/have_innodb.inc; -connection slave; -reset master; -connection master; - # MTR is not case-sensitive. let $lower_stmt_head= load data; let $UPPER_STMT_HEAD= LOAD DATA; @@ -45,9 +39,7 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata2.dat' into table t2 fi create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60)); insert into t3 select * from t2; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from t1; select * from t3; @@ -59,9 +51,7 @@ drop table t2; drop table t3; create table t1(a int, b int, unique(b)); -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # See if slave stops when there's a duplicate entry for key error in LOAD DATA @@ -72,21 +62,16 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1; save_master_pos; connection slave; -# The SQL slave thread should be stopped now. ---source include/wait_for_slave_sql_to_stop.inc +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error_and_skip.inc # Skip the bad event and see if error is cleared in SHOW SLAVE STATUS by START # SLAVE, even though we are not executing any event (as sql_slave_skip_counter # takes us directly to the end of the relay log). -set global sql_slave_skip_counter=1; -start slave; sync_with_master; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); -echo Last_SQL_Errno=$last_error; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); -echo Last_SQL_Error; -echo $last_error; +--source include/check_slave_no_error.inc # Trigger error again to test CHANGE MASTER @@ -100,17 +85,15 @@ connection slave; # The SQL slave thread should be stopped now. # Exec_Master_Log_Pos should point to the start of Execute event # for last load data. ---source include/wait_for_slave_sql_to_stop.inc +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error.inc # CHANGE MASTER and see if error is cleared in SHOW SLAVE STATUS. -stop slave; +--source include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); -echo Last_SQL_Errno=$last_error; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); -echo Last_SQL_Error; -echo $last_error; +--source include/check_slave_no_error.inc # Trigger error again to test RESET SLAVE @@ -125,16 +108,14 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1; save_master_pos; connection slave; # The SQL slave thread should be stopped now. ---source include/wait_for_slave_sql_to_stop.inc +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error.inc # RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS. stop slave; reset slave; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); -echo Last_SQL_Errno=$last_error; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); -echo Last_SQL_Error; -echo $last_error; +--source include/check_slave_no_error.inc # Finally, see if logging is done ok on master for a failing LOAD DATA INFILE @@ -165,6 +146,7 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by connection slave; --source include/wait_for_slave_sql_to_stop.inc drop table t1, t2; +--source include/stop_slave_io.inc connection master; drop table t1, t2; @@ -178,7 +160,8 @@ DROP TABLE IF EXISTS t1; # BUG#48297: Schema name is ignored when LOAD DATA is written into binlog, # replication aborts --- source include/master-slave-reset.inc +-- let $rpl_only_running_threads= 1 +-- source include/rpl_reset.inc -- let $db1= b48297_db1 -- let $db2= b42897_db2 @@ -239,8 +222,7 @@ connect (conn2,localhost,root,,*NO-ONE*); -- sync_slave_with_master -- eval use $db1 -let $diff_table_1=master:$db1.t1; -let $diff_table_2=slave:$db1.t1; +let $diff_tables= master:$db1.t1, slave:$db1.t1; source include/diff_tables.inc; -- connection master @@ -251,7 +233,7 @@ source include/diff_tables.inc; -- sync_slave_with_master # BUG#49479: LOAD DATA INFILE is binlogged without escaping field names --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); @@ -262,6 +244,6 @@ SELECT * FROM t1; -- sync_slave_with_master -- connection master DROP TABLE t1; --- sync_slave_with_master # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index e714d84a51b..b812b6ebaee 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -124,7 +124,7 @@ DROP TABLE t3; # Reset binlog so that show binlog events will not show the tests # above. -source include/master-slave-reset.inc; +source include/rpl_reset.inc; connection master; create table t1(a int auto_increment primary key, b int); diff --git a/mysql-test/extra/rpl_tests/rpl_max_relay_size.test b/mysql-test/extra/rpl_tests/rpl_max_relay_size.test index 8415522ec92..d8cd4f2d284 100644 --- a/mysql-test/extra/rpl_tests/rpl_max_relay_size.test +++ b/mysql-test/extra/rpl_tests/rpl_max_relay_size.test @@ -6,9 +6,6 @@ # Requires statement logging -- source include/master-slave.inc -# We have to sync with master, to ensure slave had time to start properly -# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log. -sync_slave_with_master; connection slave; stop slave; connection master; @@ -117,3 +114,4 @@ set global max_binlog_size= @my_max_binlog_size; --echo # --echo # End of 4.1 tests --echo # +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_multi_query.test b/mysql-test/extra/rpl_tests/rpl_multi_query.test index 2438556450d..ae2a3aa45d2 100644 --- a/mysql-test/extra/rpl_tests/rpl_multi_query.test +++ b/mysql-test/extra/rpl_tests/rpl_multi_query.test @@ -7,9 +7,6 @@ # PS doesn't support multi-statements --disable_ps_protocol -- source include/master-slave.inc ---disable_warnings -drop database if exists mysqltest; ---enable_warnings create database mysqltest; delimiter /; @@ -25,4 +22,5 @@ select * from mysqltest.t1; connection master; source include/show_binlog_events.inc; drop database mysqltest; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_multi_update.test b/mysql-test/extra/rpl_tests/rpl_multi_update.test index 121ae18daa8..bf7707f9d6d 100644 --- a/mysql-test/extra/rpl_tests/rpl_multi_update.test +++ b/mysql-test/extra/rpl_tests/rpl_multi_update.test @@ -19,12 +19,11 @@ SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # End of 4.1 tests connection master; drop table t1, t2; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test b/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test index 3de1d42c34f..6b968fe2e86 100644 --- a/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test +++ b/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test @@ -226,7 +226,7 @@ connection master; # Reset both slave and master # This should reset binlog to #1 ---source include/master-slave-reset.inc +--source include/rpl_reset.inc --echo diff --git a/mysql-test/extra/rpl_tests/rpl_not_null.test b/mysql-test/extra/rpl_tests/rpl_not_null.test index 58dbd9ce29f..86f49d1665c 100644 --- a/mysql-test/extra/rpl_tests/rpl_not_null.test +++ b/mysql-test/extra/rpl_tests/rpl_not_null.test @@ -71,12 +71,10 @@ INSERT INTO t4(a) VALUES (5); sync_slave_with_master; --echo TABLES t1 and t2 must be equal otherwise an error will be thrown. -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; --echo TABLES t2 and t3 must be different. @@ -101,8 +99,7 @@ REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); sync_slave_with_master; --echo TABLES t1 and t2 must be equal otherwise an error will be thrown. -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; --echo ************* CLEANING ************* @@ -154,8 +151,7 @@ REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); --echo ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* --echo TABLES t1 and t2 must be equal otherwise an error will be thrown. sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; @@ -273,7 +269,7 @@ sync_slave_with_master; # SELECT * FROM t3 ORDER BY a; # connection slave; # SELECT * FROM t3 ORDER BY a; -# --source include/reset_master_and_slave.inc +# --source include/rpl_reset.inc # # connection master; # diff --git a/mysql-test/extra/rpl_tests/rpl_record_compare.test b/mysql-test/extra/rpl_tests/rpl_record_compare.test index dc27dcb1f9d..f29e4fb791a 100644 --- a/mysql-test/extra/rpl_tests/rpl_record_compare.test +++ b/mysql-test/extra/rpl_tests/rpl_record_compare.test @@ -4,7 +4,7 @@ # -- echo ## case #1 - last_null_bit_pos==0 in record_compare without X bit --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master -- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1 @@ -16,8 +16,7 @@ UPDATE t1 SET c5 = 'a'; -- enable_warnings -- sync_slave_with_master --- let $diff_table_1= master:test.t1 --- let $diff_table_2= slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc --connection master @@ -26,7 +25,7 @@ DROP TABLE t1; -- echo ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit -- echo ## (1 column less and no varchar) --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master -- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1 @@ -38,8 +37,7 @@ UPDATE t1 SET c5 = 'a'; -- enable_warnings -- sync_slave_with_master --- let $diff_table_1= master:test.t1 --- let $diff_table_2= slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc --connection master @@ -48,7 +46,7 @@ DROP TABLE t1; -- echo ## case #2 - X bit is wrongly set. --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master -- eval CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=$engine DEFAULT CHARSET= latin1 @@ -57,8 +55,7 @@ INSERT INTO t1(c1) VALUES (NULL); UPDATE t1 SET c1= 0; -- sync_slave_with_master --- let $diff_table_1= master:test.t1 --- let $diff_table_2= slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master diff --git a/mysql-test/extra/rpl_tests/rpl_reset_slave.test b/mysql-test/extra/rpl_tests/rpl_reset_slave.test index 5c7d33d519e..04ab8751e39 100644 --- a/mysql-test/extra/rpl_tests/rpl_reset_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_reset_slave.test @@ -54,9 +54,9 @@ source include/check_slave_no_error.inc; change master to master_user='impossible_user_name'; start slave; let $slave_io_errno= 1045; -source include/wait_for_slave_io_error.inc; +--source include/wait_for_slave_io_error.inc +--source include/stop_slave_sql.inc -source include/stop_slave.inc; change master to master_user='root'; source include/start_slave.inc; source include/check_slave_no_error.inc; @@ -69,8 +69,11 @@ source include/stop_slave.inc; change master to master_user='impossible_user_name'; start slave; let $slave_io_errno= 1045; -source include/wait_for_slave_io_error.inc; +--source include/wait_for_slave_io_error.inc +--source include/stop_slave_sql.inc -source include/stop_slave.inc; reset slave; source include/check_slave_no_error.inc; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_row_UUID.test b/mysql-test/extra/rpl_tests/rpl_row_UUID.test index 9f2dbb4ce4b..368596d4fbc 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_UUID.test +++ b/mysql-test/extra/rpl_tests/rpl_row_UUID.test @@ -75,5 +75,3 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_master.sql $MYSQLTEST_VARDIR/tmp/r # this cleanup as no other test will use these files and they'll # be removed at next testsuite run. -# End of 5.0 test case --- source include/master-slave-end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test index 84f7b79e733..c8de853a297 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_basic.test +++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test @@ -241,7 +241,7 @@ DELETE FROM t1; sync_slave_with_master; # Just to get a clean binary log -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc --echo **** On Master **** connection master; @@ -353,8 +353,7 @@ INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; --echo [expecting slave to replicate correctly] @@ -363,8 +362,7 @@ INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); sync_slave_with_master; -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; --echo [expecting slave to stop] @@ -374,16 +372,12 @@ INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); connection slave; # 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF ---let $slave_sql_errno= 1535 +--let $slave_sql_errno= 1535 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc -connection master; -RESET MASTER; -connection slave; -STOP SLAVE; -RESET SLAVE; -START SLAVE; -source include/wait_for_slave_to_start.inc; + +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc --echo [expecting slave to replicate correctly] connection master; @@ -391,8 +385,7 @@ INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); sync_slave_with_master; -let $diff_table_1=master:test.t4; -let $diff_table_2=slave:test.t4; +let $diff_tables= master:t4, slave:t4; source include/diff_tables.inc; --echo [expecting slave to stop] @@ -402,16 +395,11 @@ INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); connection slave; # 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF ---let $slave_sql_errno= 1535 +--let $slave_sql_errno= 1535 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc -connection master; -RESET MASTER; -connection slave; -STOP SLAVE; -RESET SLAVE; -START SLAVE; -source include/wait_for_slave_to_start.inc; + +--source include/rpl_reset.inc --echo [expecting slave to stop] connection master; @@ -420,16 +408,11 @@ INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); connection slave; # 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF ---let $slave_sql_errno= 1535 +--let $slave_sql_errno= 1535 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc -connection master; -RESET MASTER; -connection slave; -STOP SLAVE; -RESET SLAVE; -START SLAVE; -source include/wait_for_slave_to_start.inc; + +--source include/rpl_reset.inc --echo [expecting slave to replicate correctly] connection master; @@ -437,8 +420,7 @@ INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); sync_slave_with_master; -let $diff_table_1=master:test.t7; -let $diff_table_2=slave:test.t7; +let $diff_tables= master:t7, slave:t7; source include/diff_tables.inc; connection master; @@ -458,8 +440,7 @@ UPDATE t1 SET a = 10; INSERT INTO t1 VALUES (4); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; @@ -537,8 +518,7 @@ UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; --sync_slave_with_master --echo *** results: t2 must be consistent **** -let $diff_table_1=master:test.t2; -let $diff_table_2=master:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; --connection master @@ -576,8 +556,7 @@ UPDATE t1 SET a = 8 WHERE a < 5; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; @@ -639,8 +618,7 @@ UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test b/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test index 214027160a9..bad308ff814 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test +++ b/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test @@ -14,9 +14,8 @@ flush tables; SELECT * FROM t1 ORDER BY a; sync_slave_with_master; -connection master; -sync_slave_with_master; SELECT * FROM t1 ORDER BY a; connection master; drop table t1; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp002.test b/mysql-test/extra/rpl_tests/rpl_row_sp002.test index 5a2ab1912b8..c52cf344c5f 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_sp002.test +++ b/mysql-test/extra/rpl_tests/rpl_row_sp002.test @@ -1,9 +1,6 @@ ############################################################################# # This test is being created to test out the non deterministic items with # # row based replication. # -# Original Author: JBM # -# Original Date: Aug/09/2005 # -# Updated: Aug/29/2005 # ############################################################################# # Test: Contains two stored procedures test one that insert data into tables# # and use the LAST_INSERTED_ID() on tables with FOREIGN KEY(a) # @@ -13,9 +10,6 @@ # the table depending on the CASE outcome. The test uses this SP in a# # transaction first rolling back and then commiting, # ############################################################################# -# Mod Date: 08/22/2005 # -# TEST: Added test to include UPDATE CASCADE on table with FK per Trudy # -############################################################################# @@ -24,18 +18,6 @@ -- source include/master-slave.inc -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings -# End of cleanup - # Begin test section 1 eval CREATE TABLE test.t1 (a INT AUTO_INCREMENT KEY, t CHAR(6)) ENGINE=$engine_type; @@ -71,9 +53,7 @@ SELECT * FROM test.t2; let $message=< -- test 1 select slave after p1 -- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; SELECT * FROM test.t2; @@ -86,9 +66,7 @@ SELECT * FROM test.t2; let $message=< -- test 1 select slave after p2 -- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; SELECT * FROM test.t2; @@ -136,9 +114,7 @@ SELECT * FROM test.t2; let $message=< -- test 2 select Slave after p1 -- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; SELECT * FROM test.t2; @@ -153,9 +129,7 @@ SELECT * FROM test.t2; let $message=< -- test 1 select Slave after p2 -- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; SELECT * FROM test.t2; @@ -195,9 +169,7 @@ while ($n) ROLLBACK; select * from test.t3; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from test.t3; connection master; @@ -216,9 +188,7 @@ while ($n) COMMIT; select * from test.t3; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select * from test.t3; connection master; @@ -228,12 +198,12 @@ connection master; # First lets cleanup SET AUTOCOMMIT=1; SET FOREIGN_KEY_CHECKS=0; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -sync_slave_with_master; +DROP PROCEDURE test.p3; +DROP PROCEDURE test.p1; +DROP PROCEDURE test.p2; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp007.test b/mysql-test/extra/rpl_tests/rpl_row_sp007.test index 8f2b72e4d32..492cd2d88f1 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_sp007.test +++ b/mysql-test/extra/rpl_tests/rpl_row_sp007.test @@ -1,8 +1,4 @@ ############################################################################# -# Original Author: JBM # -# Original Date: Aug/15/2005 # -# Updated: 08/29/2005 Remove sleeps # -############################################################################# # TEST: SP that creates table, starts tranaction inserts. Save point, insert# # rollback to save point and then commits. # ############################################################################# @@ -10,14 +6,6 @@ -- source include/have_binlog_format_row.inc -- source include/master-slave.inc -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; ---enable_warnings -# End of cleanup - # Begin test section 1 delimiter |; eval CREATE PROCEDURE test.p1(IN i INT) @@ -42,9 +30,7 @@ SELECT * FROM test.t1; let $message=< ---- Slave selects-- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; let $message=< ---- Master selects-- >; @@ -55,16 +41,15 @@ SELECT * FROM test.t1; let $message=< ---- Slave selects-- >; --source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; SELECT * FROM test.t1; connection master; #show binlog events; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; +DROP PROCEDURE test.p1; +DROP TABLE test.t1; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_set_null.test b/mysql-test/extra/rpl_tests/rpl_set_null.test index f2aba089279..3755c8bbfa5 100644 --- a/mysql-test/extra/rpl_tests/rpl_set_null.test +++ b/mysql-test/extra/rpl_tests/rpl_set_null.test @@ -29,7 +29,7 @@ # BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on # delete cant find record --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master -- eval CREATE TABLE t1 (c1 BIT, c2 INT) Engine=$engine @@ -37,8 +37,7 @@ INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master @@ -46,15 +45,14 @@ UPDATE t1 SET c1=NULL where c2=1; DELETE FROM t1 WHERE c2=1 LIMIT 1; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE t1; -- sync_slave_with_master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master @@ -68,8 +66,7 @@ SELECT * FROM t1; UPDATE t1 SET c1=NULL WHERE c1='w'; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master @@ -77,8 +74,7 @@ UPDATE t1 SET c1=NULL WHERE c1='w'; DELETE FROM t1 LIMIT 2; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master diff --git a/mysql-test/extra/rpl_tests/rpl_stm_000001.test b/mysql-test/extra/rpl_tests/rpl_stm_000001.test deleted file mode 100644 index 4397e81aadf..00000000000 --- a/mysql-test/extra/rpl_tests/rpl_stm_000001.test +++ /dev/null @@ -1,131 +0,0 @@ -# Requires binlog_format=statement format since query involving -# get_lock() is logged in row format if binlog_format=mixed or row. --- source include/have_binlog_format_statement.inc --- source include/master-slave.inc - -CALL mtr.add_suppression("Statement may not be safe to log in statement format."); - -# Load some data into t1 -create table t1 (word char(20) not null); -load data infile '../../std_data/words.dat' into table t1; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1; -select * from t1 limit 10; - -# -# Test slave with wrong password -# -sync_slave_with_master; -stop slave; -connection master; -set password for root@"localhost" = password('foo'); -connection slave; -start slave; -connection master; -# -# Give slave time to do at last one failed connect retry -# This one must be short so that the slave will not stop retrying -real_sleep 2; -set password for root@"localhost" = password(''); -# Give slave time to connect (will retry every second) -sleep 2; - -create table t3(n int); -insert into t3 values(1),(2); -sync_slave_with_master; -select * from t3; -select sum(length(word)) from t1; -connection master; -drop table t1,t3; -sync_slave_with_master; - -# Test if the slave SQL thread can be more than 16K behind the slave -# I/O thread (> IO_SIZE) - -connection master; -# we'll use table-level locking to delay slave SQL thread -eval create table t1 (n int) engine=$engine_type; -sync_slave_with_master; -connection master; -reset master; -connection slave; -stop slave; -reset slave; - -connection master; -let $1=5000; -# Generate 16K of relay log -disable_query_log; -while ($1) -{ - eval insert into t1 values($1); - dec $1; -} -enable_query_log; - -# Try to cause a large relay log lag on the slave by locking t1 -connection slave; -lock tables t1 read; -start slave; -#hope this is long enough for I/O thread to fetch over 16K relay log data -sleep 3; -unlock tables; - -#test handling of aborted connection in the middle of update - -connection master; -create table t2(id int); -insert into t2 values(connection_id()); - -connection master1; -# Avoid generating result -create temporary table t3(n int); ---disable_warnings -insert into t3 select get_lock('crash_lock%20C', 1) from t2; ---enable_warnings - -connection master; -send update t1 set n = n + get_lock('crash_lock%20C', 2); -connection master1; -sleep 3; -select (@id := id) - id from t2; -kill @id; -# We don't drop t3 as this is a temporary table -drop table t2; -connection master; -# The get_lock function causes warning for unsafe statement. ---disable_warnings ---error 1317,2013 -reap; ---enable_warnings -connection slave; -# The SQL slave thread should now have stopped because the query was killed on -# the master (so it has a non-zero error code in the binlog). ---source include/wait_for_slave_sql_to_stop.inc - -# The following test can't be done because the result of Pos will differ -# on different computers -# --replace_result $MASTER_MYPORT MASTER_PORT -# show slave status; - -set global sql_slave_skip_counter=1; -start slave; -select count(*) from t1; -connection master1; -drop table t1; -create table t1 (n int); -insert into t1 values(3456); -insert into mysql.user (Host, User, Password) - VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); -select select_priv,user from mysql.user where user = _binary'blafasel2'; -update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; -select select_priv,user from mysql.user where user = _binary'blafasel2'; -sync_slave_with_master; -select n from t1; -select select_priv,user from mysql.user where user = _binary'blafasel2'; -connection master1; -drop table t1; -delete from mysql.user where user="blafasel2"; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test index 2c396c9a209..d4140785878 100644 --- a/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test +++ b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test @@ -30,6 +30,11 @@ let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); --echo Error: "$error" (expected different error codes on master and slave) --echo Errno: "$errno" (expected 0) drop table t1; +--source include/stop_slave.inc +# Clear error messages. +RESET SLAVE; # End of 4.1 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test b/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test index 65d2483dc4b..cecbd45c02a 100644 --- a/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test +++ b/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test @@ -19,10 +19,13 @@ eval CREATE $_temporary TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 SELECT 'abc' AS c3, 1 AS c4; source include/show_binlog_events.inc; +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:t1,slave:t1 + --source include/diff_tables.inc } --echo @@ -36,10 +39,13 @@ eval CREATE $_temporary TABLE IF NOT EXISTS t1 SELECT 'abc', 2; source include/show_binlog_events.inc; +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:t1,slave:t1 + --source include/diff_tables.inc } --echo @@ -57,10 +63,13 @@ eval CREATE $_temporary TABLE IF NOT EXISTS test.t1 SELECT 'abc', 20; source include/show_binlog_events.inc; +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:test.t1,slave:test.t1 + --source include/diff_tables.inc } USE test; DROP DATABASE db1; @@ -74,10 +83,13 @@ eval CREATE $_temporary TABLE IF NOT EXISTS t1 REPLACE SELECT '123', 2; source include/show_binlog_events.inc; +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:t1,slave:t1 + --source include/diff_tables.inc } --echo @@ -89,10 +101,13 @@ eval CREATE $_temporary TABLE IF NOT EXISTS t1 IGNORE SELECT '123', 2; source include/show_binlog_events.inc; +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:t1,slave:t1 + --source include/diff_tables.inc } --echo @@ -103,10 +118,14 @@ let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); eval CREATE $_temporary TABLE IF NOT EXISTS t1 SELECT '123', 2; source include/show_binlog_events.inc; + +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:t1,slave:t1 + --source include/diff_tables.inc } --echo @@ -121,10 +140,13 @@ eval CREATE $_temporary TABLE IF NOT EXISTS t1 IGNORE (SELECT '123', 3) UNION (SELECT '123', 4); source include/show_binlog_events.inc; +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:t1,slave:t1 + --source include/diff_tables.inc } if (!$is_temporary) @@ -155,10 +177,14 @@ let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); call p1(500); call p1(600); source include/show_binlog_events.inc; + +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:t1,slave:t1 + --source include/diff_tables.inc } DROP PROCEDURE p1; @@ -173,10 +199,14 @@ EXECUTE stm USING @a; SET @a= 800; EXECUTE stm USING @a; source include/show_binlog_events.inc; + +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:t1,slave:t1 + --source include/diff_tables.inc } --echo @@ -224,10 +254,13 @@ eval /*!CREATE $_temporary TABLE IF NOT EXISTS t1 */SELECT 'abc', 905; source include/show_binlog_events.inc; +--sync_slave_with_master +--connection master + if (!$is_temporary) { - let $diff_table= test.t1; - source include/rpl_diff_tables.inc; + --let $diff_tables= master:t1,slave:t1 + --source include/diff_tables.inc } DROP TABLE t2; diff --git a/mysql-test/extra/rpl_tests/rpl_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_stop_slave.test index 7c88afe3532..ec6f297caec 100644 --- a/mysql-test/extra/rpl_tests/rpl_stop_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_stop_slave.test @@ -52,8 +52,7 @@ source include/wait_for_slave_sql_to_stop.inc; --echo # Slave should stop after the transaction has committed. --echo # So t1 on master is same to t1 on slave. -let diff_table_1=master:test.t1; -let diff_table_2=slave:test.t1; +let diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection slave; diff --git a/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test b/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test index 3b6fe7a0ef4..bb740e59b11 100644 --- a/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test +++ b/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test @@ -1,12 +1,3 @@ -#################### -# Change Author: JBM -# Change Date: 2006-01-17 -# Change: Added order by in select -#################### -# Change Date: 2006-02-02 -# Change: renamed to make bettre sense, -# and wrapped per Engine test -############################ source include/master-slave.inc; # @@ -32,4 +23,4 @@ connection master; DROP TABLE t1; sync_slave_with_master; -# End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_test_framework.inc b/mysql-test/extra/rpl_tests/rpl_test_framework.inc new file mode 100644 index 00000000000..fb42d2efb9a --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_test_framework.inc @@ -0,0 +1,86 @@ +# ==== Purpose ==== +# +# Auxiliary file used by suite/rpl/t/rpl_test_framework.test +# +# The purpose is to check that the sync chain generated in +# rpl_change_topology.inc (invoked from rpl_init.inc) is correct. This +# is done in two ways: +# (1) Print the sync chain. +# (2) Execute a statement and verify that it replicates to all slaves. +# +# +# ==== Implementation ==== +# +# Does this: +# (1) Set up a given replication topology (rpl_init.inc) +# (2) Print $rpl_sync_chain +# (3) Execute "DELETE FROM t1" and then "INSERT INTO t1" on the master +# (4) Sync and compare all servers. +# (5) Clean up the replication topology (rpl_end.inc) +# +# (Technical detail: Since DELETE FROM t1 is not executed at the end, +# some servers may have rows left in t1 from a previous invocation of +# rpl_test_framework.inc. Therefore, this file will only work in +# statement mode where "DELETE FROM t1" removes rows that exist on +# slave but not on master.) +# +# +# ==== Usage ==== +# +# --let $rpl_server_count= +# --let $rpl_topology= +# --let $masters= +# [--let $rpl_diff_servers= ] +# --source extra/rpl_tests/rpl_test_framework.inc +# +# Parameters: +# $next_number +# The INSERT statement will insert $next_number into t1, and +# $next_number will increase by 1. +# +# $rpl_server_count, $rpl_topology: +# See include/rpl_init.inc +# +# $masters +# This should be a list of numbers, each identifying a server. +# The DELETE and INSERT statements will be executed on all servers +# in the list. +# +# $rpl_diff_servers +# See include/rpl_diff.inc + +--source include/rpl_init.inc +--source include/rpl_generate_sync_chain.inc +--echo rpl_sync_chain= '$rpl_sync_chain' + +--inc $next_number + +# Iterate over masters +while ($masters) +{ + --let $master_i= `SELECT SUBSTRING_INDEX('$masters', ',', 1)` + --let $masters= `SELECT SUBSTRING('$masters', LENGTH('$master_i') + 2)` + + # Connect to master and execute statement + --let $rpl_connection_name= server_$master_i + --source include/rpl_connection.inc + DELETE FROM t1; + --eval INSERT INTO t1 VALUES ($next_number) +} + +--source include/rpl_sync.inc + +# Compare all servers. +--let $diff_tables= server_$rpl_server_count:t1 +--let $server_i= $rpl_server_count +--dec $server_i +while ($server_i) +{ + --let $diff_tables= server_$server_i:t1,$diff_tables + --dec $server_i +} +--source include/diff_tables.inc + +--let $diff_servers= +--let $masters= +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_truncate.test b/mysql-test/extra/rpl_tests/rpl_truncate.test index 7036ab126e1..c1d70b4dab2 100644 --- a/mysql-test/extra/rpl_tests/rpl_truncate.test +++ b/mysql-test/extra/rpl_tests/rpl_truncate.test @@ -1,11 +1,6 @@ -# -# Copyright 2006 MySQL. All rights reserved. -# # Test to check for the different version of truncating a table. # The statements are "TRUNCATE tbl" and "DELETE FROM tbl". We check # the behaviour of each possible value for BINLOG_FORMAT. -# -# Author(s): Mats Kindahl --source include/master-slave.inc @@ -14,3 +9,5 @@ let $trunc_stmt = TRUNCATE TABLE; let $trunc_stmt = DELETE FROM; --source extra/rpl_tests/rpl_truncate_helper.test + +--source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test index cd1ce93177a..d1d0e06e32f 100644 --- a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test +++ b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test @@ -1,4 +1,4 @@ -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc --echo **** On Master **** connection master; @@ -10,8 +10,7 @@ connection master; eval $trunc_stmt t1; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; --echo ==== Test using a table with delete triggers ==== @@ -26,8 +25,7 @@ connection master; eval $trunc_stmt t1; sync_slave_with_master; -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; connection master; diff --git a/mysql-test/include/analyze-sync_with_master.test b/mysql-test/include/analyze-sync_with_master.test index 684c0dbbab7..27b5a56c6b1 100644 --- a/mysql-test/include/analyze-sync_with_master.test +++ b/mysql-test/include/analyze-sync_with_master.test @@ -1,6 +1,9 @@ -SHOW PROCESSLIST; +# ==== Purpose ==== +# +# This is an auxiliary file that mysqltest executes when +# sync_slave_with_master or sync_with_master fails. The purpose is to +# print debug information. -let $binlog_name= query_get_value("SHOW MASTER STATUS", File, 1); -eval SHOW BINLOG EVENTS IN '$binlog_name'; - -exit; \ No newline at end of file +--let $rpl_server_count= 0 +--let $rpl_only_current_connection= 1 +--source include/show_rpl_debug_info.inc diff --git a/mysql-test/include/assert.inc b/mysql-test/include/assert.inc new file mode 100644 index 00000000000..34cc71e7c25 --- /dev/null +++ b/mysql-test/include/assert.inc @@ -0,0 +1,175 @@ +# ==== Purpose ==== +# +# Check if a condition holds, fail with debug info if not. +# +# The condition is parsed before executed. The following constructs +# are supported: +# +# [SQL_STATEMENT, COLUMN, ROW] +# The square bracket is replaced by the result from SQL_STATEMENT, +# in the given COLUMN and ROW. +# +# Optionally, SQL_STATEMENT may have the form: +# connection:SQL_STATEMENT +# In this case, SQL_STATEMENT is executed on the named connection. +# All other queries executed by this script will be executed on +# the connection that was in use when this script was started. +# The current connection will also be restored at the end of this +# script. +# +# Nested sub-statements on this form are not allowed. +# +# <1> +# This is a shorthand for the result of the first executed square +# bracket. <2> is a shorthand for the second executed square +# bracket, and so on. +# +# ==== Usage ==== +# +# --let $assert_text= Relay_Log_Pos must be between min_pos and max_pos +# --let $assert_cond= [SHOW SLAVE STATUS, Relay_Log_Pos, 1] >= $min_pos AND <1> <= $max_pos +# [--let $assert_quiet= 1] +# [--let $rpl_debug= 1] +# --source include/assert.inc +# +# Parameters: +# +# $assert_text +# Text that describes what is being checked. This text is written to +# the query log so it should not contain non-deterministic elements. +# +# $assert_cond +# Condition to check. See above for details about the format. The +# condition will be executed as `SELECT $assert_cond`. +# +# Both $assert_cond and the result from any substatement on the +# form [SQL_STATEMENT, COLUMN, ROW] will be used in SQL statements, +# inside single quotes (as in '$assert_text'). So any single quotes +# in these texts must be escaped or replaced by double quotes. +# +# $rpl_debug +# Print extra debug info. + + +--let $include_filename= assert.inc [$assert_text] +--source include/begin_include_file.inc + +if ($rpl_debug) +{ + --echo # debug: assert_text='$assert_text' assert_cond='$assert_cond' +} + +# Sanity-check input +if (!$assert_text) +{ + --die ERROR IN TEST: the mysqltest variable rpl_test must be set +} + +--let $_assert_old_connection= $CURRENT_CONNECTION + +# Evaluate square brackets in cond. +--let $_assert_substmt_number= 1 +--let $_assert_cond_interp= '$assert_cond' +--let $_assert_lbracket= `SELECT LOCATE('[', $_assert_cond_interp)` +while ($_assert_lbracket) +{ + # Get position of right bracket + --let $_assert_rbracket= `SELECT LOCATE(']', $_assert_cond_interp)` + if (!$_assert_rbracket) + { + --echo BUG IN TEST: Mismatching square brackets in assert_cond. + --echo Original assert_cond='$assert_cond' + --echo Interpolated assert_cond=$_assert_cond_interp + --die BUG IN TEST: Mismatching square brackets in $assert_cond + } + + # Get sub-statement from statement. Preserve escapes for single quotes. + --let $_assert_full_substmt= `SELECT QUOTE(SUBSTRING($_assert_cond_interp, $_assert_lbracket + 1, $_assert_rbracket - $_assert_lbracket - 1))` + + # Get connection from sub-statement + --let $_assert_colon= `SELECT IF($_assert_full_substmt REGEXP '^[a-zA-Z_][a-zA-Z_0-9]*:', LOCATE(':', $_assert_full_substmt), 0)` + --let $_assert_connection= + --let $_assert_substmt= $_assert_full_substmt + if ($_assert_colon) + { + --let $_assert_connection= `SELECT SUBSTRING($_assert_substmt, 1, $_assert_colon - 1)` + # Preserve escapes for single quotes. + --let $_assert_substmt= `SELECT QUOTE(SUBSTRING($_assert_substmt, $_assert_colon + 1))` + } + + # Interpolate escapes before using condition outside string context. + --let $_assert_substmt_interp= `SELECT $_assert_substmt` + + # Execute and get result from sub-statement + if ($_assert_connection) + { + if ($rpl_debug) + { + --echo # debug: connection='$_assert_connection' sub-statement=$_assert_substmt + } + --let $rpl_connection_name= $_assert_connection + --source include/rpl_connection.inc + --let $_assert_substmt_result= query_get_value($_assert_substmt_interp) + --let $rpl_connection_name= $_assert_old_connection + --source include/rpl_connection.inc + } + if (!$_assert_connection) + { + if ($rpl_debug) + { + --echo # debug: old connection, sub-statement=$_assert_substmt + } + --let $_assert_substmt_result= query_get_value($_assert_substmt_interp) + } + if ($rpl_debug) + { + --echo # debug: result of sub-statement='$_assert_substmt_result' + } + + # Replace sub-statement by its result + --let $_assert_cond_interp= `SELECT QUOTE(REPLACE($_assert_cond_interp, CONCAT('[', $_assert_full_substmt, ']'), '$_assert_substmt_result'))` + # Replace result references by result + --let $_assert_cond_interp= `SELECT QUOTE(REPLACE($_assert_cond_interp, '<$_assert_substmt_number>', '$_assert_substmt_result'))` + + --let $_assert_lbracket= `SELECT LOCATE('[', $_assert_cond_interp)` + + --inc $_assert_substmt_number +} + +# Interpolate escapes before using condition outside string context. +--let $_assert_cond_interp= `SELECT $_assert_cond_interp` + +if ($rpl_debug) +{ + --echo # debug: interpolated_cond='$_assert_cond_interp' +} + +# Execute. +--let $_assert_result= `SELECT $_assert_cond_interp` + +if ($rpl_debug) +{ + --echo # debug: result='$_assert_result' +} + +# Check. +if (!$_assert_result) +{ + --echo ######## Test assertion failed: $assert_text ######## + --echo Dumping debug info: + if ($rpl_inited) + { + --source include/show_rpl_debug_info.inc + } + --echo Assertion text: '$assert_text' + --echo Assertion condition: '$assert_cond' + --echo Assertion condition, interpolated: '$_assert_cond_interp' + --echo Assertion result: '$_assert_result' + --die Test assertion failed in assertion.inc +} + +--let $include_filename= assert.inc [$assert_text] +--source include/end_include_file.inc + +--let $assert_text= +--let $assert_cond= diff --git a/mysql-test/include/begin_include_file.inc b/mysql-test/include/begin_include_file.inc new file mode 100644 index 00000000000..98d3a1743ee --- /dev/null +++ b/mysql-test/include/begin_include_file.inc @@ -0,0 +1,82 @@ +# ==== Purpose ==== +# +# This is an auxiliary file that facilitates writing include/*.inc +# files. It has three purposes: +# +# 1. Store mtr's state at the beginning of the .inc file and restore +# the state at the end. The following status is restored: +# +# disable_warnings +# disable_query_log +# disable_result_log +# disable_abort_on_errors +# Current connection +# +# 2. This file also prints the name of the .inc file that sources +# it. Only the name of the top-level .inc file is printed: if +# file_1.inc sources file_2.inc, then this file only prints +# file_1.inc. +# +# 3. If the mysqltest variable $rpl_debug is set, then +# this file will print: +# +# ==== BEGIN include/ ==== +# +# and end_include_file.inc will print +# +# ==== END include/ ==== +# +# These printouts are indented to make it easier to read the +# result log. +# +# +# ==== Usage ==== +# +# # At the beginning of include/my_file.inc: +# --let $include_filename= my_file.inc +# [--let $rpl_debug= 1] +# --source include/begin_include_file.inc +# +# # At the end of include/my_file.inc: +# --let $include_filename= my_file.inc +# --source include/end_include_file.inc +# +# Parameters: +# $include_filename +# The basename of the file: a file named /path/to/my_file.inc +# should set $include_filename=my_file.inc. This parameter +# must be provided both for begin_include_file.inc and +# end_include_file.inc. +# +# $rpl_debug +# If set, this script will print the following text: +# ==== BEGIN include/$include_filename.inc ==== + + +# Print 'include/$include_filename', but only when invoked from +# the top-level. We don't want to print +# 'include/$include_filename' from all files included +# recursively. +if (!$_include_file_depth) +{ + --echo include/$include_filename +} +--inc $_include_file_depth +if ($rpl_debug) +{ + --echo $_include_file_indent==== BEGIN include/$include_filename ==== +} + +--let $_include_file_enabled_warnings= $ENABLED_WARNINGS$_include_file_enabled_warnings +--let $_include_file_enabled_query_log= $ENABLED_QUERY_LOG$_include_file_enabled_query_log +--let $_include_file_enabled_result_log= $ENABLED_RESULT_LOG$_include_file_enabled_result_log +--let $_include_file_enabled_abort_on_error= $ENABLED_ABORT_ON_ERROR$_include_file_enabled_abort_on_error +--let $_include_file_connection= $CURRENT_CONNECTION,$_include_file_connection + +if ($rpl_debug) +{ + --echo $_include_file_indent con='$CURRENT_CONNECTION' warn='$ENABLED_WARNINGS' qlog='$ENABLED_QUERY_LOG' rlog='$ENABLED_RESULT_LOG' aborterr='$ENABLED_ABORT_ON_ERROR' +} + +--let $include_filename= +--let $_include_file_indent= .$_include_file_indent diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test index 6dcb01c13cf..88b56c95cec 100644 --- a/mysql-test/include/check-testcase.test +++ b/mysql-test/include/check-testcase.test @@ -8,8 +8,10 @@ # any unwanted side affects. # --disable_query_log +--replace_column 5 # 6 # 7 # 8 # 9 # 10 # 22 # 23 # 24 # 25 # 26 # +query_vertical +SHOW SLAVE STATUS; + call mtr.check_testcase(); --enable_query_log - - diff --git a/mysql-test/include/check_slave_is_running.inc b/mysql-test/include/check_slave_is_running.inc index 5fbbe0d684c..88664da7fa7 100644 --- a/mysql-test/include/check_slave_is_running.inc +++ b/mysql-test/include/check_slave_is_running.inc @@ -2,17 +2,29 @@ # # Assert that the slave threads are running and don't have any errors. # +# # ==== Usage ==== # -# --source include/check_slave_running.inc +# [--let $rpl_debug= 1] +# --source include/check_slave_is_running.inc +# +# Parameters: +# $rpl_debug +# See include/rpl_init.inc ---echo Checking that both slave threads are running. ---let $slave_sql_running = query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1) ---let $slave_io_running = query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1) +--let $include_filename= check_slave_is_running.inc +--source include/begin_include_file.inc -if (`SELECT '$slave_sql_running' != 'Yes' OR '$slave_io_running' != 'Yes'`) { - --echo Slave not running: Slave_SQL_Running = $slave_sql_running Slave_IO_Running = $slave_io_running - --source include/show_rpl_debug_info.inc - --die Expected slave to be running, but it was not running. -} + +--let $slave_param= Slave_IO_Running +--let $slave_param_value= Yes +--source include/check_slave_param.inc + +--let $slave_param= Slave_SQL_Running +--let $slave_param_value= Yes +--source include/check_slave_param.inc + + +--let $include_filename= check_slave_is_running.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/check_slave_no_error.inc b/mysql-test/include/check_slave_no_error.inc index 371db5ed6a0..9922b426ed6 100644 --- a/mysql-test/include/check_slave_no_error.inc +++ b/mysql-test/include/check_slave_no_error.inc @@ -1,12 +1,22 @@ # ==== Purpose ==== # -# Assert that Slave_SQL_Error and Slave_IO_Error are empty. +# Assert that Slave_SQL_Errno = Slave_IO_Errno = 0 in the output from +# SHOW SLAVE STATUS. +# # # ==== Usage ==== # -# --let $slave_param= Exec_Master_Log_Pos -# --let $slave_param_value= 4711 -# --source include/check_slave_running.inc +# [--let $rpl_debug= 1] +# --source include/check_slave_no_error.inc +# +# Parameters: +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= check_slave_no_error.inc +--source include/begin_include_file.inc + --let $slave_param= Last_SQL_Errno --let $slave_param_value= 0 @@ -15,3 +25,7 @@ --let $slave_param= Last_IO_Errno --let $slave_param_value= 0 --source include/check_slave_param.inc + + +--let $include_filename= check_slave_no_error.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/check_slave_param.inc b/mysql-test/include/check_slave_param.inc index d82c26851ea..1e0e81308f2 100644 --- a/mysql-test/include/check_slave_param.inc +++ b/mysql-test/include/check_slave_param.inc @@ -4,13 +4,33 @@ # # ==== Usage ==== # -# --let $slave_param= Exec_Master_Log_Pos -# --let $slave_param_value= 4711 +# --let $slave_param= COLUMN_NAME +# --let $slave_param_value= VALUE +# [--let $rpl_debug= 1] # --source include/check_slave_param.inc +# +# Parameters: +# $slave_param, $slave_param_value +# Column name in output of SHOW SLAVE STATUS that should be checked, +# and the expected value. Example: +# --let $slave_param= Exec_Master_Log_Pos +# --let $slave_param_value= 4711 +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= check_slave_param.inc [$slave_param] +--source include/begin_include_file.inc + --let $_param_value= query_get_value(SHOW SLAVE STATUS, $slave_param, 1) if (`SELECT '$_param_value' != '$slave_param_value'`) { - --echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value' --source include/show_rpl_debug_info.inc + --echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value' --die Wrong value for slave parameter } + + +--let $include_filename= check_slave_param.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/circular_rpl_for_4_hosts_init.inc b/mysql-test/include/circular_rpl_for_4_hosts_init.inc deleted file mode 100644 index ac6654777db..00000000000 --- a/mysql-test/include/circular_rpl_for_4_hosts_init.inc +++ /dev/null @@ -1,130 +0,0 @@ -############################################################# -# -# Author: Serge Kozlov -# Date: 03/11/2008 -# Purpose: Set up circular replication based on schema -# A->B->C->D->A -# -# Notes: -# 1. --slave-num=3 must be added to *-master.opt file -# 2. Even the test uses new names for servers but file names -# of log files are still old: -# master_a -> master.[log|err] -# master_b -> slave.[log|err] -# master_c -> slave1.[log|err] -# master_d -> slave2.[log|err] -# -############################################################# ---source include/master-slave.inc - -# -# Set up circular ring by schema A->B->C->D->A -# - ---connection slave -STOP SLAVE; -RESET SLAVE; - -# master a ---connection master ---disconnect master -connect (master_a,127.0.0.1,root,,test,$MASTER_MYPORT,); -RESET MASTER; ---disable_warnings -STOP SLAVE; ---enable_warnings -RESET SLAVE; -SET auto_increment_increment = 4; -SET auto_increment_offset = 1; -let $_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); - -# master b ---connection slave ---disconnect slave -connect (master_b,127.0.0.1,root,,test,$SLAVE_MYPORT,); -RESET MASTER; -RESET SLAVE; ---replace_result $MASTER_MYPORT MASTER_A_PORT $_binlog_file MASTER_A_LOG_FILE ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root',MASTER_LOG_FILE='$_binlog_file' -SET auto_increment_increment = 4; -SET auto_increment_offset = 2; -let $_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); - -# master c ---connection slave1 ---disconnect slave1 -connect (master_c,127.0.0.1,root,,test,$SLAVE_MYPORT1,); -RESET MASTER; ---disable_warnings -STOP SLAVE; ---enable_warnings -RESET SLAVE; ---replace_result $SLAVE_MYPORT MASTER_B_PORT $_binlog_file MASTER_B_LOG_FILE ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT,master_user='root',MASTER_LOG_FILE='$_binlog_file' -SET auto_increment_increment = 4; -SET auto_increment_offset = 3; -let $_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); - -# master d -connect (master_d,127.0.0.1,root,,test,$SLAVE_MYPORT2,); -RESET MASTER; ---disable_warnings -STOP SLAVE; ---enable_warnings -RESET SLAVE; ---replace_result $SLAVE_MYPORT1 MASTER_C_PORT $_binlog_file MASTER_C_LOG_FILE ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT1,master_user='root',MASTER_LOG_FILE='$_binlog_file' -SET auto_increment_increment = 4; -SET auto_increment_offset = 4; -let $_binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); - -# master a ---connection master_a ---replace_result $SLAVE_MYPORT2 MASTER_D_PORT $_binlog_file MASTER_D_LOG_FILE ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT2,master_user='root',MASTER_LOG_FILE='$_binlog_file' - - - -# Check server_ids: they should be different ---connection master_a -let $_id_a= query_get_value(SHOW VARIABLES LIKE 'server_id', Value, 1); -SHOW VARIABLES LIKE 'auto_increment_%'; ---connection master_b -let $_id_b= query_get_value(SHOW VARIABLES LIKE 'server_id', Value, 1); -SHOW VARIABLES LIKE 'auto_increment_%'; ---connection master_c -let $_id_c= query_get_value(SHOW VARIABLES LIKE 'server_id', Value, 1); -SHOW VARIABLES LIKE 'auto_increment_%'; ---connection master_d -let $_id_d= query_get_value(SHOW VARIABLES LIKE 'server_id', Value, 1); -SHOW VARIABLES LIKE 'auto_increment_%'; ---connection master_a -let $_compared_ids= (($_id_a <> $_id_b) AND ($_id_a <> $_id_c) AND ($_id_a <> $_id_d) AND ($_id_b <> $_id_c) AND ($_id_b <> $_id_d) AND ($_id_c <> $_id_d)) AS a; -let $_compared_ids_result= query_get_value(SELECT $_compared_ids, a, 1); ---echo $_compared_ids_result - -# Start ring ---connection master_a -connect(slave,127.0.0.1,root,,test,$MASTER_MYPORT); -START SLAVE; ---source include/wait_for_slave_to_start.inc ---disconnect slave - ---connection master_b -connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT1); -START SLAVE; ---source include/wait_for_slave_to_start.inc ---disconnect slave - ---connection master_c -connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT); -START SLAVE; ---source include/wait_for_slave_to_start.inc ---disconnect slave - ---connection master_d -connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2); -START SLAVE; ---source include/wait_for_slave_to_start.inc ---disconnect slave - diff --git a/mysql-test/include/circular_rpl_for_4_hosts_sync.inc b/mysql-test/include/circular_rpl_for_4_hosts_sync.inc deleted file mode 100644 index 68aede76913..00000000000 --- a/mysql-test/include/circular_rpl_for_4_hosts_sync.inc +++ /dev/null @@ -1,23 +0,0 @@ -############################################################# -# -# Author: Serge Kozlov -# Date: 03/11/2008 -# Purpose: Sync all hosts for circular replication based on -# schema A->B->C->D->A -# -# Notes: see include/circular_rpl_for_4_hosts_init.inc -# -############################################################# - -# Make the full loop of sync ---connection master_a ---disable_query_log ---sync_slave_with_master master_b ---sync_slave_with_master master_c ---sync_slave_with_master master_d ---sync_slave_with_master master_a ---sync_slave_with_master master_b ---sync_slave_with_master master_c ---save_master_pos ---connection master_a ---enable_query_log diff --git a/mysql-test/include/cleanup_fake_relay_log.inc b/mysql-test/include/cleanup_fake_relay_log.inc index 43aa46cb657..921484ec695 100644 --- a/mysql-test/include/cleanup_fake_relay_log.inc +++ b/mysql-test/include/cleanup_fake_relay_log.inc @@ -1,16 +1,28 @@ # ==== Purpose ==== # -# Clean up files create by setup_fake_relay_log.inc. +# Clean up files created by setup_fake_relay_log.inc. # # ==== Usage ==== # # See setup_fake_relay_log.inc ---echo Cleaning up after setup_fake_relay_log.inc +--let $include_filename= cleanup_fake_relay_log.inc +--source include/begin_include_file.inc + -# Remove files. -remove_file $_fake_relay_log; -remove_file $_fake_relay_index; --disable_query_log +RESET SLAVE; + +# Assert that the fake relay log files are gone (RESET SLAVE should +# have removed them). +--let $file_does_not_exist= $_fake_relay_log +--source include/file_does_not_exist.inc + +# Revert variables. eval SET @@global.relay_log_purge= $_fake_relay_log_purge; ---enable_query_log + +eval CHANGE MASTER TO MASTER_HOST = '$_fake_old_master_host'; + + +--let $include_filename= cleanup_fake_relay_log.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/diff_master_slave.inc b/mysql-test/include/diff_master_slave.inc deleted file mode 100644 index b6d79190671..00000000000 --- a/mysql-test/include/diff_master_slave.inc +++ /dev/null @@ -1,21 +0,0 @@ -# ==== Purpose ==== -# -# Diff the output of a statement on master and slave -# -# ==== Usage ===== -# -# let $diff_statement= SELECT * FROM t1 WHERE a < 100; -# source include/diff_master_slave.inc; - ---echo source include/diff_master_slave.inc; -disable_query_log; -disable_result_log; - -exec $MYSQL test -e "$diff_statement" > $MYSQLTEST_VARDIR/tmp/diff_master.out; -sync_slave_with_master; -exec $MYSQL_SLAVE test -e "$diff_statement" > $MYSQLTEST_VARDIR/tmp/diff_slave.out; - -diff_files $MYSQLTEST_VARDIR/tmp/diff_master.out $MYSQLTEST_VARDIR/tmp/diff_slave.out; - -enable_result_log; -enable_query_log; diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc index 81362e8643b..94921b02f13 100644 --- a/mysql-test/include/diff_tables.inc +++ b/mysql-test/include/diff_tables.inc @@ -1,35 +1,41 @@ # ==== Purpose ==== # -# Check if the two given tables (possibly residing on different -# master/slave servers) are equal. +# Check if all tables in the given list are equal. The tables may have +# different names, exist in different connections, and/or reside in +# different databases. +# # # ==== Usage ==== # -# The tables to check are given by the test language variables -# $diff_table_1 and $diff_table_2. They must be of the -# following form: +# --let $diff_tables= [con1:][db1.]t1, [con2:][db2.]t2, ... , [conN:][dbN.]tN +# [--let $rpl_debug= 1] +# --source include/diff_tables.inc # -# [master:|slave:]database.table +# Parameters: +# $diff_tables +# Comma-separated list of tables to compare. Each table has the form +# +# [CONNECTION:][DATABASE.]table +# +# If CONNECTION is given, then that connection is used. If +# CONNECTION is not given, then the connection of the previous +# table is used (or the current connection, if this is the first +# table). If DATABASE is given, the table is read in that +# database. If DATABASE is not given, the table is read in the +# connection's current database. +# +# $rpl_debug +# See include/rpl_init.inc # -# I.e., both database and table must be speicified. Optionally, you -# can prefix the name with 'master:' (to read the table on master) or -# with 'slave:' (to read the table on slave). If no prefix is given, -# reads the table from the current connection. If one of these -# variables has a prefix, both should have a prefix. # # ==== Side effects ==== # -# - Prints "Comparing tables $diff_table_1 and $diff_tables_2". +# - Prints "include/diff_tables.inc [$diff_tables]". # # - If the tables are different, prints the difference in a # system-specific format (unified diff if supported) and generates # an error. # -# - If $diff_table_1 or $diff_table_2 begins with 'master:' or -# 'slave:', it will stay connected to one of those hosts after -# execution. The host is only guaranteed to remain unchanged if -# none of $diff_table_1 or $diff_table_2 begins with 'master:' or -# 'slave:'. # # ==== Bugs ==== # @@ -50,69 +56,135 @@ # by character case. +--let $include_filename= diff_tables.inc [$diff_tables] +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +# Check sanity +if (`SELECT LOCATE(',', '$diff_tables') = 0`) +{ + --die ERROR IN TEST: $diff_tables must contain at least two tables (separated by comma) +} + + # ==== Save both tables to file ==== ---echo Comparing tables $diff_table_1 and $diff_table_2 -disable_query_log; +# Trim off whitespace +--let $_dt_tables= `SELECT REPLACE('$diff_tables', ' ', '')` ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/diff_table_1 ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2 +# Iterate over all tables +--let $_dt_outfile= +--let $_dt_prev_outfile= +while (`SELECT '$_dt_tables' != ''`) +{ + --let $_dt_table= `SELECT SUBSTRING_INDEX('$_dt_tables', ',', 1)` + --let $_dt_tables= `SELECT SUBSTRING('$_dt_tables', LENGTH('$_dt_table') + 2)` -let $_diff_table=$diff_table_2; -let $_diff_i=2; -while ($_diff_i) { - - # Parse out any leading "master:" or "slave:" from the table specification -# and connect the appropriate server. - let $_pos= `SELECT LOCATE(':', '$_diff_table')`; - let $_diff_conn=`SELECT SUBSTR('$_diff_table', 1, $_pos-1)`; - if (`SELECT 'XX$_diff_conn' <> 'XX'`) { - let $_diff_table=`SELECT SUBSTR('$_diff_table', $_pos+1)`; - connection $_diff_conn; + # Parse connection, if any + --let $_dt_colon_index= `SELECT LOCATE(':', '$_dt_table')` + if ($_dt_colon_index) + { + --let $_dt_connection= `SELECT SUBSTRING('$_dt_table', 1, $_dt_colon_index - 1)` + --let $_dt_table= `SELECT SUBSTRING('$_dt_table', $_dt_colon_index + 1)` + --let $rpl_connection_name= $_dt_connection + --source include/rpl_connection.inc } - # Sanity-check the input. - let $_diff_error= `SELECT '$_diff_table' NOT LIKE '_%._%'`; - if ($_diff_error) { - --echo !!!ERROR IN TEST: \$diff_table_$_diff_i='$_diff_table' is not in the form database.table - exit; + # Parse database name, if any + --let $_dt_database_index= `SELECT LOCATE('.', '$_dt_table')` + if ($_dt_database_index) + { + --let $_dt_database= `SELECT SUBSTRING('$_dt_table', 1, $_dt_database_index - 1)` + --let $_dt_table= `SELECT SUBSTRING('$_dt_table', $_dt_database_index + 1)` + } + if (!$_dt_database_index) + { + --let $_dt_database= `SELECT DATABASE()` } - # We need the output files to be sorted (so that diff_files does not - # think the files are different just because they are differently - # ordered). To this end, we first generate a query that sorts the - # table by all columns. Since ORDER BY accept column indices, we - # just generate a comma-separated list of all numbers from 1 to the - # number of columns in the table. - let $_diff_column_index=`SELECT MAX(ordinal_position) - FROM information_schema.columns - WHERE CONCAT(table_schema, '.', table_name) = - '$_diff_table'`; - let $_diff_column_list=$_diff_column_index; - dec $_diff_column_index; - while ($_diff_column_index) { - let $_diff_column_list=$_diff_column_index, $_diff_column_list; - dec $_diff_column_index; + if ($rpl_debug) + { + --echo con='$_dt_connection' db='$_dt_database' table='$_dt_table' + --echo rest of tables='$_dt_tables' + } + + # We need to sort the output files so that diff_files does not think + # the tables are different just because the rows are differently + # ordered. To this end, we first generate a string containing a + # comma-separated list of all column names. This is used in the + # ORDER BY clause of the following SELECT statement. We get the + # column names from INFORMATION_SCHEMA.COLUMNS, and we concatenate + # them with GROUP_CONCAT. Since GROUP_CONCAT is limited by the + # @@SESSION.group_concat_max_len, which is only 1024 by default, we + # first compute the total size of all columns and then increase this + # limit if needed. We restore the limit afterwards so as not to + # interfere with the test case. + + # Compute length of ORDER BY clause. + let $_dt_order_by_length= + `SELECT SUM(LENGTH(column_name) + 3) FROM information_schema.columns + WHERE table_schema = '$_dt_database' AND table_name = '$_dt_table'`; + if (!$_dt_order_by_length) + { + --echo ERROR IN TEST: table $_dt_database.$_dt_table not found in INFORMATION_SCHEMA.COLUMNS. Did you misspell it? + --die ERROR IN TEST: table not found in INFORMATION_SCHEMA. Did you misspell it? + } + --let $_dt_old_group_concat_max_len= + # Increase group_concat_max_len if needed. + if (`SELECT $_dt_order_by_length > @@SESSION.group_concat_max_len`) + { + --let $_dt_old_group_concat_max_len= `SELECT @@SESSION.group_concat_max_len` + --eval SET SESSION group_concat_max_len = $_dt_order_by_length; + if ($rpl_debug) + { + --echo # increasing group_concat_max_len from $_dt_old_group_concat_max_len to $_dt_order_by_length + } + } + # Generate ORDER BY clause. + # It would be better to do GROUP_CONCAT(CONCAT('`', column_name, '`')) but + # BUG#58087 prevents us from returning strings that begin with backticks. + let $_dt_column_list= + `SELECT GROUP_CONCAT(column_name ORDER BY ORDINAL_POSITION SEPARATOR '`,`') + FROM information_schema.columns + WHERE table_schema = '$_dt_database' AND table_name = '$_dt_table'`; + # Restore group_concat_max_len. + if ($_dt_old_group_concat_max_len) + { + --let $_dt_dummy= `SET SESSION group_concat_max_len = $_dt_old_group_concat_max_len + } + if ($rpl_debug) + { + --echo using ORDER BY clause '`$_dt_column_list`' } # Now that we have the comma-separated list of columns, we can write # the table to a file. - eval SELECT * FROM $_diff_table ORDER BY $_diff_column_list - INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/diff_table_$_diff_i'; + --let $_dt_outfile= `SELECT @@datadir` + --let $_dt_outfile= $_dt_outfile/diff_table-$_dt_connection-$_dt_database-$_dt_table + eval SELECT * FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list` INTO OUTFILE '$_dt_outfile'; - # Do the same for $diff_table_1. - dec $_diff_i; - let $_diff_table=$diff_table_1; + # Compare files. + if ($_dt_prev_outfile) + { + if ($rpl_debug) + { + --echo # diffing $_dt_prev_outfile vs $_dt_outfile + } + --diff_files $_dt_prev_outfile $_dt_outfile + # Remove previous outfile. Keep current file for comparison with next table. + --remove_file $_dt_prev_outfile + } + --let $_dt_prev_outfile= $_dt_outfile } +--remove_file $_dt_prev_outfile -# ==== Compare the generated files ==== -diff_files $MYSQLTEST_VARDIR/tmp/diff_table_1 $MYSQLTEST_VARDIR/tmp/diff_table_2; - ---remove_file $MYSQLTEST_VARDIR/tmp/diff_table_1 ---remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2 - -enable_query_log; +--let $include_filename= diff_tables.inc [$diff_tables] +--source include/end_include_file.inc diff --git a/mysql-test/include/end_include_file.inc b/mysql-test/include/end_include_file.inc new file mode 100644 index 00000000000..1e546c1215b --- /dev/null +++ b/mysql-test/include/end_include_file.inc @@ -0,0 +1,79 @@ +# ==== Purpose ==== +# +# See include/begin_include_file.inc +# +# +# ==== Usage ==== +# +# # At the end of include/my_file.inc: +# --let $include_filename= my_file.inc +# [--let $skip_restore_connection= 1] +# [--let $rpl_debug= 1] +# --source include/begin_include_file.inc +# +# Parameters: +# $include_filename +# Name of file that sources this file. +# +# $skip_restore_connection +# By default, this script restores the connection that was active +# when begin_include_file.inc was sourced. If +# $skip_restore_connection is set, then this step is skipped and +# end_include_file.inc leaves the connection as it was before +# end_include_file.inc was sourced. + +--let $_tmp= `SELECT SUBSTRING('$_include_file_enabled_warnings', 1, 1)` +--let $_include_file_enabled_warnings= `SELECT SUBSTRING('$_include_file_enabled_warnings', 2)` +if ($_tmp) { + --enable_warnings +} +if (!$_tmp) { + --disable_warnings +} + +--let $_tmp= `SELECT SUBSTRING('$_include_file_enabled_query_log', 1, 1)` +--let $_include_file_enabled_query_log= `SELECT SUBSTRING('$_include_file_enabled_query_log', 2)` +if ($_tmp) { + --enable_query_log +} +if (!$_tmp) { + --disable_query_log +} + +--let $_tmp= `SELECT SUBSTRING('$_include_file_enabled_result_log', 1, 1)` +--let $_include_file_enabled_result_log= `SELECT SUBSTRING('$_include_file_enabled_result_log', 2)` +if ($_tmp) { + --enable_result_log +} +if (!$_tmp) { + --disable_result_log +} + +--let $_tmp= `SELECT SUBSTRING('$_include_file_enabled_abort_on_error', 1, 1)` +--let $_include_file_enabled_abort_on_error= `SELECT SUBSTRING('$_include_file_enabled_abort_on_error', 2)` +if ($_tmp) { + --enable_abort_on_error +} +if (!$_tmp) { + --disable_abort_on_error +} + +--let $_include_file_rpl_connection_name= `SELECT SUBSTRING_INDEX('$_include_file_connection', ',', 1)` +--let $_include_file_connection= `SELECT SUBSTRING('$_include_file_connection', LENGTH('$_include_file_rpl_connection_name') + 2)` +if (!$skip_restore_connection) +{ + --let $rpl_connection_name= $_include_file_rpl_connection_name + --source include/rpl_connection.inc +} +--let $skip_restore_connection= 0 + + +--dec $_include_file_depth +--let $_include_file_indent= `SELECT REPEAT('.', $_include_file_depth)` + +if ($rpl_debug) +{ + --echo $_include_file_indent==== END include/$include_filename ==== + --echo $_include_file_indent con='$CURRENT_CONNECTION' warn='$ENABLED_WARNINGS' qlog='$ENABLED_QUERY_LOG' rlog='$ENABLED_RESULT_LOG' aborterr='$ENABLED_ABORT_ON_ERROR' +} +--let $include_filename= diff --git a/mysql-test/include/file_does_not_exist.inc b/mysql-test/include/file_does_not_exist.inc new file mode 100644 index 00000000000..0b02c63a0a9 --- /dev/null +++ b/mysql-test/include/file_does_not_exist.inc @@ -0,0 +1,17 @@ +# ==== Purpose ==== +# +# Checks that a given file does not exist. If the file exists, the +# test fails. +# +# ==== Usage ==== +# +# --let $file_does_not_exist= /path/to/file +# --source include/file_does_not_exist.inc + +# Will fail if file exists. +--write_file $file_does_not_exist +tmp +EOF + +# Remove file again. +--remove_file $file_does_not_exist diff --git a/mysql-test/include/force_restart.inc b/mysql-test/include/force_restart.inc new file mode 100644 index 00000000000..d058e85df45 --- /dev/null +++ b/mysql-test/include/force_restart.inc @@ -0,0 +1,17 @@ +# ==== Purpose ==== +# +# Tell mtr that all servers must be restarted after the test has +# finished. +# +# ==== Usage ==== +# +# --source include/force_restart.inc +# +# ==== See also ==== +# +# include/force_restart_if_skipped.inc + +--let $_force_restart_datadir= `SELECT @@datadir` +--append_file $_force_restart_datadir/mtr/force_restart +1 +EOF diff --git a/mysql-test/include/force_restart_if_skipped.inc b/mysql-test/include/force_restart_if_skipped.inc new file mode 100644 index 00000000000..228e094e932 --- /dev/null +++ b/mysql-test/include/force_restart_if_skipped.inc @@ -0,0 +1,17 @@ +# ==== Purpose ==== +# +# Tell mtr that all servers must be restarted in case the test is +# skipped. +# +# ==== Usage ==== +# +# --source include/force_restart_if_skipped.inc +# +# ==== See also ==== +# +# include/force_restart.inc + +--let $_force_restart_datadir= `SELECT @@datadir` +--append_file $_force_restart_datadir/mtr/force_restart_if_skipped +1 +EOF diff --git a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc index 8944cc46f3e..fa3e586834c 100644 --- a/mysql-test/include/have_innodb.inc +++ b/mysql-test/include/have_innodb.inc @@ -1,4 +1,4 @@ -disable_query_log; ---require r/true.require -select (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` from information_schema.engines where engine = 'innodb'; -enable_query_log; +if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`) +{ + --skip Test requires InnoDB. +} diff --git a/mysql-test/include/io_thd_fault_injection.inc b/mysql-test/include/io_thd_fault_injection.inc index a76e46d772a..7cbe055dbf6 100644 --- a/mysql-test/include/io_thd_fault_injection.inc +++ b/mysql-test/include/io_thd_fault_injection.inc @@ -11,11 +11,11 @@ SET @old_debug=@@global.debug; -- eval SET GLOBAL debug="+d,$io_thd_injection_fault_flag" START SLAVE io_thread; --- source include/wait_for_slave_io_to_stop.inc -- source include/wait_for_slave_io_error.inc -- eval SET GLOBAL debug="-d,$io_thd_injection_fault_flag" SET GLOBAL debug=@old_debug; # restart because slave is in bad shape --- source include/restart_mysqld.inc +--let $rpl_server_number= 2 +--source include/rpl_restart_server.inc diff --git a/mysql-test/include/kill_query_and_diff_master_slave.inc b/mysql-test/include/kill_query_and_diff_master_slave.inc index b3846d12df1..59588551af5 100644 --- a/mysql-test/include/kill_query_and_diff_master_slave.inc +++ b/mysql-test/include/kill_query_and_diff_master_slave.inc @@ -9,19 +9,19 @@ # connection ; # let $connection_name= # let $connection_id=`SELECT CONNECTION_ID()`; -# let $diff_statement=; +# let $rpl_diff_statement=; # send ; # source include/kill_query_and_diff_master_slave.inc; # # Note: must not be 'master'. # -# See also kill_query.inc and diff_master_slave.inc for more +# See also kill_query.inc and rpl_diff.inc for more # information source include/kill_query.inc; # Release the debug lock if used, so that the statements in -# diff_master_slave.inc will not be blocked. +# rpl_diff.inc will not be blocked. connection master; disable_query_log; disable_result_log; @@ -32,7 +32,7 @@ if ($debug_lock) enable_result_log; enable_query_log; -source include/diff_master_slave.inc; +--source include/rpl_diff.inc # Acquire the debug lock again if used connection master; diff --git a/mysql-test/include/master-slave-end.inc b/mysql-test/include/master-slave-end.inc deleted file mode 100644 index 74e4c7b608a..00000000000 --- a/mysql-test/include/master-slave-end.inc +++ /dev/null @@ -1,6 +0,0 @@ ---connection master ---sync_slave_with_master ---connection slave ---disable_query_log -STOP SLAVE; ---enable_query_log diff --git a/mysql-test/include/master-slave-reset.inc b/mysql-test/include/master-slave-reset.inc deleted file mode 100644 index 938eb2c074a..00000000000 --- a/mysql-test/include/master-slave-reset.inc +++ /dev/null @@ -1,36 +0,0 @@ -# Reset the master and the slave to start fresh. -# -# It is necessary to execute RESET MASTER and RESET SLAVE on both -# master and slave since the replication setup might be circular. -# -# Since we expect STOP SLAVE to produce a warning as the slave is -# stopped (the server was started with skip-slave-start), we disable -# warnings when doing STOP SLAVE. - -connection slave; ---disable_warnings -stop slave; -source include/wait_for_slave_to_stop.inc; ---enable_warnings -connection master; ---disable_warnings ---disable_query_log -use test; ---enable_query_log -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; ---enable_warnings -reset master; ---disable_query_log -reset slave; ---enable_query_log -connection slave; -reset slave; -# Clean up old test tables ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; ---enable_warnings ---disable_query_log -reset master; ---enable_query_log -start slave; -source include/wait_for_slave_to_start.inc; diff --git a/mysql-test/include/master-slave.inc b/mysql-test/include/master-slave.inc index e0eb87f02f7..9ed206b2c22 100644 --- a/mysql-test/include/master-slave.inc +++ b/mysql-test/include/master-slave.inc @@ -1,12 +1,63 @@ -# Replication tests need binlog -source include/have_log_bin.inc; +# ==== Purpose ==== +# +# Configure two servers to be replication master and slave. +# +# ==== Usage ==== +# +# [--let $rpl_server_count= N] +# [--let $rpl_check_server_ids= 1] +# [--let $rpl_skip_reset_master_and_slave= 1] +# [--let $rpl_skip_change_master= 1] +# [--let $rpl_skip_start_slave= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/master-slave.inc +# +# Parameters: +# $rpl_check_server_ids, $rpl_skip_reset_master_and_slave, +# $rpl_skip_change_master, $rpl_skip_start_slave, $rpl_debug, +# $slave_timeout +# See include/rpl_init.inc +# +# $rpl_server_count +# By default, two servers are configured. You can configure more +# servers (servers 3, 4, etc are neither masters nor slaves) by +# setting this variable. See also include/rpl_init.inc -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); -connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,); --- source include/master-slave-reset.inc +--let $include_filename= master-slave.inc +if ($rpl_server_count) +{ + --let $include_filename= master-slave.inc [rpl_server_count=$rpl_server_count] +} +--source include/begin_include_file.inc -# Set the default connection to 'master' -connection master; + +--let $rpl_topology= 1->2 +--source include/rpl_init.inc + +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc + +--let $rpl_connection_name= master1 +--let $rpl_server_number= 1 +--source include/rpl_connect.inc + +--let $rpl_connection_name= slave +--let $rpl_server_number= 2 +--source include/rpl_connect.inc + +--let $rpl_connection_name= slave1 +--let $rpl_server_number= 2 +--source include/rpl_connect.inc + + +--let $include_filename= master-slave.inc +--source include/end_include_file.inc + + +# Set the default connection to 'master'. Do this after +# end_include_file.inc, so that it gets printed to the query log. +--let $rpl_connection_name= master +--source include/rpl_connection.inc diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index 9db631a2615..12cb2c870a2 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -57,13 +57,3 @@ BEGIN mysql.user; END|| - --- --- Procedure used by test case used to force all --- servers to restart after testcase and thus skipping --- check test case after test --- -CREATE DEFINER=root@localhost PROCEDURE force_restart() -BEGIN - SELECT 1 INTO OUTFILE 'force_restart'; -END|| diff --git a/mysql-test/include/mysqldump.inc b/mysql-test/include/mysqldump.inc index 6227138b012..3a53bf8e3bd 100644 --- a/mysql-test/include/mysqldump.inc +++ b/mysql-test/include/mysqldump.inc @@ -41,8 +41,7 @@ eval ALTER TABLE $table_name RENAME to $orig_table_name; --echo # Compare original and recreated tables --echo # Recreated table: $table_name --echo # Original table: $orig_table_name -let $diff_table_1 = $table_name; -let $diff_table_2 = $orig_table_name; +let $diff_tables = $table_name, $orig_table_name; --source include/diff_tables.inc --echo # Cleanup --remove_file $mysqldumpfile diff --git a/mysql-test/include/ndb_master-slave.inc b/mysql-test/include/ndb_master-slave.inc index 0bf4b701f0c..8305a310953 100644 --- a/mysql-test/include/ndb_master-slave.inc +++ b/mysql-test/include/ndb_master-slave.inc @@ -1,10 +1,4 @@ -# Replication tests need binlog -source include/have_log_bin.inc; - -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); -connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,); +--source include/master-slave.inc connection slave; # Check that server is compiled and started with support for NDB @@ -14,7 +8,5 @@ select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schem --source include/ndb_not_readonly.inc enable_query_log; --- source include/master-slave-reset.inc - # Set the default connection to 'master' connection master; diff --git a/mysql-test/include/ndb_master-slave_2ch.inc b/mysql-test/include/ndb_master-slave_2ch.inc index 52a06c01d86..17017d2b801 100644 --- a/mysql-test/include/ndb_master-slave_2ch.inc +++ b/mysql-test/include/ndb_master-slave_2ch.inc @@ -1,7 +1,6 @@ -############################################################# -# Author: Serge Kozlov -# Date: 03/17/2008 -# Purpose: Set up circular cluster replication where each +# ==== Purpose ==== +# +# Set up circular cluster replication where each # cluster has two mysqlds and replication directions are # following: # master ---> slave @@ -9,128 +8,60 @@ # cluster A cluster B # \ / # master1 <--- slave1 -############################################################# +# +# ==== Usage ==== +# +# [--let $rpl_server_count= N] +# [--let $rpl_skip_check_server_ids= 1] +# [--let $rpl_skip_reset_master_and_slave= 1] +# [--let $rpl_skip_change_master= 1] +# [--let $rpl_skip_start_slave= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/ndb_master-slave_2ch.inc +# +# Parameters: +# $rpl_server_count, $rpl_skip_check_server_ids, +# $rpl_skip_reset_master_and_slave, $rpl_skip_change_master, +# $rpl_skip_start_slave, $rpl_debug, $slave_timeout +# See include/master-slave.inc ---source include/have_log_bin.inc +--let $rpl_topology= 1->2,4->3 +--let $rpl_skip_check_server_ids= 1 +--source include/rpl_init.inc # Make connections to mysqlds -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT1,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); -connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT1,); +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc -# Check that all mysqld compiled with ndb support +--let $rpl_connection_name= master1 +--let $rpl_server_number= 1 +--source include/rpl_connect.inc ---connection master ---disable_query_log ---require r/true.require -SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; ---source include/ndb_not_readonly.inc ---enable_query_log +--let $rpl_connection_name= slave +--let $rpl_server_number= 2 +--source include/rpl_connect.inc ---connection master1 ---disable_query_log ---require r/true.require -SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; ---source include/ndb_not_readonly.inc ---enable_query_log +--let $rpl_connection_name= slave1 +--let $rpl_server_number= 2 +--source include/rpl_connect.inc ---connection slave ---disable_query_log ---require r/true.require -SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; ---source include/ndb_not_readonly.inc ---enable_query_log ---connection slave1 ---disable_query_log ---require r/true.require -SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; ---source include/ndb_not_readonly.inc ---enable_query_log - -# Stop slaves - ---connection master ---disable_warnings -STOP SLAVE; ---wait_for_slave_to_stop ---enable_warnings - ---connection master1 ---disable_warnings -STOP SLAVE; ---wait_for_slave_to_stop ---enable_warnings - ---connection slave ---disable_warnings -STOP SLAVE; ---wait_for_slave_to_stop ---enable_warnings - ---connection slave1 ---disable_warnings -STOP SLAVE; ---wait_for_slave_to_stop ---enable_warnings - -# Reset masters - ---connection master ---disable_warnings ---disable_query_log -USE test; ---enable_query_log -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; ---enable_warnings -RESET MASTER; - ---connection master1 ---disable_warnings ---disable_query_log -USE test; ---enable_query_log -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; ---enable_warnings -RESET MASTER; - ---connection slave ---disable_warnings ---disable_query_log -USE test; ---enable_query_log -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; ---enable_warnings -RESET MASTER; - ---connection slave1 ---disable_warnings ---disable_query_log -USE test; ---enable_query_log -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; ---enable_warnings -RESET MASTER; - -# Start slaves - ---connection slave -RESET SLAVE; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root' -START SLAVE; ---source include/wait_for_slave_to_start.inc - ---connection master1 -RESET SLAVE; ---replace_result $SLAVE_MYPORT1 SLAVE_MYPORT1 ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT1,master_user='root' -START SLAVE; ---source include/wait_for_slave_to_start.inc +# Check that all mysqld are compiled with ndb support +--let $_rpl_server= 4 +while ($_rpl_server) +{ + --connection server_$_rpl_server + if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'ndbcluster' AND (support = 'YES' OR support = 'DEFAULT')`) + { + --skip Test requires NDB. + } + --source include/ndb_not_readonly.inc + --dec $_rpl_server +} # Set the default connection to 'master' (cluster A) connection master; - diff --git a/mysql-test/include/ndb_not_readonly.inc b/mysql-test/include/ndb_not_readonly.inc index f50ca0cab66..ebb343bb18d 100644 --- a/mysql-test/include/ndb_not_readonly.inc +++ b/mysql-test/include/ndb_not_readonly.inc @@ -2,6 +2,9 @@ # # wait for server to connect properly to cluster # + +--disable_query_log + set @saved_log = @@sql_log_bin; set sql_log_bin = 0; --error 0,ER_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG,ER_KEY_NOT_FOUND @@ -25,6 +28,9 @@ while ($mysql_errno) } delete from mysql.ndb_apply_status where server_id=0; set sql_log_bin = @saved_log; + +--enable_query_log + # # connected # diff --git a/mysql-test/include/report-features.test b/mysql-test/include/report-features.test index 1e4ab232490..75879f67165 100644 --- a/mysql-test/include/report-features.test +++ b/mysql-test/include/report-features.test @@ -9,4 +9,4 @@ show engines; show variables; --echo ===== STOP ===== --enable_query_log -exit; \ No newline at end of file +exit; diff --git a/mysql-test/include/reset_master_and_slave.inc b/mysql-test/include/reset_master_and_slave.inc deleted file mode 100644 index 30ba1f07a40..00000000000 --- a/mysql-test/include/reset_master_and_slave.inc +++ /dev/null @@ -1,8 +0,0 @@ ---echo **** Resetting master and slave **** -connection slave; -source include/stop_slave.inc; -RESET SLAVE; -connection master; -RESET MASTER; -connection slave; -source include/start_slave.inc; diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc index f750385e300..7cb9c7994d8 100644 --- a/mysql-test/include/restart_mysqld.inc +++ b/mysql-test/include/restart_mysqld.inc @@ -1,4 +1,12 @@ +if ($rpl_inited) +{ + if (!$allow_rpl_inited) + { + --die ERROR IN TEST: When using the replication test framework (master-slave.inc, rpl_init.inc etc), use rpl_restart_server.inc instead of restart_mysqld.inc. If you know what you are doing and you really have to use restart_mysqld.inc, set allow_rpl_inited=1 before you source restart_mysqld.inc + } +} + # Write file to make mysql-test-run.pl expect the "crash", but don't start # it until it's told to --let $_server_id= `SELECT @@server_id` diff --git a/mysql-test/include/rpl_change_topology.inc b/mysql-test/include/rpl_change_topology.inc new file mode 100644 index 00000000000..d25ebfbf25c --- /dev/null +++ b/mysql-test/include/rpl_change_topology.inc @@ -0,0 +1,248 @@ +# ==== Purpose ==== +# +# Changes replication topology. This file is normally sourced from +# include/rpl_init.inc, but test cases can also source it if they +# need to change topology after they have sourced include/rpl_init.inc +# +# This file sets up variables needed by include/rpl_sync.inc and many +# other replication scripts in the include/ directory. It also issues +# CHANGE MASTER on all servers where the configuration changes from +# what it was before. It does not issue START SLAVE (use +# include/rpl_start_slaves.inc for that). +# +# Note: it is not currently possible to change the number of servers +# after the rpl_init.inc, without first calling rpl_end.inc. So the +# test has to set $rpl_server_count to the total number of servers +# that the test uses, before it sources include/rpl_init.inc. After +# that, $rpl_server_count must not change until after next time the +# test sources include/rpl_end.inc. +# +# Note: Since this script issues CHANGE MASTER, the test case must +# ensure that all slaves where the configuration changes have stopped +# both the IO thread and the SQL thread before this script is sourced. +# +# +# ==== Usage ==== +# +# [--let $rpl_server_count= 7] +# --let $rpl_topology= 1->2->3->1->4, 2->5, 6->7 +# [--let $rpl_skip_change_master= 1] +# [--let $rpl_master_log_file= 1:master-bin.000001,3:master-bin.000003] +# [--let $rpl_master_log_pos= 1:4711,3:107] +# [--let $rpl_debug= 1] +# --source include/rpl_change_topology.inc +# +# Parameters: +# $rpl_master_log_file +# By default, CHANGE MASTER is executed with MASTER_LOG_FILE set +# to the name of the last binlog file on the master (retrieved by +# executing SHOW MASTER STATUS). This variable can be set to +# specify another filename. This variable should be a +# comma-separated list of the following form: +# +# SERVER_NUMBER_1:FILE_NAME_1,SERVER_NUMBER_2:FILE_NAME_2,... +# +# Before CHANGE MASTER is executed on server N, this script checks +# if $rpl_master_log_file contains the text N:FILE_NAME. If it +# does, then MASTER_LOG_FILE is set to FILE_NAME. Otherwise, +# MASTER_LOG_FILE is set to the last binlog on the master. For +# example, to specify that server_1 should start replicate from +# master-bin.000007 and server_5 should start replicate from +# master-bin.012345, do: +# --let $rpl_master_log_file= 1:master-bin.000007,5:master-bin.012345 +# +# $rpl_master_log_pos +# By default, CHANGE MASTER is executed without specifying the +# MASTER_LOG_POS parameter. This variable can be set to set a +# specific position. It has the same form as $rpl_master_log_file +# (see above). For example, to specify that server_3 should start +# replicate from position 4711 of its master, do: +# --let $rpl_master_log_pos= 3:4711 +# +# $rpl_server_count, $rpl_topology, $rpl_debug, $rpl_skip_change_master +# See include/rpl_init.inc +# +# +# ==== Internal variables configured by this file ==== +# +# This file sets up the following variables, which are used by other +# low-level replication files such as: +# include/rpl_sync.inc +# include/rpl_start_slaves.inc +# include/rpl_stop_slaves.inc +# include/rpl_end.inc +# +# $rpl_server_count_length: +# Set to LENGTH($rpl_server_count). So if $rpl_server_count < 10, +# then $rpl_server_count_length = 1; if 10 <= $rpl_server_count < +# 100, then $rpl_server_count_length = 2, etc. +# +# $rpl_master_list +# Set to a string consisting of $rpl_server_count numbers, each one +# whitespace-padded to $rpl_server_count_length characters. If +# server N is a slave, then the N'th number is the master of server +# N. If server N is not a slave, then the N'th number is just spaces +# (so in fact it is not a number). For example, if $rpl_topology is +# '1->2,2->3,3->1,2->4,5->6', then $rpl_master_list is '3122 6'. +# +# $rpl_sync_chain_dirty +# This variable is set to 1. This tells include/rpl_sync.inc to +# compute a new value for $rpl_sync_chain next time that +# include/rpl_sync.inc is sourced. See +# include/rpl_generate_sync_chain.inc and include/rpl_sync.inc for +# details. + + +# Remove whitespace from $rpl_topology +--let $rpl_topology= `SELECT REPLACE('$rpl_topology', ' ', '')` + +--let $include_filename= rpl_change_topology.inc [new topology=$rpl_topology] +--source include/begin_include_file.inc + + +if ($rpl_debug) +{ + --echo ---- Check input ---- +} + + +if (`SELECT '$rpl_topology' = '' OR '$rpl_server_count' = ''`) +{ + --die You must set $rpl_topology and $rpl_server_count before you source rpl_change_topology.inc. If you really want to change to the empty topology, set $rpl_topology= none +} +--let $_rpl_topology= $rpl_topology +if (`SELECT '$_rpl_topology' = 'none'`) +{ + --let $_rpl_topology= +} +if (`SELECT '!$rpl_master_list!' = '!!'`) +{ + --die You must source include/rpl_init.inc before you source include/rpl_change_topology.inc +} +--let $_rpl_old_master_list= $rpl_master_list + +if ($rpl_debug) +{ + --echo \$rpl_server_count='$rpl_server_count' + --echo \$rpl_server_count_length='$rpl_server_count_length' + --echo new \$rpl_topology='$_rpl_topology' + --echo old \$rpl_master_list='$rpl_master_list' + --echo old \$rpl_sync_chain='$rpl_sync_chain' +} + + +if ($rpl_debug) +{ + --echo ---- Generate \$rpl_server_count_length and \$rpl_master_list ---- +} + +--let $rpl_server_count_length= `SELECT LENGTH('$rpl_server_count')` +--let $rpl_master_list= +--let $_rpl_no_server= `SELECT REPEAT(' ', $rpl_server_count_length)` +--let $rpl_master_list= `SELECT REPEAT('$_rpl_no_server', $rpl_server_count)` +while ($_rpl_topology) +{ + # Get 's1->s2' from 's1->s2->s3->...' or from 's1->s2,s3->s4,...' + --let $_rpl_master_slave= `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX('$_rpl_topology', ',', 1), '->', 2)` + # Modify $_rpl_topology as follows: + # - If it starts with 's1->s2,', remove 's1->s2,' + # - If it starts with 's1->s2->', remove 's1->' + # - If it is equal to 's1->s2', remove 's1->s2' + --let $_rpl_topology= `SELECT SUBSTR('$_rpl_topology', IF(SUBSTR('$_rpl_topology', LENGTH('$_rpl_master_slave') + 1, 2) != '->', LENGTH('$_rpl_master_slave'), LOCATE('->', '$_rpl_master_slave')) + 2)` + # Get 's1' from 's1->s2' + --let $_rpl_master= `SELECT SUBSTRING_INDEX('$_rpl_master_slave', '->', 1)` + # Get 's2' from 's1->s2' + --let $_rpl_slave= `SELECT SUBSTRING('$_rpl_master_slave', LENGTH('$_rpl_master') + 3)` + # Check that s2 does not have another master. + if (`SELECT SUBSTR('$rpl_master_list', 1 + ($_rpl_slave - 1) * $rpl_server_count_length, $rpl_server_count_length) != '$_rpl_no_server'`) + { + --echo ERROR IN TEST: Server '$_rpl_slave' has more than one master in topology '$rpl_topology' + --die ERROR IN TEST: found a server with more than one master in the $rpl_topology variable + } + # Save 's1' at position 's2' in $rpl_master_list + --let $rpl_master_list= `SELECT INSERT('$rpl_master_list', 1 + ($_rpl_slave - 1) * $rpl_server_count_length, $rpl_server_count_length, RPAD('$_rpl_master', $rpl_server_count_length, ' '))` +} + +if ($rpl_debug) +{ + --echo new \$rpl_server_count_length = '$rpl_server_count_length' + --echo new \$rpl_master_list = '$rpl_master_list' +} + +if (!$rpl_skip_change_master) +{ + if ($rpl_debug) + { + --echo ---- Execute CHANGE MASTER on all servers ---- + } + + if (!$rpl_debug) + { + --disable_query_log + } + + --let $_rpl_server= $rpl_server_count + while ($_rpl_server) + { + # The following statement evaluates to: + # 0, if server_$_rpl_server has the same master as before. + # The master's server, if server_$_rpl_server is a slave. + # The empty string, if server_$_rpl_server is not a slave. + --let $_rpl_master= `SELECT TRIM(IFNULL(NULLIF(SUBSTRING('$rpl_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length), SUBSTRING('$_rpl_old_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length)), 0))` + if ($rpl_debug) + { + --echo \$_rpl_server='$_rpl_server' \$_rpl_master='$_rpl_master' + } + if ($_rpl_master) + { + # Get port number + --let $_rpl_port= \$SERVER_MYPORT_$_rpl_master + # Get MASTER_LOG_FILE + --let $_rpl_master_log_file_index= `SELECT LOCATE('$_rpl_server:', '$rpl_master_log_file')` + if ($_rpl_master_log_file_index) + { + # Get text from after ':' and before ',', starting at + # $_rpl_master_log_file + --let $_rpl_master_log_file= `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING('$rpl_master_log_file', $_rpl_master_log_file_index), ',', 1), ':', -1)` + } + if (!$_rpl_master_log_file_index) + { + --let $rpl_connection_name= server_$_rpl_master + --source include/rpl_connection.inc + --let $_rpl_master_log_file= query_get_value(SHOW MASTER STATUS, File, 1) + } + # Change connection. + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + # Get MASTER_LOG_POS + --let $_rpl_master_log_pos_index= `SELECT LOCATE('$_rpl_server:', '$rpl_master_log_pos')` + if ($_rpl_master_log_pos_index) + { + --let $_rpl_master_log_pos= `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING('$rpl_master_log_pos', $_rpl_master_log_pos_index), ',', 1), ':', -1)` + --let $_rpl_master_log_pos= , MASTER_LOG_POS = $_rpl_master_log_pos + } + if (!$_rpl_master_log_pos_index) + { + --let $_rpl_master_log_pos= + } + eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_LOG_FILE = '$_rpl_master_log_file'$_rpl_master_log_pos, MASTER_CONNECT_RETRY = 1; + } + if (!$_rpl_master) + { + if (`SELECT '$_rpl_master' = ''`) + { + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + CHANGE MASTER TO MASTER_HOST = ''; + } + } + --dec $_rpl_server + } +} + + +--let $rpl_sync_chain_dirty= 1 + + +--let $include_filename= rpl_change_topology.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_connect.inc b/mysql-test/include/rpl_connect.inc new file mode 100644 index 00000000000..a4d18dd5f9c --- /dev/null +++ b/mysql-test/include/rpl_connect.inc @@ -0,0 +1,58 @@ +# ==== Purpose ==== +# +# Create a connection to a given numbered server. +# +# This script is normally used internally by rpl_init.inc and +# master-slave.inc, but it can also be used in test cases that need to +# create more connections or re-create connections after disconnect. +# +# +# ==== Usage ==== +# +# --let $rpl_connection_name= +# --let $rpl_server_number= +# [--let $rpl_debug= 1] +# --source include/rpl_connect.inc +# +# Parameters: +# $rpl_connection_name +# The name of the connection to create. +# +# $rpl_server_number +# The number of the server to connect to. +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= rpl_connect.inc [creating $rpl_connection_name] +--source include/begin_include_file.inc + + +if (!$rpl_server_number) +{ + --die ERROR IN TEST: You must set $rpl_server_number before sourcing include/rpl_connect.inc +} +if (`SELECT '$rpl_connection_name' = ''`) +{ + --die ERROR IN TEST: You must set $rpl_connection_name before sourcing include/rpl_connect.inc +} + +# Get port number +--let $_rpl_port= \$SERVER_MYPORT_$rpl_server_number +if (!$_rpl_port) +{ + --echo Bug in test case: '\$SERVER_MYPORT_$rpl_server_number' not initialized. Check the test's .cfg file. + --die Not all SERVER_MYPORT_* environment variables are setup correctly. +} + +# Create connection. +if ($rpl_debug) +{ + --echo connect ($rpl_connection_name,127.0.0.1,root,,test,$_rpl_port,) +} +--connect ($rpl_connection_name,127.0.0.1,root,,test,$_rpl_port,) + + +--let $include_filename= rpl_connect.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_connection.inc b/mysql-test/include/rpl_connection.inc new file mode 100644 index 00000000000..1988568a4d2 --- /dev/null +++ b/mysql-test/include/rpl_connection.inc @@ -0,0 +1,47 @@ +# ==== Purpose ==== +# +# The same as 'connection $rpl_connection_name', but it can also +# prints the connection name. The connection is printed if $rpl_debug +# is set, or if rpl_connection.inc is not called between two +# invocations of begin_include_file.inc/end_include_file.inc. +# Otherwise the connection name is not printed. +# +# +# ==== Usage ==== +# +# --let $rpl_connection_name= master +# [--let $rpl_debug= 1] +# --source include/rpl_connection.inc +# +# Parameters: +# $rpl_connection_name +# Name of the connection to connect to. +# +# $rpl_debug +# By default, the connection name is printed only when this file +# is sourced from a top-level test script. If $rpl_debug is set, +# the connection name is also printed whenever auxiliary files +# like rpl_init.inc change connection. + + +if (!$rpl_connection_name) +{ + --die ERROR IN TEST: you must set $rpl_connection_name before sourcing rpl_connection.inc +} + +# This is the same as "if (!$_rpl_include_file_depth || $rpl_debug)", +# but the mysqltest language doesn't have boolean operations. + +if (!$_include_file_depth) +{ + --echo [connection $rpl_connection_name] +} +if ($_include_file_depth) +{ + if ($rpl_debug) + { + --echo [connection $rpl_connection_name] + } +} +--connection $rpl_connection_name +--let $rpl_connection_name= diff --git a/mysql-test/include/rpl_diff.inc b/mysql-test/include/rpl_diff.inc new file mode 100644 index 00000000000..bf24b4f2a13 --- /dev/null +++ b/mysql-test/include/rpl_diff.inc @@ -0,0 +1,118 @@ +# ==== Purpose ==== +# +# Diff the output of a statement on all configured servers (usually +# master and slave). +# +# +# ==== Usage ===== +# +# --let $rpl_diff_statement= SELECT * FROM t1 WHERE a < 100 +# [--let $rpl_diff_servers= ,,...] +# --source include/rpl_diff.inc +# +# Parameters: +# $rpl_diff_statement +# Statement to check. For each compared server, this script will +# start a new client and pass this statement to the client. +# Note: This string will be evaluated as a single-quote-escaped +# SQL string and hence must be quoted as such. In particular, any +# single quotes in this string must be escaped. +# +# $rpl_diff_servers +# By default, this file compares all servers configured by +# rpl_init.inc. You can set $diff_servers to a comma-separated +# list of numbers: only the servers identified by these numbers +# will be compared. +# +# $rpl_diff_database +# By default, the statement will be executed on the database +# 'test'. If $rpl_diff_database is set, the statement will be +# executed on the database named $rpl_diff_database instead. + + +--let $include_filename= rpl_diff.inc +--source include/begin_include_file.inc + + +if (!$rpl_diff_statement) +{ + --die ERROR IN TEST: you must set $rpl_diff_statement before you source include/rpl_diff.inc +} + + +# Sync. +--source include/rpl_sync.inc + + +# Get database name. +--let $_rpl_diff_database= $rpl_diff_database +if (`SELECT '$_rpl_diff_database' = ''`) +{ + --let $_rpl_diff_database= test +} + + +# Generate list of servers. +--let $_rpl_diff_servers= $rpl_diff_servers +if (!$_rpl_diff_servers) +{ + --let $_rpl_server_i= $rpl_server_count + --let $_rpl_diff_servers= + while ($_rpl_server_i) + { + --let $_rpl_diff_servers= $_rpl_server_i,$_rpl_diff_servers + --dec $_rpl_server_i + } +} +if ($rpl_debug) +{ + --echo \$rpl_diff_servers= '$_rpl_diff_servers' +} + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +# Generate file containing $rpl_diff_statement. We don't pass the +# statement on the command line, because it would be subject to shell +# substitutions. +--let $write_to_file= GENERATE +--let $write_var= $rpl_diff_statement +--source include/write_var_to_file.inc +--let $_rpl_diff_statement_file= $write_to_file + + +# Compare all servers. +--let $_rpl_diff_first= 1 +while ($_rpl_diff_servers) +{ + # Set $_rpl_diff_server_i to the first number in the list + --let $_rpl_diff_server_i= `SELECT SUBSTRING_INDEX('$_rpl_diff_servers', ',', 1)` + # Remove $_rpl_diff_server_i from the list + --let $_rpl_diff_servers= `SELECT SUBSTRING('$_rpl_diff_servers', LENGTH('$_rpl_diff_server_i') + 2)` + + # Execute statement + --let $_rpl_diff_file= $MYSQLTEST_VARDIR/tmp/_rpl_diff_server-$_rpl_diff_server_i.tmp + --exec $MYSQL --defaults-group-suffix=.$_rpl_diff_server_i $_rpl_diff_database < $_rpl_diff_statement_file > $_rpl_diff_file + + # Compare + if (!$_rpl_diff_first) + { + if ($rpl_debug) + { + --echo diffing $_rpl_diff_file and $_rpl_diff_prev_file + } + --diff_files $_rpl_diff_file $_rpl_diff_prev_file + --remove_file $_rpl_diff_prev_file + } + --let $_rpl_diff_prev_file= $_rpl_diff_file + --let $_rpl_diff_first= 0 +} +--remove_file $_rpl_diff_prev_file + + +--let $include_filename= rpl_diff.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_diff_tables.inc b/mysql-test/include/rpl_diff_tables.inc deleted file mode 100644 index 7fc68422c40..00000000000 --- a/mysql-test/include/rpl_diff_tables.inc +++ /dev/null @@ -1,36 +0,0 @@ -# ############################################################################# -# Check whether the given table is consistent between different master and -# slaves -# -# Usage: -# --let $diff_table= test.t1 -# --let $diff_server_list= master, slave, slave2 -# --source include/rpl_diff_tables.inc -# ############################################################################# - -if (`SELECT "XX$diff_table" = "XX"`) -{ - --die diff_table is null. -} - ---let $_servers= master, slave -if (`SELECT "XX$diff_server_list" <> "XX"`) -{ - --let $_servers= $diff_server_list -} - ---let $_master= `SELECT SUBSTRING_INDEX('$_servers', ',', 1)` ---let $_servers= `SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_master') + 2))` -connection $_master; -while (`SELECT "XX$_servers" <> "XX"`) -{ - --let $_slave= `SELECT SUBSTRING_INDEX('$_servers', ',', 1)` - --let $_servers= `SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_slave') + 2))` - - --sync_slave_with_master $_slave - --let $diff_table_1= $_master:$diff_table - --let $diff_table_2= $_slave:$diff_table - --source include/diff_tables.inc - connection $_slave; -} -connection $_master; diff --git a/mysql-test/include/rpl_end.inc b/mysql-test/include/rpl_end.inc new file mode 100644 index 00000000000..8f1d7f695fc --- /dev/null +++ b/mysql-test/include/rpl_end.inc @@ -0,0 +1,103 @@ +# ==== Purpose ==== +# +# Shut down replication initialized by include/rpl_init.inc. +# +# This syncs all servers, executes STOP SLAVE on all servers, executes +# CHANGE MASTER on all servers, and disconnects all connections +# configured by rpl_init.inc. +# +# It does not execute RESET MASTER or RESET SLAVE, because that would +# remove binlogs which are possibly useful debug information in case +# the test case later fails with a result mismatch. If you need that, +# source include/rpl_reset.inc before you source this file. +# +# +# ==== Usage ==== +# +# [--let $rpl_only_running_threads= 1] +# [--let $rpl_debug= 1] +# --source include/rpl_end.inc +# +# Parameters: +# $rpl_only_running_threads +# If one or both of the IO and SQL threads is stopped, sync and +# stop only the threads that are running. See +# include/rpl_sync.inc and include/stop_slave.inc for details. +# +# $rpl_debug +# See include/rpl_init.inc +# +# Note: +# This script will fail if Last_SQL_Error or Last_IO_Error is +# nonempty. If you expect an error in the SQL thread, you should +# normally call this script as follows: +# +# --source include/wait_for_slave_sql_error.inc +# --source include/stop_slave_io.inc +# RESET SLAVE; +# --let $rpl_only_running_threads= 1 +# --source include/rpl_end.inc +# +# +# ==== Side effects ==== +# +# Changes the current connection to 'default'. + + +--let $include_filename= rpl_end.inc +--source include/begin_include_file.inc + + +if (!$rpl_inited) +{ + --die ERROR IN TEST: rpl_end.inc was sourced when replication was not configured. Most likely, rpl_end.inc was sourced twice or rpl_init.inc has not been sourced. +} + + +if ($rpl_debug) +{ + --echo ---- Check that no slave thread has an error ---- +} + +--let $_rpl_server= $rpl_server_count +while ($_rpl_server) +{ + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + + # Only check slave threads for error on hosts that were at some + # point configured as slave. + --let $_tmp= query_get_value(SHOW SLAVE STATUS, Master_Host, 1) + if (`SELECT '$_tmp' != 'No such row'`) + { + --source include/check_slave_no_error.inc + } + + --dec $_rpl_server +} + +--source include/rpl_sync.inc +--source include/rpl_stop_slaves.inc + +# mtr configures server 2 to be a slave before it runs the test. We +# have to restore that state now, so we change topology to 1->2. +--let $rpl_topology= 1->2 +--source include/rpl_change_topology.inc + + +--connection default +--let $_rpl_server= $rpl_server_count +--let $_rpl_one= _1 +while ($_rpl_server) +{ + --disconnect server_$_rpl_server + --disconnect server_$_rpl_server$_rpl_one + --dec $_rpl_server +} + +--let $rpl_inited= 0 + +# Do not restore connection, because we have disconnected it. +--let $skip_restore_connection= 1 +--let $include_filename= rpl_end.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_for_each_slave.inc b/mysql-test/include/rpl_for_each_slave.inc new file mode 100644 index 00000000000..65d242cf894 --- /dev/null +++ b/mysql-test/include/rpl_for_each_slave.inc @@ -0,0 +1,39 @@ +# ==== Purpose ==== +# +# Execute a .inc file once for each server that was configured as a +# slave by rpl_init.inc +# +# +# ==== Usage ==== +# +# --let $rpl_source_file +# [--let $rpl_debug= 1] +# --source include/rpl_for_each_slave.inc +# +# Parameters: +# $rpl_source_file +# The file that will be sourced. +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= rpl_for_each_file.inc [$rpl_source_file] +--source include/begin_include_file.inc + +--let $_rpl_server= $rpl_server_count +while ($_rpl_server) +{ + --let $_rpl_has_master= `SELECT SUBSTRING('$rpl_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length) != ''` + if ($_rpl_has_master) + { + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + --source $rpl_source_file + } + --dec $_rpl_server +} + + +--let $include_filename= rpl_for_each_file.inc [$rpl_source_file] +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_generate_sync_chain.inc b/mysql-test/include/rpl_generate_sync_chain.inc new file mode 100644 index 00000000000..9104c21c3b8 --- /dev/null +++ b/mysql-test/include/rpl_generate_sync_chain.inc @@ -0,0 +1,122 @@ +# ==== Purpose ==== +# +# Setup $rpl_sync_chain, which is used by rpl_sync.inc. You normally +# don't need to source this file, it should only be sourced by +# rpl_sync.inc. +# +# $rpl_sync_chain is set to a string that specifies in what order +# servers should be synchronized in include/rpl_sync.inc. This has the +# form of a sequence of "chains" (with no separator between two +# chains). Each chain begins with $rpl_server_count_length space +# characters, followed by a sequence of numbers, each number +# whitespace-padded to $rpl_server_count_length characters. Each +# number in the sequence denotes a server, and the N'th server is a +# master of the (N+1)'th server. For example, if $rpl_topology is +# '1->2,2->3,3->1,2->4,5->6', then $rpl_sync_chain is ' 56 123124'. +# +# +# ==== Usage ==== +# +# [--let $rpl_debug= 1] +# --source include/rpl_generate_sync_chain.inc +# +# Parameters: +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= rpl_generate_sync_chain.inc +--source include/begin_include_file.inc + + +# Algorithm: +# 0. Mark all servers as unseen and unsynced. +# 1. Let S be a server that is marked unseen. +# 2. Append S to the list of seen servers. +# 3. Check how S is marked: +# 3.1. If S has no master: append the list of seen servers (in +# order from grand-master to grand-slave) to the end of +# $rpl_sync_chain. Go to 3. +# 3.2. Elseif S is marked as synced: append the list of seen +# servers (in order from grand-master to grand-slave) to the +# end of $rpl_sync_chain. Go to 3. +# 3.3. Elseif S is marked as unsynced but seen: This means that the +# graph of visited servers has a "6-shape": it is a loop with +# a tail, such as 1->2->3->1->4->5. We should first sync the +# loop, and then the tail. To ensure all servers in the loop +# are synced, we must sync the loop two turns minus two +# servers. For example, the loop 1->2->3->4->5->1 is fully +# synced by this sequence of 1-step synchronizations: +# 1->2->3->4->5->1->2->3->4. Hence we do this: in the list of +# traversed servers (in order from grand-master to +# grand-slave), find the first occurrence of S. Take the +# sub-list starting at the 3rd server and ending at the first +# occurrence of S. Append this sub-list it to the end of +# $rpl_sync_chain. Then append the entire list of traversed +# servers (in order from grand-master to grand-slave) to +# $rpl_sync_chain. Go to 3. +# 3.4. Else (i.e., S has a master and is not marked as seen or +# synced): Mark S as seen. Set S=master(S) and go back to 2. +# 4. For each server that is marked as seen, mark it as synced. +# 5. If there are unseen servers, go back to 1. + +# $_rpl_server_marks holds the marks of all servers. The i'th character +# corresponds to the mark of server i: +# '0' = unseen & unmarked, '1' = seen & unsynced, '2' = seen & synced. +--let $_rpl_server_marks= `SELECT REPEAT('0', $rpl_server_count)` +--let $_rpl_start_server= $rpl_server_count +--let $rpl_sync_chain= +while ($_rpl_start_server) +{ + --let $_rpl_server= `SELECT RPAD('$_rpl_start_server', $rpl_server_count_length, ' ')` + --let $_rpl_seen_list= + --let $_rpl_continue_loop= 1 + while ($_rpl_continue_loop) + { + --let $_rpl_master= `SELECT SUBSTRING('$rpl_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length)` + # We need to delimit elements of $_rpl_seen_list with commas, so + # that LOCATE() below will not find spurious matches that begin in + # the middle of one element and end in the middle of next element. + --let $_rpl_seen_list= $_rpl_server,$_rpl_seen_list + # If server is marked seen or synced, or has no master + if (`SELECT SUBSTRING('$_rpl_server_marks', $_rpl_server, 1) != 0 OR '$_rpl_master' = ''`) + { + # If server is marked seen but not synced. + if (`SELECT SUBSTRING('$_rpl_server_marks', $_rpl_server, 1) = 1`) + { + # Get sub-list of servers to prepend to server list. + # E.g., if topology is 1->2->3->4->1->5, then at this point + # $_rpl_seen_list='1,2,3,4,1,5,' and we have to prepend '4,3,' + # to it. Hence, the sub-list starts at position + # 1+2*($rpl_server_count_length+1) and ends at the first + # occurrence of ',1,' in the list. + --let $_rpl_extra_list= `SELECT SUBSTRING('$_rpl_seen_list', 1 + 2 * ($rpl_server_count_length + 1), LOCATE(',$_rpl_server,', '$_rpl_seen_list') - 2 * ($rpl_server_count_length + 1))` + --let $_rpl_seen_list= $_rpl_extra_list$_rpl_seen_list + } + # Append the seen servers. Only need to append if the list + # contains at least two elements. + if (`SELECT LENGTH('$_rpl_seen_list') > $rpl_server_count_length + 1`) + { + --let $rpl_sync_chain= $rpl_sync_chain$_rpl_no_server$_rpl_seen_list + } + --let $_rpl_continue_loop= 0 + } + --let $_rpl_server_marks= `SELECT INSERT('$_rpl_server_marks', $_rpl_server, 1, '1')` + --let $_rpl_server= $_rpl_master + } + # Mark seen servers as synced + --let $_rpl_server_marks= `SELECT REPLACE('$_rpl_server_marks', '1', '2')` + # Get highest-numbered unmarked server. + --let $_rpl_start_server= `SELECT IFNULL(NULLIF($rpl_server_count + 1 - LOCATE('0', REVERSE('$_rpl_server_marks')), $rpl_server_count + 1), 0)` +} +# Strip commas: they were only needed temporarily. +--let $rpl_sync_chain= `SELECT REPLACE('$rpl_sync_chain', ',', '')` + +if ($rpl_debug) +{ + --echo Generated \$rpl_sync_chain = '$rpl_sync_chain' +} + + +--let $include_filename= rpl_generate_sync_chain.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_init.inc b/mysql-test/include/rpl_init.inc new file mode 100644 index 00000000000..3cf78dc2979 --- /dev/null +++ b/mysql-test/include/rpl_init.inc @@ -0,0 +1,242 @@ +# ==== Purpose ==== +# +# Set up replication on several servers in a specified topology. +# +# By default, this script does the following: +# - Creates the connections server_1, server_2, ..., server_N, as +# well as extra connections server_1_1, server_2_1, ..., +# server_N_1. server_I and server_I_1 are connections to the same +# server. +# - Sets up @@auto_increment_increment and @@auto_increment_increment. +# - Verifies that @@server_id of all servers are different. +# - Calls RESET MASTER, RESET SLAVE, USE test, CHANGE MASTER, START SLAVE. +# - Sets the connection to server_1 before exiting. +# +# ==== Usage ==== +# +# 1. If you are going to use more than two servers, create +# rpl_test.cfg with the following contents: +# +# !include ../my.cnf +# [mysqld.1] +# log-slave-updates +# [mysqld.2] +# log-slave-updates +# ... +# [mysqld.N] +# log-slave-updates +# +# [ENV] +# SERVER_MYPORT_3= @mysqld.3.port +# SERVER_MYPORT_4= @mysqld.4.port +# SERVER_MYPORT_5= @mysqld.5.port +# ... +# SERVER_MYPORT_N= @mysqld.N.port +# +# (It is allowed, but not required, to configure SERVER_MYPORT_1 +# and SERVER_MYPORT_2 too. If these variables are not set, the +# variables MASTER_MYPORT and SLAVE_MYPORT, configured in the +# default my.cnf used by the rpl and rpl_ndb suites, are used +# instead. In addition, in the rpl_ndb suite, SERVER_MYPORT_3 is +# not needed since MASTER_MYPORT1 can be used instead.) +# +# 2. Execute the following near the top of the test: +# +# [--let $rpl_server_count= 7] +# --let $rpl_topology= 1->2->3->1->4, 2->5, 6->7 +# [--let $rpl_check_server_ids= 1] +# [--let $rpl_skip_change_master= 1] +# [--let $rpl_skip_start_slave= 1] +# [--let $rpl_skip_reset_master_and_slave= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/rpl_init.inc +# +# Parameters: +# +# $rpl_server_count +# The number of servers to configure. If this is not set, the largest +# number in $rpl_topology will be used. +# +# $rpl_topology +# A comma-separated list of replication chain +# specifications. Each replication chain specification has the +# form S1->S2->...->Sn, where 1 <= S1,...Sn <= $rpl_server_count. +# This file will configure S(i+1) to be a slave of S(i). If you +# want to specify the empty topology (no server replicates at +# all), you have to set $rpl_topology=none. +# +# $rpl_check_server_ids +# If $rpl_check_server_ids is set, this script checks that the +# @@server_id of all servers are different. This is normally +# guaranteed by mtr, so it is only useful for debugging. +# +# $rpl_skip_reset_master_and_slave +# By default, this script issues RESET MASTER and RESET SLAVE +# before CHANGE MASTER and START SLAVE. RESET MASTER and RESET +# SLAVE are suppressed if $rpl_skip_reset_master_and_slave is +# set. +# +# $rpl_skip_change_master +# By default, this script issues CHANGE MASTER so that all slaves +# are ready to run as specified by $rpl_topology. CHANGE MASTER +# is suppressed if $rpl_skip_change_master is set. +# +# $rpl_skip_start_slave +# By default, this script issues START SLAVE on all slaves +# specified by $rpl_topology. START SLAVE is suppressed if +# $rpl_skip_change_master is set. +# +# $rpl_debug +# By default, this script only outputs a static text that says +# that rpl_init.inc was invoked. If $rpl_debug is set, additional +# debug info is printed. The debug info may be nondeterministic, +# so no test case should be checked in with $rpl_debug set. +# +# $slave_timeout +# Timeout used when waiting for the slave threads to start. +# See include/wait_for_slave_param.inc +# +# +# ==== Side effects ==== +# +# Changes current connection to server_1. + +--source include/have_log_bin.inc + + +--let $include_filename= rpl_init.inc [topology=$rpl_topology] +--source include/begin_include_file.inc + + +if ($rpl_debug) +{ + --echo ---- Check input ---- + --echo MASTER_MYPORT='$MASTER_MYPORT' SLAVE_MYPORT='$SLAVE_MYPORT' MASTER_MYPORT1='$MASTER_MYPORT1' SLAVE_MYPORT1='$SLAVE_MYPORT1' +} + +# Allow $MASTER_MYPORT as alias for $SERVER_MYPORT_1 +if (`SELECT '$SERVER_MYPORT_1' = ''`) +{ + --let SERVER_MYPORT_1= $MASTER_MYPORT +} +# Allow $SLAVE_MYPORT as alias for $SERVER_MYPORT_2 +if (`SELECT '$SERVER_MYPORT_2' = ''`) +{ + --let SERVER_MYPORT_2= $SLAVE_MYPORT +} +# Allow $MASTER_MYPORT1 as alias for $SERVER_MYPORT_3 +# (this alias is used by rpl_ndb tests) +if (`SELECT '$SERVER_MYPORT_3' = ''`) +{ + --let SERVER_MYPORT_3= $MASTER_MYPORT1 +} +# Allow $SLAVE_MYPORT1 as alias for $SERVER_MYPORT_4 +# (this alias is used by rpl_ndb tests) +if (`SELECT '$SERVER_MYPORT_4' = ''`) +{ + --let SERVER_MYPORT_4= $SLAVE_MYPORT1 +} +# Check that $rpl_server_count is set +if (!$rpl_server_count) +{ + --let $_compute_rpl_server_count= `SELECT REPLACE('$rpl_topology', '->', ',')` + --let $rpl_server_count= `SELECT GREATEST($_compute_rpl_server_count)` +} + + +if ($rpl_debug) +{ + --echo ---- Setup connections and reset each server ---- +} + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +# Create two connections to each server; reset master/slave, select +# database, set autoinc variables. +--let $_rpl_server= $rpl_server_count +--let $_rpl_one= _1 +while ($_rpl_server) +{ + # Connect. + --let $rpl_server_number= $_rpl_server + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connect.inc + --let $rpl_connection_name= server_$_rpl_server$_rpl_one + --source include/rpl_connect.inc + + # Configure server. + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + USE test; + if (!$rpl_skip_reset_master_and_slave) + { + RESET MASTER; + RESET SLAVE; + } + eval SET auto_increment_increment= $rpl_server_count; + eval SET auto_increment_offset= $_rpl_server; + + --dec $_rpl_server +} + + +# Signal that initialization is done and all connections created. +--let $rpl_inited= 1 + +# Signal that the server is in a dirty state and needs to be restarted +# if the test is skipped. If the test is not skipped, it will continue +# to the end and execute its cleanup section (and check-testcase will +# report if you forget to clean up). +--source include/force_restart_if_skipped.inc + + +# Assert that all hosts have different server_ids +if ($rpl_check_server_ids) +{ + if ($rpl_debug) + { + --echo ---- Check that @@server_id is distinct for all servers ---- + } + + --let $_rpl_server= $rpl_server_count + while ($_rpl_server) + { + --let $_rpl_server2= $_rpl_server + --dec $_rpl_server2 + while ($_rpl_server2) + { + --let $assert_text= Servers $_rpl_server and $_rpl_server2 should have different @@server_id + --let $assert_condition= [$_rpl_server:SELECT @@server_id AS i, i, 1] != [$_rpl_server2:SELECT @@server_id AS i, i, 1] + + --source include/assert.inc + --dec $_rpl_server2 + } + --dec $_rpl_server + } +} + +# $rpl_master_list must be set so that include/rpl_change_topology.inc +# knows which servers are initialized and not. +--let $rpl_master_list= `SELECT REPEAT('x', $rpl_server_count * LENGTH($rpl_server_count))` +--source include/rpl_change_topology.inc + + +if (!$rpl_skip_start_slave) +{ + --source include/rpl_start_slaves.inc +} + + +--let $rpl_connection_name= server_1 +--source include/rpl_connection.inc + + +--let $skip_restore_connection= 1 +--let $include_filename= rpl_init.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_reconnect.inc b/mysql-test/include/rpl_reconnect.inc new file mode 100644 index 00000000000..cdbbd0a1bf1 --- /dev/null +++ b/mysql-test/include/rpl_reconnect.inc @@ -0,0 +1,132 @@ +# ==== Purpose ==== +# +# After a server has restarted, this waits for all clients configured +# by rpl_init.inc and/or master-slave.inc to reconnect again. +# +# For each connection, it issues this: +# --enable_reconnect +# --source include/wait_until_connected_again.inc +# --disable_reconnect +# +# +# ==== Usage ==== +# +# --let $rpl_server_number= N +# [--let $rpl_debug= 1] +# --source include/rpl_reconnect.inc +# +# Parameters: +# $rpl_server_number +# Number to identify the server that needs to reconnect. 1 is the +# master server, 2 the slave server, 3 the 3rd server, and so on. +# Cf. include/rpl_init.inc +# +# $rpl_debug +# See include/rpl_init.inc + +--let $include_filename= rpl_reconnect.inc +--source include/begin_include_file.inc + +if (!$rpl_server_number) +{ + --die ERROR IN TEST: you must set $rpl_server_number before you source rpl_connect.inc +} + + +if ($rpl_debug) +{ + --echo ---- Enable reconnect ---- +} + +--let $_rpl_server_number= $rpl_server_number + +--dec $_rpl_server_number +if (!$_rpl_server_number) +{ + --let $rpl_connection_name= default + --source include/rpl_connection.inc + --enable_reconnect + + --let $rpl_connection_name= master + --source include/rpl_connection.inc + --enable_reconnect + + --let $rpl_connection_name= master1 + --source include/rpl_connection.inc + --enable_reconnect +} + +--dec $_rpl_server_number +if (!$_rpl_server_number) +{ + --let $rpl_connection_name= slave + --source include/rpl_connection.inc + --enable_reconnect + + --let $rpl_connection_name= slave1 + --source include/rpl_connection.inc + --enable_reconnect +} + +--let $rpl_connection_name= server_$rpl_server_number +--source include/rpl_connection.inc +--enable_reconnect + +--let $_rpl_one= _1 +--let $rpl_connection_name= server_$rpl_server_number$_rpl_one +--source include/rpl_connection.inc +--enable_reconnect + +if ($rpl_debug) +{ + --echo ---- Wait for reconnect and disable reconnect on all connections ---- +} + +--let $_rpl_server_number= $rpl_server_number + +--dec $_rpl_server_number +if (!$_rpl_server_number) +{ + --let $rpl_connection_name= default + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect + + --let $rpl_connection_name= master + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect + + --let $rpl_connection_name= master1 + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect +} + +--dec $_rpl_server_number +if (!$_rpl_server_number) +{ + --let $rpl_connection_name= slave + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect + + --let $rpl_connection_name= slave1 + --source include/rpl_connection.inc + --source include/wait_until_connected_again.inc + --disable_reconnect +} + +--let $rpl_connection_name= server_$rpl_server_number +--source include/rpl_connection.inc +--source include/wait_until_connected_again.inc +--disable_reconnect + +--let $rpl_connection_name= server_$rpl_server_number$_rpl_one +--source include/rpl_connection.inc +--source include/wait_until_connected_again.inc +--disable_reconnect + + +--let $include_filename= rpl_reconnect.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_reset.inc b/mysql-test/include/rpl_reset.inc new file mode 100644 index 00000000000..a94371c38fc --- /dev/null +++ b/mysql-test/include/rpl_reset.inc @@ -0,0 +1,81 @@ +# ==== Purpose ==== +# +# Reset all replication servers to a clean state: +# +# - sync all slaves, +# - stop all slaves (STOP SLAVE), +# - remove all binlogs and relay logs (RESET MASTER and RESET SLAVE), +# - start all slaves again (START SLAVE). +# +# It does not execute CHANGE MASTER, so the replication topology is +# kept intact. +# +# +# ==== Usage ==== +# +# [--let $rpl_only_running_threads= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/rpl_end.inc +# +# Parameters: +# $rpl_only_running_threads +# If one or both of the IO and SQL threads is stopped, sync and +# stop only the threads that are running. See +# include/rpl_sync.inc and include/stop_slave.inc for details. +# +# $rpl_debug +# See include/rpl_init.inc +# +# $slave_timeout +# Set the timeout when waiting for slave threads to stop and +# start, respectively. See include/wait_for_slave_param.inc +# +# Note: +# This script will fail if Last_SQL_Error or Last_IO_Error is +# nonempty. If you expect an error in the SQL thread, you should +# normally do this before you source include/rpl_reset.inc: +# +# --source include/wait_for_slave_sql_error.inc +# --source include/stop_slave_io.inc +# RESET SLAVE; + +--let $include_filename= rpl_reset.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +--source include/rpl_sync.inc + + +if ($rpl_debug) +{ + --echo ---- Stop and reset all servers ---- +} +--let $_rpl_server= $rpl_server_count +while ($_rpl_server) +{ + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + + # Check if this server is configured to have a master + if (`SELECT SUBSTRING('$rpl_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length) != ''`) + { + --source include/stop_slave.inc + RESET SLAVE; + } + RESET MASTER; + --dec $_rpl_server +} + + +--source include/rpl_start_slaves.inc + + +--let $include_filename= rpl_reset.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_restart_server.inc b/mysql-test/include/rpl_restart_server.inc new file mode 100644 index 00000000000..5df2c67d3da --- /dev/null +++ b/mysql-test/include/rpl_restart_server.inc @@ -0,0 +1,39 @@ +# ==== Purpose ==== +# +# Shut down and shut up the server given by $rpl_server_number. This +# is equivalent to rpl_stop_server.inc followed by rpl_start_server.inc +# +# ==== Usage ==== +# +# --let $rpl_server_number= N +# [--let $rpl_server_parameters= --flag1 --flag2 ...] +# [--let $rpl_debug= 1] +# --source include/rpl_restart_server.inc +# +# Parameters: +# +# $rpl_server_number, $rpl_server_parameters +# See include/rpl_start_server.inc +# +# $rpl_debug +# See include/rpl_init.inc +# +# ==== See also ==== +# +# rpl_start_server.inc +# rpl_stop_server.inc + + +--let $_rpl_restart_server_args= [server_number=$rpl_server_number] +if ($rpl_server_parameters) +{ + --let $_rpl_restart_server_args= [server_number=$rpl_server_number parameters: $rpl_server_parameters] +} +--let $include_filename= rpl_restart_server.inc $_rpl_restart_server_args +--source include/begin_include_file.inc + +--source include/rpl_stop_server.inc +--source include/rpl_start_server.inc + +--let $include_filename= rpl_restart_server.inc $_rpl_restart_server_args +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_start_server.inc b/mysql-test/include/rpl_start_server.inc new file mode 100644 index 00000000000..c59c7759910 --- /dev/null +++ b/mysql-test/include/rpl_start_server.inc @@ -0,0 +1,54 @@ +# ==== Purpose ==== +# +# Start the server given by $rpl_server_number. This should normally +# be invoked after rpl_stop_server.inc. +# +# ==== Usage ==== +# +# --let $rpl_server_number= N +# [--let $rpl_server_parameters= --flag1 --flag2 ...] +# [--let $rpl_debug= 1] +# --source include/rpl_start_server.inc +# +# Parameters: +# +# $rpl_server_number +# Number to identify the server that needs to reconnect. 1 is the +# master server, 2 the slave server, 3 the 3rd server, and so on. +# Cf. include/rpl_init.inc +# +# $rpl_server_parameters +# If set, extra parameters given by this variable are passed to +# mysqld. +# +# $rpl_debug +# See include/rpl_init.inc +# +# ==== See also ==== +# +# rpl_stop_server.inc +# rpl_restart_server.inc + + +--let $_rpl_start_server_command= restart +--let $_rpl_start_server_args= [server_number=$rpl_server_number] +if ($rpl_server_parameters) +{ + --let $_rpl_start_server_command= restart:$rpl_server_parameters + --let $_rpl_start_server_args= [server_number=$rpl_server_number parameters: $rpl_server_parameters] +} + +--let $include_filename= rpl_start_server.inc $_rpl_start_server_args +--source include/begin_include_file.inc + +--let $rpl_connection_name= server_$rpl_server_number +--source include/rpl_connection.inc + +# Write file to make mysql-test-run.pl start up the server again +--exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect + +--source include/rpl_reconnect.inc + + +--let $include_filename= rpl_start_server.inc $_rpl_start_server_args +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_start_slaves.inc b/mysql-test/include/rpl_start_slaves.inc new file mode 100644 index 00000000000..fdd90eb12c5 --- /dev/null +++ b/mysql-test/include/rpl_start_slaves.inc @@ -0,0 +1,32 @@ +# ==== Purpose ==== +# +# Start all slaves configured by rpl_init.inc and wait for the slave +# threads to start. +# +# Note that rpl_init.inc calls this file automatically, so you only +# need to source this file if the slaves have stopped after that. +# +# +# ==== Usage ==== +# +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/rpl_start_slaves.inc +# +# Parameters: +# $rpl_debug +# See include/rpl_init.inc +# +# $slave_timeout +# Set the timeout when waiting for slave threads to stop and +# start, respectively. See include/wait_for_slave_param.inc + + +--let $include_filename= rpl_start_slaves.inc +--source include/begin_include_file.inc + +--let $rpl_source_file= include/start_slave.inc +--source include/rpl_for_each_slave.inc + +--let $include_filename= rpl_start_slaves.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_stop_server.inc b/mysql-test/include/rpl_stop_server.inc new file mode 100644 index 00000000000..e1f8839dd69 --- /dev/null +++ b/mysql-test/include/rpl_stop_server.inc @@ -0,0 +1,63 @@ +# ==== Purpose ==== +# +# Stop the server given by $rpl_server_number. +# +# ==== Usage ==== +# +# --let $rpl_server_number= N +# [--let $rpl_debug= 1] +# --source include/rpl_stop_server.inc +# +# Parameters: +# +# $rpl_server_number +# Number to identify the server that needs to reconnect. 1 is the +# master server, 2 the slave server, 3 the 3rd server, and so on. +# Cf. include/rpl_init.inc +# +# $rpl_debug +# See include/rpl_init.inc +# +# ==== See also ==== +# +# rpl_start_server.inc +# rpl_restart_server.inc + + +# Can't use begin_include_file / end_include_file because they require +# executing on a server and the server will go down after this script. +if (!$_include_file_depth) +{ + --echo include/rpl_stop_server.inc [server_number=$rpl_server_number] +} +--inc $_include_file_depth +--let $_rpl_stop_server_old_connection= $CURRENT_CONNECTION +if ($rpl_debug) +{ + --echo $_include_file_indent con='$CURRENT_CONNECTION' warn='$ENABLED_WARNINGS' qlog='$ENABLED_QUERY_LOG' rlog='$ENABLED_RESULT_LOG' aborterr='$ENABLED_ABORT_ON_ERROR' + --echo $_include_file_indent==== BEGIN include/$include_filename ==== +} + + +--let $rpl_connection_name= server_$rpl_server_number +--source include/rpl_connection.inc + +# Write file to make mysql-test-run.pl expect the "crash", but don't start +# it until it's told to +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect + +# Send shutdown to the connected server and give +# it 10 seconds to die before zapping it +shutdown_server 10; + +--source include/wait_until_disconnected.inc + + +--let $rpl_connection_name= $_rpl_stop_server_old_connection +--source include/rpl_connection.inc +--dec $_include_file_depth +if ($rpl_debug) +{ + --echo $_include_file_indent==== END include/rpl_stop_server.inc [server_number=$rpl_server_number] ==== + --echo $_include_file_indent con='$CURRENT_CONNECTION' warn='$ENABLED_WARNINGS' qlog='$ENABLED_QUERY_LOG' rlog='$ENABLED_RESULT_LOG' aborterr='$ENABLED_ABORT_ON_ERROR' +} diff --git a/mysql-test/include/rpl_stop_slaves.inc b/mysql-test/include/rpl_stop_slaves.inc new file mode 100644 index 00000000000..2b9199739dd --- /dev/null +++ b/mysql-test/include/rpl_stop_slaves.inc @@ -0,0 +1,33 @@ +# ==== Purpose ==== +# +# Stop all slaves configured by rpl_init.inc and waits for the slave +# threads to stop. +# +# +# ==== Usage ==== +# +# [--let $rpl_only_running_threads= 1] +# [--let $rpl_debug= 1] +# [--let $rpl_timeout= NUMBER] +# --source include/rpl_stop_slaves.inc +# +# Parameters: +# $rpl_only_running_threads +# See include/stop_slave.inc +# +# $slave_timeout +# Set the timeout when waiting for slave threads to stop. See +# include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= rpl_stop_slaves.inc +--source include/begin_include_file.inc + +--let $rpl_source_file= include/stop_slave.inc +--source include/rpl_for_each_slave.inc + +--let $include_filename= rpl_stop_slaves.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/rpl_sync.inc b/mysql-test/include/rpl_sync.inc new file mode 100644 index 00000000000..a05bee23981 --- /dev/null +++ b/mysql-test/include/rpl_sync.inc @@ -0,0 +1,153 @@ +# ==== Purpose ==== +# +# Sync all servers in an arbitrary replication topology. This works +# only if the servers have been configured with rpl_init.inc (and +# possibly rpl_change_topology.inc). +# +# +# ==== Usage ==== +# +# [--let $rpl_only_running_threads= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/rpl_sync.inc +# +# Parameters: +# $rpl_only_running_threads +# By default, this script assumes that both the IO thread and the +# SQL thread are running and fails if one of them is stopped. If +# $rpl_only_running_threads is set, this script first checks +# which slave threads are running: +# - If both threads are running, sync both threads with master. +# - If only IO thread is running, sync IO thread with master. +# - If only SQL thread is running, sync SQL thread with IO thread. +# - If no thread is running, don't sync. +# +# $slave_timeout +# Set the timeout when waiting for threads to sync. See +# include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc +# +# +# ==== Side effects ==== +# +# Does not change the current connection (note that this is different +# from mysqltest's built-in sync_slave_with_master command). + + +--let $include_filename= rpl_sync.inc +--source include/begin_include_file.inc + + +# Compute $rpl_sync_chain if needed. We could have done this in +# rpl_change_topology.inc, but instead we do it here because that +# means we only compute $rpl_sync_chain when it is needed. +if ($rpl_sync_chain_dirty) +{ + --source include/rpl_generate_sync_chain.inc + --let $rpl_sync_chain_dirty= 0 +} + + +if ($rpl_debug) +{ + --echo \$rpl_sync_chain = '$rpl_sync_chain' \$rpl_only_running_threads= $rpl_only_running_threads +} + +if (!$rpl_server_count_length) +{ + --die \$rpl_server_count_length is not set. Did you call rpl_init.inc? +} + + +--let $_rpl_i= 1 +--let $_rpl_connect= 0 +while ($_rpl_i) { + # $rpl_sync_chain consists of a sequence of sync chains. Each sync + # chain has the form: + # + # ... + # + # So the space character indicates that a new sync chain starts. + --let $_rpl_server= `SELECT TRIM(SUBSTR('$rpl_sync_chain', 1 + ($_rpl_i - 1) * $rpl_server_count_length, $rpl_server_count_length))` + + if ($_rpl_server) + { + if ($rpl_debug) + { + --echo [sync server_$_rpl_prev_server -> server_$_rpl_server] + } + if ($rpl_only_running_threads) + { + --connection server_$_rpl_server + --let $_rpl_slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1) + --let $_rpl_slave_sql_running= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1) + if ($rpl_debug) + { + --echo Sync IO: $_rpl_slave_io_running; Sync SQL: $_rpl_slave_sql_running + } + --let $_rpl_slave_io_running= `SELECT IF('$_rpl_slave_io_running' = 'Yes', 1, '')` + --let $_rpl_slave_sql_running= `SELECT IF('$_rpl_slave_sql_running' = 'Yes', 1, '')` + if ($_rpl_slave_io_running) + { + --connection server_$_rpl_prev_server + if ($_rpl_slave_sql_running) + { + if ($rpl_debug) + { + --let $_rpl_master_file= query_get_value("SHOW MASTER STATUS", File, 1) + --let $_rpl_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1) + --echo syncing master_file='$_rpl_master_file' master_pos='$_rpl_master_pos' + } + --sync_slave_with_master server_$_rpl_server + } + if (!$_rpl_slave_sql_running) + { + --let $sync_slave_connection= server_$_rpl_server + --source include/sync_slave_io_with_master.inc + } + } + if (!$_rpl_slave_io_running) + { + if ($_rpl_slave_sql_running) + { + --source include/sync_slave_sql_with_io.inc + } + } + } + if (!$rpl_only_running_threads) + { + --connection server_$_rpl_prev_server + if ($rpl_debug) + { + --let $_rpl_master_file= query_get_value("SHOW MASTER STATUS", File, 1) + --let $_rpl_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1) + --echo syncing master_file='$_rpl_master_file' master_pos='$_rpl_master_pos' + } + --sync_slave_with_master server_$_rpl_server + } + } + + # This happens at the beginning of a new sync subchain and at the + # end of the full sync chain. + if (!$_rpl_server) + { + --inc $_rpl_i + --let $_rpl_server= `SELECT TRIM(SUBSTR('$rpl_sync_chain', 1 + ($_rpl_i - 1) * $rpl_server_count_length, $rpl_server_count_length))` + + if (!$_rpl_server) + { + # terminate loop + --let $_rpl_i= -1 + } + } + + --let $_rpl_prev_server= $_rpl_server + --inc $_rpl_i +} + + +--let $include_filename= rpl_sync.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/save_master_pos.inc b/mysql-test/include/save_master_pos.inc new file mode 100644 index 00000000000..2c176d160cc --- /dev/null +++ b/mysql-test/include/save_master_pos.inc @@ -0,0 +1,33 @@ +# ==== Purpose ==== +# +# Save the current binlog position on the master, just like the +# built-in mysqltest command save_master_pos. The advantage of this +# script is that the saved position is available to the test script. +# +# +# ==== Usage ==== +# +# [--let $rpl_debug= 1] +# --source include/save_master_pos.inc +# +# Typically, you would use this script together with +# include/sync_io_with_master.inc +# +# Parameters: +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= save_master_pos.inc +--source include/begin_include_file.inc + +let $_master_file= query_get_value("SHOW MASTER STATUS", File, 1); +let $_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1); + +if ($rpl_debug) +{ + --echo save_master_pos saved file='$_master_file', pos='$_master_pos' +} + +--let $include_filename= save_master_pos.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/setup_fake_relay_log.inc b/mysql-test/include/setup_fake_relay_log.inc index f881f3bf4e8..6c47752aabd 100644 --- a/mysql-test/include/setup_fake_relay_log.inc +++ b/mysql-test/include/setup_fake_relay_log.inc @@ -29,11 +29,15 @@ # Creates a binlog file and a binlog index file, and sets # @@global.relay_log_purge=1. All this is restored when you call # cleanup_fake_relay_log.inc. -# -# Enables the query log. ---disable_query_log +--let $include_filename= setup_fake_relay_log.inc +--source include/begin_include_file.inc + +if (!$rpl_debug) +{ + --disable_query_log +} # Print message. let $_fake_relay_log_printable= `SELECT REPLACE('$fake_relay_log', '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')`; @@ -46,22 +50,18 @@ if (`SELECT "$_sql_running" = "Yes" OR "$_io_running" = "Yes"`) { --echo Error: Slave was running when test case sourced --echo include/setup_fake_replication.inc --echo Slave_IO_Running = $_io_running; Slave_SQL_Running = $_sql_running - --echo Printing some debug info: - SHOW SLAVE STATUS; - SHOW MASTER STATUS; - SHOW BINLOG EVENTS; - SHOW PROCESSLIST; + --source include/show_rpl_debug_info.inc + --die } # Read server variables. -let $MYSQLD_DATADIR= `SELECT @@datadir`; +let $_fake_datadir= `SELECT @@datadir`; let $_fake_filename= query_get_value(SHOW VARIABLES LIKE 'relay_log', Value, 1); if (!$_fake_filename) { - --echo Badly written test case: relay_log variable is empty. Please use the - --echo server option --relay-log=FILE. + --die ERROR IN TEST: relay_log variable is empty. Please use the server option --relay-log=FILE. } -let $_fake_relay_log= $MYSQLD_DATADIR/$_fake_filename-fake.000001; -let $_fake_relay_index= $MYSQLD_DATADIR/$_fake_filename.index; +let $_fake_relay_log= $_fake_datadir/$_fake_filename-fake.000001; +let $_fake_relay_index= $_fake_datadir/$_fake_filename.index; # Need to restore relay_log_purge in cleanup_fake_relay_log.inc, since # CHANGE MASTER modifies it (see the manual for CHANGE MASTER). let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`; @@ -69,24 +69,16 @@ let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`; # Create relay log file. copy_file $fake_relay_log $_fake_relay_log; # Create relay log index. +--let $write_var= $_fake_filename-fake.000001\n +--let $write_to_file= $_fake_relay_index +--source include/write_var_to_file.inc -if (`SELECT LENGTH(@@secure_file_priv) > 0`) -{ - -- let $_file_priv_dir= `SELECT @@secure_file_priv` - -- let $_suffix= `SELECT UUID()` - -- let $_tmp_file= $_file_priv_dir/fake-index.$_suffix - - -- eval select '$_fake_filename-fake.000001\n' into dumpfile '$_tmp_file' - -- copy_file $_tmp_file $_fake_relay_index - -- remove_file $_tmp_file -} - -if (`SELECT LENGTH(@@secure_file_priv) = 0`) -{ - -- eval select '$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index' -} +# Remember old settings. +--let $_fake_old_master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1) # Setup replication from existing relay log. eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4; ---enable_query_log + +--let $include_filename= setup_fake_relay_log.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/show_rpl_debug_info.inc b/mysql-test/include/show_rpl_debug_info.inc index 9944e6cd25f..0faae59d8d3 100644 --- a/mysql-test/include/show_rpl_debug_info.inc +++ b/mysql-test/include/show_rpl_debug_info.inc @@ -3,87 +3,104 @@ # Print status information for replication, typically used to debug # test failures. # -# First, the following is printed on slave: +# The following is printed on the current connection: # +# SELECT NOW() # SHOW SLAVE STATUS +# SHOW MASTER STATUS # SHOW PROCESSLIST # SHOW BINLOG EVENTS IN # # Where is the currently active binlog. # -# Then, the following is printed on master: +# Then, the same is printed from all connections configured by +# rpl_init.inc - i.e., on connection server_N, where +# 1 <= N <= $rpl_server_count # -# SHOW MASTER STATUS -# SHOW PROCESSLIST -# SHOW BINLOG EVENTS IN -# SHOW BINLOG EVENTS IN -# -# Where is the binlog name that the slave sql thread -# is currently reading from and is the binlog that -# the slave IO thread is currently reading from. # # ==== Usage ==== # -# [let $master_connection= ;] -# source include/show_rpl_debug_info.inc; +# [--let $rpl_only_current_connection= 1] +# --source include/show_rpl_debug_info.inc # -# If $master_connection is set, debug info will be retrieved from the -# connection named $master_connection. Otherwise, it will be -# retrieved from the 'master' connection if the current connection is -# 'slave'. +# Parameters: +# $rpl_only_current_connection +# By default, debug info is printed from all connections, starting +# with the current connection. If this variable is set, debug +# info is printed only for the current connection. +# +# +# ==== Side effects ==== +# +# Turns on enable_query_log, enable_result_log, enable_warnings, +# horizontal_results, and enable_abort_on_error. +# +# Prints non-deterministic output to the query log. This file should +# never be called in a test that does not fail. -let $_con= $CURRENT_CONNECTION; ---echo ---echo [on $_con] ---echo -SELECT NOW(); ---echo **** SHOW SLAVE STATUS on $_con **** -query_vertical SHOW SLAVE STATUS; ---echo ---echo **** SHOW PROCESSLIST on $_con **** -SHOW PROCESSLIST; ---echo ---echo **** SHOW BINLOG EVENTS on $_con **** -let $binlog_name= query_get_value("SHOW MASTER STATUS", File, 1); -eval SHOW BINLOG EVENTS IN '$binlog_name'; -let $_master_con= $master_connection; -if (!$_master_con) +--enable_query_log +--enable_result_log +--enable_warnings +--disable_abort_on_error +--horizontal_results + + +--let $_rpl_old_con= $CURRENT_CONNECTION +--let $_rpl_is_first_server= 1 +--let $_rpl_server= $rpl_server_count +--inc $_rpl_server + + +while ($_rpl_server) { - if (`SELECT '$_con' = 'slave'`) + if (!$_rpl_is_first_server) { - let $_master_con= master; + --connection server_$_rpl_server } - if (!$_master_con) - { - --echo Unable to determine master connection. No debug info printed for master. - --echo Please fix the test case by setting $master_connection before sourcing - --echo show_rpl_debug_info.inc. - } -} -if ($_master_con) -{ - - let $master_binlog_name_io= query_get_value("SHOW SLAVE STATUS", Master_Log_File, 1); - let $master_binlog_name_sql= query_get_value("SHOW SLAVE STATUS", Relay_Master_Log_File, 1); --echo - --echo [on $_master_con] - connection $_master_con; + --echo ############################## $CURRENT_CONNECTION ############################## --echo - SELECT NOW(); - --echo **** SHOW MASTER STATUS on $_master_con **** + --echo **** SHOW WARNINGS on $CURRENT_CONNECTION **** + SHOW WARNINGS; + --echo + --echo **** SELECT replication-related variables on $CURRENT_CONNECTION **** + SELECT NOW(), @@SERVER_ID; + --echo + --echo **** SHOW SLAVE STATUS on $CURRENT_CONNECTION **** + query_vertical SHOW SLAVE STATUS; + --echo + --echo **** SHOW MASTER STATUS on $CURRENT_CONNECTION **** query_vertical SHOW MASTER STATUS; --echo - --echo **** SHOW PROCESSLIST on $_master_con **** + --echo **** SHOW SLAVE HOSTS on $CURRENT_CONNECTION **** + query_vertical SHOW SLAVE HOSTS; + --echo + --echo **** SHOW PROCESSLIST on $CURRENT_CONNECTION **** SHOW PROCESSLIST; --echo - --echo **** SHOW BINLOG EVENTS on $_master_con **** - eval SHOW BINLOG EVENTS IN '$master_binlog_name_sql'; - if (`SELECT '$master_binlog_name_io' != '$master_binlog_name_sql'`) - { - eval SHOW BINLOG EVENTS IN '$master_binlog_name_io'; - } + --echo **** SHOW BINARY LOGS on $CURRENT_CONNECTION **** + SHOW BINARY LOGS; + --echo + --echo **** SHOW BINLOG EVENTS on $CURRENT_CONNECTION **** + let $binlog_name= query_get_value("SHOW MASTER STATUS", File, 1); + --echo binlog_name = '$binlog_name' + eval SHOW BINLOG EVENTS IN '$binlog_name'; - connection $_con; + + --let $_rpl_is_first_server= 0 + --dec $_rpl_server + # Don't use same connection twice. + if (`SELECT 'server_$_rpl_server' = '$_rpl_old_con'`) + { + --dec $_rpl_server + if ($rpl_only_current_connection) + { + --let $_rpl_server= 0 + } + } } + +--connection $_rpl_old_con +--enable_abort_on_error diff --git a/mysql-test/include/show_slave_status.inc b/mysql-test/include/show_slave_status.inc index d66c068e19b..779de5a37f5 100644 --- a/mysql-test/include/show_slave_status.inc +++ b/mysql-test/include/show_slave_status.inc @@ -1,25 +1,75 @@ -# Include file to show the slave status, masking out some information -# that varies depending on where the test is executed. +# ==== Purpose ==== +# +# Show selected columns of output from SHOW SLAVE STATUS. +# +# Note: test cases should never call SHOW SLAVE STATUS directly, +# because that outputs more information to the query log than what is +# needed for the property that is being tested. That would cause +# maintenance problems, because (1) it is hard for a human to +# understand what property is being tested; (2) the output of many of +# the fields is non-deterministic (e.g., Slave_IO_State) or changes +# frequently (e.g., binlog positions). +# +# Instead, what you want most of the time is to source one of the +# following scripts: +# +# include/check_slave_no_error.inc +# Assert that Slave_SQL_Errno = Slave_IO_Errno = 0. +# +# include/check_slave_is_running.inc +# Assert that Slave_IO_Running = Slave_SQL_Running = 'Yes'. +# +# include/wait_for_slave_sql_error.inc +# Wait for the SQL thread to get a given error (and assert that +# it has this error). +# +# include/wait_for_slave_io_error.inc +# Wait for the IO thread to get a given error (and assert that +# it has this error). +# +# include/wait_for_slave_sql_to_stop.inc +# include/wait_for_slave_io_to_stop.inc +# include/wait_for_slave_to_stop.inc +# Wait for the SQL thread, the IO thread, or both to stop (and +# assert they stop). +# +# When none of the above applies, you may use this script instead. +# However, take care so that the test never contains explicit binlog +# coordinates. Usually you can read the binlog coordinates into a +# variable and compare it to some other coordinates. +# +# +# ==== Usage ==== +# +# --let $status_items= Column_Name[, Column_Name[, ...]] +# --source include/show_slave_status.inc +# +# Parameters: +# $status_items +# Set to the name of the column in the output of SHOW SLAVE STATUS +# that you want to display. Example: +# +# --let $status_items= Master_SSL_Allowed +# +# You can show multiple columns by setting $status_items to a +# comma-separated list. Example: +# +# --let $status_items= Master_Log_File, Relay_Master_Log_File ---let $_items=$status_items + +--let $_show_slave_status_items=$status_items if (`SELECT "XX$status_items" = "XX"`) { - --die 'Variable status_items is NULL' + --die Bug in test case: The mysqltest variable $status_items is not set. } ---disable_query_log ---vertical_results -while (`SELECT "XX$_items" <> "XX"`) +while (`SELECT "XX$_show_slave_status_items" <> "XX"`) { - --let $_name= `SELECT SUBSTRING_INDEX('$_items', ',', 1)` - --let $_items= `SELECT LTRIM(SUBSTRING('$_items', LENGTH('$_name') + 2))` + --let $_show_slave_status_name= `SELECT SUBSTRING_INDEX('$_show_slave_status_items', ',', 1)` + --let $_show_slave_status_items= `SELECT LTRIM(SUBSTRING('$_show_slave_status_items', LENGTH('$_show_slave_status_name') + 2))` - --let $_value= query_get_value(SHOW SLAVE STATUS, $_name, 1) - - --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR - --eval SELECT "$_value" AS $_name + --let $_show_slave_status_value= query_get_value(SHOW SLAVE STATUS, $_show_slave_status_name, 1) + --let $_show_slave_status_value= `SELECT REPLACE("$_show_slave_status_value", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')` + --echo $_show_slave_status_name = '$_show_slave_status_value' } - ---horizontal_results ---enable_query_log diff --git a/mysql-test/include/start_slave.inc b/mysql-test/include/start_slave.inc index 78a02736de8..d01978037b4 100644 --- a/mysql-test/include/start_slave.inc +++ b/mysql-test/include/start_slave.inc @@ -6,16 +6,34 @@ # Please use this instead of 'START SLAVE', to reduce the risk of test # case bugs. # +# # ==== Usage ==== # -# source include/wait_for_slave_to_start.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/start_slave.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= start_slave.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + ---disable_query_log START SLAVE; ---enable_query_log ---echo include/start_slave.inc source include/wait_for_slave_to_start.inc; + + +--let $include_filename= start_slave.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/stop_slave.inc b/mysql-test/include/stop_slave.inc index 7161e6fe739..64cc0d5b322 100644 --- a/mysql-test/include/stop_slave.inc +++ b/mysql-test/include/stop_slave.inc @@ -3,19 +3,86 @@ # Issues STOP SLAVE on the current connection. Then waits until both # the IO and SQL threads have stopped, or until a timeout is reached. # -# Please use this instead of 'STOP SLAVE', to reduce the risk of test -# case bugs. +# Please use this instead of 'STOP SLAVE', to reduce the risk of races +# in test cases. +# +# This will fail if the slave IO or SQL thread has an error. If you +# expect an error in the IO thread, use +# include/wait_for_slave_io_error.inc and include/stop_slave_sql.inc. +# # # ==== Usage ==== # -# source include/wait_for_slave_to_start.inc; +# [--let $rpl_only_running_threads= 1] +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/stop_slave.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $rpl_only_running_threads +# By default, this script executes STOP SLAVE unconditionally. +# This generates a warnings if one or both slave threads are +# already stopped. If $rpl_only_running_threads is set, this +# script checks which slave threads are running, and issues either +# STOP SLAVE, STOP SLAVE SQL_THREAD, STOP SLAVE IO_THREAD, or +# nothing. +# +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc ---disable_query_log -STOP SLAVE; ---enable_query_log ---echo include/stop_slave.inc -source include/wait_for_slave_to_stop.inc; + +--let $include_filename= stop_slave.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +if ($rpl_only_running_threads) +{ + --let $_slave_sql_running= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1) + --let $_slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1) + if ($rpl_debug) + { + --echo Stop SQL: $_slave_sql_running; Stop IO: $_slave_io_running + } + + --let $_slave_running_bits= `SELECT IF('$_slave_io_running' = 'Yes', 1, 0) + IF('$_slave_sql_running' = 'Yes', 2, 0)` + if ($_slave_running_bits) + { + --dec $_slave_running_bits + # $_slave_running_bits=1: io thread running + if (!$_slave_running_bits) + { + --source include/stop_slave_io.inc + } + --dec $_slave_running_bits + # $_slave_running_bits=2: sql thread running + if (!$_slave_running_bits) + { + --source include/stop_slave_sql.inc + } + --dec $_slave_running_bits + # $_slave_running_bits=2: both threads running + if (!$_slave_running_bits) + { + STOP SLAVE; + --source include/wait_for_slave_to_stop.inc + } + } +} +if (!$rpl_only_running_threads) +{ + STOP SLAVE; + --source include/wait_for_slave_to_stop.inc +} + + +--let $include_filename= stop_slave.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/stop_slave_io.inc b/mysql-test/include/stop_slave_io.inc new file mode 100644 index 00000000000..ddc83782311 --- /dev/null +++ b/mysql-test/include/stop_slave_io.inc @@ -0,0 +1,43 @@ +# ==== Purpose ==== +# +# Issues STOP SLAVE IO_THREAD on the current connection. Then waits +# until the IO thread has stopped, or until a timeout is reached. +# +# This will fail if the slave IO thread has an error. If you expect an +# error in the IO thread, use include/wait_for_slave_io_error.inc +# instead. +# +# Please use this instead of 'STOP SLAVE IO_THREAD', to reduce the +# risk of races in test cases. +# +# +# ==== Usage ==== +# +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/stop_slave_io.inc +# +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= stop_slave_io.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +STOP SLAVE IO_THREAD; +--source include/wait_for_slave_io_to_stop.inc + + +--let $include_filename= stop_slave_io.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/stop_slave_sql.inc b/mysql-test/include/stop_slave_sql.inc new file mode 100644 index 00000000000..f5075b32fda --- /dev/null +++ b/mysql-test/include/stop_slave_sql.inc @@ -0,0 +1,41 @@ +# ==== Purpose ==== +# +# Issues STOP SLAVE SQL_THREAD on the current connection. Then waits +# until the SQL thread has stopped, or until a timeout is reached. +# +# Please use this instead of 'STOP SLAVE SQL_THREAD', to reduce the +# risk of races in test cases. +# +# This will fail if the SQL thread has an error. +# +# +# ==== Usage ==== +# +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/stop_slave_sql.inc +# +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= stop_slave_sql.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + + +STOP SLAVE SQL_THREAD; +--source include/wait_for_slave_sql_to_stop.inc + + +--let $include_filename= stop_slave_sql.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/sync_io_with_master.inc b/mysql-test/include/sync_io_with_master.inc new file mode 100644 index 00000000000..34906c416f5 --- /dev/null +++ b/mysql-test/include/sync_io_with_master.inc @@ -0,0 +1,46 @@ +# ==== Purpose ==== +# +# Waits until the slave IO thread on the current connection has been +# synced up to the point saved by the last call to +# include/save_master_pos.inc (i.e., until the IO thead has copied up +# to the saved position). Does not wait for the SQL thread. +# +# +# ==== Usage ==== +# +# On master: +# --source include/save_master_pos.inc +# +# On slave: +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/sync_slave_io_with_master.inc +# +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= sync_io_with_master.inc +--source include/begin_include_file.inc + + +--let $_old_slave_error_param= $slave_error_param +--let $slave_error_param= Last_IO_Errno + +--let $slave_param= Master_Log_File +--let $slave_param_value= $_master_file +source include/wait_for_slave_param.inc; + +let $slave_param= Read_Master_Log_Pos; +let $slave_param_value= $_master_pos; +source include/wait_for_slave_param.inc; + +--let $slave_error_param= $_old_slave_error_param + + +--let $include_filename= sync_io_with_master.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/sync_slave_io_with_master.inc b/mysql-test/include/sync_slave_io_with_master.inc index f7dd563039c..b1b81371c97 100644 --- a/mysql-test/include/sync_slave_io_with_master.inc +++ b/mysql-test/include/sync_slave_io_with_master.inc @@ -2,35 +2,49 @@ # # Waits until the slave IO thread has been synced, i.e., all events # have been copied over to slave. Does not care if the SQL thread is -# in sync. +# in sync (or even running). # # # ==== Usage ==== # -# source include/sync_slave_io_with_master.inc; +# [--let $sync_slave_connection= ] +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/sync_slave_io_with_master.inc # -# Syncs to the current position on master, as found by SHOW MASTER -# STATUS. +# Syncs slave to the current position on master, as found by SHOW +# MASTER STATUS. # # Must be called on the master. Will change connection to the slave. # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $sync_slave_connection +# By default, this script switches connection to 'slave'. If +# $sync_slave_connection is set, then '$sync_slave_connection' is +# used instead of 'slave'. +# +# $slave_timeout +# See include/wait_for_slave_param.inc. +# +# $rpl_debug +# See include/rpl_init.inc -let $_master_file= query_get_value("SHOW MASTER STATUS", File, 1); -let $_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1); +--let $include_filename= sync_slave_io_with_master.inc +--source include/begin_include_file.inc -connection slave; -let $slave_error_message= Failed while waiting for slave IO thread to sync; +--source include/save_master_pos.inc -let $slave_param= Master_Log_File; -let $slave_param_value= $_master_file; -source include/wait_for_slave_param.inc; +--let $rpl_connection_name= slave +if (`SELECT '$sync_slave_connection' != ''`) +{ + --let $rpl_connection_name= $sync_slave_connection +} +--source include/rpl_connection.inc -let $slave_param= Read_Master_Log_Pos; -let $slave_param_value= $_master_pos; -source include/wait_for_slave_param.inc; +--source include/sync_io_with_master.inc -let $slave_error_message= ; + +--let $include_filename= sync_slave_io_with_master.inc +--let $skip_restore_connection= 1 +--source include/end_include_file.inc diff --git a/mysql-test/include/sync_slave_sql_with_io.inc b/mysql-test/include/sync_slave_sql_with_io.inc new file mode 100644 index 00000000000..8048f7a177c --- /dev/null +++ b/mysql-test/include/sync_slave_sql_with_io.inc @@ -0,0 +1,50 @@ +# ==== Purpose ==== +# +# Sync the slave SQL thread with the IO thread. +# +# ==== Usage ==== +# +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/sync_slave_sql_with_io.inc +# +# Parameters: +# $slave_timeout +# By default, the synchronization timeouts after 300 seconds. If +# $slave_timeout is set, the synchronization timeouts after +# $slave_timeout seconds. +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= sync_slave_sql_with_io.inc +--source include/begin_include_file.inc + + +let $_slave_timeout= $slave_timeout; +if (!$_slave_timeout) +{ + let $_slave_timeout= 300; +} + +--let $_master_log_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1) +--let $_master_log_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1) + +if ($rpl_debug) +{ + --echo Master_Log_File='$_master_log_file' Read_Master_Log_Pos='$_master_log_pos' \$slave_timeout='$_slave_timeout' +} + +--let $_sync_slave_sql_with_io_errno= `SELECT MASTER_POS_WAIT('$_master_log_file', $_master_log_pos, $_slave_timeout)` +if (`SELECT IFNULL($_sync_slave_sql_with_io_errno, -1) < 0`) +{ + --echo #### Failed to sync slave SQL thread with slave IO thread. #### + --echo MASTER_POS_WAIT('$_master_log_file', $_master_log_pos, $_slave_timeout) returned $_sync_slave_sql_with_io_errno + --source include/show_rpl_debug_info.inc + --die Failed to sync slave SQL thread with slave IO thread. +} + + +--let $include_filename= sync_slave_sql_with_io.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_query_to_fail.inc b/mysql-test/include/wait_for_query_to_fail.inc new file mode 100644 index 00000000000..471813026ee --- /dev/null +++ b/mysql-test/include/wait_for_query_to_fail.inc @@ -0,0 +1,25 @@ +# +# Run a query over and over until it fails or timeout occurs +# + + +let $counter= 100; + +disable_abort_on_error; +disable_query_log; +disable_result_log; +eval $query; +while (!$mysql_errno) +{ + eval $query; + sleep 0.1; + dec $counter; + + if (!$counter) + { + --die "Waited too long for query to fail"; + } +} +enable_abort_on_error; +enable_query_log; +enable_result_log; diff --git a/mysql-test/include/wait_for_slave_io_error.inc b/mysql-test/include/wait_for_slave_io_error.inc index ffdcf752873..bd3468eebb6 100644 --- a/mysql-test/include/wait_for_slave_io_error.inc +++ b/mysql-test/include/wait_for_slave_io_error.inc @@ -4,56 +4,86 @@ # error, or until a timeout is reached. Also waits until the IO # thread has completely stopped. # +# # ==== Usage ==== # -# # Wait several errors. -# let $slave_io_errno= 1, 2, 3; -# source include/wait_for_slave_io_error.inc; -# -# # Print error message -# let $slave_io_errno= 1; -# let $show_slave_io_error= 1; -# source include/wait_for_slave_io_error.inc; +# --let $slave_io_errno= NUMBER [, NUMBER ...] +# [--let $show_slave_io_error= 1] +# [--let $slave_io_error_is_nonfatal= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/wait_for_slave_io_error.inc # # Parameters: +# $slave_io_errno +# The expected IO error numbers. This can be either a single +# number, or a comma-separated list of numbers. Examples: +# --let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013 +# --let $slave_io_errno= 1045 +# (After BUG#41956 has been fixed, this will be required to be +# symbolic names instead of numbers.) # -# $slave_io_errno -# The expected IO error numbers. This is required. -# (After BUG#41956 has been fixed, this will be required to be a -# symbolic name instead of a numbers.) +# $show_slave_io_error +# If set, will print the error to the query log. # -# $show_slave_io_error -# If set, will print the error to the query log. +# $slave_io_error_is_nonfatal +# By default, we wait for the slave IO thread to stop completely +# (i.e., until Slave_IO_State is empty). If this variable is set, +# then we don't wait. This is useful if the error is non-fatal +# (e.g., temporary connection error) and does not cause the slave +# IO thread to stop. # -# $slave_timeout -# See wait_for_slave_param.inc for description. +# $slave_timeout +# See include/wait_for_slave_param.inc # -# $master_connection -# See wait_for_slave_param.inc for description. +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= wait_for_slave_io_error.inc [errno=$slave_io_errno] +--source include/begin_include_file.inc -if (!$slave_io_errno) { - --die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc -} let $old_slave_param_comparison= $slave_param_comparison; let $slave_param= Last_IO_Errno; let $slave_param_comparison= !=; let $slave_param_value= 0; -let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread; source include/wait_for_slave_param.inc; -let $slave_error_message= ; let $slave_param_comparison= $old_slave_param_comparison; -let $_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); -if (`SELECT $_error NOT IN ($slave_io_errno)`) { - --echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) **** +let $_wfsie_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1); + +if (!$slave_io_errno) { + --echo !!!ERROR IN TEST: you must set \$slave_io_errno before you source + --echo !!!wait_for_slave_sql_error.inc. The error we got this time was '$_wfsie_errno', + --echo !!!so you probably want to add the following line to your test case: + --echo !!! --let \$slave_io_errno= $_wfsie_errno + --die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc +} + +if (`SELECT $_wfsie_errno NOT IN ($slave_io_errno)`) { + --echo **** Slave stopped with wrong error code: $_wfsie_errno (expected $slave_io_errno) **** source include/show_rpl_debug_info.inc; - --echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) **** + --echo **** Slave stopped with wrong error code: $_wfsie_errno (expected $slave_io_errno) **** --die Slave stopped with wrong error code } if ($show_slave_io_error) { - let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1); - echo Last_IO_Error = $error; + --let $_wait_for_slave_io_error_old_status_items= $status_items + --let $status_items= Last_IO_Error + --source include/show_slave_status.inc + --let $status_items= $_wait_for_slave_io_error_old_status_items } + +if (!$slave_io_error_is_nonfatal) +{ + --let $slave_param= Slave_IO_State + --let $slave_param_value= + --source include/wait_for_slave_param.inc +} +--let $slave_io_error_is_nonfatal= 0 + + +--let $include_filename= wait_for_slave_io_error.inc [errno=$slave_io_errno] +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_io_to_start.inc b/mysql-test/include/wait_for_slave_io_to_start.inc index abdc8339290..ab2ccb45007 100644 --- a/mysql-test/include/wait_for_slave_io_to_start.inc +++ b/mysql-test/include/wait_for_slave_io_to_start.inc @@ -4,16 +4,31 @@ # connected to the master (i.e., until SHOW SLAVE STATUS returns Yes # in the Slave_IO_Running field), or until a timeout is reached. # +# # ==== Usage ==== # -# source include/wait_for_slave_io_to_start.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_io_to_start.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= wait_for_slave_io_to_start.inc +--source include/begin_include_file.inc + let $slave_param= Slave_IO_Running; let $slave_param_value= Yes; -let $slave_error_message= Failed while waiting for slave IO thread to start; +--let $slave_error_param= Last_IO_Errno source include/wait_for_slave_param.inc; -let $slave_error_message= ; +--let $slave_error_param= + + +--let $include_filename= wait_for_slave_io_to_start.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_io_to_stop.inc b/mysql-test/include/wait_for_slave_io_to_stop.inc index f61b0db1ed7..d25c2ac071d 100644 --- a/mysql-test/include/wait_for_slave_io_to_stop.inc +++ b/mysql-test/include/wait_for_slave_io_to_stop.inc @@ -1,24 +1,40 @@ # ==== Purpose ==== # -# Waits until the IO thread of the current connection has stopped, or -# until a timeout is reached. +# Waits until the IO thread of the current connection has stopped +# gracefully. +# +# Note: this script will fail if the IO thread stops with an error. +# If you expect an error in the IO thread, use +# include/wait_for_slave_io_error.inc instead. +# +# This script also fails if a timeout is reached (default 300 +# seconds). +# # # ==== Usage ==== # -# source include/wait_for_slave_io_to_stop.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_io_to_stop.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc. +# +# $rpl_debug +# See include/rpl_init.inc -# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE -# STATUS will return an empty set. -let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -if (`SELECT '$_slave_io_running' != 'No such row'`) -{ - let $slave_param= Slave_IO_Running; - let $slave_param_value= No; - let $slave_error_message= Failed while waiting for slave IO thread to stop; - source include/wait_for_slave_param.inc; - let $slave_error_message= ; -} + +--let $include_filename= wait_for_slave_io_to_stop.inc +--source include/begin_include_file.inc + + +--let $slave_param= Slave_IO_Running +--let $slave_param_value= No +--let $slave_error_param= Last_IO_Errno +--source include/wait_for_slave_param.inc +--let $slave_error_param= + + +--let $include_filename= wait_for_slave_io_to_stop.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_param.inc b/mysql-test/include/wait_for_slave_param.inc index 98cd426fa11..c9660b0679d 100644 --- a/mysql-test/include/wait_for_slave_param.inc +++ b/mysql-test/include/wait_for_slave_param.inc @@ -3,11 +3,16 @@ # Waits until SHOW SLAVE STATUS has returned a specified value, or # until a timeout is reached. # +# # ==== Usage ==== # -# let $slave_param= Slave_SQL_Running; -# let $slave_param_value= No; -# source include/slave_wait_param.inc; +# --let $slave_param= Slave_SQL_Running +# --let $slave_param_value= No +# [--let $slave_param_comparison= [ < | <= | >= | > | = | != ]] +# [--let $slave_timeout= NUMBER] +# [--let $slave_error_param= [Slave_SQL_Errno | Slave_IO_Errno]] +# [--let $rpl_debug= 1] +# --source include/slave_wait_param.inc # # Parameters: # @@ -21,33 +26,35 @@ # $slave_param_value. If you want to wait until $slave_param # becomes *unequal* to $slave_param_value, set this parameter to the # string '!=', like this: -# let $slave_param_comparison= !=; +# --let $slave_param_comparison= != # # $slave_timeout # The default timeout is 5 minutes. You can change the timeout by -# setting $slave_timeout. The unit is tenths of seconds. +# setting $slave_timeout. The unit is seconds. # -# $master_connection -# If the timeout is reached, debug info is given by calling SHOW -# SLAVE STATUS, SHOW PROCESSLIST, and SHOW BINLOG EVENTS. Then, a -# 'connection master' is then issued, and more debug info is given -# by calling SHOW MASTER STATUS, SHOW PROCESSLIST, and SHOW BINLOG -# EVENTS. If $master_connection is set, the latter three commands -# will be issued on $master_connection instead of on the host named -# 'master'. See also show_rpl_debug_info.inc +# $slave_error_param +# If set, this script will check if the column of the output from +# SHOW SLAVE STATUS named $slave_error_param is nonzero. If it is, +# this script will faile immediately. Typically, this should be set +# to Last_IO_Errno or Last_SQL_Errno. # -# $slave_error_message -# If set, this is printed when a timeout occurs. This is primarily -# intended to be used by other wait_for_slave_* macros, to indicate -# what the purpose of the wait was. (A very similar error message is -# given by default, but the wait_for_slave_* macros use this to give -# an error message identical to that in previous versions, so that -# errors are easier searchable in the pushbuild history.) +# $rpl_debug +# See include/rpl_init.inc -let $_slave_timeout_counter= $slave_timeout; -if (!$_slave_timeout_counter) + +--let $include_filename= wait_for_slave_param.inc [$slave_param] +--source include/begin_include_file.inc + + +let $_slave_timeout= $slave_timeout; +if (!$_slave_timeout) { - let $_slave_timeout_counter= 3000; + let $_slave_timeout= 300; +} + +if (`SELECT '$slave_error_param' = ''`) +{ + --let $slave_error_param= 1 } let $_slave_param_comparison= $slave_param_comparison; @@ -56,27 +63,57 @@ if (!$_slave_param_comparison) let $_slave_param_comparison= =; } -let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1); -while (`SELECT NOT('$_show_slave_status_value' $_slave_param_comparison '$slave_param_value') AND $_slave_timeout_counter > 0`) +if ($rpl_debug) { - dec $_slave_timeout_counter; - if ($_slave_timeout_counter) + --echo Waiting until '$slave_param' $_slave_param_comparison '$slave_param_value' [timeout='$_slave_timeout', \$slave_error_param='$slave_error_param'] +} + +--let $_slave_check_configured= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1) + +if (`SELECT '$_slave_check_configured' = 'No such row'`) +{ + --echo **** ERROR: SHOW SLAVE STATUS returned empty result set. Slave not configured. **** + --source include/show_rpl_debug_info.inc + --die SHOW SLAVE STATUS returned empty result set. Slave not configured. +} + +# mysqltest doesn't provide any better way to multiply by 10 +--let $_wait_for_slave_param_zero= 0 +--let $_slave_timeout_counter= $_slave_timeout$zero +--let $_slave_continue= 1 +while ($_slave_continue) +{ + --let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1) + + # Check if an error condition is reached. + if (!$slave_error_param) { - sleep 0.1; - let $_show_slave_status_value= query_get_value("SHOW SLAVE STATUS", $slave_param, 1); + --let $_show_slave_status_error_value= query_get_value("SHOW SLAVE STATUS", $slave_error_param, 1) + if ($_show_slave_status_error_value) + { + --echo **** ERROR: $slave_error_param = '$_show_slave_status_error_value' while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value **** + --source include/show_rpl_debug_info.inc + --die Error condition reached in include/wait_for_slave_param.inc + } + } + + # Check if the termination condition is reached. + --let $_slave_continue= `SELECT NOT('$_show_slave_status_value' $_slave_param_comparison '$slave_param_value')` + + # Decrease timer, and check if the timeout is reached. + if ($_slave_continue) + { + --dec $_slave_timeout_counter + if (!$_slave_timeout_counter) + { + --echo **** ERROR: timeout after $_slave_timeout seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value **** + --source include/show_rpl_debug_info.inc + --die Timeout in include/wait_for_slave_param.inc + } + --sleep 0.1 } } -# This has to be outside the loop until BUG#41913 has been fixed -if (!$_slave_timeout_counter) -{ - --echo **** ERROR: timeout after $slave_timeout seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value **** - if ($slave_error_message) - { - --echo Message: $slave_error_message - } - --echo Current connection is '$CURRENT_CONNECTION' - echo Note: the following output may have changed since the failure was detected; - source include/show_rpl_debug_info.inc; - die; -} + +--let $include_filename= wait_for_slave_param.inc [$slave_param] +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_sql_error.inc b/mysql-test/include/wait_for_slave_sql_error.inc index 80836f908c6..80c532d6a20 100644 --- a/mysql-test/include/wait_for_slave_sql_error.inc +++ b/mysql-test/include/wait_for_slave_sql_error.inc @@ -6,43 +6,65 @@ # # ==== Usage ==== # -# source include/wait_for_slave_sql_error.inc; +# --let $slave_sql_errno= NUMBER +# [--let $show_slave_sql_error= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/wait_for_slave_sql_error.inc # # Parameters: +# $slave_sql_errno +# The expected SQL error number. This is required. +# (After BUG#41956 has been fixed, this will be required to be a +# symbolic name instead of a number.) # -# $slave_sql_errno -# The expected SQL error number. This is required. -# (After BUG#41956 has been fixed, this will be required to be a -# symbolic name instead of a number.) -# -# $show_slave_sql_error -# If set, will print the error to the query log. +# $show_slave_sql_error +# If set, will print the error to the query log. # -# $slave_timeout -# See wait_for_slave_param.inc for description. +# $slave_timeout +# See include/wait_for_slave_param.inc # -# $master_connection -# See wait_for_slave_param.inc for description. +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= wait_for_slave_sql_error.inc [errno=$slave_sql_errno] +--source include/begin_include_file.inc + + +# Note: here, we should not wait for Slave_SQL_Errno!=0. +# Slave_SQL_Errno and Slave_SQL_Running are not set atomically. +# Slave_SQL_Errno is set first, then Slave_SQL_Running. So we wait +# until Slave_SQL_Running=No to be sure that both conditions hold. +let $slave_param= Slave_SQL_Running; +let $slave_param_value= No; +source include/wait_for_slave_param.inc; + +let $_wfsse_errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); if (!$slave_sql_errno) { + --echo !!!ERROR IN TEST: you must set \$slave_sql_errno before you source + --echo !!!wait_for_slave_sql_error.inc. The error we got this time was '$_wfsse_errno', + --echo !!!so you probably want to add the following line to your test case: + --echo !!! --let \$slave_sql_errno= $_wfsse_errno --die !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_for_slave_sql_error.inc } -let $slave_param= Slave_SQL_Running; -let $slave_param_value= No; -let $slave_error_message= Failed while waiting for slave to stop the SQL thread (expecting error in the SQL thread); -source include/wait_for_slave_param.inc; - -let $_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); -if (`SELECT '$_error' != '$slave_sql_errno'`) { - --echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) **** +if (`SELECT $_wfsse_errno NOT IN ($slave_sql_errno)`) { + --echo **** Slave stopped with wrong error code: $_wfsse_errno (expected $slave_sql_errno) **** source include/show_rpl_debug_info.inc; - --echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) **** + --echo **** Slave stopped with wrong error code: $_wfsse_errno (expected $slave_sql_errno) **** --die Slave stopped with wrong error code } if ($show_slave_sql_error) { - let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); - echo Last_SQL_Error = $error; + --let $_wait_for_slave_sql_error_old_status_items= $status_items + --let $status_items= Last_SQL_Error + --source include/show_slave_status.inc + --let $status_items= $_wait_for_slave_sql_error_old_status_items } + + +--let $include_filename= wait_for_slave_sql_error.inc [errno=$slave_sql_errno] +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc index 11c02c0b490..9246c1839af 100644 --- a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc +++ b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc @@ -5,38 +5,58 @@ # # ==== Usage ==== # -# let $slave_sql_error= ; -# source include/wait_for_slave_sql_error_and_skip.inc; +# --let $slave_sql_error= NUMBER +# [--let $show_sql_error= 1] +# [--let $slave_skip_counter= 1] +# [--let $not_switch_connection= 1] +# [--let $rpl_debug= 1] +# [--let $slave_timeout= NUMBER] +# --source include/wait_for_slave_sql_error_and_skip.inc # # Parameters: # -# $slave_sql_errno -# The error number to wait for. This is required. (See -# wait_for_slave_sql_error.inc) +# $slave_sql_errno +# The error number to wait for. This is required. (See +# wait_for_slave_sql_error.inc) # -# $show_sql_error -# If set, will print the error to the query log. -# -# $slave_timeout -# See wait_for_slave_param.inc for description. +# $show_sql_error +# If set, will print the error to the query log. # -# $master_connection -# See wait_for_slave_param.inc for description. +# $slave_skip_counter +# If set, skip this number of events. If not set, skip one event. # -# $slave_skip_counter -# If set, skip this number of events. If not set, skip one event. +# $not_switch_connection +# By default, this script executes on the connection 'slave'. If +# $not_switch_connection is set, this script executes on the current +# connection. In any case, the original connection is restored. # -# $not_switch_connection If set, don't switch to slave and don't switch back -# master. +# $slave_timeout +# See include/wait_for_slave_param.inc # +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno] +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + -echo --source include/wait_for_slave_sql_error_and_skip.inc; if (!$not_switch_connection) { - connection slave; + --let $rpl_connection_name= slave + --source include/rpl_connection.inc } + + source include/wait_for_slave_sql_error.inc; + # skip the erroneous statement if ($slave_skip_counter) { eval SET GLOBAL SQL_SLAVE_SKIP_COUNTER= $slave_skip_counter; @@ -45,7 +65,7 @@ if (!$slave_skip_counter) { SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; } source include/start_slave.inc; -if (!$not_switch_connection) -{ - connection master; -} + + +--let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno] +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_sql_to_start.inc b/mysql-test/include/wait_for_slave_sql_to_start.inc index 48744f5dd13..4aea9fba569 100644 --- a/mysql-test/include/wait_for_slave_sql_to_start.inc +++ b/mysql-test/include/wait_for_slave_sql_to_start.inc @@ -5,13 +5,33 @@ # # ==== Usage ==== # -# source include/wait_for_slave_sql_to_start.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_sql_to_start.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= wait_for_slave_sql_to_start.inc +--source include/begin_include_file.inc + let $slave_param= Slave_SQL_Running; let $slave_param_value= Yes; -let $slave_error_message= Failed while waiting for slave SQL to start; + +# Unfortunately, the slave sql thread sets Slave_SQL_Running=Yes +# *before* it clears Last_SQL_Errno. So we have to allow errors in +# the SQL thread here. + +#--let $slave_error_param= Last_SQL_Errno source include/wait_for_slave_param.inc; +#--let $slave_error_param= + + +--let $include_filename= wait_for_slave_sql_to_start.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_sql_to_stop.inc b/mysql-test/include/wait_for_slave_sql_to_stop.inc index 6992613b646..492b3237be5 100644 --- a/mysql-test/include/wait_for_slave_sql_to_stop.inc +++ b/mysql-test/include/wait_for_slave_sql_to_stop.inc @@ -1,24 +1,40 @@ # ==== Purpose ==== # -# Waits the SQL thread of the current connection has stopped, or until -# a timeout is reached. +# Waits until the SQL thread of the current connection has stopped +# gracefully. +# +# Note: this script will fail if the SQL thread stops with an error. +# If you expect an error in the SQL thread, use +# include/wait_for_slave_io_error.inc instead. +# +# This script also fails if a timeout is reached (default 300 +# seconds). +# # # ==== Usage ==== # -# source include/wait_for_slave_sql_to_stop.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_sql_to_stop.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc -# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE -# STATUS will return an empty set. -let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -if (`SELECT '$_slave_io_running' != 'No such row'`) -{ - let $slave_param= Slave_SQL_Running; - let $slave_param_value= No; - let $slave_error_message= Failed while waiting for slave SQL thread to stop; - source include/wait_for_slave_param.inc; - let $slave_error_message= ; -} + +--let $include_filename= wait_for_slave_sql_to_stop.inc +--source include/begin_include_file.inc + + +--let $slave_param= Slave_SQL_Running +--let $slave_param_value= No +--let $slave_error_param= Last_SQL_Errno +--source include/wait_for_slave_param.inc +--let $slave_error_param= + + +--let $include_filename= wait_for_slave_sql_to_stop.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_to_start.inc b/mysql-test/include/wait_for_slave_to_start.inc index 567950cc6d7..a916e2ea615 100644 --- a/mysql-test/include/wait_for_slave_to_start.inc +++ b/mysql-test/include/wait_for_slave_to_start.inc @@ -3,22 +3,28 @@ # Waits until both the IO and SQL threads of the current connection # have started, or until a timeout is reached. # +# # ==== Usage ==== # -# source include/wait_for_slave_to_start.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_to_start.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc -let $slave_error_message= Failed while waiting for slave to start; -let $slave_param= Slave_IO_Running; -let $slave_param_value= Yes; -source include/wait_for_slave_param.inc; +--let $include_filename= wait_for_slave_to_start.inc +--source include/begin_include_file.inc -let $slave_param= Slave_SQL_Running; -let $slave_param_value= Yes; -source include/wait_for_slave_param.inc; -let $slave_error_message= ; +--source include/wait_for_slave_io_to_start.inc +--source include/wait_for_slave_sql_to_start.inc + + +--let $include_filename= wait_for_slave_to_start.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/wait_for_slave_to_stop.inc b/mysql-test/include/wait_for_slave_to_stop.inc index 56d0e7b0c91..1bfd16067c5 100644 --- a/mysql-test/include/wait_for_slave_to_stop.inc +++ b/mysql-test/include/wait_for_slave_to_stop.inc @@ -1,30 +1,38 @@ # ==== Purpose ==== # # Waits until both the IO and SQL threads of the current connection -# have stopped, or until a timeout is reached. +# have stopped gracefully. +# +# Note: this script will fail if one of the threads stops with an +# error. If you expect an error in one of the threads, use +# include/wait_for_slave_io_error.inc or +# include/wait_for_slave_sql_error.inc instead. +# +# This script also fails if a timeout is reached (default 300 +# seconds). +# # # ==== Usage ==== # -# source include/wait_for_slave_to_stop.inc; +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/wait_for_slave_to_stop.inc # -# Parameters to this macro are $slave_timeout and -# $master_connection. See wait_for_slave_param.inc for -# descriptions. +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc -# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE -# STATUS will return an empty set. -let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -if (`SELECT '$_slave_io_running' != 'No such row'`) -{ - let $slave_error_message= Failed while waiting for slave to stop; - let $slave_param= Slave_IO_Running; - let $slave_param_value= No; - source include/wait_for_slave_param.inc; +--let $include_filename= wait_for_slave_to_stop.inc +--source include/begin_include_file.inc - let $slave_param= Slave_SQL_Running; - let $slave_param_value= No; - source include/wait_for_slave_param.inc; - let $slave_error_message= ; -} +--source include/wait_for_slave_sql_to_stop.inc +--source include/wait_for_slave_io_to_stop.inc + + +--let $include_filename= wait_for_slave_to_stop.inc +--source include/end_include_file.inc diff --git a/mysql-test/include/write_var_to_file.inc b/mysql-test/include/write_var_to_file.inc new file mode 100644 index 00000000000..e70667634a3 --- /dev/null +++ b/mysql-test/include/write_var_to_file.inc @@ -0,0 +1,57 @@ +# ==== Purpose ==== +# +# Write the contents of $write_var to file $write_to_file. +# +# +# ==== Usage ==== +# +# --let $write_var = +# --let $write_to_file = [|GENERATE] +# --source include/write_var_to_file.inc +# +# $write_var is evaluated in sql 'string' context, so escapes like \n +# are interpolated. +# +# $write_to_file can be either a filename, or the special string +# GENERATE. If it is GENERATE, a unique filename is generated (based +# on UUID()). The filename is saved in $write_to_file so that it can +# be retrieved later. +# +# +# ==== Implementation ==== +# +# We can't use mysqltest's write_file because it does not evaluate +# variables. We can't use '--exec echo $write_var > $write_file' +# because it will use \n\r line terminator under windows. So the only +# working way is mysql's SELECT INTO DUMPFILE, which is subject to +# @@secure_file_priv. That makes this more complex than you might +# expect. + +if (`SELECT '$write_to_file' = ''`) +{ + --die You must set the mysqltest variable \$write_to_file before you source include/write_var_to_file.inc +} + +if (`SELECT '$write_to_file' = 'GENERATE'`) +{ + --let $_wvtf_suffix= `SELECT UUID()` + --let $write_to_file= $MYSQLTEST_VARDIR/tmp/_var_file_$_wvtf_suffix.inc +} + +--error 0,1 +--remove_file $write_to_file + +if (`SELECT LENGTH(@@secure_file_priv) > 0`) +{ + --let $_wvtf_secure_file_priv= `SELECT @@secure_file_priv` + --let $_wvtf_suffix= `SELECT UUID()` + --let $_wvtf_tmp_file= $_wvtf_secure_file_priv/_wvtf_$_wvtf_suffix + + --eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file' + --copy_file $_wvtf_tmp_file $write_to_file + --remove_file $_wvtf_tmp_file +} +if (`SELECT LENGTH(@@secure_file_priv) = 0`) +{ + --eval SELECT '$write_var' INTO DUMPFILE '$write_to_file' +} diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 6e8f12ceec1..a32c647e3a4 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3360,13 +3360,14 @@ sub find_analyze_request # The test can leave a file in var/tmp/ to signal # that all servers should be restarted -sub restart_forced_by_test +sub restart_forced_by_test($) { + my $file = shift; my $restart = 0; foreach my $mysqld ( mysqlds() ) { my $datadir = $mysqld->value('datadir'); - my $force_restart_file = "$datadir/mtr/force_restart"; + my $force_restart_file = "$datadir/mtr/$file"; if ( -f $force_restart_file ) { mtr_verbose("Restart of servers forced by test"); @@ -3606,7 +3607,7 @@ sub run_testcase ($) { if ( $res == 0 ) { my $check_res; - if ( restart_forced_by_test() ) + if ( restart_forced_by_test('force_restart') ) { stop_all_servers($opt_shutdown_timeout); } @@ -3634,8 +3635,11 @@ sub run_testcase ($) { find_testcase_skipped_reason($tinfo); mtr_report_test_skipped($tinfo); # Restart if skipped due to missing perl, it may have had side effects - stop_all_servers($opt_shutdown_timeout) - if ($tinfo->{'comment'} =~ /^perl not found/); + if ( restart_forced_by_test('force_restart_if_skipped') || + $tinfo->{'comment'} =~ /^perl not found/ ) + { + stop_all_servers($opt_shutdown_timeout); + } } elsif ( $res == 65 ) { diff --git a/mysql-test/r/init_file.result b/mysql-test/r/init_file.result index 43ed908ad01..6394014f3e5 100644 --- a/mysql-test/r/init_file.result +++ b/mysql-test/r/init_file.result @@ -21,4 +21,3 @@ y 11 13 drop table t1, t2; -call mtr.force_restart(); diff --git a/mysql-test/r/mysqldump_restore.result b/mysql-test/r/mysqldump_restore.result index 16698251913..9eac8b253de 100644 --- a/mysql-test/r/mysqldump_restore.result +++ b/mysql-test/r/mysqldump_restore.result @@ -20,7 +20,7 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Compare original and recreated tables # Recreated table: test.t1 # Original table: test.t1_orig -Comparing tables test.t1 and test.t1_orig +include/diff_tables.inc [test.t1, test.t1_orig] # Cleanup DROP TABLE test.t1, test.t1_orig; # @@ -45,7 +45,7 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Compare original and recreated tables # Recreated table: test.t1 # Original table: test.t1_orig -Comparing tables test.t1 and test.t1_orig +include/diff_tables.inc [test.t1, test.t1_orig] # Cleanup DROP TABLE test.t1, test.t1_orig; # @@ -63,7 +63,7 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Compare original and recreated tables # Recreated table: test.t1 # Original table: test.t1_orig -Comparing tables test.t1 and test.t1_orig +include/diff_tables.inc [test.t1, test.t1_orig] # Cleanup DROP TABLE test.t1, test.t1_orig; # @@ -82,7 +82,7 @@ ALTER TABLE test.t2 RENAME to test.t2_orig; # Compare original and recreated tables # Recreated table: test.t2 # Original table: test.t2_orig -Comparing tables test.t2 and test.t2_orig +include/diff_tables.inc [test.t2, test.t2_orig] # Cleanup DROP TABLE test.t2, test.t2_orig; DROP TABLE t1; @@ -100,7 +100,7 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Compare original and recreated tables # Recreated table: test.t1 # Original table: test.t1_orig -Comparing tables test.t1 and test.t1_orig +include/diff_tables.inc [test.t1, test.t1_orig] # Cleanup DROP TABLE test.t1, test.t1_orig; # End tests diff --git a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result b/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result deleted file mode 100644 index 8226469fcf7..00000000000 --- a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result +++ /dev/null @@ -1,42 +0,0 @@ -SET @old_relay_log_purge= @@global.relay_log_purge; -change master to -MASTER_HOST='dummy.localdomain', -RELAY_LOG_FILE='slave-relay-bin.000001', -RELAY_LOG_POS=4; -start slave sql_thread; -select MASTER_POS_WAIT('master-bin.000001', 3776); -# Result on slave -SELECT * FROM t1; -id -5 -6 -7 -8 -9 -10 -11 -SELECT * FROM t2; -id -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -DROP TABLE IF EXISTS t1, t2; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP FUNCTION IF EXISTS f1; -DROP TRIGGER IF EXISTS tr1; -stop slave sql_thread; -reset slave; -SET @@global.relay_log_purge= @old_relay_log_purge; diff --git a/mysql-test/suite/rpl/r/rpl_drop_if_exists.result b/mysql-test/suite/binlog/r/binlog_drop_if_exists.result similarity index 100% rename from mysql-test/suite/rpl/r/rpl_drop_if_exists.result rename to mysql-test/suite/binlog/r/binlog_drop_if_exists.result diff --git a/mysql-test/suite/binlog/r/binlog_old_versions.result b/mysql-test/suite/binlog/r/binlog_old_versions.result index 77289252b4c..a4850b835c8 100644 --- a/mysql-test/suite/binlog/r/binlog_old_versions.result +++ b/mysql-test/suite/binlog/r/binlog_old_versions.result @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1, t2, t3; ==== Read modern binlog (version 5.1.23) ==== SELECT * FROM t1 ORDER BY a; a b diff --git a/mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result b/mysql-test/suite/binlog/r/binlog_query_filter_rules.result similarity index 100% rename from mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result rename to mysql-test/suite/binlog/r/binlog_query_filter_rules.result diff --git a/mysql-test/suite/rpl/r/rpl_server_id.result b/mysql-test/suite/binlog/r/binlog_server_id.result similarity index 100% rename from mysql-test/suite/rpl/r/rpl_server_id.result rename to mysql-test/suite/binlog/r/binlog_server_id.result diff --git a/mysql-test/suite/rpl/r/rpl_sf.result b/mysql-test/suite/binlog/r/binlog_sf.result similarity index 100% rename from mysql-test/suite/rpl/r/rpl_sf.result rename to mysql-test/suite/binlog/r/binlog_sf.result diff --git a/mysql-test/suite/binlog/r/binlog_sql_mode.result b/mysql-test/suite/binlog/r/binlog_sql_mode.result index e306040502d..4477c94a95e 100644 --- a/mysql-test/suite/binlog/r/binlog_sql_mode.result +++ b/mysql-test/suite/binlog/r/binlog_sql_mode.result @@ -1,9 +1,3 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; SET @old_sql_mode= @@global.sql_mode; SET @old_binlog_format=@@session.binlog_format; SET SESSION sql_mode=8; @@ -27,7 +21,7 @@ DO BEGIN UPDATE t1 SET id = id +1; END;| -Chceck Result +Check Result select (@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog")) is not null; diff --git a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt deleted file mode 100644 index 74e71a8e558..00000000000 --- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-same-server-id --relay-log=slave-relay-bin --skip-slave-start diff --git a/mysql-test/suite/rpl/t/rpl_drop_if_exists.test b/mysql-test/suite/binlog/t/binlog_drop_if_exists.test similarity index 100% rename from mysql-test/suite/rpl/t/rpl_drop_if_exists.test rename to mysql-test/suite/binlog/t/binlog_drop_if_exists.test diff --git a/mysql-test/suite/binlog/t/binlog_old_versions.test b/mysql-test/suite/binlog/t/binlog_old_versions.test index 0ccea406a82..b294adbc69d 100644 --- a/mysql-test/suite/binlog/t/binlog_old_versions.test +++ b/mysql-test/suite/binlog/t/binlog_old_versions.test @@ -24,9 +24,6 @@ source include/not_embedded.inc; ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; - --echo ==== Read modern binlog (version 5.1.23) ==== @@ -161,3 +158,4 @@ DROP TABLE t1, t2, t3; #SELECT * FROM t1 ORDER BY a; #SELECT * FROM t2 ORDER BY a; #SELECT COUNT(*) FROM t3; +#--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt b/mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt similarity index 100% rename from mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt rename to mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt diff --git a/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test b/mysql-test/suite/binlog/t/binlog_query_filter_rules.test similarity index 100% rename from mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test rename to mysql-test/suite/binlog/t/binlog_query_filter_rules.test diff --git a/mysql-test/suite/rpl/t/rpl_server_id.test b/mysql-test/suite/binlog/t/binlog_server_id.test similarity index 100% rename from mysql-test/suite/rpl/t/rpl_server_id.test rename to mysql-test/suite/binlog/t/binlog_server_id.test diff --git a/mysql-test/suite/rpl/t/rpl_sf.test b/mysql-test/suite/binlog/t/binlog_sf.test similarity index 94% rename from mysql-test/suite/rpl/t/rpl_sf.test rename to mysql-test/suite/binlog/t/binlog_sf.test index 4d12f3839a2..05b31afcb58 100644 --- a/mysql-test/suite/rpl/t/rpl_sf.test +++ b/mysql-test/suite/binlog/t/binlog_sf.test @@ -1,5 +1,9 @@ -- source include/have_log_bin.inc +# We change binlog format inside the test, so no need to re-run with +# more than one binlog_format. +-- source include/have_binlog_format_statement.inc + # Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR # BUG#41166 stored function requires "deterministic" if binlog_format is "statement" diff --git a/mysql-test/suite/binlog/t/binlog_sql_mode.test b/mysql-test/suite/binlog/t/binlog_sql_mode.test index 1777f8cb561..ab4f6450543 100644 --- a/mysql-test/suite/binlog/t/binlog_sql_mode.test +++ b/mysql-test/suite/binlog/t/binlog_sql_mode.test @@ -8,7 +8,6 @@ # Scan binlog file to check if the sql_mode is still set to 0 before generating binlog event # --- source include/master-slave.inc -- source include/have_log_bin.inc # BUG#39526 sql_mode not retained in binary log for CREATE PROCEDURE @@ -50,10 +49,10 @@ CREATE EVENT testEvent ON SCHEDULE END;| DELIMITER ;| ---echo Chceck Result +--echo Check Result let $MYSQLD_DATADIR= `select @@datadir`; ---exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog +--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog")) diff --git a/mysql-test/suite/bugs/t/rpl_bug12691.test b/mysql-test/suite/bugs/t/rpl_bug12691.test index 28d7f16935e..038f3e57b75 100644 --- a/mysql-test/suite/bugs/t/rpl_bug12691.test +++ b/mysql-test/suite/bugs/t/rpl_bug12691.test @@ -1,6 +1,4 @@ # Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER -# Date: 01/31/2008 -# Added: Serge Kozlov --source include/master-slave.inc --connection master @@ -47,5 +45,5 @@ SELECT COUNT(*) FROM t1; --echo --echo **** On Master **** DROP TABLE t1; ---sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug23533.test b/mysql-test/suite/bugs/t/rpl_bug23533.test index 397f1102f0e..337dddcef3d 100644 --- a/mysql-test/suite/bugs/t/rpl_bug23533.test +++ b/mysql-test/suite/bugs/t/rpl_bug23533.test @@ -1,7 +1,4 @@ ############################################################# -# Author: Serge Kozlov -# Date: 02/26/2008 -# Purpose: testing bug report # Bug#23533: CREATE SELECT max_binlog_cache_size test # case needed ############################################################# @@ -10,11 +7,6 @@ --source include/have_binlog_format_row.inc --source include/master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2; ---enable_warnings - SET AUTOCOMMIT=0; SET GLOBAL max_binlog_cache_size=4096; SHOW VARIABLES LIKE 'max_binlog_cache_size'; @@ -41,3 +33,4 @@ SHOW TABLES LIKE 't%'; # 5.1 End of Test +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug31582.test b/mysql-test/suite/bugs/t/rpl_bug31582.test index 7ba15eec8ce..6bff8ef4172 100644 --- a/mysql-test/suite/bugs/t/rpl_bug31582.test +++ b/mysql-test/suite/bugs/t/rpl_bug31582.test @@ -21,5 +21,5 @@ SELECT * FROM t1 ORDER BY a; connection master; DROP TABLE t1; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug31583.test b/mysql-test/suite/bugs/t/rpl_bug31583.test index 657e4984b77..ee5b7698016 100644 --- a/mysql-test/suite/bugs/t/rpl_bug31583.test +++ b/mysql-test/suite/bugs/t/rpl_bug31583.test @@ -21,5 +21,5 @@ SELECT * FROM t1 ORDER BY a; connection master; DROP TABLE t1; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug33029.test b/mysql-test/suite/bugs/t/rpl_bug33029.test index 494cef42ce0..f5aad4de8df 100644 --- a/mysql-test/suite/bugs/t/rpl_bug33029.test +++ b/mysql-test/suite/bugs/t/rpl_bug33029.test @@ -23,3 +23,4 @@ insert into `t1` values (); sync_slave_with_master; select * from t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug36391.test b/mysql-test/suite/bugs/t/rpl_bug36391.test index 8bca9a46c5a..3961082273d 100644 --- a/mysql-test/suite/bugs/t/rpl_bug36391.test +++ b/mysql-test/suite/bugs/t/rpl_bug36391.test @@ -15,8 +15,6 @@ --source include/master-slave.inc -drop table if exists t1; - create table t1(id int); show tables; @@ -28,3 +26,4 @@ flush logs; --exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test drop table t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug37426.test b/mysql-test/suite/bugs/t/rpl_bug37426.test index d2bad0fa0c1..4c7729ab837 100644 --- a/mysql-test/suite/bugs/t/rpl_bug37426.test +++ b/mysql-test/suite/bugs/t/rpl_bug37426.test @@ -1,6 +1,4 @@ ############################################################# -# Author: Mats Kindahl -# Date: 2008-06-18 # Purpose: Test for BUG#37426 # RBR breaks for CHAR() UTF8 fields > 85 chars ############################################################# @@ -20,3 +18,4 @@ SELECT * FROM char128_utf8; sync_slave_with_master; SELECT * FROM char128_utf8; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug38205.test b/mysql-test/suite/bugs/t/rpl_bug38205.test index 52b36636e79..550746719f4 100644 --- a/mysql-test/suite/bugs/t/rpl_bug38205.test +++ b/mysql-test/suite/bugs/t/rpl_bug38205.test @@ -163,4 +163,4 @@ start slave sql_thread; connection master; drop table t1i, t2m; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/manual/t/rpl_replication_delay.test b/mysql-test/suite/manual/t/rpl_replication_delay.test index fc1db9bfe18..f2b2da6f53c 100644 --- a/mysql-test/suite/manual/t/rpl_replication_delay.test +++ b/mysql-test/suite/manual/t/rpl_replication_delay.test @@ -7,9 +7,8 @@ source include/master-slave.inc; -connection master; -#connection slave; -sync_slave_with_master; +connection slave; + --echo # Second_behind reports 0 let $status_items= Seconds_Behind_Master; source include/show_slave_status.inc; @@ -61,9 +60,4 @@ unlock tables; connection master; drop table t1; -#connection slave; -sync_slave_with_master; - - -# End of tests - +--source include/rpl_end.inc diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test b/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test index e08b1b6f701..5d6c915307a 100644 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test +++ b/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test @@ -1,6 +1,4 @@ ############################################### -# Author: JBM # -# Date: 2006-03-07 # # Purpose: To test advance DD and replication # ############################################### @@ -11,11 +9,6 @@ --source include/not_embedded.inc --source include/ndb_master-slave.inc -#### Test start cleanup section ##### ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; ---enable_warnings - ###################################################### # Requirment: Cluster DD and replication must be able# # to handle ALTER tables and indexes and must rpl # @@ -408,3 +401,4 @@ remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql; remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; # End 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test b/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test index d78eda7eef1..f5625f841b0 100644 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test +++ b/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test @@ -12,3 +12,5 @@ set binlog_format=row; set binlog_format=mixed; -- source extra/rpl_tests/rpl_extraMaster_Col.test + +--source include/rpl_end.inc diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test index b730bcc08e0..87bd1aecd30 100644 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test +++ b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test @@ -1,6 +1,4 @@ ############################################# -#Authors: TU and Jeb -#Date: 2007/04 #Purpose: Generic replication to cluster # and ensuring that the ndb_apply_status # table is updated. @@ -34,3 +32,4 @@ let $off_set = 9; let $rpl_format = 'MIX'; --source extra/rpl_tests/rpl_ndb_apply_status.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/parts/r/rpl_partition.result b/mysql-test/suite/parts/r/rpl_partition.result index 9c5ac34b1b0..00247f218e4 100644 --- a/mysql-test/suite/parts/r/rpl_partition.result +++ b/mysql-test/suite/parts/r/rpl_partition.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set @old_global_binlog_format= @@global.binlog_format; set @old_session_binlog_format= @@session.binlog_format; SET GLOBAL binlog_format = 'ROW'; @@ -11,10 +7,6 @@ SET SESSION binlog_format = 'ROW'; select @@global.binlog_format, @@session.binlog_format; @@global.binlog_format ROW @@session.binlog_format ROW -DROP TABLE IF EXISTS t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, fkid MEDIUMINT, filler VARCHAR(255), @@ -138,7 +130,7 @@ SUBPARTITIONS 2 PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT count(*) "Slave norm" FROM t1; Slave norm 500 SELECT count(*) "Slave bykey" FROM t2; @@ -148,6 +140,7 @@ Slave byrange 500 set @@global.binlog_format= @old_global_binlog_format; set @@session.binlog_format= @old_session_binlog_format; DROP TABLE t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; +include/rpl_end.inc diff --git a/mysql-test/suite/parts/t/rpl_partition.test b/mysql-test/suite/parts/t/rpl_partition.test index 15cd85463b1..32a3d8ee346 100644 --- a/mysql-test/suite/parts/t/rpl_partition.test +++ b/mysql-test/suite/parts/t/rpl_partition.test @@ -12,13 +12,6 @@ SET GLOBAL binlog_format = 'ROW'; SET SESSION binlog_format = 'ROW'; select @@global.binlog_format, @@session.binlog_format; ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; ---enable_warnings - eval CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, fkid MEDIUMINT, filler VARCHAR(255), @@ -140,7 +133,6 @@ SELECT count(*) as "Master bykey" FROM t2; CALL p3(); SELECT count(*) as "Master byrange" FROM t3; -#--source include/master-slave-end.inc --sync_slave_with_master connection slave; show create table t3; @@ -153,11 +145,9 @@ connection master; set @@global.binlog_format= @old_global_binlog_format; set @@session.binlog_format= @old_session_binlog_format; DROP TABLE t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; -save_master_pos; -connection slave; -sync_with_master; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; # End of 5.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc b/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc index 79825016448..89db1c3545d 100644 --- a/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc +++ b/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -82,3 +80,4 @@ sync_slave_with_master; # the files your self to see what is not matching --diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc index d953397c0cb..dc245b8d38c 100644 --- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc +++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -342,3 +340,4 @@ sync_slave_with_master; # the files your self to see what is not matching --diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl000011.result b/mysql-test/suite/rpl/r/rpl000011.result deleted file mode 100644 index dd0fa2fbe74..00000000000 --- a/mysql-test/suite/rpl/r/rpl000011.result +++ /dev/null @@ -1,16 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 (n int); -insert into t1 values(1); -stop slave; -start slave; -insert into t1 values(2); -select * from t1; -n -1 -2 -drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl000010.result b/mysql-test/suite/rpl/r/rpl_000010.result similarity index 50% rename from mysql-test/suite/rpl/r/rpl000010.result rename to mysql-test/suite/rpl/r/rpl_000010.result index 65191ea411f..4bb87a765cd 100644 --- a/mysql-test/suite/rpl/r/rpl000010.result +++ b/mysql-test/suite/rpl/r/rpl_000010.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (n int not null auto_increment primary key); insert into t1 values(NULL); insert into t1 values(2); @@ -12,3 +8,4 @@ n 1 2 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_000011.result b/mysql-test/suite/rpl/r/rpl_000011.result new file mode 100644 index 00000000000..9160d1952c2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_000011.result @@ -0,0 +1,13 @@ +include/master-slave.inc +[connection master] +create table t1 (n int); +insert into t1 values(1); +stop slave; +start slave; +insert into t1 values(2); +select * from t1; +n +1 +2 +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl000013.result b/mysql-test/suite/rpl/r/rpl_000013.result similarity index 74% rename from mysql-test/suite/rpl/r/rpl000013.result rename to mysql-test/suite/rpl/r/rpl_000013.result index 37838bb88e0..e94a469e970 100644 --- a/mysql-test/suite/rpl/r/rpl000013.result +++ b/mysql-test/suite/rpl/r/rpl_000013.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t2(n int); create temporary table t1 (n int); insert into t1 values(1),(2),(3); @@ -26,3 +22,4 @@ Slave_open_temp_tables 0 drop table if exists t1,t2; Warnings: Note 1051 Unknown table 't1' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl000017.result b/mysql-test/suite/rpl/r/rpl_000017.result similarity index 60% rename from mysql-test/suite/rpl/r/rpl000017.result rename to mysql-test/suite/rpl/r/rpl_000017.result index 1c611357e64..1b4f9f1e8a3 100644 --- a/mysql-test/suite/rpl/r/rpl000017.result +++ b/mysql-test/suite/rpl/r/rpl_000017.result @@ -1,14 +1,8 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; +include/master-slave.inc +[connection master] grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab'; grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab'; -start slave; -drop table if exists t1; +include/start_slave.inc create table t1(n int); insert into t1 values(24); select * from t1; @@ -16,3 +10,4 @@ n 24 drop table t1; delete from mysql.user where user="replicate"; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_EE_err.result b/mysql-test/suite/rpl/r/rpl_EE_err.result index 16fa931e303..3795deedee3 100644 --- a/mysql-test/suite/rpl/r/rpl_EE_err.result +++ b/mysql-test/suite/rpl/r/rpl_EE_err.result @@ -1,11 +1,8 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int) engine=myisam; flush tables; drop table if exists t1; Warnings: Error 2 Can't find file: 't1' (errno: 2) +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result index b092dd9e088..3280d4bbaf7 100644 --- a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result +++ b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a)); LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1; @@ -115,3 +111,4 @@ abasement abased abase DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_alter.result b/mysql-test/suite/rpl/r/rpl_alter.result index cedb6854239..d60f1b68082 100644 --- a/mysql-test/suite/rpl/r/rpl_alter.result +++ b/mysql-test/suite/rpl/r/rpl_alter.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop database if exists mysqltest; +include/master-slave.inc +[connection master] create database mysqltest; create table mysqltest.t1 ( n int); alter table mysqltest.t1 add m int; @@ -35,7 +30,8 @@ ALTER TABLE t1 CHANGE b c INT; ALTER TABLE t2 CHANGE b c VARCHAR(255); INSERT INTO t1 (a) VALUES(2); -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_alter_db.result b/mysql-test/suite/rpl/r/rpl_alter_db.result index 60c07d0dede..55adbfeda79 100644 --- a/mysql-test/suite/rpl/r/rpl_alter_db.result +++ b/mysql-test/suite/rpl/r/rpl_alter_db.result @@ -1,12 +1,9 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Verify that alter database does not stop replication ==== create database temp_db; use temp_db; alter database collate latin1_bin; ==== Clean up ==== drop database temp_db; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index fdd94264041..2ab515c8d93 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3; insert into t1 values (NULL,1),(NULL,2),(NULL,3); select * from t1; @@ -244,12 +240,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 drop table t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb; @@ -303,12 +294,13 @@ id INSERT INTO t1 VALUES(4); INSERT INTO t2 VALUES(4); FLUSH LOGS; -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1; DROP TABLE t2; -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1; DROP TABLE t2; SET SQL_MODE=''; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result index 25eda6ee454..62ff28e7159 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists test1; create database test1; use test1; @@ -44,4 +40,4 @@ id fname 1 testtest 1 2 test drop database test1; -drop database test1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result b/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result new file mode 100644 index 00000000000..71c6ff57f80 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result @@ -0,0 +1,45 @@ +include/master-slave.inc +[connection master] +==== Initialize ==== +SET @old_relay_log_purge= @@global.relay_log_purge; +include/setup_fake_relay_log.inc +Setting up fake replication from MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 +==== Test ==== +start slave sql_thread; +include/wait_for_slave_param.inc [Exec_Master_Log_Pos] +# Result on slave +SELECT * FROM t1; +id +5 +6 +7 +8 +9 +10 +11 +SELECT * FROM t2; +id +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +==== Clean up ==== +stop slave sql_thread; +include/cleanup_fake_relay_log.inc +DROP TABLE t1, t2; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION f1; +SET @@global.relay_log_purge= @old_relay_log_purge; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result b/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result index b2cc92491c3..af84978dc80 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # Test case1: INVOKES A TRIGGER with after insert action create table t1(a int, b int) engine=innodb; create table t2(i1 int not null auto_increment, a int, primary key(i1)) engine=innodb; @@ -110,9 +106,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -226,9 +222,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -342,9 +338,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after update action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -458,9 +454,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before update action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -574,9 +570,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after delete action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -690,9 +686,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before delete action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -761,8 +757,8 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'CALLS A FUNCTION which INVOKES A TRIGGER with after insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t3, slave:t3] drop table t1; drop table t2; drop table t3; @@ -828,8 +824,8 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'CALLS A FUNCTION which INVOKES A TRIGGER with before insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t3, slave:t3] drop table t1; drop table t2; drop table t3; @@ -853,7 +849,7 @@ INSERT INTO v16(c1) VALUES (25), (26); commit; #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t3, slave:t3] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -877,7 +873,7 @@ INSERT INTO v16(c1) VALUES (25), (26); commit; #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t3, slave:t3] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -980,8 +976,8 @@ master-bin.000001 # Query # # use `test`; insert into t2(a,b) values(3,3) master-bin.000001 # Xid # # COMMIT /* XID */ #Test if the results are consistent on master and slave #for 'UPDATE MORE THAN ONE TABLES ON TOP-STATEMENT' -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] drop table t1; drop table t2; # Test case14: INSERT DATA INTO VIEW WHICH INVOLVED MORE THAN ONE TABLES @@ -1034,8 +1030,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO v15(c2) VALUES (25), (26) master-bin.000001 # Xid # # COMMIT /* XID */ #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOLVED MORE THAN ONE TABLES' -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] drop table t1; drop table t2; drop view v15; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result index f826136e81e..1fdbb5a7786 100644 --- a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result +++ b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS db1; DROP DATABASE IF EXISTS db2; CREATE DATABASE db1; @@ -49,6 +45,7 @@ before call db1.p1() after call db1.p1() [on slave] start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS; +include/wait_for_slave_sql_to_stop.inc # # If we got non-zero here, then we're suffering BUG#43263 # @@ -87,6 +84,7 @@ executed db1.p2() after call db1.p2() [on slave] start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS; +include/wait_for_slave_sql_to_stop.inc # # If we got non-zero here, then we're suffering BUG#43263 # @@ -105,6 +103,7 @@ s before call db1.p1() executed db1.p2() START SLAVE; +include/wait_for_slave_sql_to_start.inc # # SAVEPOINT and ROLLBACK TO have the same problem in BUG#43263 # This was reported by BUG#50407 @@ -167,3 +166,4 @@ a # DROP DATABASE db1; DROP DATABASE db2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result index f94d2833603..4f1eca42e1a 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result @@ -1,8 +1,15 @@ +include/master-slave.inc +[connection master] call mtr.add_suppression('Found invalid event in binary log'); ==== Initialize ==== +include/stop_slave.inc +RESET SLAVE; +include/setup_fake_relay_log.inc Setting up fake replication from MYSQL_TEST_DIR/std_data/bug40482-bin.000001 ==== Test ==== START SLAVE SQL_THREAD; +include/wait_for_slave_sql_error.inc [errno=1594] Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. ==== Clean up ==== -Cleaning up after setup_fake_relay_log.inc +include/cleanup_fake_relay_log.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result index 6c8c750bc79..be1b3b150bc 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ####################################################################### ####################### PART 1: MASTER TESTS ########################## ####################################################################### @@ -192,6 +188,7 @@ DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; ###################### TEST #11 +include/rpl_restart_server.inc [server_number=1] SET GLOBAL debug="+d,fault_injection_openning_index"; FLUSH LOGS; ERROR HY000: Can't open file: 'master-bin.index' (errno: 1) @@ -204,6 +201,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +include/rpl_restart_server.inc [server_number=1] ###################### TEST #12 SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; FLUSH LOGS; @@ -217,6 +215,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +include/rpl_restart_server.inc [server_number=1] SET GLOBAL debug= @old_debug; DROP TABLE t1, t2, t4; RESET MASTER; @@ -224,12 +223,7 @@ include/start_slave.inc ####################################################################### ####################### PART 2: SLAVE TESTS ########################### ####################################################################### -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*"); call mtr.add_suppression("Error writing file .*"); call mtr.add_suppression("Could not open .*"); @@ -240,35 +234,45 @@ SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,error_unique_log_filename"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,error_unique_log_filename"; SET GLOBAL debug=@old_debug; +include/rpl_restart_server.inc [server_number=2] ###################### TEST #14 SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,fault_injection_new_file_rotate_event"; SET GLOBAL debug=@old_debug; +include/rpl_restart_server.inc [server_number=2] ###################### TEST #15 SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,fault_injection_registering_index"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,fault_injection_registering_index"; SET GLOBAL debug=@old_debug; +include/rpl_restart_server.inc [server_number=2] ###################### TEST #16 SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,fault_injection_openning_index"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,fault_injection_openning_index"; SET GLOBAL debug=@old_debug; -include/stop_slave.inc +include/rpl_restart_server.inc [server_number=2] +include/stop_slave_sql.inc +Warnings: +Note 1255 Slave already has been stopped SET GLOBAL debug=@old_debug; RESET SLAVE; RESET MASTER; -include/start_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result index 7a2e3183d5b..93138fa5b43 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists d1; create database d1; use d1; @@ -30,3 +26,4 @@ Grants for x@y GRANT USAGE ON *.* TO 'x'@'y' drop user x@y; drop database d1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result index f9e492db6bc..a7e8b86ac79 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET GLOBAL max_binlog_cache_size = 4096; SET GLOBAL binlog_cache_size = 4096; CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; @@ -17,14 +13,11 @@ Got one of the listed errors *** Single statement on non-transactional table *** *** After WL#2687 the difference between STATEMENT/MIXED and ROW will not exist. *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] *** Single statement on both transactional and non-transactional tables. *** *** After WL#2687 we will be able to change the order of the tables. *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] TRUNCATE TABLE t1; TRUNCATE TABLE t2; TRUNCATE TABLE t3; @@ -39,7 +32,7 @@ Got one of the listed errors BEGIN; Got one of the listed errors Got one of the listed errors -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 3 - BEGIN - COMMIT ######################################################################################## @@ -51,7 +44,7 @@ Got one of the listed errors Got one of the listed errors Got one of the listed errors COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 4 - BEGIN - ROLLBACK ######################################################################################## @@ -65,7 +58,7 @@ Got one of the listed errors ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 5 - PROCEDURE ######################################################################################## @@ -89,7 +82,7 @@ TRUNCATE TABLE t1; BEGIN; Got one of the listed errors ROLLBACK; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 6 - XID ######################################################################################## @@ -104,7 +97,7 @@ ROLLBACK TO sv; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 7 - NON-TRANS TABLE ######################################################################################## @@ -121,9 +114,7 @@ COMMIT; BEGIN; Got one of the listed errors COMMIT; ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] ######################################################################## # 8 - Bug#55375(Regression Bug) Transaction bigger than # max_binlog_cache_size crashes slave @@ -140,6 +131,7 @@ SET GLOBAL binlog_cache_size= ORIGINAL_VALUE; BEGIN; Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times COMMIT; +include/wait_for_slave_sql_error.inc [errno=1197] SELECT count(*) FROM t1; count(*) 0 @@ -159,6 +151,6 @@ DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; DROP TABLE IF EXISTS t4; -DROP TABLE IF EXISTS t5; -DROP TABLE IF EXISTS t6; +DROP TABLE t5; DROP PROCEDURE p1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bit.result b/mysql-test/suite/rpl/r/rpl_bit.result index 924de8a65f8..fa935cd9e56 100644 --- a/mysql-test/suite/rpl/r/rpl_bit.result +++ b/mysql-test/suite/rpl/r/rpl_bit.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 ( dummyKey INTEGER NOT NULL, @@ -136,3 +132,4 @@ hex(bit3) 24 35 DROP TABLE IF EXISTS test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bit_npk.result b/mysql-test/suite/rpl/r/rpl_bit_npk.result index 9599660f18f..13c9985614e 100644 --- a/mysql-test/suite/rpl/r/rpl_bit_npk.result +++ b/mysql-test/suite/rpl/r/rpl_bit_npk.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 ( dummyKey INTEGER NOT NULL, @@ -167,3 +163,4 @@ a b DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_blackhole.result b/mysql-test/suite/rpl/r/rpl_blackhole.result index 954589267c5..566fb828fc7 100644 --- a/mysql-test/suite/rpl/r/rpl_blackhole.result +++ b/mysql-test/suite/rpl/r/rpl_blackhole.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT, b INT, c INT); CREATE TABLE t2 (a INT, b INT, c INT); ALTER TABLE t1 ENGINE=BLACKHOLE; @@ -99,3 +95,4 @@ COUNT(*) 0 >>> Something was written to binary log <<< DROP TABLE t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug26395.result b/mysql-test/suite/rpl/r/rpl_bug26395.result index c6dd2d01ed3..a3725f34a55 100644 --- a/mysql-test/suite/rpl/r/rpl_bug26395.result +++ b/mysql-test/suite/rpl/r/rpl_bug26395.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== [on master] CREATE TABLE tinnodb (a INT) ENGINE = INNODB; @@ -20,6 +16,7 @@ SELECT * FROM tinnodb ORDER BY a; a 1 [on slave] +include/sync_slave_io_with_master.inc ==== Verify results on slave ==== include/stop_slave.inc SELECT "" AS Slave_IO_State; @@ -39,3 +36,4 @@ DROP TABLE tinnodb; set @@debug= @old_debug; [on slave] DROP TABLE tinnodb; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug31076.result b/mysql-test/suite/rpl/r/rpl_bug31076.result index fd66ca85d57..09330b35fbd 100644 --- a/mysql-test/suite/rpl/r/rpl_bug31076.result +++ b/mysql-test/suite/rpl/r/rpl_bug31076.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE DATABASE track; USE track; CREATE TABLE `visits` ( @@ -67,3 +63,4 @@ event_id visit_id timestamp src data visits_events_id 20000 21231038 2007-09-18 03:59:02 Downloads/MySQL-4.1/mysql-4.1.12a-win32.zip 33712207 DROP DATABASE track; End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result index 292922a1afd..d27308db1d5 100644 --- a/mysql-test/suite/rpl/r/rpl_bug33931.result +++ b/mysql-test/suite/rpl/r/rpl_bug33931.result @@ -1,8 +1,12 @@ -reset master; +include/master-slave.inc +[connection master] call mtr.add_suppression("Failed during slave I/O thread initialization"); -stop slave; +include/stop_slave.inc reset slave; SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; -Last_SQL_Error = Failed during slave thread initialization +include/wait_for_slave_sql_error.inc [errno=1593] +Last_SQL_Error = 'Failed during slave thread initialization' SET GLOBAL debug=""; +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug38694.result b/mysql-test/suite/rpl/r/rpl_bug38694.result index 711c4a91c03..b666d9a9155 100644 --- a/mysql-test/suite/rpl/r/rpl_bug38694.result +++ b/mysql-test/suite/rpl/r/rpl_bug38694.result @@ -1,6 +1,3 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result index 883feb42b3f..6674ab168ef 100644 --- a/mysql-test/suite/rpl/r/rpl_change_master.result +++ b/mysql-test/suite/rpl/r/rpl_change_master.result @@ -1,15 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(n int); select * from t1; n stop slave sql_thread; insert into t1 values(1); insert into t1 values(2); +include/wait_for_slave_param.inc [Read_Master_Log_Pos] include/stop_slave.inc change master to master_user='root'; start slave; @@ -18,3 +15,4 @@ n 1 2 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_charset.result b/mysql-test/suite/rpl/r/rpl_charset.result index ae5cf3b0fd1..fff11542f6b 100644 --- a/mysql-test/suite/rpl/r/rpl_charset.result +++ b/mysql-test/suite/rpl/r/rpl_charset.result @@ -1,12 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set timestamp=1000000000; -drop database if exists mysqltest2; -drop database if exists mysqltest3; create database mysqltest2 character set latin2; set @@character_set_server=latin5; create database mysqltest3; @@ -142,3 +136,4 @@ primary key (`pk`) set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_charset_sjis.result b/mysql-test/suite/rpl/r/rpl_charset_sjis.result index 770ad0588d1..b31bad28a59 100644 --- a/mysql-test/suite/rpl/r/rpl_charset_sjis.result +++ b/mysql-test/suite/rpl/r/rpl_charset_sjis.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1; drop procedure if exists p1; create table t1 (a varchar(255) character set sjis); @@ -24,3 +20,4 @@ hex(a) 965C drop table t1; drop procedure p1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result index c3ccc76d1bc..fb1d3f8258e 100644 --- a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result +++ b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result @@ -1,60 +1,10 @@ -*** Set up circular ring by schema A->B->C->D->A *** -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -SET auto_increment_increment = 4; -SET auto_increment_offset = 1; -RESET MASTER; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_A_PORT,master_user='root',MASTER_LOG_FILE='MASTER_A_LOG_FILE'; -SET auto_increment_increment = 4; -SET auto_increment_offset = 2; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',MASTER_LOG_FILE='MASTER_B_LOG_FILE'; -SET auto_increment_increment = 4; -SET auto_increment_offset = 3; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',MASTER_LOG_FILE='MASTER_C_LOG_FILE'; -SET auto_increment_increment = 4; -SET auto_increment_offset = 4; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_D_PORT,master_user='root',MASTER_LOG_FILE='MASTER_D_LOG_FILE'; -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 1 -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 2 -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 3 -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 4 -1 -START SLAVE; -START SLAVE; -START SLAVE; -START SLAVE; +*** Set up circular replication on four servers *** +include/rpl_init.inc [topology=1->2->3->4->1] *** Preparing data *** CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB; +include/rpl_sync.inc *** Testing schema A->B->C->D->A *** @@ -62,6 +12,7 @@ INSERT INTO t1(b,c) VALUES('A',1); INSERT INTO t1(b,c) VALUES('B',1); INSERT INTO t1(b,c) VALUES('C',1); INSERT INTO t1(b,c) VALUES('D',1); +include/rpl_sync.inc SELECT 'Master A',a,b FROM t1 WHERE c = 1 ORDER BY a,b; Master A a b Master A 1 A @@ -95,6 +46,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; include/start_slave.inc INSERT INTO t1 VALUES(6,'C',2); INSERT INTO t1(b,c) VALUES('B',2); +include/wait_for_slave_sql_error.inc [errno=1062] INSERT INTO t1(b,c) VALUES('A',2); INSERT INTO t1(b,c) VALUES('D',2); @@ -116,9 +68,9 @@ Master D a b Master D 8 D * Reconfigure replication to schema A->B->D->A * -STOP SLAVE; -STOP SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS; +include/stop_slave_io.inc +include/stop_slave.inc +include/rpl_change_topology.inc [new topology=1->2->4->1,2->3] include/start_slave.inc * Check data inserted before failure * @@ -145,6 +97,7 @@ Master D 8 D INSERT INTO t1(b,c) VALUES('A',3); INSERT INTO t1(b,c) VALUES('B',3); INSERT INTO t1(b,c) VALUES('D',3); +include/rpl_sync.inc SELECT 'Master A',a,b FROM t1 WHERE c = 3 ORDER BY a,b; Master A a b Master A 9 A @@ -171,8 +124,9 @@ DELETE FROM t1 WHERE a = 6; START SLAVE; RESET MASTER; RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS; +include/rpl_change_topology.inc [new topology=1->2->3->4->1] START SLAVE; +include/rpl_sync.inc * Check data inserted before restoring schema A->B->C->D->A * SELECT 'Master A',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; @@ -213,6 +167,7 @@ INSERT INTO t1(b,c) VALUES('A',4); INSERT INTO t1(b,c) VALUES('B',4); INSERT INTO t1(b,c) VALUES('C',4); INSERT INTO t1(b,c) VALUES('D',4); +include/rpl_sync.inc SELECT 'Master A',a,b FROM t1 WHERE c = 4 ORDER BY a,b; Master A a b Master A 13 A @@ -241,6 +196,7 @@ Master D 16 D * Transactions with commits * BEGIN; BEGIN; +include/rpl_sync.inc SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; Master A b COUNT(*) Master A A 100 @@ -269,6 +225,7 @@ Master D D 100 * Transactions with rollbacks * BEGIN; BEGIN; +include/rpl_sync.inc SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; Master A b COUNT(*) Master A B 100 @@ -288,11 +245,4 @@ Master D D 100 *** Clean up *** DROP TABLE t1,t2; -STOP SLAVE; -RESET SLAVE; -STOP SLAVE; -RESET SLAVE; -STOP SLAVE; -RESET SLAVE; -STOP SLAVE; -RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_colSize.result b/mysql-test/suite/rpl/r/rpl_colSize.result index 91456742833..8147ab2db37 100644 --- a/mysql-test/suite/rpl/r/rpl_colSize.result +++ b/mysql-test/suite/rpl/r/rpl_colSize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; **** Testing WL#3228 changes. **** *** Create "wider" table on slave *** @@ -177,3 +173,4 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 *** Cleanup *** DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_commit_after_flush.result b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result index eaddda63b6a..b91b273e64e 100644 --- a/mysql-test/suite/rpl/r/rpl_commit_after_flush.result +++ b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT) ENGINE=innodb; begin; insert into t1 values(1); @@ -11,3 +7,4 @@ flush tables with read lock; commit; unlock tables; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_concurrency_error.result b/mysql-test/suite/rpl/r/rpl_concurrency_error.result index 83e5f66a9c4..c6bd8dc6062 100644 --- a/mysql-test/suite/rpl/r/rpl_concurrency_error.result +++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ######################################################################## # Environment ######################################################################## @@ -101,11 +97,12 @@ master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown") master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") master-bin.000001 # Xid # # COMMIT /* XID */ -source include/diff_master_slave.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc +include/rpl_diff.inc ######################################################################## # Cleanup ######################################################################## DROP TRIGGER tr; DROP TABLE t; DROP TABLE n; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_conditional_comments.result b/mysql-test/suite/rpl/r/rpl_conditional_comments.result index 105d3bc59f3..f520ac04bb4 100644 --- a/mysql-test/suite/rpl/r/rpl_conditional_comments.result +++ b/mysql-test/suite/rpl/r/rpl_conditional_comments.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1(c1 INT); show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info @@ -17,7 +13,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; /* 99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 99999 ,(11)*/ -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Case 2: # ----------------------------------------------------------------- @@ -28,7 +24,7 @@ EXECUTE stmt; DROP TABLE t1; CREATE TABLE t1(c1 INT); EXECUTE stmt; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] SET @value=62; PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; @@ -46,7 +42,7 @@ master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALU master-bin.000001 # Query # # use `test`; DROP TABLE t1 master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/ -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Case 3: # ----------------------------------------------------------------- @@ -55,3 +51,4 @@ Comparing tables master:test.t1 and slave:test.t1 SELECT c1 FROM /*!99999 t1 WHEREN; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*!99999 t1 WHEREN' at line 1 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_database.result b/mysql-test/suite/rpl/r/rpl_create_database.result index 9780b65f334..6bb950483ed 100644 --- a/mysql-test/suite/rpl/r/rpl_create_database.result +++ b/mysql-test/suite/rpl/r/rpl_create_database.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest_prometheus; DROP DATABASE IF EXISTS mysqltest_sisyfos; DROP DATABASE IF EXISTS mysqltest_bob; @@ -60,3 +56,4 @@ t2 DROP DATABASE IF EXISTS mysqltest_prometheus; DROP DATABASE IF EXISTS mysqltest_sisyfos; DROP DATABASE IF EXISTS mysqltest_bob; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result index e3cddf4c606..dbb48f734b8 100644 --- a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest; CREATE DATABASE IF NOT EXISTS mysqltest; USE mysqltest; @@ -74,3 +70,4 @@ CREATE TABLE IF NOT EXISTS t1 AS SELECT SLEEP(3); KILL QUERY master1; DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result index de44a1e5d2a..b31a6d399e2 100644 --- a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest; CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int); CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int); @@ -25,3 +21,4 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS ` ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`tmp2` (`c1`) SELECT * FROM tmp master-bin.000001 # Query # # COMMIT +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_cross_version.result b/mysql-test/suite/rpl/r/rpl_cross_version.result index de5dd134516..ddb97ffa8c5 100644 --- a/mysql-test/suite/rpl/r/rpl_cross_version.result +++ b/mysql-test/suite/rpl/r/rpl_cross_version.result @@ -1,12 +1,19 @@ +include/master-slave.inc +[connection master] ==== Initialize ==== +include/stop_slave.inc +RESET SLAVE; +include/setup_fake_relay_log.inc Setting up fake replication from MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001 ==== Test ==== start slave sql_thread; +include/wait_for_slave_param.inc [Exec_Master_Log_Pos] ==== a prove that the fake has been processed successfully ==== SELECT COUNT(*) - 17920 as zero FROM t3; zero 0 ==== Clean up ==== -stop slave sql_thread; -Cleaning up after setup_fake_relay_log.inc +include/stop_slave_sql.inc +include/cleanup_fake_relay_log.inc drop table t1, t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_current_user.result b/mysql-test/suite/rpl/r/rpl_current_user.result index 85490c2571c..7d8fc4e492e 100644 --- a/mysql-test/suite/rpl/r/rpl_current_user.result +++ b/mysql-test/suite/rpl/r/rpl_current_user.result @@ -1,25 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -# On slave2 -# Connect slave2 to slave -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_MYPORT;, -MASTER_LOG_FILE='slave-bin.000001', MASTER_USER='root'; -START SLAVE; - -# [On master] -DROP VIEW IF EXISTS v_user; -DROP VIEW IF EXISTS v_tables_priv; -DROP VIEW IF EXISTS v_procs_priv; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS my_grant; -DROP PROCEDURE IF EXISTS my_revoke; -DROP FUNCTION IF EXISTS my_user; -DROP EVENT IF EXISTS e1; +include/rpl_init.inc [topology=1->2->3] +include/rpl_connect.inc [creating master] +include/rpl_connect.inc [creating slave] CREATE TABLE t1(c1 char(100)); CREATE VIEW test.v_user AS SELECT * FROM mysql.user WHERE User LIKE 'bug48321%'; CREATE VIEW test.v_tables_priv AS SELECT * FROM mysql.tables_priv WHERE User LIKE 'bug48321%'; @@ -41,76 +22,76 @@ ERROR HY000: String '01234567890123456789012345678901234567890123456789012345678 # [On conn1] # Verify 'REVOKE ALL' statement REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(); -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'GRANT ... ON TABLE ...' statement GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'GRANT ... ON PROCEDURE...' statement GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER(); -Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv -Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] # Verify 'GRANT ... ON *.* ...' statement GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() WITH GRANT OPTION; -Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv -Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] # Verify 'REVOKE ... ON TABLE ...' statement REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'REVOKE ... ON PROCEDURE...' statement REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(); -Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv -Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] # Verify 'REVOKE ... ON *.* ...' statement REVOKE ALL PRIVILEGES ON *.* FROM CURRENT_USER(); -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'GRANT ...' statement in the procedure CREATE PROCEDURE my_grant() GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); call my_grant; -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'REVOKE ... ON TABLE ...' statement in the procedure CREATE PROCEDURE my_revoke() REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); call my_revoke; -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'RENAME USER ...' statement RENAME USER CURRENT_USER TO 'bug48321_2'@'localhost'; -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'DROP USER ...' statement GRANT CREATE USER ON *.* TO 'bug48321_2'@'localhost'; DROP USER CURRENT_USER(); -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'ALTER EVENT...' statement CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT * FROM t1; # Explicitly assign CURRENT_USER() to definer ALTER DEFINER=CURRENT_USER() EVENT e1 ENABLE; -Comparing tables master:test.v_event and slave:test.v_event -Comparing tables master:test.v_event and slave2:test.v_event +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event] # Session user will be set as definer, if the statement does not assign # a definer ALTER EVENT e1 ENABLE; -Comparing tables master:test.v_event and slave:test.v_event -Comparing tables master:test.v_event and slave2:test.v_event +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event] # Verify that this patch does not affect the calling of CURRENT_USER() # in the other statements @@ -127,7 +108,7 @@ SELECT * FROM t1; c1 @ 1234 -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 @ @@ -145,7 +126,7 @@ SELECT * FROM t1; c1 @ @ -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 @ @@ -159,7 +140,7 @@ c1 # [On slave] SELECT * FROM t1; c1 -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 # [On master] @@ -187,7 +168,7 @@ c1 SELECT * FROM t2; c1 @ -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 @ @@ -203,3 +184,4 @@ DROP PROCEDURE my_grant; DROP PROCEDURE my_revoke; DROP FUNCTION my_user; DROP EVENT e1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result index 1485389204b..c399b408d5c 100644 --- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] *** Prepare tables and data *** CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb; CREATE TABLE t2 (a INT) ENGINE=innodb; @@ -50,7 +46,7 @@ a SELECT * FROM t3; a 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc *** Test lock wait timeout *** include/stop_slave.inc @@ -61,6 +57,7 @@ SELECT * FROM t1 FOR UPDATE; a 1 START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1205] SELECT COUNT(*) FROM t2; COUNT(*) 0 @@ -74,7 +71,7 @@ SELECT * FROM t3; a 3 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc *** Test lock wait timeout and purged relay logs *** SET @my_max_relay_log_size= @@global.max_relay_log_size; @@ -88,6 +85,7 @@ a 1 1 START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1205] SELECT COUNT(*) FROM t2; COUNT(*) 0 @@ -103,9 +101,10 @@ a 3 3 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc *** Clean up *** DROP TABLE t1,t2,t3; SET global max_relay_log_size= @my_max_relay_log_size; End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_delete_no_where.result b/mysql-test/suite/rpl/r/rpl_delete_no_where.result index 78edf4bf3fa..923cd428aec 100644 --- a/mysql-test/suite/rpl/r/rpl_delete_no_where.result +++ b/mysql-test/suite/rpl/r/rpl_delete_no_where.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int, b int) engine=myisam; insert into t1 values(1,1); select * from t1; @@ -13,3 +9,4 @@ delete from t1; select * from t1; a b drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 6472294fe9d..dea58316287 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] delete from mysql.user where user=_binary'rpl_do_grant'; delete from mysql.db where user=_binary'rpl_do_grant'; flush privileges; @@ -167,20 +163,10 @@ DROP FUNCTION upgrade_del_func; DROP FUNCTION upgrade_alter_func; DROP DATABASE bug42217_db; DROP USER 'create_rout_db'@'localhost'; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc +USE test; ######## BUG#49119 ####### ### i) test case from the 'how to repeat section' -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; CREATE TABLE t1(c1 INT); CREATE PROCEDURE p1() SELECT * FROM t1 | REVOKE EXECUTE ON PROCEDURE p1 FROM 'root'@'localhost'; @@ -188,12 +174,7 @@ ERROR 42000: There is no such grant defined for user 'root' on host 'localhost' DROP TABLE t1; DROP PROCEDURE p1; ### ii) Test case in which REVOKE partially succeeds -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1(c1 INT); CREATE PROCEDURE p1() SELECT * FROM t1 | CREATE USER 'user49119'@'localhost'; @@ -246,12 +227,7 @@ GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION DROP TABLE t1; DROP PROCEDURE p1; DROP USER 'user49119'@'localhost'; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc grant all on *.* to foo@"1.2.3.4"; revoke all privileges, grant option from "foo"; ERROR HY000: Can't revoke all privileges for one or more of the requested users @@ -259,15 +235,11 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; grant all on *.* to foo@"1.2.3.4" master-bin.000001 # Query # # use `test`; revoke all privileges, grant option from "foo" +include/check_slave_no_error.inc DROP USER foo@"1.2.3.4"; # Bug#27606 GRANT statement should be replicated with DEFINER information -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc GRANT SELECT, INSERT ON mysql.user TO user_bug27606@localhost; SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606'; Grantor @@ -284,3 +256,4 @@ Grantor root@localhost DROP USER user_bug27606@localhost; "End of test" +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop.result b/mysql-test/suite/rpl/r/rpl_drop.result index 5ebbc4f9ce7..a32d3fd5fc7 100644 --- a/mysql-test/suite/rpl/r/rpl_drop.result +++ b/mysql-test/suite/rpl/r/rpl_drop.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop table if exists t1, t2; +include/master-slave.inc +[connection master] create table t1 (a int); drop table t1, t2; ERROR 42S02: Unknown table 't2' @@ -32,3 +27,4 @@ DROP FUNCTION f1; DROP TABLE t2, t3; SET @@global.binlog_format= @old_binlog_format; SET @@global.binlog_format= @old_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_db.result b/mysql-test/suite/rpl/r/rpl_drop_db.result index 8825797f80d..8a88f01a444 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_db.result +++ b/mysql-test/suite/rpl/r/rpl_drop_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; create table mysqltest1.t1 (n int); @@ -34,4 +30,4 @@ n use test; drop table t1; drop database mysqltest1; -include/stop_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_temp.result b/mysql-test/suite/rpl/r/rpl_drop_temp.result index 03fbaa2256f..4aa0ba0bc0d 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_temp.result +++ b/mysql-test/suite/rpl/r/rpl_drop_temp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create database if not exists mysqltest; use mysqltest; create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; @@ -26,3 +22,4 @@ CREATE TEMPORARY TABLE tmp3 (a int); DROP TEMPORARY TABLE tmp3; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_view.result b/mysql-test/suite/rpl/r/rpl_drop_view.result index c359011612a..0688ce42bc2 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_view.result +++ b/mysql-test/suite/rpl/r/rpl_drop_view.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1, t2; drop view if exists v1, v2, v3, not_exist_view; create table t1 (a int); @@ -27,3 +23,4 @@ select * from v3; ERROR 42S02: Table 'test.v3' doesn't exist ==== clean up ==== drop table t1, t2, t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result index aa1a573d052..3a3bed1a6fd 100644 --- a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result +++ b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result @@ -1,12 +1,4 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; -change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; -include/start_slave.inc +include/rpl_init.inc [topology=1->2->1] create table t1 (n int); include/stop_slave.inc create table t2 (n int); @@ -25,6 +17,7 @@ insert into t3 values(4); start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS; Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart +include/wait_for_slave_sql_to_stop.inc show tables; Tables_in_test t1 @@ -32,12 +25,14 @@ t2 start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS; Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart +include/wait_for_slave_sql_to_stop.inc select * from t3; n 1 start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS; Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart +include/wait_for_slave_sql_to_stop.inc select * from t3; n 1 @@ -55,6 +50,5 @@ t3 t4 t5 t6 -include/stop_slave.inc -reset slave; -drop table t1,t2,t3,t4,t5,t6; +drop table t1, t2, t3, t4, t5, t6; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_empty_master_crash.result b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result index f71411c68dd..34281bc33d7 100644 --- a/mysql-test/suite/rpl/r/rpl_empty_master_crash.result +++ b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result @@ -1,10 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] load table t1 from master; ERROR 08S01: Error connecting to master: Master is not configured load table t1 from master; ERROR HY000: Error from master: 'Table 'test.t1' doesn't exist' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result index 75fefdad2a2..6d00774ef87 100644 --- a/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result +++ b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression("Statement may not be safe to log in statement format."); create table t1 (a int primary key); create table t4 (a int primary key); @@ -41,3 +37,4 @@ a 3 4 DROP TABLE test.t4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index b724d284bfa..30ba1bb3828 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @old_event_scheduler = @@global.event_scheduler; set global event_scheduler=1; set binlog_format=row; @@ -257,3 +253,4 @@ DROP EVENT event44331_1; DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result similarity index 95% rename from mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result rename to mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result index e8535a0bc5e..affb179d50e 100644 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set binlog_format=row; *********************************************************** @@ -91,7 +87,7 @@ f1 f2 f3 f4 27 27 27 next 29 29 29 second 30 30 30 next -Checking that both slave threads are running. +include/check_slave_is_running.inc ***** Testing Altering table def scenario ***** @@ -428,7 +424,7 @@ f1 f2 f3 f4 ** Check slave status ** -Checking that both slave threads are running. +include/check_slave_is_running.inc **************************************** * columns in master at middle of table * @@ -464,10 +460,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254' *** Drop t10 *** DROP TABLE t10; @@ -502,10 +496,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15' *** Drop t11 *** DROP TABLE t11; @@ -616,7 +608,8 @@ c1 c3 hex(c4) c5 c6 ************ * Bug30415 * ************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +include/wait_for_slave_sql_error.inc [errno=1091] +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; @@ -664,7 +657,8 @@ c1 hex(c4) c5 c6 c7 c2 *** Expect slave to fail with Error 1054 *** ******************************************** -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +include/wait_for_slave_sql_error.inc [errno=1054] +Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'' STOP SLAVE; RESET SLAVE; @@ -712,7 +706,8 @@ c1 hex(c4) c5 c6 c7 *** BUG 30434 *** ***************** -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +include/wait_for_slave_sql_error.inc [errno=1072] +Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'' STOP SLAVE; RESET SLAVE; @@ -876,7 +871,6 @@ c1 hex(c4) c5 2 6231623162316231 JOE 3 6231623162316231 QA DROP TABLE t5; - set binlog_format=statement; *********************************************************** @@ -964,7 +958,7 @@ f1 f2 f3 f4 27 27 27 next 29 29 29 second 30 30 30 next -Checking that both slave threads are running. +include/check_slave_is_running.inc ***** Testing Altering table def scenario ***** @@ -1301,7 +1295,7 @@ f1 f2 f3 f4 ** Check slave status ** -Checking that both slave threads are running. +include/check_slave_is_running.inc **************************************** * columns in master at middle of table * @@ -1337,10 +1331,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254' *** Drop t10 *** DROP TABLE t10; @@ -1375,10 +1367,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15' *** Drop t11 *** DROP TABLE t11; @@ -1489,7 +1479,8 @@ c1 c3 hex(c4) c5 c6 ************ * Bug30415 * ************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +include/wait_for_slave_sql_error.inc [errno=1091] +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; @@ -1537,7 +1528,8 @@ c1 hex(c4) c5 c6 c7 c2 *** Expect slave to fail with Error 1054 *** ******************************************** -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +include/wait_for_slave_sql_error.inc [errno=1054] +Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'' STOP SLAVE; RESET SLAVE; @@ -1585,7 +1577,8 @@ c1 hex(c4) c5 c6 c7 *** BUG 30434 *** ***************** -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +include/wait_for_slave_sql_error.inc [errno=1072] +Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'' STOP SLAVE; RESET SLAVE; @@ -1749,7 +1742,6 @@ c1 hex(c4) c5 2 6231623162316231 JOE 3 6231623162316231 QA DROP TABLE t5; - set binlog_format=mixed; *********************************************************** @@ -1837,7 +1829,7 @@ f1 f2 f3 f4 27 27 27 next 29 29 29 second 30 30 30 next -Checking that both slave threads are running. +include/check_slave_is_running.inc ***** Testing Altering table def scenario ***** @@ -2174,7 +2166,7 @@ f1 f2 f3 f4 ** Check slave status ** -Checking that both slave threads are running. +include/check_slave_is_running.inc **************************************** * columns in master at middle of table * @@ -2210,10 +2202,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254' *** Drop t10 *** DROP TABLE t10; @@ -2248,10 +2238,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15' *** Drop t11 *** DROP TABLE t11; @@ -2362,7 +2350,8 @@ c1 c3 hex(c4) c5 c6 ************ * Bug30415 * ************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +include/wait_for_slave_sql_error.inc [errno=1091] +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; @@ -2410,7 +2399,8 @@ c1 hex(c4) c5 c6 c7 c2 *** Expect slave to fail with Error 1054 *** ******************************************** -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +include/wait_for_slave_sql_error.inc [errno=1054] +Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'' STOP SLAVE; RESET SLAVE; @@ -2458,7 +2448,8 @@ c1 hex(c4) c5 c6 c7 *** BUG 30434 *** ***************** -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +include/wait_for_slave_sql_error.inc [errno=1072] +Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'' STOP SLAVE; RESET SLAVE; @@ -2622,4 +2613,4 @@ c1 hex(c4) c5 2 6231623162316231 JOE 3 6231623162316231 QA DROP TABLE t5; - +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result similarity index 95% rename from mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result rename to mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result index f360a8847eb..8aeb5bdc1c9 100644 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set binlog_format=row; *********************************************************** @@ -91,7 +87,7 @@ f1 f2 f3 f4 27 27 27 next 29 29 29 second 30 30 30 next -Checking that both slave threads are running. +include/check_slave_is_running.inc ***** Testing Altering table def scenario ***** @@ -428,7 +424,7 @@ f1 f2 f3 f4 ** Check slave status ** -Checking that both slave threads are running. +include/check_slave_is_running.inc **************************************** * columns in master at middle of table * @@ -464,10 +460,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254' *** Drop t10 *** DROP TABLE t10; @@ -502,10 +496,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15' *** Drop t11 *** DROP TABLE t11; @@ -616,7 +608,8 @@ c1 c3 hex(c4) c5 c6 ************ * Bug30415 * ************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +include/wait_for_slave_sql_error.inc [errno=1091] +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; @@ -664,7 +657,8 @@ c1 hex(c4) c5 c6 c7 c2 *** Expect slave to fail with Error 1054 *** ******************************************** -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +include/wait_for_slave_sql_error.inc [errno=1054] +Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'' STOP SLAVE; RESET SLAVE; @@ -712,7 +706,8 @@ c1 hex(c4) c5 c6 c7 *** BUG 30434 *** ***************** -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +include/wait_for_slave_sql_error.inc [errno=1072] +Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'' STOP SLAVE; RESET SLAVE; @@ -876,7 +871,6 @@ c1 hex(c4) c5 2 6231623162316231 JOE 3 6231623162316231 QA DROP TABLE t5; - set binlog_format=statement; *********************************************************** @@ -964,7 +958,7 @@ f1 f2 f3 f4 27 27 27 next 29 29 29 second 30 30 30 next -Checking that both slave threads are running. +include/check_slave_is_running.inc ***** Testing Altering table def scenario ***** @@ -1301,7 +1295,7 @@ f1 f2 f3 f4 ** Check slave status ** -Checking that both slave threads are running. +include/check_slave_is_running.inc **************************************** * columns in master at middle of table * @@ -1337,10 +1331,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254' *** Drop t10 *** DROP TABLE t10; @@ -1375,10 +1367,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15' *** Drop t11 *** DROP TABLE t11; @@ -1489,7 +1479,8 @@ c1 c3 hex(c4) c5 c6 ************ * Bug30415 * ************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +include/wait_for_slave_sql_error.inc [errno=1091] +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; @@ -1537,7 +1528,8 @@ c1 hex(c4) c5 c6 c7 c2 *** Expect slave to fail with Error 1054 *** ******************************************** -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +include/wait_for_slave_sql_error.inc [errno=1054] +Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'' STOP SLAVE; RESET SLAVE; @@ -1585,7 +1577,8 @@ c1 hex(c4) c5 c6 c7 *** BUG 30434 *** ***************** -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +include/wait_for_slave_sql_error.inc [errno=1072] +Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'' STOP SLAVE; RESET SLAVE; @@ -1749,7 +1742,6 @@ c1 hex(c4) c5 2 6231623162316231 JOE 3 6231623162316231 QA DROP TABLE t5; - set binlog_format=mixed; *********************************************************** @@ -1837,7 +1829,7 @@ f1 f2 f3 f4 27 27 27 next 29 29 29 second 30 30 30 next -Checking that both slave threads are running. +include/check_slave_is_running.inc ***** Testing Altering table def scenario ***** @@ -2174,7 +2166,7 @@ f1 f2 f3 f4 ** Check slave status ** -Checking that both slave threads are running. +include/check_slave_is_running.inc **************************************** * columns in master at middle of table * @@ -2210,10 +2202,8 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254' *** Drop t10 *** DROP TABLE t10; @@ -2248,10 +2238,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15' *** Drop t11 *** DROP TABLE t11; @@ -2362,7 +2350,8 @@ c1 c3 hex(c4) c5 c6 ************ * Bug30415 * ************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +include/wait_for_slave_sql_error.inc [errno=1091] +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; @@ -2410,7 +2399,8 @@ c1 hex(c4) c5 c6 c7 c2 *** Expect slave to fail with Error 1054 *** ******************************************** -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +include/wait_for_slave_sql_error.inc [errno=1054] +Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'' STOP SLAVE; RESET SLAVE; @@ -2458,7 +2448,8 @@ c1 hex(c4) c5 c6 c7 *** BUG 30434 *** ***************** -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +include/wait_for_slave_sql_error.inc [errno=1072] +Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'' STOP SLAVE; RESET SLAVE; @@ -2622,4 +2613,4 @@ c1 hex(c4) c5 2 6231623162316231 JOE 3 6231623162316231 QA DROP TABLE t5; - +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result similarity index 88% rename from mysql-test/suite/rpl/r/rpl_extraCol_innodb.result rename to mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result index 48fd0366c26..9ea319379c0 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); **** Diff Table Def Start **** *** On Slave *** @@ -54,7 +50,8 @@ a b c 3 4 QA TESTING *** Start Slave *** START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.' STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -83,10 +80,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3' *** Drop t3 *** DROP TABLE t3; *** Create t4 on slave *** @@ -108,10 +103,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3' *** Drop t4 *** DROP TABLE t4; *** Create t5 on slave *** @@ -133,10 +126,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246' *** Drop t5 *** DROP TABLE t5; *** Create t6 on slave *** @@ -157,7 +148,8 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** -Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3' SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -237,6 +229,7 @@ a b c d e f g h i 1 b1b1b1b1b1b1b1b1 Kyle 0000-00-00 00:00:00 0 NULL NULL 2 b1b1b1b1b1b1b1b1 JOE 0000-00-00 00:00:00 0 NULL NULL 3 b1b1b1b1b1b1b1b1 QA 0000-00-00 00:00:00 0 NULL NULL +DROP TABLE t9; *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; @@ -255,10 +248,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5' *** Drop t10 *** DROP TABLE t10; *** Create t11 on slave *** @@ -279,10 +270,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252' *** Drop t11 *** DROP TABLE t11; *** Create t12 on slave *** @@ -439,6 +428,7 @@ c1 c4 c5 c6 c7 4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP 5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP 6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +DROP TABLE t14a; *** connect to master and drop columns *** ALTER TABLE t14 DROP COLUMN c2; ALTER TABLE t14 DROP COLUMN c4; @@ -492,10 +482,8 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; ******************************************** *** Expect slave to fail with Error 1060 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1060] +Last_SQL_Error = 'Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'' *** Try to insert in master **** INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); SELECT * FROM t15 ORDER BY c1; @@ -595,9 +583,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2' ** DROP table t17 *** DROP TABLE t17; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result similarity index 88% rename from mysql-test/suite/rpl/r/rpl_extraCol_myisam.result rename to mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result index 80b18ee4bd7..716a35b3464 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); **** Diff Table Def Start **** *** On Slave *** @@ -54,7 +50,8 @@ a b c 3 4 QA TESTING *** Start Slave *** START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.' STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -83,10 +80,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3' *** Drop t3 *** DROP TABLE t3; *** Create t4 on slave *** @@ -108,10 +103,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3' *** Drop t4 *** DROP TABLE t4; *** Create t5 on slave *** @@ -133,10 +126,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246' *** Drop t5 *** DROP TABLE t5; *** Create t6 on slave *** @@ -157,7 +148,8 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** -Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3' SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -237,6 +229,7 @@ a b c d e f g h i 1 b1b1b1b1b1b1b1b1 Kyle 0000-00-00 00:00:00 0 NULL NULL 2 b1b1b1b1b1b1b1b1 JOE 0000-00-00 00:00:00 0 NULL NULL 3 b1b1b1b1b1b1b1b1 QA 0000-00-00 00:00:00 0 NULL NULL +DROP TABLE t9; *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; @@ -255,10 +248,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5' *** Drop t10 *** DROP TABLE t10; *** Create t11 on slave *** @@ -279,10 +270,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252' *** Drop t11 *** DROP TABLE t11; *** Create t12 on slave *** @@ -439,6 +428,7 @@ c1 c4 c5 c6 c7 4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP 5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP 6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +DROP TABLE t14a; *** connect to master and drop columns *** ALTER TABLE t14 DROP COLUMN c2; ALTER TABLE t14 DROP COLUMN c4; @@ -492,10 +482,8 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; ******************************************** *** Expect slave to fail with Error 1060 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1060] +Last_SQL_Error = 'Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'' *** Try to insert in master **** INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); SELECT * FROM t15 ORDER BY c1; @@ -595,9 +583,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2' ** DROP table t17 *** DROP TABLE t17; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_failed_optimize.result b/mysql-test/suite/rpl/r/rpl_failed_optimize.result index 7210898d521..b0c331fa557 100644 --- a/mysql-test/suite/rpl/r/rpl_failed_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_failed_optimize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 ( a int ) ENGINE=InnoDB; BEGIN; INSERT INTO t1 VALUES (1); @@ -23,3 +19,4 @@ a 1 commit; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result index 5f1f72a9a3a..4eaf61e5f9e 100644 --- a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result +++ b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (id int, a int); CREATE TABLE t2 (id int, b int); CREATE TABLE t3 (id int, c int); @@ -47,85 +43,53 @@ UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1; UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1; UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1'' UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1'' UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1'' UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1'' UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1'' UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1'' UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1'' UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1'' UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1'' UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1'' [on slave] show tables like 't%'; Tables_in_test (t%) @@ -149,3 +113,4 @@ id c 3 3 [on master] drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result index 3bb96b669d7..b6dbe9f5b48 100644 --- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result +++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result @@ -1,27 +1,15 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_init.inc [topology=1->2->1] show variables like 'relay_log%'; Variable_name Value -relay_log MYSQLD_DATADIR/relay-log +relay_log relay_log_index relay_log_info_file relay-log.info relay_log_purge ON relay_log_space_limit 0 -stop slave; -change master to master_host='127.0.0.1',master_user='root', -master_password='',master_port=MASTER_PORT; -start slave; -stop slave; -change master to master_host='127.0.0.1',master_user='root', -master_password='',master_port=SLAVE_PORT; -include/start_slave.inc CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM; INSERT INTO t1 VALUE(1); FLUSH LOGS; INSERT INTO t1 VALUE(2); -Checking that both slave threads are running. -Relay_Log_File relay-log.000003 +include/check_slave_is_running.inc +Relay_Log_File = 'mysqld-relay-bin.000003' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result index e7a912b75fa..038a29c12e2 100644 --- a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=INNODB; CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=INNODB; SET FOREIGN_KEY_CHECKS=0; @@ -53,3 +49,4 @@ select count(*) from t1 /* must be zero */; count(*) 0 drop table t2,t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_found_rows.result b/mysql-test/suite/rpl/r/rpl_found_rows.result index 45a931872cf..f1f8cc6d32d 100644 --- a/mysql-test/suite/rpl/r/rpl_found_rows.result +++ b/mysql-test/suite/rpl/r/rpl_found_rows.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== 0. Setting it all up ==== SET BINLOG_FORMAT=STATEMENT; **** On Master **** @@ -102,11 +98,7 @@ DELETE FROM logtbl; DROP PROCEDURE just_log; DROP PROCEDURE calc_and_log; DROP FUNCTION log_rows; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc #### 2. Using mixed mode #### ==== 2.1. Checking a procedure ==== **** On Master **** @@ -231,3 +223,4 @@ DROP PROCEDURE just_log; DROP PROCEDURE log_me; DROP PROCEDURE log_me_inner; DROP FUNCTION log_rows; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_free_items.result b/mysql-test/suite/rpl/r/rpl_free_items.result index 91c1e2aa6e5..416f597aebc 100644 --- a/mysql-test/suite/rpl/r/rpl_free_items.result +++ b/mysql-test/suite/rpl/r/rpl_free_items.result @@ -1,10 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int); create table t2 (a int); drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_geometry.result b/mysql-test/suite/rpl/r/rpl_geometry.result index 9b48dba4f22..7ec119c9ae8 100644 --- a/mysql-test/suite/rpl/r/rpl_geometry.result +++ b/mysql-test/suite/rpl/r/rpl_geometry.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a varchar(100), b multipoint not null, c varchar(256)); @@ -16,3 +12,4 @@ b geometrycollection default null, c decimal(10,0)); insert into t2(c) values (null); drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_get_lock.result b/mysql-test/suite/rpl/r/rpl_get_lock.result index cbad759b17f..8250ca348e6 100644 --- a/mysql-test/suite/rpl/r/rpl_get_lock.result +++ b/mysql-test/suite/rpl/r/rpl_get_lock.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression("Statement may not be safe to log in statement format."); create table t1(n int); insert into t1 values(get_lock("lock",2)); @@ -34,3 +30,4 @@ select is_free_lock(NULL); is_free_lock(NULL) NULL drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result index 432bcfcc94d..32d24e5867a 100644 --- a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result +++ b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result @@ -1,33 +1,32 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*"); call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*"); call mtr.add_suppression("Slave I/O thread .* register on master"); -stop slave; +include/stop_slave.inc SET @@global.debug= "+d,'debug_lock.before_get_UNIX_TIMESTAMP'"; -start slave; +include/start_slave.inc slave is going to hang in get_master_version_and_clock +include/rpl_stop_server.inc [server_number=1] slave is unblocked SET DEBUG_SYNC='now SIGNAL signal.get_unix_timestamp'; Check network error happened here +include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013] set @@global.debug = "-d,'debug_lock.before_get_UNIX_TIMESTAMP'"; -stop slave; +include/rpl_start_server.inc [server_number=1] +include/wait_for_slave_param.inc [Slave_IO_Running] +include/stop_slave.inc SET @@global.debug= "+d,'debug_lock.before_get_SERVER_ID'"; -start slave; +include/start_slave.inc slave is going to hang in get_master_version_and_clock +include/rpl_stop_server.inc [server_number=1] slave is unblocked SET DEBUG_SYNC='now SIGNAL signal.get_server_id'; Check network error happened here +include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013] set @@global.debug = "-d,'debug_lock.before_get_SERVER_ID'"; +include/rpl_start_server.inc [server_number=1] +include/wait_for_slave_param.inc [Slave_IO_Running] set global debug= ''; -reset master; -include/stop_slave.inc -change master to master_port=SLAVE_PORT; -start slave; -*** must be having the replicate-same-server-id IO thread error *** -Last_IO_Error = Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). SET DEBUG_SYNC= 'RESET'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result index 285d52b7678..4ec8c51a5dc 100644 --- a/mysql-test/suite/rpl/r/rpl_grant.result +++ b/mysql-test/suite/rpl/r/rpl_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Master **** CREATE USER dummy@localhost; CREATE USER dummy1@localhost, dummy2@localhost; @@ -41,3 +37,4 @@ user host SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; COUNT(*) 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result index bfdcbc6fa23..1ae2d0b9ee5 100644 --- a/mysql-test/suite/rpl/r/rpl_idempotency.result +++ b/mysql-test/suite/rpl/r/rpl_idempotency.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032"); call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); @@ -32,8 +28,7 @@ SELECT * FROM t2 ORDER BY a; a -3 -1 -Last_SQL_Error -0 +include/check_slave_no_error.inc INSERT IGNORE INTO t1 VALUES (-2); INSERT IGNORE INTO t1 VALUES (-2); SELECT * FROM t1 ORDER BY a; @@ -46,8 +41,7 @@ a -3 -2 -1 -Last_SQL_Error -0 +include/check_slave_no_error.inc UPDATE t1 SET a = 1 WHERE a = -1; UPDATE t2 SET a = 1 WHERE a = -1; UPDATE t1 SET a = 1 WHERE a = -1; @@ -70,8 +64,7 @@ SELECT * FROM t2 ORDER BY a; a -3 1 -Last_SQL_Error -0 +include/check_slave_no_error.inc DROP TABLE t1, t2; select @@global.slave_exec_mode /* must be IDEMPOTENT */; @@global.slave_exec_mode @@ -143,8 +136,7 @@ b 2 3 *** slave must stop (Trying to delete a referenced foreing key) -Last_SQL_Error -1451 +include/wait_for_slave_sql_error.inc [errno=1451] select * from ti1 order by b /* must be (1),(2),(3) - not deleted */; b 1 @@ -161,8 +153,7 @@ set global slave_exec_mode='STRICT'; delete from ti1 where b=3; insert into ti2 set a=3, b=3 /* offending write event */; *** slave must stop (Trying to insert an invalid foreign key) -Last_SQL_Error -1452 +include/wait_for_slave_sql_error.inc [errno=1452] select * from ti2 order by b /* must be (2,2) */; a b 2 2 @@ -181,8 +172,7 @@ a b insert into ti1 set b=1; insert into ti1 set b=1 /* offending write event */; *** slave must stop (Trying to insert a dupliacte key) -Last_SQL_Error -1062 +include/wait_for_slave_sql_error.inc [errno=1062] set foreign_key_checks= 0; delete from ti1 where b=1; set foreign_key_checks= 1; @@ -197,15 +187,13 @@ DELETE FROM t1 WHERE a = -2; DELETE FROM t2 WHERE a = -2; DELETE FROM t1 WHERE a = -2; *** slave must stop (Key was not found) -Last_SQL_Error -1032 +include/wait_for_slave_sql_error.inc [errno=1032] set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; set global slave_exec_mode='STRICT'; DELETE FROM t2 WHERE a = -2; *** slave must stop (Key was not found) -Last_SQL_Error -1032 +include/wait_for_slave_sql_error.inc [errno=1032] set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; set global slave_exec_mode='STRICT'; @@ -213,18 +201,17 @@ UPDATE t1 SET a = 1 WHERE a = -1; UPDATE t2 SET a = 1 WHERE a = -1; UPDATE t1 SET a = 1 WHERE a = -1; *** slave must stop (Key was not found) -Last_SQL_Error -1032 +include/wait_for_slave_sql_error.inc [errno=1032] set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; set global slave_exec_mode='STRICT'; UPDATE t2 SET a = 1 WHERE a = -1; *** slave must stop (Key was not found) -Last_SQL_Error -1032 +include/wait_for_slave_sql_error.inc [errno=1032] set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; SET @@global.slave_exec_mode= @old_slave_exec_mode; set @@session.binlog_format= @save_binlog_format; drop table t1,t2,ti2,ti1; +include/rpl_end.inc *** end of tests diff --git a/mysql-test/suite/rpl/r/rpl_ignore_grant.result b/mysql-test/suite/rpl/r/rpl_ignore_grant.result index 5169cc8e888..ae6d6ddfc8d 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_grant.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; @@ -35,3 +31,4 @@ flush privileges; delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result index b1ccd2f0442..84e1a3b40c7 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; revoke select on *.* from 'user_foo'@'%'; select select_priv from mysql.user where user='user_foo' /* master:must be N */; @@ -28,3 +24,4 @@ Y revoke select on *.* FROM 'user_foo'; delete from mysql.user where user="user_foo"; delete from mysql.user where user="user_foo"; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result index 6b845ddcac9..2e3fd62fbec 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** Test case for BUG#16487 **** **** Master **** CREATE TABLE test.t4 (a int); @@ -141,4 +137,4 @@ HEX(word) SELECT * FROM tmptbl504451f4258$1; ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist DROP TABLE t5; -call mtr.force_restart(); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table_update.result b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result index a88a3c690ed..c3882d0b98f 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table_update.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] use test; drop table if exists mysqltest_foo; drop table if exists mysqltest_bar; @@ -21,3 +17,4 @@ n m k 4 15 55 drop table mysqltest_foo,mysqltest_bar,t1; drop table mysqltest_foo,mysqltest_bar,t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result index 6c226aaf2f7..b54d7d400f7 100644 --- a/mysql-test/suite/rpl/r/rpl_incident.result +++ b/mysql-test/suite/rpl/r/rpl_incident.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Master **** CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); @@ -19,7 +15,8 @@ a 2 3 4 -Last_SQL_Error = The incident LOST_EVENTS occured on the master. Message: +include/wait_for_slave_sql_error.inc [errno=1590] +Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: ' **** On Slave **** SELECT * FROM t1; a @@ -34,5 +31,6 @@ a 2 3 4 -Checking that both slave threads are running. +include/check_slave_is_running.inc DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_init_slave.result b/mysql-test/suite/rpl/r/rpl_init_slave.result index 908abf56c1f..fcf7114879c 100644 --- a/mysql-test/suite/rpl/r/rpl_init_slave.result +++ b/mysql-test/suite/rpl/r/rpl_init_slave.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set global max_connections=151; include/stop_slave.inc include/start_slave.inc @@ -25,6 +21,6 @@ set global init_connect="set @c=1"; show variables like 'init_connect'; Variable_name Value init_connect set @c=1 -include/stop_slave.inc set global init_connect= @my_global_init_connect; set global max_connections= default; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result index c6ee82b13f3..46bc66cbb65 100644 --- a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result +++ b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result @@ -1,19 +1,19 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; reset slave; SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; -Reporting the following error: Failed during slave thread initialization +include/wait_for_slave_sql_error.inc [errno=1593] +Last_SQL_Error = 'Failed during slave thread initialization' call mtr.add_suppression("Failed during slave I/O thread initialization"); SET GLOBAL debug= ""; -stop slave; reset slave; SET GLOBAL init_slave= "garbage"; start slave; -Reporting the following error: Slave SQL thread aborted. Can't execute init_slave query +include/wait_for_slave_sql_error.inc [errno=1064] +Last_SQL_Error = 'Slave SQL thread aborted. Can't execute init_slave query' SET GLOBAL init_slave= ""; +include/stop_slave_io.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb.result b/mysql-test/suite/rpl/r/rpl_innodb.result index bf6c3cb8c86..fe3feba10e1 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t4 ( id INT(5) unsigned NOT NULL auto_increment, name varchar(15) NOT NULL default '', @@ -81,4 +77,5 @@ FLUSH LOGS; -------- switch to master -------- FLUSH LOGS; DROP DATABASE mysqltest1; +include/rpl_end.inc End of 5.1 tests diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result index 6ad22c368b4..f8734b48295 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] use test; CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, @@ -140,3 +136,4 @@ DROP PROCEDURE test.proc_byrange; DROP TABLE test.regular_tbl; DROP TABLE test.bykey_tbl; DROP TABLE test.byrange_tbl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result b/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result index abff02b4b07..d06e6681e81 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] use test; CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, @@ -33,3 +29,4 @@ END| CALL test.proc_norm(); DROP PROCEDURE test.proc_norm; DROP TABLE test.regular_tbl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result index 549842198e8..36294a4333b 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==========MASTER========== show global variables like 'binlog_format%'; Variable_name Value @@ -157,3 +153,4 @@ master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index2 on t2 (d) master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index3 on t2 (a, d) master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d drop database test_rpl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index d076a24e1f0..acecb7a88be 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==========MASTER========== show global variables like 'binlog_format%'; Variable_name Value @@ -1104,3 +1100,4 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid # # COMMIT /* XID */ drop database test_rpl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert.result b/mysql-test/suite/rpl/r/rpl_insert.result index b6a97926f73..8ab90fceed2 100644 --- a/mysql-test/suite/rpl/r/rpl_insert.result +++ b/mysql-test/suite/rpl/r/rpl_insert.result @@ -1,12 +1,8 @@ # # Bug#20821: INSERT DELAYED fails to write some rows to binlog # -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE SCHEMA IF NOT EXISTS mysqlslap; USE mysqlslap; CREATE TABLE t1 (id INT, name VARCHAR(64)); @@ -21,3 +17,4 @@ COUNT(*) # USE test; DROP SCHEMA mysqlslap; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_id.result b/mysql-test/suite/rpl/r/rpl_insert_id.result index e171e247b6c..7ac951576ce 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_id.result +++ b/mysql-test/suite/rpl/r/rpl_insert_id.result @@ -2,19 +2,14 @@ # Setup # use test; -drop table if exists t1, t2, t3; # # See if queries that use both auto_increment and LAST_INSERT_ID() # are replicated well # # We also check how the foreign_key_check variable is replicated # -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @old_concurrent_insert= @@global.concurrent_insert; SET @@global.concurrent_insert= 0; create table t1(a int auto_increment, key(a)) engine=myisam; @@ -531,3 +526,4 @@ id last_id drop table t1, t2; drop procedure foo; SET @@global.concurrent_insert= @old_concurrent_insert; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_id_pk.result b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result index 79815355332..c2d6d2c9b0c 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_id_pk.result +++ b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int auto_increment, primary key(a)); create table t2(b int auto_increment, c int, primary key(b)); insert into t1 values (1),(2),(3); @@ -74,3 +70,4 @@ SET FOREIGN_KEY_CHECKS=0; INSERT INTO t1 VALUES (1),(1); Got one of the listed errors drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_ignore.result b/mysql-test/suite/rpl/r/rpl_insert_ignore.result index da24c86627c..6937c3d0987 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_ignore.result +++ b/mysql-test/suite/rpl/r/rpl_insert_ignore.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, b int unsigned, @@ -68,3 +64,4 @@ a b 5 5 6 6 drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_select.result b/mysql-test/suite/rpl/r/rpl_insert_select.result index 1aff39e0026..d98ae2538fa 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_select.result +++ b/mysql-test/suite/rpl/r/rpl_insert_select.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (n int not null primary key); insert into t1 values (1); create table t2 (n int); @@ -15,3 +11,4 @@ n 1 2 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_invoked_features.result b/mysql-test/suite/rpl/r/rpl_invoked_features.result index be9169c785b..514483e7995 100644 --- a/mysql-test/suite/rpl/r/rpl_invoked_features.result +++ b/mysql-test/suite/rpl/r/rpl_invoked_features.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] USE test; DROP VIEW IF EXISTS v1,v11; DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; @@ -447,3 +443,4 @@ DROP FUNCTION IF EXISTS f1; DROP FUNCTION IF EXISTS f2; DROP EVENT IF EXISTS e1; DROP EVENT IF EXISTS e11; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_killed_ddl.result b/mysql-test/suite/rpl/r/rpl_killed_ddl.result index c3cde16b9d2..a02c9b599bf 100644 --- a/mysql-test/suite/rpl/r/rpl_killed_ddl.result +++ b/mysql-test/suite/rpl/r/rpl_killed_ddl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS d3; @@ -59,62 +55,62 @@ CREATE VIEW v1 AS SELECT a FROM t1 WHERE a < 100; [on master1] CREATE DATABASE d2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP DATABASE d1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP DATABASE IF EXISTS d2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE EVENT e2 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY DO INSERT INTO test.t1 VALUES (2); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP EVENT e1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP EVENT IF EXISTS e2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE FUNCTION f2 () RETURNS INT DETERMINISTIC RETURN 1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc ALTER FUNCTION f1 SQL SECURITY INVOKER; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP FUNCTION f1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE PROCEDURE p2 (OUT rows INT) BEGIN SELECT COUNT(*) INTO rows FROM t2; END; // source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1'; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP PROCEDURE p1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE TABLE t2 (b int); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc ALTER TABLE t1 ADD (d int); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc RENAME TABLE t3 TO t4; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE INDEX i2 on t1 (a); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP INDEX i1 on t1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE TABLE IF NOT EXISTS t4 (a int); CREATE TRIGGER tr2 BEFORE INSERT ON t4 FOR EACH ROW BEGIN @@ -122,28 +118,28 @@ DELETE FROM t1 WHERE a=NEW.a; END; // source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TRIGGER tr1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TRIGGER IF EXISTS tr2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE VIEW v2 AS SELECT a FROM t1 WHERE a > 100; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP VIEW v1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP VIEW IF EXISTS v2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TABLE t1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TABLE IF EXISTS t2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS d3; @@ -168,3 +164,4 @@ DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; DROP PROCEDURE IF EXISTS p3; DROP PROCEDURE IF EXISTS p4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result index daefee9c669..52980e81523 100644 --- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result +++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, UNIQUE(b)); INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; @@ -11,7 +7,8 @@ SELECT * FROM t1; a b 1 10 2 2 -Last_SQL_Error = Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10' +include/wait_for_slave_sql_error.inc [errno=1105] +Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'' SELECT * FROM t1; a b stop slave; @@ -56,12 +53,16 @@ id field_1 field_2 field_3 4 4 d 4d 5 5 e 5e 6 6 f 6f -Last_SQL_Error = Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3) +include/wait_for_slave_sql_error.inc [errno=1105] +Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3) SELECT t2.field_a, t2.field_b, t2.field_c FROM t2 ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c' +t1.field_3 = t2.field_c'' SELECT * FROM t1; id field_1 field_2 field_3 drop table t1, t2; drop table t1, t2; +include/stop_slave_io.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_load_from_master.result b/mysql-test/suite/rpl/r/rpl_load_from_master.result index e1c2ecb35be..8ff9514d023 100644 --- a/mysql-test/suite/rpl/r/rpl_load_from_master.result +++ b/mysql-test/suite/rpl/r/rpl_load_from_master.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest; drop database if exists mysqltest2; drop database if exists mysqltest3; @@ -131,3 +127,4 @@ drop database mysqltest; drop database mysqltest2; drop database mysqltest2; drop database mysqltest3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_load_table_from_master.result b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result index 9d9a1d7d6cb..50bd11873f1 100644 --- a/mysql-test/suite/rpl/r/rpl_load_table_from_master.result +++ b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] "******************** Test Requirment 1 *************" SET SQL_LOG_BIN=0,timestamp=200006; CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; @@ -49,3 +45,4 @@ set SQL_LOG_BIN=1; drop table if exists t1,t2,t3; create table t1(n int); drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result index 32ec2e624e2..bd8bc5093aa 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; +include/master-slave.inc +[connection master] select last_insert_id(); last_insert_id() 0 @@ -32,32 +27,27 @@ drop table t3; create table t1(a int, b int, unique(b)); insert into t1 values(1,10); load data infile '../../std_data/rpl_loaddata.dat' into table t1; -set global sql_slave_skip_counter=1; -start slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] +include/check_slave_no_error.inc set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data infile '../../std_data/rpl_loaddata.dat' into table t1; -stop slave; +include/wait_for_slave_sql_error.inc [errno=1062] +include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data infile '../../std_data/rpl_loaddata.dat' into table t1; +include/wait_for_slave_sql_error.inc [errno=1062] stop slave; reset slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; @@ -80,18 +70,15 @@ load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +include/wait_for_slave_sql_to_stop.inc drop table t1, t2; +include/stop_slave_io.inc drop table t1, t2; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1; ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' DROP TABLE IF EXISTS t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc drop database if exists b48297_db1; drop database if exists b42897_db2; create database b48297_db1; @@ -112,15 +99,10 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; ### disconnect and switch back to master connection use b48297_db1; -Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1 +include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; @@ -132,3 +114,4 @@ Field 3 'Field 4' 'Field 5' 'Field 6' Field 6 'Field 7' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result index e0971b84e3d..6b60bffa365 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a varchar(10) character set utf8); load data infile '../../std_data/loaddata6.dat' into table t1; set @@character_set_database=koi8r; @@ -76,3 +72,4 @@ E4B880E4BA8CE4B889 E59B9BE4BA94E585AD E4B883E585ABE4B99D DROP DATABASE mysqltest; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result b/mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result index 126cc07f45f..bc40f32842d 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result @@ -9,13 +9,8 @@ master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../s master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`c1`) ;file_id=# DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; +include/master-slave.inc +[connection master] select last_insert_id(); last_insert_id() 0 @@ -43,32 +38,27 @@ drop table t3; create table t1(a int, b int, unique(b)); insert into t1 values(1,10); load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; -set global sql_slave_skip_counter=1; -start slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] +include/check_slave_no_error.inc set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; -stop slave; +include/wait_for_slave_sql_error.inc [errno=1062] +include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; +include/wait_for_slave_sql_error.inc [errno=1062] stop slave; reset slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; @@ -91,18 +81,15 @@ load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fie terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +include/wait_for_slave_sql_to_stop.inc drop table t1, t2; +include/stop_slave_io.inc drop table t1, t2; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; LOAD DATA CONCURRENT INFILE "../../std_data/words.dat" INTO TABLE t1; ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' DROP TABLE IF EXISTS t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc drop database if exists b48297_db1; drop database if exists b42897_db2; create database b48297_db1; @@ -123,15 +110,10 @@ LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; ### disconnect and switch back to master connection use b48297_db1; -Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1 +include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; @@ -143,3 +125,4 @@ Field 3 'Field 4' 'Field 5' 'Field 6' Field 6 'Field 7' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result index 9acc1ad93ac..a81813de19f 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result @@ -1,14 +1,9 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,10); LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Fatal error: Not enough memory -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1593] +Last_SQL_Error = 'Fatal error: Not enough memory' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_loaddata_m.result index a1294d515fa..ad9fb6e0896 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_m.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_m.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest; USE test; CREATE TABLE t1(a INT, b INT, UNIQUE(b)); @@ -37,3 +33,4 @@ COUNT(*) 2 DROP DATABASE mysqltest; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_map.result b/mysql-test/suite/rpl/r/rpl_loaddata_map.result index 91624b15ef8..ca6271012dc 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_map.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_map.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Create a big file ==== ==== Load our big file into a table ==== create table t2 (id int not null primary key auto_increment); @@ -29,3 +25,4 @@ count(*) ==== Clean up ==== [on master] drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_s.result b/mysql-test/suite/rpl/r/rpl_loaddata_s.result index 779a3af9631..351c5b584c5 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_s.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_s.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] reset master; create table test.t1(a int, b int, unique(b)); load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; @@ -13,3 +9,4 @@ count(*) show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info drop table test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result index 5e3923616ed..24a1a35470d 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (word CHAR(20) NOT NULL); LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; SELECT * FROM t1 ORDER BY word; @@ -151,3 +147,4 @@ Abernathy aberrant aberration drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result b/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result index c7806f5ecce..c3b3c2232a6 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int not null auto_increment, b int, primary key(a) ); load data infile '../../std_data/rpl_loaddata.dat' into table t1; select * from t1; @@ -15,3 +11,4 @@ a b 1 10 2 15 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result index 6dccaa3d74c..37936871993 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result +++ b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int); select * into outfile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1; truncate table t1; @@ -82,3 +78,4 @@ LOAD DATA LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO TABLE t1; DROP TABLE t1; SET SESSION sql_mode=@old_mode; [slave] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loadfile.result b/mysql-test/suite/rpl/r/rpl_loadfile.result index 22f65c0b5e5..640d1f72bf5 100644 --- a/mysql-test/suite/rpl/r/rpl_loadfile.result +++ b/mysql-test/suite/rpl/r/rpl_loadfile.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); @@ -225,11 +221,7 @@ aberration DROP PROCEDURE IF EXISTS test.p1; DROP TABLE test.t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc SELECT repeat('x',20) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_39701.data'; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (t text); @@ -240,6 +232,7 @@ END| include/stop_slave.inc CALL p('MYSQLTEST_VARDIR/tmp/bug_39701.data'); include/start_slave.inc -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; DROP PROCEDURE p; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_locale.result b/mysql-test/suite/rpl/r/rpl_locale.result index b7396084663..1f6bd40cd16 100644 --- a/mysql-test/suite/rpl/r/rpl_locale.result +++ b/mysql-test/suite/rpl/r/rpl_locale.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (s1 char(10)); set lc_time_names= 'de_DE'; insert into t1 values (date_format('2001-01-01','%W')); @@ -18,3 +14,4 @@ s1 Montag Monday drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result index d9f02f6e82f..91d307008f0 100644 --- a/mysql-test/suite/rpl/r/rpl_log_pos.result +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -1,19 +1,16 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading data from binary"); show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 # include/stop_slave.inc change master to master_log_pos=MASTER_LOG_POS; -Read_Master_Log_Pos 75 +Read_Master_Log_Pos = '75' start slave; -Last_IO_Error = Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master' -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1236] +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'' +include/stop_slave_sql.inc show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 # @@ -30,3 +27,4 @@ n 3 drop table t1; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result index 9061abca477..23238d9c97b 100644 --- a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result +++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result @@ -1,21 +1,18 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] FLUSH LOGS; CREATE TABLE t1(c1 INT); FLUSH LOGS; call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log'); -Last_IO_Error -Got fatal error 1236 from master when reading data from binary log: 'could not find next log' +include/wait_for_slave_io_error.inc [errno=1236] +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log'' CREATE TABLE t2(c1 INT); FLUSH LOGS; CREATE TABLE t3(c1 INT); FLUSH LOGS; CREATE TABLE t4(c1 INT); START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc SHOW TABLES; Tables_in_test t1 @@ -23,3 +20,4 @@ t2 t3 t4 DROP TABLE t1, t2, t3, t4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_many_optimize.result b/mysql-test/suite/rpl/r/rpl_many_optimize.result index b2148892591..53be9b48c7b 100644 --- a/mysql-test/suite/rpl/r/rpl_many_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_many_optimize.result @@ -1,9 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int not null auto_increment primary key, b int, key(b)); INSERT INTO t1 (a) VALUES (1),(2); drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result index edcae6e7506..bf4347757f7 100644 --- a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result +++ b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] select master_pos_wait('master-bin.999999',0,2); master_pos_wait('master-bin.999999',0,2) -1 @@ -22,3 +18,4 @@ show slave status; select master_pos_wait('foo', 98); master_pos_wait('foo', 98) NULL +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result index 6d69235927e..c8f294a7558 100644 --- a/mysql-test/suite/rpl/r/rpl_misc_functions.result +++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); create table t1(id int, i int, r1 int, r2 int, p varchar(100)); insert into t1 values(1, connection_id(), 0, 0, ""); @@ -54,3 +50,4 @@ DROP TABLE t1, t1_slave; DROP PROCEDURE test_replication_sp1; DROP PROCEDURE test_replication_sp2; DROP FUNCTION test_replication_sf; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result b/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result index f1b0b2ae5cb..2b5b31201cb 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; CREATE TABLE t1 (`bit_key` bit, `bit` bit, key (`bit_key` )) ENGINE=MyISAM; CREATE TABLE t2 (`bit_key` bit(4), `bit` bit, key (`bit_key` )) ENGINE=MyISAM; @@ -30,3 +26,4 @@ DELETE FROM `t7` WHERE `bit` < 2 LIMIT 4; INSERT INTO `t8` ( `bit` ) VALUES ( 0 ); DELETE FROM `t8` WHERE `bit` < 2 LIMIT 4; DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result index 08d3241c48f..b378276133e 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (n int auto_increment primary key); set insert_id = 2000; insert into t1 values (NULL),(NULL),(NULL); @@ -44,3 +40,4 @@ t5 CREATE TABLE `t5` ( `created` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2,t3,t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete.result b/mysql-test/suite/rpl/r/rpl_multi_delete.result index 4831502eb88..ea1d87a3960 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_delete.result +++ b/mysql-test/suite/rpl/r/rpl_multi_delete.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int primary key); create table t2 (a int); insert into t1 values (1); @@ -20,3 +16,4 @@ select * from t2; a 1 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete2.result b/mysql-test/suite/rpl/r/rpl_multi_delete2.result index 87abe60b268..51112345a1d 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_delete2.result +++ b/mysql-test/suite/rpl/r/rpl_multi_delete2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set sql_log_bin=0; create database mysqltest_from; set sql_log_bin=1; @@ -42,3 +38,4 @@ set sql_log_bin=0; drop database mysqltest_from; set sql_log_bin=1; drop database mysqltest_to; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_engine.result b/mysql-test/suite/rpl/r/rpl_multi_engine.result index e26777c15ce..7815fa88c93 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_engine.result +++ b/mysql-test/suite/rpl/r/rpl_multi_engine.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1; CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT @@ -360,3 +356,4 @@ id hex(b1) vc bc d f total y t select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; id hex(b1) vc bc d f total y t DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update.result b/mysql-test/suite/rpl/r/rpl_multi_update.result index 524278be042..8634e86afed 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, b int unsigned @@ -25,3 +21,4 @@ a b 2 1 UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update2.result b/mysql-test/suite/rpl/r/rpl_multi_update2.result index 5bb262764fa..a3cab693322 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update2.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1,t2; CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, @@ -53,3 +49,4 @@ select * from t1; a 3 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update3.result b/mysql-test/suite/rpl/r/rpl_multi_update3.result index dba7f770ba2..6b9ec5c3947 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update3.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update3.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] -------- Test for BUG#9361 -------- CREATE TABLE t1 ( @@ -195,3 +191,4 @@ idpro price nbprice 2 1.0000 2 3 2.0000 1 DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update4.result b/mysql-test/suite/rpl/r/rpl_multi_update4.result index f6dde65a35d..0c4857bed60 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update4.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update4.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists d1; drop database if exists d2; drop database if exists d2; @@ -23,3 +19,4 @@ id 0 drop database d1; drop database d2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result b/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result index 09a9121d22c..5187cb0344d 100644 --- a/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result +++ b/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result @@ -1,13 +1,11 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`; CREATE DATABASE `#mysql50#mysqltest-1`; Master position is not changed STOP SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_stop.inc Master position has been changed DROP DATABASE `mysqltest-1`; DROP DATABASE `#mysql50#mysqltest-1`; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_name_const.result b/mysql-test/suite/rpl/r/rpl_name_const.result index acb2684d2c8..89a48bad09b 100644 --- a/mysql-test/suite/rpl/r/rpl_name_const.result +++ b/mysql-test/suite/rpl/r/rpl_name_const.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== [on master] create table t1 (id int); @@ -26,3 +22,4 @@ id [on master] drop table t1; drop procedure test_procedure; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result index 3b9b741e040..0b5673a383c 100644 --- a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result +++ b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); CREATE TABLE t1 (a VARCHAR(1000)); INSERT INTO t1 VALUES (CONNECTION_ID()); @@ -23,5 +19,6 @@ INSERT INTO t1 VALUES (UTC_TIMESTAMP()); INSERT INTO t1 VALUES (RAND()); INSERT INTO t1 VALUES (LAST_INSERT_ID()); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result index b09fbab905a..1eaeaba05bb 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET SQL_LOG_BIN= 0; CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, `c` INT DEFAULT NULL, @@ -45,8 +41,8 @@ INSERT INTO t4(a,c) VALUES (4, 4); INSERT INTO t4(a) VALUES (5); ************* SHOWING THE RESULT SETS WITH INSERTS ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] TABLES t2 and t3 must be different. SELECT * FROM t3 ORDER BY a; a b @@ -80,7 +76,7 @@ UPDATE t1 set b= NULL, c= 300 where a= 1; REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ************* CLEANING ************* DROP TABLE t1; DROP TABLE t2; @@ -122,7 +118,7 @@ UPDATE t1 set b= NULL, c= b'00' where a= 1; REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ################################################################################ # NULL ---> NOT NULL (STRICT MODE) @@ -200,3 +196,4 @@ a b c DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result index 09611dc6480..ec17e3bfafa 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET SQL_LOG_BIN= 0; CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, `c` INT DEFAULT NULL, @@ -45,8 +41,8 @@ INSERT INTO t4(a,c) VALUES (4, 4); INSERT INTO t4(a) VALUES (5); ************* SHOWING THE RESULT SETS WITH INSERTS ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] TABLES t2 and t3 must be different. SELECT * FROM t3 ORDER BY a; a b @@ -80,7 +76,7 @@ UPDATE t1 set b= NULL, c= 300 where a= 1; REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ************* CLEANING ************* DROP TABLE t1; DROP TABLE t2; @@ -122,7 +118,7 @@ UPDATE t1 set b= NULL, c= b'00' where a= 1; REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* TABLES t1 and t2 must be equal otherwise an error will be thrown. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ################################################################################ # NULL ---> NOT NULL (STRICT MODE) @@ -200,3 +196,4 @@ a b c DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_optimize.result b/mysql-test/suite/rpl/r/rpl_optimize.result index 1ae94a3ca36..9c0304ae3a4 100644 --- a/mysql-test/suite/rpl/r/rpl_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_optimize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); create table t1 (a int not null auto_increment primary key, b int, key(b)); INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); @@ -26,3 +22,4 @@ optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result index 1ec9259a1fb..9239a718504 100644 --- a/mysql-test/suite/rpl/r/rpl_packet.result +++ b/mysql-test/suite/rpl/r/rpl_packet.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave I/O: Got a packet bigger than 'max_allowed_packet' bytes, Error_code: 1153"); call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log:"); drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; @@ -33,22 +29,15 @@ include/stop_slave.inc include/start_slave.inc CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); -Slave_IO_Running = No (expect No) -SELECT "Got a packet bigger than 'max_allowed_packet' bytes" AS Last_IO_Error; -Last_IO_Error -Got a packet bigger than 'max_allowed_packet' bytes -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/wait_for_slave_io_error.inc [errno=1153] +Last_IO_Error = 'Got a packet bigger than 'max_allowed_packet' bytes' +include/stop_slave_sql.inc +include/rpl_reset.inc +DROP TABLE t1; CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM; INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet)); -Slave_IO_Running = No (expect No) -SELECT "Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'" AS Last_IO_Error; -Last_IO_Error -Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master' +include/wait_for_slave_io_error.inc [errno=1236] +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'' STOP SLAVE; RESET SLAVE; RESET MASTER; @@ -62,3 +51,5 @@ DROP TABLE t1; SET @@global.max_allowed_packet= 1024; SET @@global.net_buffer_length= 1024; DROP TABLE t1; +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_plugin_load.result b/mysql-test/suite/rpl/r/rpl_plugin_load.result index 43e171a97c9..b33e29ef668 100644 --- a/mysql-test/suite/rpl/r/rpl_plugin_load.result +++ b/mysql-test/suite/rpl/r/rpl_plugin_load.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] Verify that example engine is not installed. SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE'; ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS @@ -33,4 +29,5 @@ Delta Verify that example engine is not installed. SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE'; ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +include/rpl_end.inc End of test diff --git a/mysql-test/suite/rpl/r/rpl_ps.result b/mysql-test/suite/rpl/r/rpl_ps.result index 89e822b3eb6..6e110227782 100644 --- a/mysql-test/suite/rpl/r/rpl_ps.result +++ b/mysql-test/suite/rpl/r/rpl_ps.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1; create table t1(n char(30)); prepare stmt1 from 'insert into t1 values (?)'; @@ -33,49 +29,22 @@ stop slave; # statement breaks binlog. # ######################################################################## - # Connection: slave - - START SLAVE; - # Connection: master - - CREATE DATABASE mysqltest1; CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32)); - PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)'; - EXECUTE stmt_d_1; - use mysqltest1; - EXECUTE stmt_d_1; - - # Connection: slave - - SELECT * FROM t1; db_name db_col_name test latin1_swedish_ci test latin1_swedish_ci - # Connection: master - - DROP DATABASE mysqltest1; - use test; DROP TABLE t1; - - -# Connection: slave - - -STOP SLAVE; - -######################################################################## -reset master; -reset slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result index 6bb9b139057..e5d722a841f 100644 --- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @old_binlog_format= @@global.binlog_format; SET BINLOG_FORMAT=MIXED; SET GLOBAL BINLOG_FORMAT=MIXED; @@ -33,3 +29,4 @@ slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT DROP TABLE IF EXISTS t1; SET @@global.binlog_format= @old_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_read_only.result b/mysql-test/suite/rpl/r/rpl_read_only.result index 6b1404b4f68..37bdc09a8c0 100644 --- a/mysql-test/suite/rpl/r/rpl_read_only.result +++ b/mysql-test/suite/rpl/r/rpl_read_only.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create user test; create table t1(a int) engine=InnoDB; create table t2(a int) engine=MyISAM; @@ -114,3 +110,4 @@ drop user test; drop table t1; drop table t2; set global read_only=0; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result index 54aac2eca35..4f10ac50f9a 100644 --- a/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SHOW VARIABLES LIKE 'relay_log_space_limit'; Variable_name Value relay_log_space_limit 0 @@ -23,3 +19,4 @@ Andy 31 00000001 Jacob 2 00000002 Caleb 1 00000003 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result index e8d2d63e46e..4c1a50b2f33 100644 --- a/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SHOW VARIABLES LIKE 'relay_log_space_limit'; Variable_name Value relay_log_space_limit 0 @@ -23,3 +19,4 @@ Andy 31 00000001 Jacob 2 00000002 Caleb 1 00000003 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relayrotate.result b/mysql-test/suite/rpl/r/rpl_relayrotate.result index 20f19973d83..ea00aee0085 100644 --- a/mysql-test/suite/rpl/r/rpl_relayrotate.result +++ b/mysql-test/suite/rpl/r/rpl_relayrotate.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; create table t1 (a int) engine=innodb; reset slave; @@ -14,3 +10,4 @@ select max(a) from t1; max(a) 8000 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relayspace.result b/mysql-test/suite/rpl/r/rpl_relayspace.result index 1f2a739d3e3..f12f177ff7c 100644 --- a/mysql-test/suite/rpl/r/rpl_relayspace.result +++ b/mysql-test/suite/rpl/r/rpl_relayspace.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; create table t1 (a int); drop table t1; @@ -11,9 +7,11 @@ create table t1 (a int); drop table t1; reset slave; start slave io_thread; +include/wait_for_slave_param.inc [Slave_IO_State] stop slave io_thread; reset slave; start slave; select master_pos_wait('master-bin.001',200,6)=-1; master_pos_wait('master-bin.001',200,6)=-1 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result index 637047a883b..6f85fc15b1e 100644 --- a/mysql-test/suite/rpl/r/rpl_replicate_do.result +++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t11; drop table if exists t11; create table t2 (n int); @@ -26,7 +22,7 @@ n select * from t11; ERROR 42S02: Table 'test.t11' doesn't exist drop table if exists t1,t2,t11; -Replicate_Do_Table test.t1 +Replicate_Do_Table = 'test.t1' create table t1 (ts timestamp); set one_shot time_zone='met'; insert into t1 values('2005-08-12 00:00:00'); @@ -73,3 +69,4 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie *** master *** drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result index 0135804c02d..f0c46b0b966 100644 --- a/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result +++ b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; drop database if exists mysqltest2; create database mysqltest1; @@ -21,3 +17,4 @@ a 1 drop database mysqltest1; drop database mysqltest2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_report.result b/mysql-test/suite/rpl/r/rpl_report.result index e129d7c8f22..b979d1faf5d 100644 --- a/mysql-test/suite/rpl/r/rpl_report.result +++ b/mysql-test/suite/rpl/r/rpl_report.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_host'; VARIABLE_NAME VARIABLE_VALUE REPORT_HOST 127.0.0.1 @@ -31,3 +27,4 @@ Value my_password set @@global.report_host='my.new.address.net'; ERROR HY000: Variable 'report_host' is a read only variable end of tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result index dae72d83b51..12071faecfd 100644 --- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result +++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -219,3 +215,4 @@ DROP DATABASE database_slave_temp_01; DROP DATABASE database_slave_temp_02; DROP DATABASE database_slave_temp_03; SET sql_log_bin= 1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result index b50c7cebcab..e41f56c0a71 100644 --- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -1,5 +1,3 @@ -drop table if exists t1, t2, t3, t4; -drop table if exists t1, t2, t3, t4; start slave; Got one of the listed errors start slave; @@ -14,9 +12,9 @@ create temporary table temp_table (a char(80) not null); insert into temp_table values ("testing temporary tables"); create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); -Master_Log_File master-bin.000001 -Relay_Master_Log_File master-bin.000001 -Checking that both slave threads are running. +Master_Log_File = 'master-bin.000001' +Relay_Master_Log_File = 'master-bin.000001' +include/check_slave_is_running.inc select * from t1; s Could not break slave @@ -38,8 +36,7 @@ drop table temp_table, t3; insert into t2 values(1234); set insert_id=1234; insert into t2 values(NULL); -set global sql_slave_skip_counter=1; -start slave; +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] purge master logs to 'master-bin.000002'; show master logs; Log_name master-bin.000002 @@ -57,9 +54,9 @@ show binary logs; Log_name File_size master-bin.000003 # insert into t2 values (65); -Master_Log_File master-bin.000003 -Relay_Master_Log_File master-bin.000003 -Checking that both slave threads are running. +Master_Log_File = 'master-bin.000003' +Relay_Master_Log_File = 'master-bin.000003' +include/check_slave_is_running.inc select * from t2; m 34 @@ -85,9 +82,9 @@ master-bin.000005 # select * from t4; a testing temporary tables part 2 -Master_Log_File master-bin.000005 -Relay_Master_Log_File master-bin.000005 -Checking that both slave threads are running. +Master_Log_File = 'master-bin.000005' +Relay_Master_Log_File = 'master-bin.000005' +include/check_slave_is_running.inc lock tables t3 read; select count(*) from t3 where n >= 4; count(*) @@ -102,3 +99,5 @@ show binlog events in ''; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log purge master logs before now(); End of 5.0 tests +include/stop_slave.inc +CHANGE MASTER TO MASTER_HOST = ''; diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result index 0d682eb82e1..b5f6aea9698 100644 --- a/mysql-test/suite/rpl/r/rpl_row_001.result +++ b/mysql-test/suite/rpl/r/rpl_row_001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (word CHAR(20) NOT NULL); LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; @@ -53,3 +49,4 @@ SELECT n FROM t1; n 3456 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_4_bytes.result b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result index e2431364ed3..ef9602204a1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_4_bytes.result +++ b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -25,3 +21,4 @@ ABE ANG LIL DROP DATABASE mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_NOW.result b/mysql-test/suite/rpl/r/rpl_row_NOW.result index 23f95878608..eb6271d6e93 100644 --- a/mysql-test/suite/rpl/r/rpl_row_NOW.result +++ b/mysql-test/suite/rpl/r/rpl_row_NOW.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create database if not exists mysqltest1; DROP TABLE IF EXISTS mysqltest1.t1; CREATE TABLE mysqltest1.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, @@ -27,3 +23,4 @@ INSERT INTO mysqltest1.t1 SET n = NULL, a = now(); DROP TABLE IF EXISTS mysqltest1.t1; DROP FUNCTION mysqltest1.f1; DROP DATABASE mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_USER.result b/mysql-test/suite/rpl/r/rpl_row_USER.result index 98755fb4653..5298395da20 100644 --- a/mysql-test/suite/rpl/r/rpl_row_USER.result +++ b/mysql-test/suite/rpl/r/rpl_row_USER.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest1; CREATE DATABASE mysqltest1; CREATE USER tester IDENTIFIED BY 'test'; @@ -36,3 +32,4 @@ REVOKE ALL ON mysqltest1.* FROM 'tester'@'%'; REVOKE ALL ON mysqltest1.* FROM ''@'localhost%'; DROP USER tester@'%'; DROP USER ''@'localhost%'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_UUID.result b/mysql-test/suite/rpl/r/rpl_row_UUID.result index 02174a7ecae..b7d3f8914e0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_UUID.result +++ b/mysql-test/suite/rpl/r/rpl_row_UUID.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=myisam; @@ -38,3 +34,4 @@ DROP PROCEDURE test.p1; DROP FUNCTION test.fn1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result index 458ae53e79c..d769b0b0881 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE DATABASE test_ignore; **** On Master **** SHOW DATABASES; @@ -46,11 +42,10 @@ t1 USE test_ignore; ERROR 42000: Unknown database 'test_ignore' DROP DATABASE test_ignore; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +USE test; +DROP TABLE t1; +USE test; +include/rpl_reset.inc CREATE TABLE t1 (a INT); DELETE FROM t1; INSERT INTO t1 VALUES (1),(2); @@ -65,11 +60,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT DROP TABLE t1; ================ Test for BUG#17620 ================ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc **** On Slave **** SET GLOBAL QUERY_CACHE_SIZE=0; **** On Master **** @@ -103,12 +94,9 @@ a 8 9 SET GLOBAL QUERY_CACHE_SIZE=0; +DROP TABLE t1; ================ Test for BUG#22550 ================ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; INSERT INTO t1 VALUES(1,2); SELECT HEX(a),b FROM t1; @@ -126,11 +114,7 @@ HEX(a) b 0 2 DROP TABLE IF EXISTS t1; ================ Test for BUG#22583 ================ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc **** On Master **** CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM; CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB; @@ -247,13 +231,8 @@ a b 3 1 4 4 drop table t1,t2; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc **** On Master **** -SET SESSION BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT PRIMARY KEY, b SET('master','slave')); INSERT INTO t1 VALUES (1,'master,slave'), (2,'master,slave'); **** On Slave **** @@ -277,6 +256,6 @@ SELECT * FROM t1 ORDER BY a; a b 2 master,slave 5 slave -DROP TABLE t1; **** On Master **** DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result index a247c3a6039..7afc70bfa5c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'MYISAM' ; SELECT * FROM t1; C1 C2 @@ -422,11 +418,7 @@ a b c **** Test for BUG#31552 **** **** On Master **** DELETE FROM t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); **** On Master **** @@ -436,7 +428,7 @@ DELETE FROM t1; SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 set @@global.slave_exec_mode= default; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 **** Test for BUG#37076 **** @@ -478,50 +470,44 @@ j INT NOT NULL) ENGINE = 'MYISAM' ; [expecting slave to replicate correctly] INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] [expecting slave to replicate correctly] INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] [expecting slave to stop] INSERT INTO t3 VALUES (1, "", 1); INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] [expecting slave to stop] INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to stop] INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] drop table t1, t2, t3, t4, t5, t6, t7; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='MYISAM' ; INSERT INTO t1 VALUES (1), (2), (3); UPDATE t1 SET a = 10; ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( @@ -575,7 +561,7 @@ ERROR 23000: Duplicate entry '6' for key 'PRIMARY' DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; *** results: t2 must be consistent **** -Comparing tables master:test.t2 and master:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1, t2; EOF OF TESTS CREATE TABLE t1 (a int) ENGINE='MYISAM' ; @@ -591,7 +577,7 @@ UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; CREATE TABLE t1 (a bit) ENGINE='MYISAM' ; INSERT IGNORE INTO t1 VALUES (NULL); @@ -633,5 +619,6 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result index fefe8e969dc..b8620894bd1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'INNODB' ; SELECT * FROM t1; C1 C2 @@ -422,11 +418,7 @@ a b c **** Test for BUG#31552 **** **** On Master **** DELETE FROM t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); **** On Master **** @@ -436,7 +428,7 @@ DELETE FROM t1; SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 set @@global.slave_exec_mode= default; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 **** Test for BUG#37076 **** @@ -478,50 +470,44 @@ j INT NOT NULL) ENGINE = 'INNODB' ; [expecting slave to replicate correctly] INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] [expecting slave to replicate correctly] INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] [expecting slave to stop] INSERT INTO t3 VALUES (1, "", 1); INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] [expecting slave to stop] INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to stop] INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] drop table t1, t2, t3, t4, t5, t6, t7; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='INNODB' ; INSERT INTO t1 VALUES (1), (2), (3); UPDATE t1 SET a = 10; ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( @@ -575,7 +561,7 @@ ERROR 23000: Duplicate entry '6' for key 'PRIMARY' DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; *** results: t2 must be consistent **** -Comparing tables master:test.t2 and master:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1, t2; EOF OF TESTS CREATE TABLE t1 (a int) ENGINE='INNODB' ; @@ -591,7 +577,7 @@ UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; CREATE TABLE t1 (a bit) ENGINE='INNODB' ; INSERT IGNORE INTO t1 VALUES (NULL); @@ -633,5 +619,6 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result index 3443e704031..c7241c52353 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; SET @@BINLOG_FORMAT = ROW; SELECT @@BINLOG_FORMAT; @@ -717,3 +713,4 @@ COUNT(*) 4 DELETE FROM t1; DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result index 055efffbd6a..4fb33dc4b6b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; ***** Table Create Section **** @@ -154,3 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result index 055efffbd6a..4fb33dc4b6b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; ***** Table Create Section **** @@ -154,3 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result index 417bc65641a..49753d2b25c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_colSize.result +++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; **** Testing WL#3228 changes. **** *** Create "wider" table on slave *** @@ -18,7 +14,8 @@ CREATE TABLE t1 (a DECIMAL(20, 10)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -34,7 +31,8 @@ CREATE TABLE t1 (a DECIMAL(27, 18)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -50,7 +48,8 @@ CREATE TABLE t1 (a NUMERIC(20, 10)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -67,7 +66,8 @@ CREATE TABLE t1 (a FLOAT(47)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4 +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -84,7 +84,8 @@ CREATE TABLE t1 (a BIT(64)); RESET MASTER; INSERT INTO t1 VALUES (B'10101'); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -100,7 +101,8 @@ CREATE TABLE t1 (a BIT(12)); RESET MASTER; INSERT INTO t1 VALUES (B'10101'); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -117,7 +119,8 @@ CREATE TABLE t1 (a SET('1','2','3','4','5','6','7','8','9')); RESET MASTER; INSERT INTO t1 VALUES ('4'); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -134,7 +137,8 @@ CREATE TABLE t1 (a CHAR(20)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -182,7 +186,8 @@ CREATE TABLE t1 (a ENUM( RESET MASTER; INSERT INTO t1 VALUES ('44'); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -199,7 +204,8 @@ CREATE TABLE t1 (a VARCHAR(2000)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -215,7 +221,8 @@ CREATE TABLE t1 (a VARCHAR(200)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -231,7 +238,8 @@ CREATE TABLE t1 (a VARCHAR(2000)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -248,7 +256,8 @@ CREATE TABLE t1 (a LONGBLOB); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -258,3 +267,4 @@ RESET MASTER; START SLAVE; *** Cleanup *** DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_conflicts.result b/mysql-test/suite/rpl/r/rpl_row_conflicts.result index 0f15bfc7156..d8fbab98191 100644 --- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result +++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*"); [on slave] SET @old_slave_exec_mode= @@global.slave_exec_mode; @@ -24,6 +20,7 @@ a 1 [on slave] ---- Wait until slave stops with an error ---- +include/wait_for_slave_sql_error.inc [errno=1062] Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 346 (expected "duplicate key" error) SELECT * FROM t1; a @@ -31,6 +28,7 @@ a ---- Resolve the conflict on the slave and restart SQL thread ---- DELETE FROM t1 WHERE a = 1; START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc ---- Sync slave and verify that there is no error ---- Last_SQL_Error = '' (expected no error) SELECT * FROM t1; @@ -50,12 +48,15 @@ SELECT * FROM t1; a [on slave] ---- Wait until slave stops with an error ---- -Last_SQL_Error = Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos 982 (expected "can't find record" error) +include/wait_for_slave_sql_error.inc [errno=1032] +Last_SQL_Error (expected "duplicate key" error) +Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS SELECT * FROM t1; a ---- Resolve the conflict on the slave and restart SQL thread ---- INSERT INTO t1 VALUES (1); START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc ---- Sync slave and verify that there is no error ---- Last_SQL_Error = (expected no error) SELECT * FROM t1; @@ -64,6 +65,7 @@ a [on master] DROP TABLE t1; [on slave] +include/rpl_reset.inc ######## Run with slave_exec_mode=IDEMPOTENT ######## set @@global.slave_exec_mode= 'IDEMPOTENT'; ==== Initialize ==== @@ -107,3 +109,4 @@ a DROP TABLE t1; [on slave] SET @@global.slave_exec_mode= @old_slave_exec_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result index 90b68428008..4575588b1ef 100644 --- a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result +++ b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int not null primary key) engine=myisam; insert delayed into t1 values (1); insert delayed into t1 values (2); @@ -20,3 +16,4 @@ a 2 3 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_drop.result b/mysql-test/suite/rpl/r/rpl_row_drop.result index 048e07271b3..963a001f70a 100644 --- a/mysql-test/suite/rpl/r/rpl_row_drop.result +++ b/mysql-test/suite/rpl/r/rpl_row_drop.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Master **** CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); @@ -53,3 +49,4 @@ t2 SHOW TABLES; Tables_in_test t2 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_find_row.result b/mysql-test/suite/rpl/r/rpl_row_find_row.result index 69516b47b7d..fff1f1b0c35 100644 --- a/mysql-test/suite/rpl/r/rpl_row_find_row.result +++ b/mysql-test/suite/rpl/r/rpl_row_find_row.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET SQL_LOG_BIN=0; CREATE TABLE t (a int, b int, c int, key(b)); SET SQL_LOG_BIN=1; @@ -12,27 +8,18 @@ INSERT INTO t VALUES (1,2,4); INSERT INTO t VALUES (4,3,4); DELETE FROM t; DROP TABLE t; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t (a int, b int, c int, key(b)); ALTER TABLE t DISABLE KEYS; INSERT INTO t VALUES (1,2,4); INSERT INTO t VALUES (4,3,4); DELETE FROM t; DROP TABLE t; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT, UNIQUE KEY(c1,c3), KEY(c2)); INSERT INTO t1(c1,c2) VALUES(1,1); INSERT INTO t1(c1,c2) VALUES(1,2); UPDATE t1 SET c1=1000 WHERE c2=2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc 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 61fee130d49..af44821a817 100644 --- a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result +++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int); insert into t1 values (10); create table t2 (a int); @@ -21,10 +17,13 @@ flush tables; select * from t3; a stop slave; +include/wait_for_slave_to_stop.inc drop table t1; flush tables with read lock; start slave; +include/wait_for_slave_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; drop table t3, t4, t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_func001.result b/mysql-test/suite/rpl/r/rpl_row_func001.result index b20f3f724d0..74a053abb26 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func001.result +++ b/mysql-test/suite/rpl/r/rpl_row_func001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP FUNCTION test.f1; DROP TABLE IF EXISTS test.t1; create table test.t1 (a int, PRIMARY KEY(a)); @@ -28,3 +24,4 @@ a 2 DROP FUNCTION test.f1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_func002.result b/mysql-test/suite/rpl/r/rpl_row_func002.result index 03f5b3115c3..69a732048b2 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func002.result +++ b/mysql-test/suite/rpl/r/rpl_row_func002.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP FUNCTION test.f1; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -24,3 +20,4 @@ INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); DROP FUNCTION test.f1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_func003.result b/mysql-test/suite/rpl/r/rpl_row_func003.result index 94d01b50ce5..cdc5bf6afba 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func003.result +++ b/mysql-test/suite/rpl/r/rpl_row_func003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); DROP FUNCTION IF EXISTS test.f1; DROP TABLE IF EXISTS test.t1; @@ -28,3 +24,4 @@ ROLLBACK; SET AUTOCOMMIT=1; DROP FUNCTION test.f1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result index 562e3dc2862..148840cc8c5 100644 --- a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result +++ b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Setup table on master but not on slave ==== [on master] CREATE TABLE t1 (a INT); @@ -14,8 +10,10 @@ DROP TABLE t1; INSERT INTO t1 VALUES (1); ==== Verify error on slave ==== [on slave] -Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables +include/wait_for_slave_sql_error.inc [errno=1146] ==== Clean up ==== -include/stop_slave.inc +include/stop_slave_io.inc +RESET SLAVE; [on master] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result index 1551d83266d..b6fd074c766 100644 --- a/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result +++ b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set @old_global_binlog_format = @@global.binlog_format; set @@global.binlog_format = row; CREATE SCHEMA IF NOT EXISTS mysqlslap; @@ -60,3 +56,4 @@ a drop table t1; End of 5.0 tests set @@global.binlog_format = @old_global_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index 0f648539c47..b88634e2802 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] include/stop_slave.inc reset master; reset slave; @@ -240,18 +236,13 @@ slave-bin.000002 # Query # # BEGIN slave-bin.000002 # Table_map # # table_id: # (test.t2) slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000002 # Query # # COMMIT -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -273,3 +264,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result index ff189e676cc..6e1eec2056a 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] include/stop_slave.inc reset master; reset slave; @@ -240,18 +236,13 @@ slave-bin.000002 # Query # # BEGIN slave-bin.000002 # Table_map # # table_id: # (test.t2) slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000002 # Xid # # COMMIT /* XID */ -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -273,3 +264,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result index db06cb6d3de..871d3218b70 100644 --- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result +++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; # # Generate a big enough master's binlog to cause relay log rotations @@ -21,7 +17,7 @@ select @@global.max_relay_log_size; @@global.max_relay_log_size 4096 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 2 # @@ -31,7 +27,7 @@ set global max_relay_log_size=(5*4096); select @@global.max_relay_log_size; @@global.max_relay_log_size 20480 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 3: max_relay_log_size = 0 # @@ -41,7 +37,7 @@ set global max_relay_log_size=0; select @@global.max_relay_log_size; @@global.max_relay_log_size 0 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -55,13 +51,13 @@ reset slave; start slave; flush logs; create table t1 (a int); -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # flush logs; drop table t1; -Checking that both slave threads are running. +include/check_slave_is_running.inc flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB @@ -70,3 +66,4 @@ set global max_binlog_size= @my_max_binlog_size; # # End of 4.1 tests # +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index 538764da738..5fee82f6017 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ---Setup Section -- set timestamp=1000000000; @@ -380,3 +376,4 @@ a b 1 1 FLUSH LOGS; DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result index c461cafbd7c..d9ebb52493b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result @@ -1,46 +1,28 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ## case #1 - last_null_bit_pos==0 in record_compare without X bit -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit ## (1 column less and no varchar) -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #2 - X bit is wrongly set. -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=InnoDB DEFAULT CHARSET= latin1; INSERT INTO t1(c1) VALUES (10); INSERT INTO t1(c1) VALUES (NULL); UPDATE t1 SET c1= 0; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result index 38fbe486d2e..e9ffcc927be 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result @@ -1,60 +1,37 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ## case #1 - last_null_bit_pos==0 in record_compare without X bit -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit ## (1 column less and no varchar) -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #2 - X bit is wrongly set. -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=MyISAM DEFAULT CHARSET= latin1; INSERT INTO t1(c1) VALUES (10); INSERT INTO t1(c1) VALUES (NULL); UPDATE t1 SET c1= 0; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## coverage purposes - Field_bits ## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0 -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1(c1,c2) VALUES (10, b'1'); INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); UPDATE t1 SET c1= 0; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result index 7bf09df31ca..be4bc630e3f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result @@ -1,21 +1,17 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -Master_User root -Master_Host 127.0.0.1 +include/master-slave.inc +[connection master] +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc change master to master_user='test'; -Master_User test -Master_Host 127.0.0.1 +Master_User = 'test' +Master_Host = '127.0.0.1' reset slave; -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/start_slave.inc -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc reset slave; include/start_slave.inc @@ -28,13 +24,19 @@ Variable_name Value Slave_open_temp_tables 0 include/stop_slave.inc reset slave; +include/check_slave_no_error.inc change master to master_user='impossible_user_name'; start slave; -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc change master to master_user='root'; include/start_slave.inc +include/check_slave_no_error.inc include/stop_slave.inc change master to master_user='impossible_user_name'; start slave; -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc reset slave; +include/check_slave_no_error.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp001.result b/mysql-test/suite/rpl/r/rpl_row_sp001.result index 8c26c061376..17117ce2fac 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp001.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] --------------------------------------------- @@ -83,3 +79,4 @@ DROP PROCEDURE test.p1; DROP PROCEDURE test.p2; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result index a42c9af988c..f368cf6e356 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result @@ -1,15 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; +include/master-slave.inc +[connection master] CREATE TABLE test.t1 (a INT AUTO_INCREMENT KEY, t CHAR(6)) ENGINE=INNODB; CREATE TABLE test.t2 (a INT AUTO_INCREMENT KEY, f INT, FOREIGN KEY(a) REFERENCES test.t1(a) ON DELETE CASCADE) ENGINE=INNODB; create procedure test.p1(IN i CHAR(6)) @@ -231,9 +221,10 @@ a t 98 NONE SET AUTOCOMMIT=1; SET FOREIGN_KEY_CHECKS=0; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; +DROP PROCEDURE test.p3; +DROP PROCEDURE test.p1; +DROP PROCEDURE test.p2; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp003.result b/mysql-test/suite/rpl/r/rpl_row_sp003.result index df3e2a7ceed..5650af7a916 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp003.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; @@ -47,3 +43,4 @@ a DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp005.result b/mysql-test/suite/rpl/r/rpl_row_sp005.result index 01e1970e0df..df877233e94 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp005.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp005.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t2; @@ -98,3 +94,4 @@ DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result index 6792a701577..da196bb3615 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP PROCEDURE IF EXISTS p1; @@ -42,3 +38,4 @@ DROP TABLE t1; DROP TABLE t2; DROP PROCEDURE p1; DROP PROCEDURE p2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result index 9a2822835f8..fc49f968b4a 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result @@ -1,11 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; +include/master-slave.inc +[connection master] CREATE PROCEDURE test.p1(IN i INT) BEGIN DECLARE CONTINUE HANDLER FOR sqlexception BEGIN END; @@ -46,5 +40,6 @@ num SELECT * FROM test.t1; num 13 -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; +DROP PROCEDURE test.p1; +DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp008.result b/mysql-test/suite/rpl/r/rpl_row_sp008.result index 23197964a24..f817e9c5f1b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp008.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp008.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t2; CREATE TABLE test.t1 (a INT,PRIMARY KEY(a)); @@ -32,3 +28,4 @@ a DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp009.result b/mysql-test/suite/rpl/r/rpl_row_sp009.result index 35ce0d7b420..8e9a2cbb8e9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp009.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp009.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -75,3 +71,4 @@ a DROP PROCEDURE test.p1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp010.result b/mysql-test/suite/rpl/r/rpl_row_sp010.result index 02567465428..d31f37d8411 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp010.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp010.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP PROCEDURE IF EXISTS test.p3; @@ -54,3 +50,4 @@ DROP PROCEDURE IF EXISTS test.p3; DROP PROCEDURE IF EXISTS test.p4; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp011.result b/mysql-test/suite/rpl/r/rpl_row_sp011.result index e35c9f21adb..8588d739dff 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp011.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp011.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP PROCEDURE IF EXISTS test.p3; @@ -67,3 +63,4 @@ DROP PROCEDURE IF EXISTS test.p6; DROP PROCEDURE IF EXISTS test.p7; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp012.result b/mysql-test/suite/rpl/r/rpl_row_sp012.result index b9c818bad9a..57d92386638 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp012.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp012.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP PROCEDURE IF EXISTS test.p3; @@ -57,3 +53,4 @@ DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP USER user1@localhost; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result index 1934b01505c..09a3e4b73de 100644 --- a/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result +++ b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result @@ -1,17 +1,14 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (words varchar(20)) engine=myisam; load data infile '../../std_data/words.dat' into table t1 (words); select count(*) from t1; count(*) 70 +include/wait_for_slave_sql_to_stop.inc select count(*) from t1; count(*) 70 drop table t1; -include/stop_slave.inc drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result index 2b83bffd85f..5a29acfda1d 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] STOP SLAVE; SET @my_sql_mode= @@global.sql_mode; SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; @@ -118,27 +114,21 @@ a b SELECT * FROM t2; a 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t9 VALUES (4); INSERT INTO t4 VALUES (4); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4' INSERT INTO t9 VALUES (5); INSERT INTO t5 VALUES (5,10,25); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4' INSERT INTO t9 VALUES (6); INSERT INTO t6 VALUES (6,12,36); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4' INSERT INTO t9 VALUES (6); -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; @@ -194,3 +184,4 @@ a b x y z DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; SET @@global.sql_mode= @my_sql_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result index a42530c354d..f6620ecf05f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] STOP SLAVE; SET @my_sql_mode= @@global.sql_mode; SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; @@ -118,27 +114,21 @@ a b SELECT * FROM t2; a 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t9 VALUES (4); INSERT INTO t4 VALUES (4); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4' INSERT INTO t9 VALUES (5); INSERT INTO t5 VALUES (5,10,25); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4' INSERT INTO t9 VALUES (6); INSERT INTO t6 VALUES (6,12,36); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4' INSERT INTO t9 VALUES (6); -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; @@ -194,3 +184,4 @@ a b x y z DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; SET @@global.sql_mode= @my_sql_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result index 711d0d063aa..eaee105a2d9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result +++ b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS `t1`; ### TABLE with field_metadata_size == 290 CREATE TABLE `t1` ( @@ -159,15 +155,10 @@ LOCK TABLES `t1` WRITE; INSERT INTO `t1`(c2) VALUES ('1'); FLUSH LOGS; ### assertion: the slave replicated event successfully and tables match -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE `t1`; === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc ### action: generating several tables with different metadata ### sizes (resorting to perl) ### testing table with 249 field metadata size. @@ -182,25 +173,26 @@ start slave; ### testing table with 258 field metadata size. FLUSH LOGS; ### assertion: the slave replicated event successfully and tables match for t10 -Comparing tables master:test.t10 and slave:test.t10 +include/diff_tables.inc [master:t10, slave:t10] ### assertion: the slave replicated event successfully and tables match for t9 -Comparing tables master:test.t9 and slave:test.t9 +include/diff_tables.inc [master:t9, slave:t9] ### assertion: the slave replicated event successfully and tables match for t8 -Comparing tables master:test.t8 and slave:test.t8 +include/diff_tables.inc [master:t8, slave:t8] ### assertion: the slave replicated event successfully and tables match for t7 -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] ### assertion: the slave replicated event successfully and tables match for t6 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t6, slave:t6] ### assertion: the slave replicated event successfully and tables match for t5 -Comparing tables master:test.t5 and slave:test.t5 +include/diff_tables.inc [master:t5, slave:t5] ### assertion: the slave replicated event successfully and tables match for t4 -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] ### assertion: the slave replicated event successfully and tables match for t3 -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t3, slave:t3] ### assertion: the slave replicated event successfully and tables match for t2 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] ### assertion: the slave replicated event successfully and tables match for t1 -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ### assertion: check that binlog is not corrupt. Using mysqlbinlog to ### detect failure. Before the patch mysqlbinlog would find ### a corrupted event, thence would fail. +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig001.result b/mysql-test/suite/rpl/r/rpl_row_trig001.result index ea0ef27fccd..d00da976d30 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig001.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE test.t1 (n MEDIUMINT NOT NULL, d DATETIME, PRIMARY KEY(n)); CREATE TABLE test.t2 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); CREATE TABLE test.t3 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d DATETIME, PRIMARY KEY(n)); @@ -29,3 +25,4 @@ DROP TRIGGER test.t3_bi_t2; DROP TABLE test.t1; DROP TABLE test.t2; DROP TABLE test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig002.result b/mysql-test/suite/rpl/r/rpl_row_trig002.result index 794104db750..b0be0316bf2 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig002.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig002.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TRIGGER test.t2_ai; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -67,3 +63,4 @@ DROP TRIGGER test.t2_ai; DROP TABLE test.t1; DROP TABLE test.t2; DROP TABLE test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig003.result b/mysql-test/suite/rpl/r/rpl_row_trig003.result index 43c2ecde2b4..68552ede1c0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig003.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TRIGGER test.t1_bi; DROP TRIGGER test.t2_ai; DROP TRIGGER test.t1_bu; @@ -81,3 +77,4 @@ DROP TRIGGER test.t2_ad; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig004.result b/mysql-test/suite/rpl/r/rpl_row_trig004.result index d0d0657f875..50317b55e2e 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig004.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig004.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TRIGGER test.t1_bi_t2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -28,3 +24,4 @@ n f DROP TRIGGER test.t1_bi_t2; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result b/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result index f9181be9bc0..d3b892326ac 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result +++ b/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TEMPORARY TABLE t1(c1 INTEGER); CREATE TABLE t2(c1 INTEGER); CREATE TABLE t1(c1 INTEGER); @@ -27,3 +23,4 @@ SELECT * FROM t2; c1 DROP TABLE t1; DROP TABLE t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result b/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result index 800670b78ae..b9ae1893629 100644 --- a/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result +++ b/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT); CREATE TABLE t2 (a INT, b INT); INSERT INTO t1 SELECT 1; @@ -20,3 +16,4 @@ b 1 3 DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result index 81aeb0d645b..5629f5c8cdd 100644 --- a/mysql-test/suite/rpl/r/rpl_row_until.result +++ b/mysql-test/suite/rpl/r/rpl_row_until.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); INSERT INTO t1 VALUES (1),(2),(3),(4); DROP TABLE t1; @@ -14,27 +10,37 @@ DROP TABLE t2; include/stop_slave.inc RESET SLAVE; START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_drop_t1 +include/wait_for_slave_sql_to_stop.inc SELECT * FROM t1; n 1 2 3 4 +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; +include/wait_for_slave_sql_to_stop.inc SELECT * FROM t1; n 1 2 3 4 +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2 +include/wait_for_slave_sql_to_stop.inc SELECT * FROM t2; n 1 2 +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE; +include/wait_for_slave_to_start.inc include/stop_slave.inc START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_create_t2 +include/wait_for_slave_param.inc [Until_Log_Pos] +include/wait_for_slave_sql_to_stop.inc +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE UNTIL MASTER_LOG_FILE='master-bin', MASTER_LOG_POS=MASTER_LOG_POS; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS, RELAY_LOG_POS=RELAY_LOG_POS; @@ -49,3 +55,6 @@ START SLAVE; START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; Warnings: Note 1254 Slave is already running +include/stop_slave.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_view01.result b/mysql-test/suite/rpl/r/rpl_row_view01.result index 4dfe5826f32..471de20ea6d 100644 --- a/mysql-test/suite/rpl/r/rpl_row_view01.result +++ b/mysql-test/suite/rpl/r/rpl_row_view01.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create database if not exists mysqltest1; DROP VIEW IF EXISTS mysqltest1.v1; DROP VIEW IF EXISTS mysqltest1.v2; @@ -102,3 +98,4 @@ DROP TABLE IF EXISTS mysqltest1.t2; DROP TABLE IF EXISTS mysqltest1.t4; DROP TABLE IF EXISTS mysqltest1.t10; DROP DATABASE mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_wide_table.result b/mysql-test/suite/rpl/r/rpl_row_wide_table.result index da96e84d1d5..f469a13837c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_wide_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_wide_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t300; create table t300 ( f1 int, @@ -316,3 +312,4 @@ one 1 *** Cleanup *** DROP TABLE t300; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_server_id1.result b/mysql-test/suite/rpl/r/rpl_server_id1.result index 76f187e3b01..80e5bbae146 100644 --- a/mysql-test/suite/rpl/r/rpl_server_id1.result +++ b/mysql-test/suite/rpl/r/rpl_server_id1.result @@ -1,13 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; -include/stop_slave.inc -change master to master_port=SLAVE_PORT; -start slave; -*** must be having the replicate-same-server-id IO thread error *** -Slave_IO_Errno= 1593 -Slave_IO_Error= Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). +include/rpl_init.inc [topology=2->2] +START SLAVE; +include/wait_for_slave_io_error.inc [errno=1593] +Last_IO_Error = 'Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).' +include/stop_slave_sql.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_server_id2.result b/mysql-test/suite/rpl/r/rpl_server_id2.result index bb5a175fbfe..dacb69bc7cb 100644 --- a/mysql-test/suite/rpl/r/rpl_server_id2.result +++ b/mysql-test/suite/rpl/r/rpl_server_id2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (n int); reset master; stop slave; @@ -21,6 +17,8 @@ create table t1(n int); create table t2(n int); change master to master_port=MASTER_PORT; start slave until master_log_file='master-bin.000001', master_log_pos=UNTIL_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc *** checking until postion execution: must be only t1 in the list *** show tables; Tables_in_test @@ -28,3 +26,4 @@ t1 start slave sql_thread; drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_session_var.result b/mysql-test/suite/rpl/r/rpl_session_var.result index 297a18a5931..030ae161b22 100644 --- a/mysql-test/suite/rpl/r/rpl_session_var.result +++ b/mysql-test/suite/rpl/r/rpl_session_var.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1; Warnings: Note 1051 Unknown table 't1' @@ -51,3 +47,4 @@ SELECT length(data) < 100 FROM t1; length(data) < 100 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_charset.result b/mysql-test/suite/rpl/r/rpl_set_charset.result index 480d926fbba..fa30a361d13 100644 --- a/mysql-test/suite/rpl/r/rpl_set_charset.result +++ b/mysql-test/suite/rpl/r/rpl_set_charset.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1 /*!40100 character set latin2 */; use mysqltest1; @@ -46,3 +42,4 @@ D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 drop database mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_null_innodb.result b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result index 41600a5fe1b..f099b2b7691 100644 --- a/mysql-test/suite/rpl/r/rpl_set_null_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result @@ -1,35 +1,22 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] +include/rpl_reset.inc CREATE TABLE t1 (c1 BIT, c2 INT) Engine=InnoDB; INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 CHAR) Engine=InnoDB; INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; SELECT * FROM t1; c1 w UPDATE t1 SET c1=NULL WHERE c1='w'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_null_myisam.result b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result index cbd7010664a..5698be4ff0c 100644 --- a/mysql-test/suite/rpl/r/rpl_set_null_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result @@ -1,35 +1,22 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] +include/rpl_reset.inc CREATE TABLE t1 (c1 BIT, c2 INT) Engine=MyISAM; INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 CHAR) Engine=MyISAM; INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; SELECT * FROM t1; c1 w UPDATE t1 SET c1=NULL WHERE c1='w'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_show_slave_running.result b/mysql-test/suite/rpl/r/rpl_show_slave_running.result index 598762d5188..66958c67428 100644 --- a/mysql-test/suite/rpl/r/rpl_show_slave_running.result +++ b/mysql-test/suite/rpl/r/rpl_show_slave_running.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET DEBUG_SYNC= 'RESET'; include/stop_slave.inc set global debug= 'd,dbug.before_get_running_status_yes'; @@ -21,6 +17,7 @@ Slave_running OFF Slave_IO_Running= No Slave_SQL_Running= No SET DEBUG_SYNC='now SIGNAL signal.io_thread_let_running'; +include/wait_for_slave_param.inc [Slave_IO_Running] Slave_running, Slave_IO_Running, Slave_SQL_Running must be OFF YES NO in three following queries SHOW STATUS LIKE 'Slave_running'; Variable_name Value @@ -28,6 +25,7 @@ Slave_running OFF Slave_IO_Running= Yes Slave_SQL_Running= No start slave sql_thread; +include/wait_for_slave_sql_to_start.inc Slave_running, Slave_IO_Running, Slave_SQL_Running must be ON, YES, YES in three following queries SHOW STATUS LIKE 'Slave_running'; Variable_name Value @@ -37,3 +35,4 @@ Slave_SQL_Running= Yes set global debug= ''; SET DEBUG_SYNC= 'RESET'; End of tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result index 0aa8069a38c..d46338fd5b0 100644 --- a/mysql-test/suite/rpl/r/rpl_skip_error.result +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Test Without sql_mode=strict_trans_tables ==== [on master] create table t1 (n int not null primary key); @@ -31,7 +27,7 @@ n 3 7 8 -Checking that both slave threads are running. +include/check_slave_is_running.inc ==== Clean Up ==== drop table t1; create table t1(a int primary key); @@ -46,7 +42,7 @@ select * from t1; a 1 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc ==== Clean Up ==== drop table t1; ==== Using Innodb ==== @@ -112,3 +108,4 @@ UPDATE t2 SET id= id + 3, data = 2; ==== Clean Up ==== DROP TABLE t1; DROP TABLE t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result index eb3c4ef5978..25deb65fa0f 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result +++ b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] *** Preparing data *** CREATE TABLE t1 (a INT NOT NULL, b VARCHAR(10)) ENGINE=MyISAM; @@ -33,6 +29,7 @@ a b SELECT * FROM t3 ORDER BY a; a b 1 ZZ +include/wait_for_slave_sql_error.inc [errno=1146] SHOW TABLES LIKE 't%'; Tables_in_test (t%) t1 @@ -44,7 +41,7 @@ a b SELECT * FROM t2 ORDER BY a; a b 1 AA_for_row_or_YY_for_stmt_mixed -include/stop_slave.inc +include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; include/start_slave.inc TRUNCATE t1; @@ -60,6 +57,7 @@ INSERT INTO t3 VALUES(2, 'B'); INSERT INTO t2 VALUES(2, 'B'); INSERT INTO t1 VALUES(2, 'B'); UPDATE t1 SET b = 'X' WHERE a = 2; +include/wait_for_slave_sql_error.inc [errno=1146] SELECT * FROM t1 ORDER BY a; a b 2 X @@ -78,7 +76,7 @@ SELECT * FROM t1 ORDER BY a; a b SELECT * FROM t2 ORDER BY a; a b -include/stop_slave.inc +include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; include/start_slave.inc TRUNCATE t1; @@ -95,6 +93,7 @@ INSERT INTO t1 VALUES (3, 'C'), (4, 'D'); INSERT INTO t2 VALUES (3, 'C'), (4, 'D'); INSERT INTO t3 VALUES (3, 'C'), (4, 'D'); COMMIT; +include/wait_for_slave_sql_error.inc [errno=1146] SELECT * FROM t1 ORDER BY a; a b 3 C @@ -116,8 +115,9 @@ SELECT * FROM t1 ORDER BY a; a b SELECT * FROM t2 ORDER BY a; a b -include/stop_slave.inc +include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; include/start_slave.inc *** Clean up *** DROP TABLE t1,t2,t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_in.result b/mysql-test/suite/rpl/r/rpl_slave_load_in.result index 2cc83fd0a19..504f6f60d9e 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_in.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_in.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int not null auto_increment, b int, primary key(a)); create table t2(a int not null auto_increment, b int, primary key(a)) engine=innodb; load data infile '../../std_data/rpl_loaddata.dat' into table t1; @@ -13,7 +9,8 @@ insert into t2(b) values (2); load data infile '../../std_data/rpl_loaddata.dat' into table t2; load data infile '../../std_data/rpl_loaddata.dat' into table t2; commit; -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result index c3c4f7c015a..213ab06f0c1 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result @@ -1,15 +1,16 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb; start transaction; insert into t1(b) values (1); insert into t1(b) values (2); load data infile '../../std_data/rpl_loaddata.dat' into table t1; commit; +include/wait_for_slave_sql_error.inc [errno=9] drop table t1; +include/sync_slave_io_with_master.inc +include/stop_slave_io.inc +RESET SLAVE; drop table t1; call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3"); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result b/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result index 3ed14a9cb6b..8cd6218dcdc 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result @@ -1,6 +1,7 @@ -CHANGE MASTER TO MASTER_USER='root', -MASTER_CONNECT_RETRY=1, -MASTER_HOST='127.0.0.1', -MASTER_PORT=MASTER_MYPORT; +include/master-slave.inc +[connection master] START SLAVE; -12 +include/wait_for_slave_sql_error.inc [errno=12] +include/stop_slave_io.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index a4067fb7983..e5fe33aed19 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Slave **** STOP SLAVE; **** On Master **** @@ -43,6 +39,9 @@ c d 3 18 **** On Slave **** START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; +include/wait_for_slave_sql_to_stop.inc +include/check_slave_param.inc [Exec_Master_Log_Pos] +include/check_slave_no_error.inc SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; SELECT * FROM t1; @@ -66,6 +65,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # User var # # @`foo`=12 master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(@foo, 2*@foo) START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; +include/wait_for_slave_sql_to_stop.inc SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; **** On Master **** @@ -279,3 +279,4 @@ include/start_slave.inc SELECT * FROM t10 ORDER BY a; a b DROP TABLE t10; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_status.result b/mysql-test/suite/rpl/r/rpl_slave_status.result index a98a81dc74f..cbd71002c04 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_status.result +++ b/mysql-test/suite/rpl/r/rpl_slave_status.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Create new replication user ==== [on master] GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl'; @@ -27,9 +23,11 @@ FLUSH PRIVILEGES; ==== Restart slave without privileges ===== include/stop_slave.inc START SLAVE; -==== Verify that Slave_IO_Running = No ==== -Slave_IO_Running = No (should be No) +include/wait_for_slave_sql_to_start.inc +==== Verify that Slave IO thread stopped with error ==== +include/wait_for_slave_io_error.inc [errno=1045] ==== Cleanup (Note that slave IO thread is not running) ==== -DROP TABLE t1; +include/rpl_reset.inc [on master] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slow_query_log.result b/mysql-test/suite/rpl/r/rpl_slow_query_log.result index a4479f0c544..46da59a583d 100644 --- a/mysql-test/suite/rpl/r/rpl_slow_query_log.result +++ b/mysql-test/suite/rpl/r/rpl_slow_query_log.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); include/stop_slave.inc SET @old_log_output= @@log_output; @@ -46,12 +42,7 @@ include/stop_slave.inc SET GLOBAL long_query_time= @old_long_query_time; SET GLOBAL log_output= @old_log_output; include/start_slave.inc -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc SET @old_log_output= @@log_output; SET GLOBAL log_output= 'TABLE'; SET GLOBAL long_query_time= 2; @@ -89,3 +80,4 @@ SET @@global.long_query_time= @old_long_query_time; DROP TABLE t1; SET @@global.log_output= @old_log_output; SET @@global.long_query_time= @old_long_query_time; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 8f06653f8ab..fc9c05ebc81 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -989,3 +985,4 @@ drop procedure ` mysqltestbug36570_p2`; drop function mysqltestbug36570_f1; End of 5.0 tests End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sp004.result b/mysql-test/suite/rpl/r/rpl_sp004.result index 1c0ed3cc50a..5b67d225490 100644 --- a/mysql-test/suite/rpl/r/rpl_sp004.result +++ b/mysql-test/suite/rpl/r/rpl_sp004.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t2; @@ -91,3 +87,4 @@ DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result index d9cdfd81167..a6e3ae03963 100644 --- a/mysql-test/suite/rpl/r/rpl_sp_effects.result +++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators; drop procedure if exists p1; drop procedure if exists p2; @@ -278,3 +274,4 @@ drop procedure sp_bug26199; drop function sf_bug26199; SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators; end of the tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sporadic_master.result b/mysql-test/suite/rpl/r/rpl_sporadic_master.result index 14fb673a081..e8278bf3744 100644 --- a/mysql-test/suite/rpl/r/rpl_sporadic_master.result +++ b/mysql-test/suite/rpl/r/rpl_sporadic_master.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t2(n int); create table t1(n int not null auto_increment primary key); insert into t1 values (NULL),(NULL); @@ -24,3 +20,4 @@ n 14 15 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ssl.result b/mysql-test/suite/rpl/r/rpl_ssl.result index 1af4c5e227c..35aaabc8c56 100644 --- a/mysql-test/suite/rpl/r/rpl_ssl.result +++ b/mysql-test/suite/rpl/r/rpl_ssl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int auto_increment, KEY(t)); stop slave; @@ -19,23 +15,32 @@ insert into t1 values(1); select * from t1; t 1 -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc STOP SLAVE; select * from t1; t 1 insert into t1 values (NULL); -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +include/wait_for_slave_to_start.inc +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc drop user replssl@localhost; drop table t1; +include/stop_slave.inc +CHANGE MASTER TO +master_user = 'root', +master_ssl = 0, +master_ssl_ca = '', +master_ssl_cert = '', +master_ssl_key = ''; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ssl1.result b/mysql-test/suite/rpl/r/rpl_ssl1.result index 5b4aa126c77..5e1614f5aac 100644 --- a/mysql-test/suite/rpl/r/rpl_ssl1.result +++ b/mysql-test/suite/rpl/r/rpl_ssl1.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int); stop slave; @@ -18,23 +14,23 @@ start slave; select * from t1; t 1 -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc stop slave; change master to master_user='root',master_password='', master_ssl=0; start slave; drop user replssl@localhost; drop table t1; -Master_SSL_Allowed No -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +Master_SSL_Allowed = 'No' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc stop slave; change master to master_host="localhost", @@ -50,10 +46,19 @@ on slave select * from t1; t 1 -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Checking that both slave threads are running. +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem' +Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem' +Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem' +include/check_slave_is_running.inc drop table t1; +include/stop_slave.inc +CHANGE MASTER TO +master_host="127.0.0.1", +master_ssl_ca ='', +master_ssl_cert='', +master_ssl_key='', +master_ssl_verify_server_cert=0, +master_ssl=0; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result index e2b1935c268..ee667771ef0 100644 --- a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result @@ -1,14 +1,11 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(n int); stop slave; start slave; stop slave io_thread; start slave io_thread; +include/wait_for_slave_to_start.inc drop table t1; create table t1i(n int primary key) engine=innodb; create table t2m(n int primary key) engine=myisam; @@ -28,6 +25,7 @@ zero 0 stop slave; rollback; +include/wait_for_slave_to_stop.inc *** sql thread is *not* running: No *** *** the prove: the stopped slave has finished the current transaction *** five @@ -38,3 +36,4 @@ one 1 include/start_slave.inc drop table t1i, t2m; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result index c2a24cbaa82..d4290331b8c 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_000001.result +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression("Statement may not be safe to log in statement format."); create table t1 (word char(20) not null); load data infile '../../std_data/words.dat' into table t1; @@ -52,8 +48,7 @@ select (@id := id) - id from t2; kill @id; drop table t2; Got one of the listed errors -set global sql_slave_skip_counter=1; -start slave; +include/wait_for_slave_sql_error_and_skip.inc [errno=1053] select count(*) from t1; count(*) 5000 @@ -81,3 +76,4 @@ select_priv user Y blafasel2 drop table t1; delete from mysql.user where user="blafasel2"; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result index 4bbbc0e99c6..0e83f1dfb67 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result +++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int, unique(a)) engine=myisam; set sql_log_bin=0; insert into t1 values(2); @@ -11,6 +7,10 @@ set sql_log_bin=1; insert into t1 values(1),(2); ERROR 23000: Duplicate entry '2' for key 'a' drop table t1; +include/wait_for_slave_sql_to_stop.inc Error: "Query caused different errors on master and slave. Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) Errno: "0" (expected 0) drop table t1; +include/stop_slave.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result b/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result index 2f6e98d5eec..2b974d0d98c 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result +++ b/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1, t2; DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; @@ -167,3 +163,4 @@ DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result b/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result index 818e383e2f1..8fdac1a5c97 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result +++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set @@session.binlog_direct_non_transactional_updates= TRUE; ######################################################################### # CONFIGURATION @@ -1358,3 +1354,4 @@ master-bin.000001 # Query # # ROLLBACK ################################################################################### # CLEAN ################################################################################### +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_conflicts.result b/mysql-test/suite/rpl/r/rpl_stm_conflicts.result index b0df9516b7c..b56297a5487 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_conflicts.result +++ b/mysql-test/suite/rpl/r/rpl_stm_conflicts.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== [on master] CREATE TABLE t1(a INT PRIMARY KEY); @@ -19,6 +15,7 @@ a 1 [on slave] ---- Wait until slave stops with an error ---- +include/wait_for_slave_sql_error.inc [errno=1062] Last_SQL_Error = Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)' (expected "duplicate key" error) SELECT * FROM t1; a @@ -26,6 +23,7 @@ a ---- Resolve the conflict on the slave and restart SQL thread ---- DELETE FROM t1 WHERE a = 1; START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc ---- Sync slave and verify that there is no error ---- Last_SQL_Error = '' (expected no error) SELECT * FROM t1; @@ -52,3 +50,4 @@ a [on master] DROP TABLE t1; [on slave] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result index 9ae1ef315b6..d833852e193 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result @@ -1,12 +1,8 @@ # WL#5370 Keep forward-compatibility when changing 'CREATE TABLE IF NOT # EXISTS ... SELECT' behaviour # -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t2(c1 INT, c2 char(10)); @@ -21,7 +17,7 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 INT KEY) SELECT 'abc' AS c3, 1 AS c4 -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # The statement should be binlogged as two events. one is # 'CREATE TABLE IF NOT EXISTS ..', another one is @@ -44,7 +40,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 2 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Verify if it can be binlogged with right database name when the table # is not in the default database @@ -68,7 +64,7 @@ master-bin.000001 # Query # # use `db1`; CREATE TABLE IF NOT EXISTS `test`.`t1` ) master-bin.000001 # Query # # use `db1`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 20 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:test.t1,slave:test.t1] USE test; DROP DATABASE db1; @@ -91,7 +87,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; REPLACE INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 2 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # It should be binlogged as 'INSERT IGNORE... SELECT' # if the original statement has option IGNORE @@ -112,7 +108,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 2 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Nothing should be binlogged if error happens and no any row is inserted @@ -121,7 +117,7 @@ SELECT '123', 2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Verify it can binlog well when there are some braces('(') @@ -169,7 +165,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO `test`.`t1` (`c3`,`c4`) (SELECT '123', 3) UNION (SELECT '123', 4) master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Throw a warning that table already exists and don't insert anything @@ -215,7 +211,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', NAME_CONST('a',600) master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] DROP PROCEDURE p1; # The statement can be binlogged correctly when it is in a prepared statement @@ -251,7 +247,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 800 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # The statement can be binlogged correctly when it is in a conditional comment @@ -362,7 +358,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 905 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] DROP TABLE t2; DROP TABLE t1; @@ -702,3 +698,4 @@ master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SE master-bin.000001 # Query # # COMMIT DROP TABLE t2; DROP TEMPORARY TABLE t1; +include/rpl_end.inc 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 61fee130d49..af44821a817 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result +++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int); insert into t1 values (10); create table t2 (a int); @@ -21,10 +17,13 @@ flush tables; select * from t3; a stop slave; +include/wait_for_slave_to_stop.inc drop table t1; flush tables with read lock; start slave; +include/wait_for_slave_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; drop table t3, t4, t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result index 1bed2058687..b309096fbc0 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result +++ b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set @old_global_binlog_format = @@global.binlog_format; set @@global.binlog_format = statement; CREATE SCHEMA IF NOT EXISTS mysqlslap; @@ -128,3 +124,4 @@ FLUSH LOGS; FLUSH LOGS; End of 5.0 tests set @@global.binlog_format = @old_global_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_loadfile.result b/mysql-test/suite/rpl/r/rpl_stm_loadfile.result index ca76695f4d4..b49f44273ff 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_loadfile.result +++ b/mysql-test/suite/rpl/r/rpl_stm_loadfile.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); @@ -229,3 +225,4 @@ aberration DROP PROCEDURE IF EXISTS test.p1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index d73a689969f..4eeec6584fd 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] include/stop_slave.inc reset master; reset slave; @@ -222,18 +218,13 @@ show binlog events in 'slave-bin.000002' from ; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Query # # use `test`; insert into t2 values (1) -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -252,3 +243,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result index db06cb6d3de..871d3218b70 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result +++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; # # Generate a big enough master's binlog to cause relay log rotations @@ -21,7 +17,7 @@ select @@global.max_relay_log_size; @@global.max_relay_log_size 4096 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 2 # @@ -31,7 +27,7 @@ set global max_relay_log_size=(5*4096); select @@global.max_relay_log_size; @@global.max_relay_log_size 20480 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 3: max_relay_log_size = 0 # @@ -41,7 +37,7 @@ set global max_relay_log_size=0; select @@global.max_relay_log_size; @@global.max_relay_log_size 0 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -55,13 +51,13 @@ reset slave; start slave; flush logs; create table t1 (a int); -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # flush logs; drop table t1; -Checking that both slave threads are running. +include/check_slave_is_running.inc flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB @@ -70,3 +66,4 @@ set global max_binlog_size= @my_max_binlog_size; # # End of 4.1 tests # +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result index 2ecaf2c90ae..ee4c710ecd2 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ################################################################################### # CONFIGURATION ################################################################################### @@ -868,12 +864,7 @@ DROP TABLE nt_4; DROP PROCEDURE pc_i_tt_3; DROP FUNCTION f1; DROP FUNCTION f2; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE `t1` ( `c1` int(10) unsigned NOT NULL AUTO_INCREMENT, `c2` tinyint(1) unsigned DEFAULT NULL, @@ -887,5 +878,6 @@ INSERT INTO t1 (c1,c2,c3,c4,c5) VALUES (1, 1, 'X', 1, NULL); COMMIT; ROLLBACK; SET AUTOCOMMIT=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE `t1`; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_multi_query.result b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result index 625c686f383..0b4d179f385 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_multi_query.result +++ b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop database if exists mysqltest; +include/master-slave.inc +[connection master] create database mysqltest; create table mysqltest.t1 ( n int); insert into mysqltest.t1 values(1)/ @@ -21,7 +16,6 @@ n 5 show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest master-bin.000001 # Query # # create database mysqltest master-bin.000001 # Query # # use `test`; create table mysqltest.t1 ( n int) master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(1) @@ -30,3 +24,4 @@ master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(3) master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(4) master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(5) drop database mysqltest; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_no_op.result b/mysql-test/suite/rpl/r/rpl_stm_no_op.result index 5a253d61fcb..cf5b03cdfa6 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_no_op.result +++ b/mysql-test/suite/rpl/r/rpl_stm_no_op.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create database mysqltest; drop database if exists mysqltest; Warnings: @@ -50,3 +46,4 @@ a b select * from t2; a b drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result index 1fc189975ef..c263e27a11f 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result @@ -1,21 +1,17 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -Master_User root -Master_Host 127.0.0.1 +include/master-slave.inc +[connection master] +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc change master to master_user='test'; -Master_User test -Master_Host 127.0.0.1 +Master_User = 'test' +Master_Host = '127.0.0.1' reset slave; -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/start_slave.inc -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc reset slave; include/start_slave.inc @@ -28,13 +24,19 @@ Variable_name Value Slave_open_temp_tables 1 include/stop_slave.inc reset slave; +include/check_slave_no_error.inc change master to master_user='impossible_user_name'; start slave; -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc change master to master_user='root'; include/start_slave.inc +include/check_slave_no_error.inc include/stop_slave.inc change master to master_user='impossible_user_name'; start slave; -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc reset slave; +include/check_slave_no_error.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result b/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result index fd143fc8a50..fa5ac2a0c85 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result +++ b/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (pk integer auto_increment , primary key (pk)); SET SESSION SQL_MODE='traditional'; # **** [MASTER] ***** @@ -16,3 +12,4 @@ DROP TABLE t1; # assertion: sync slave with master makes slave not to stop with # duplicate key error (because it has received event # with expected error code). +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result index 118d31d78c8..a71746d7fba 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_until.result +++ b/mysql-test/suite/rpl/r/rpl_stm_until.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] [on slave] include/stop_slave.inc ==== Create some events on master ==== @@ -18,29 +14,41 @@ drop table t2; ==== Replicate one event at a time on slave ==== [on slave] start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc select * from t1; n 1 2 3 4 +include/check_slave_param.inc [Exec_Master_Log_Pos] start slave until master_log_file='master-no-such-bin.000001', master_log_pos=MASTER_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc select * from t1; n 1 2 3 4 -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=RELAY_LOG_POS; +include/check_slave_param.inc [Exec_Master_Log_Pos] +start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=RELAY_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc select * from t2; n 1 2 +include/check_slave_param.inc [Exec_Master_Log_Pos] start slave; [on master] [on slave] include/stop_slave.inc start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc +include/check_slave_param.inc [Exec_Master_Log_Pos] ==== Test various error conditions ==== start slave until master_log_file='master-bin', master_log_pos=MASTER_LOG_POS; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL @@ -75,6 +83,7 @@ select count(*) as two from t1; two 2 start slave until master_log_file='MASTER_LOG_FILE', master_log_pos= UNTIL_POS;; +include/wait_for_slave_sql_to_stop.inc slave stopped at the prescribed position select 0 as zero; zero @@ -84,23 +93,15 @@ one 1 drop table t1; start slave; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' +include/rpl_reset.inc flush logs; stop slave; reset slave; start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */; +include/wait_for_slave_sql_to_stop.inc show tables /* t1 must exist */; Tables_in_test t1 drop table t1; stop slave; -reset slave; -reset master; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result index 49146417ab7..2e9522e8947 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # BUG#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends # @@ -41,10 +37,12 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # CREATE TEMPORARY TABLE with MyISAM engine # ----------------------------------------- @@ -66,10 +64,12 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # CREATE TEMPORARY TABLE ... SELECT with InnoDB engine # ---------------------------------------------------- @@ -92,10 +92,12 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # CREATE TEMPORARY TABLE ... SELECT with MyISAM engine # ---------------------------------------------------- @@ -118,10 +120,13 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # Test end SET GLOBAL debug= '$debug_save'; DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result index 7447d12f9b2..d4aae782221 100644 --- a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result +++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -427,3 +423,4 @@ INSERT INTO t13 VALUES (CURRENT_USER()); INSERT INTO t13 VALUES (my_current_user()); drop database mysqltest1; set global binlog_format =@my_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temp_table.result b/mysql-test/suite/rpl/r/rpl_temp_table.result index e4ca31d8908..e7df070874a 100644 --- a/mysql-test/suite/rpl/r/rpl_temp_table.result +++ b/mysql-test/suite/rpl/r/rpl_temp_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t2 (n int, PRIMARY KEY(n)); create temporary table t1 (n int); create temporary table t3 (n int not null); @@ -46,3 +42,4 @@ Slave_open_temp_tables 0 drop table if exists t1,t2; Warnings: Note 1051 Unknown table 't1' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result index 00cf238c712..116ae76dafe 100644 --- a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result +++ b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialize ==== [on master] CREATE TABLE t1 (a CHAR(48)); @@ -15,6 +11,7 @@ SHOW STATUS LIKE "Slave_open_temp_tables"; Variable_name Value Slave_open_temp_tables 1 [on master] +[on master1] [on slave] ==== Verify results on slave ==== SHOW STATUS LIKE "Slave_open_temp_tables"; @@ -22,14 +19,10 @@ Variable_name Value Slave_open_temp_tables 0 ==== Clean up ==== [on master] +include/rpl_connect.inc [creating master] DROP TABLE t1; [on slave] -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (a int); CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) ); CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) ); @@ -110,6 +103,7 @@ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT # Compare the base table. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result index 87bf525aacc..0ce7fe37a34 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary.result +++ b/mysql-test/suite/rpl/r/rpl_temporary.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can\'t find record in \'user\' Error_code: 1032"); reset master; DROP TABLE IF EXISTS t1; @@ -129,6 +125,8 @@ select * from t1; a 1 drop table t1; +include/stop_slave.inc +include/rpl_reset.inc -- Bug#43748 -- make a user on the slave that can list but not kill system threads. FLUSH PRIVILEGES; @@ -140,5 +138,5 @@ KILL @id; Got one of the listed errors -- throw out test-user on slave. DROP USER user43748@127.0.0.1; --- done. back to master. End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result index 3ea31b8fc62..27843e1dcda 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result +++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Deadlock found"); **** On Master **** SET SESSION BINLOG_FORMAT=ROW; @@ -40,12 +36,9 @@ a b 2 2 3 3 4 4 -Checking that both slave threads are running. -DROP TABLE t1; +include/check_slave_is_running.inc **** On Master **** -SET SQL_LOG_BIN= 0; DROP TABLE t1; -SET SQL_LOG_BIN= 1; SET SESSION BINLOG_FORMAT=MIXED; CREATE TABLE t_myisam (id INT, PRIMARY KEY (id)) engine= MyIsam; INSERT INTO t_myisam (id) VALUES(1); @@ -101,3 +94,4 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(1) master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(1) master-bin.000001 # Query # # ROLLBACK DROP TABLE t_myisam, t_innodb; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_test_framework.result b/mysql-test/suite/rpl/r/rpl_test_framework.result new file mode 100644 index 00000000000..e45c12ba0ec --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_test_framework.result @@ -0,0 +1,170 @@ +==== Create t1 on all servers. ==== +include/rpl_init.inc [topology=1->2->3->4->5->6->7->8->9] +CREATE TABLE t1 (a INT); +include/rpl_end.inc +==== Test 3-server topologies ==== +include/rpl_init.inc [topology=1 -> 2] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 12' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (1); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (1); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=2 -> 3] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 23' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (2); +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (2); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=none] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= '' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (3); +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (3); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (3); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2, 2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 212' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (4); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (4); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 212' +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (5); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (5); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=2->1->2] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 212' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (6); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (6); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2->3] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 123' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (7); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=2->3->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 323 21' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (8); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2,2->3,3->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 23123' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (9); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->3->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 13213' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (10); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +==== Test 6-server topologies ==== +include/rpl_init.inc [topology=1->2->3->4->1->5->6] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 341234156' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (11); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=3->4->5->6->3->1->2] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 4563456 312' +[connection server_4] +DELETE FROM t1; +INSERT INTO t1 VALUES (12); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=6->5->4->3->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 65 54 43 32 21' +[connection server_6] +DELETE FROM t1; +INSERT INTO t1 VALUES (13); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2->3->1,4->5->6] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 456 23123' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (14); +[connection server_4] +DELETE FROM t1; +INSERT INTO t1 VALUES (14); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +==== Test 9-server topology ==== +include/rpl_init.inc [topology=1->2, 2->3, 3->4, 4->5, 5->1, 1->6, 6->7, 6->8, 8->9] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 345123451689 67' +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (15); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1,server_7:t1,server_8:t1,server_9:t1] +include/rpl_end.inc +==== Clean up ==== +include/rpl_init.inc [topology=1->2->3->4->5->6->7->8->9] +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result index 0b5c03b5300..ce93c3030c0 100644 --- a/mysql-test/suite/rpl/r/rpl_timezone.result +++ b/mysql-test/suite/rpl/r/rpl_timezone.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set @my_time_zone= @@global.time_zone; set timestamp=100000000; create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n)); @@ -122,6 +118,7 @@ a b SET @@session.time_zone = default; DROP TABLE t1; SET @@session.time_zone = default; +include/stop_slave.inc reset master; CREATE TABLE t1 (date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, a int(11) default NULL); SET @@session.time_zone='+01:00'; @@ -141,4 +138,5 @@ date a 2008-12-23 19:39:39 2 DROP TABLE t1; SET @@session.time_zone = default; +include/rpl_end.inc End of 5.0 tests diff --git a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result index 5729faa9659..682aa71d64c 100644 --- a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result +++ b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TEMPORARY TABLE t1 (a INT); CREATE TABLE t2 (a INT, b INT) ENGINE= MyISAM; INSERT INTO t1 VALUES (1); @@ -94,3 +90,4 @@ INSERT INTO t1 VALUES (1); DROP TABLE t2; INSERT INTO t1 VALUES (1); DROP TEMPORARY TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result index 86534fa8f7d..24795378177 100644 --- a/mysql-test/suite/rpl/r/rpl_trigger.result +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression("Statement may not be safe to log in statement format."); DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; @@ -863,8 +859,8 @@ drop table t21,t31; drop table t11; STOP SLAVE; FLUSH LOGS; ---> Stop master server ---> Start master server +include/rpl_stop_server.inc [server_number=1] +include/rpl_start_server.inc [server_number=1] --> Master binlog: Server ver: 5.0.16-debug-log, Binlog ver: 4 RESET SLAVE; START SLAVE; @@ -979,12 +975,7 @@ a b 2 b 3 c drop table t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1 ( f int ) engine = innodb; create table log ( r int ) engine = myisam; create trigger tr @@ -995,6 +986,7 @@ insert into t1 values ( 1 ); rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.log and slave:test.log +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:log, slave:log] drop table t1, log; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_trunc_temp.result b/mysql-test/suite/rpl/r/rpl_trunc_temp.result index 44624a38875..ae2c9973c9f 100644 --- a/mysql-test/suite/rpl/r/rpl_trunc_temp.result +++ b/mysql-test/suite/rpl/r/rpl_trunc_temp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create temporary table t1 (n int); insert into t1 values(1); show status like 'Slave_open_temp_tables'; @@ -20,3 +16,4 @@ Slave_open_temp_tables 1 show status like 'Slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result index 38fb9e27764..da8db64cef4 100644 --- a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result @@ -1,20 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/master-slave.inc +[connection master] +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -22,19 +14,15 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=MyISAM; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** DELETE FROM t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -42,5 +30,6 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=MyISAM; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** DELETE FROM t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result index b5e5936834d..d8a4443022d 100644 --- a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result @@ -1,20 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/master-slave.inc +[connection master] +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -22,19 +14,15 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=InnoDB; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** DELETE FROM t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -42,5 +30,6 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=InnoDB; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** DELETE FROM t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result b/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result index e3b8d6de12e..a5c55e43617 100644 --- a/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result @@ -1,15 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/master-slave.inc +[connection master] CREATE TABLE t1(b1 BIT(1), b2 BIT(2), b3 BIT(3)) ENGINE=InnoDB; INSERT INTO t1 VALUES (b'0', b'01', b'101'); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_udf.result b/mysql-test/suite/rpl/r/rpl_udf.result index ccf16271d01..9f4c2b199ca 100644 --- a/mysql-test/suite/rpl/r/rpl_udf.result +++ b/mysql-test/suite/rpl/r/rpl_udf.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set binlog_format=row; drop table if exists t1; "*** Test 1) Test UDFs via loadable libraries *** @@ -316,3 +312,4 @@ affected rows: 0 "Running on the master" DROP TABLE t1; affected rows: 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_user.result b/mysql-test/suite/rpl/r/rpl_user.result index a98e7e9ca55..4ad87eb1ae7 100644 --- a/mysql-test/suite/rpl/r/rpl_user.result +++ b/mysql-test/suite/rpl/r/rpl_user.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] set session sql_log_bin=0; delete from mysql.user where Host='fakehost'; set session sql_log_bin=1; @@ -43,3 +39,4 @@ master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofo master-bin.000001 # Query # # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost' master-bin.000001 # Query # # use `test`; drop user 'foofoo'@'fakehost' master-bin.000001 # Query # # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_user_variables.result b/mysql-test/suite/rpl/r/rpl_user_variables.result index 1f76eae3fce..e302ec0aceb 100644 --- a/mysql-test/suite/rpl/r/rpl_user_variables.result +++ b/mysql-test/suite/rpl/r/rpl_user_variables.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] reset master; create table t1(n char(30)); set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1; @@ -279,4 +275,4 @@ i DROP FUNCTION f1; DROP FUNCTION f2; DROP TABLE t1; -stop slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_variables.result b/mysql-test/suite/rpl/r/rpl_variables.result index b3108c75a6e..3724ff571b2 100644 --- a/mysql-test/suite/rpl/r/rpl_variables.result +++ b/mysql-test/suite/rpl/r/rpl_variables.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialization ==== [on master] SET @m_default_week_format= @@global.default_week_format; @@ -38,12 +34,7 @@ SET @@global.sql_mode = 'ALLOW_INVALID_DATES'; SET @@local.sql_mode = 'ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE'; SET @user_num = 10; SET @user_text = 'Alunda'; -[on master] -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc [on slave] SET @@global.init_slave = 'SELECT 1'; [on master] @@ -550,15 +541,7 @@ id truth num text 30 NULL 30 NULL 31 NULL NULL Bergsbrunna 32 NULL NULL Centrum -Comparing tables master:test.tstmt and master:test.tproc -Comparing tables master:test.tstmt and master:test.tfunc -Comparing tables master:test.tstmt and master:test.ttrig -Comparing tables master:test.tstmt and master:test.tprep -Comparing tables master:test.tstmt and slave:test.tstmt -Comparing tables master:test.tstmt and slave:test.tproc -Comparing tables master:test.tstmt and slave:test.tfunc -Comparing tables master:test.tstmt and slave:test.ttrig -Comparing tables master:test.tstmt and slave:test.tprep +include/diff_tables.inc [master:tstmt,tproc,tfunc,ttrig,tprep, slave:tstmt,tproc,tfunc,ttrig,tprep] ==== Clean up ==== [on master] DROP PROCEDURE proc; @@ -582,3 +565,4 @@ SET @@global.relay_log_purge= @s_relay_log_purge; SET @@global.slave_exec_mode= @s_slave_exec_mode; SET @@global.sql_mode= @s_sql_mode; SET @@global.sync_binlog= @s_sync_binlog; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_variables_stm.result b/mysql-test/suite/rpl/r/rpl_variables_stm.result index 51484187215..553a1710d77 100644 --- a/mysql-test/suite/rpl/r/rpl_variables_stm.result +++ b/mysql-test/suite/rpl/r/rpl_variables_stm.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Initialization ==== [on master] SET @m_pseudo_thread_id= @@global.pseudo_thread_id; @@ -490,15 +486,7 @@ id num text 56 NULL 47124712 57 NULL 1616 58 NULL 1717 -Comparing tables master:test.tstmt and master:test.tproc -Comparing tables master:test.tstmt and master:test.tfunc -Comparing tables master:test.tstmt and master:test.ttrig -Comparing tables master:test.tstmt and master:test.tprep -Comparing tables master:test.tstmt and slave:test.tstmt -Comparing tables master:test.tstmt and slave:test.tproc -Comparing tables master:test.tstmt and slave:test.tfunc -Comparing tables master:test.tstmt and slave:test.ttrig -Comparing tables master:test.tstmt and slave:test.tprep +include/diff_tables.inc [master:tstmt,tproc,tfunc,ttrig,tprep, slave:tstmt,tproc,tfunc,ttrig,tprep] ==== Clean up ==== [on master] DROP PROCEDURE proc; @@ -524,3 +512,4 @@ SET @@global.collation_server= @s_collation_server; SET @@global.time_zone= @s_time_zone; SET @@global.lc_time_names= @s_lc_time_names; SET @@global.collation_database= @s_collation_database; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_view.result b/mysql-test/suite/rpl/r/rpl_view.result index b129223b6d2..307b88ff6f9 100644 --- a/mysql-test/suite/rpl/r/rpl_view.result +++ b/mysql-test/suite/rpl/r/rpl_view.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1,v1; drop view if exists t1,v1; reset master; @@ -116,3 +112,4 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI DROP VIEW v1; DROP TABLE t1; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl000017-slave.sh b/mysql-test/suite/rpl/t/rpl000017-slave.sh deleted file mode 100755 index 1d95798260a..00000000000 --- a/mysql-test/suite/rpl/t/rpl000017-slave.sh +++ /dev/null @@ -1,12 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/log/*relay* -rm -f $MYSQLTEST_VARDIR/mysqld.2/data/relay-log.info -cat > $MYSQLTEST_VARDIR/mysqld.2/data/master.info < injects fault on MYSQL_BIN_LOG::open_index_file SET GLOBAL debug="+d,fault_injection_openning_index"; @@ -316,7 +317,8 @@ DELETE FROM t2; DROP TABLE t5; # restart the server so that we have binlog again --- source include/restart_mysqld.inc +--let $rpl_server_number= 1 +--source include/rpl_restart_server.inc -- echo ###################### TEST #12 @@ -342,7 +344,8 @@ DELETE FROM t2; DROP TABLE t5; # restart the server so that we have binlog again --- source include/restart_mysqld.inc +--let $rpl_server_number= 1 +--source include/rpl_restart_server.inc ## clean up SET GLOBAL debug= @old_debug; @@ -359,9 +362,7 @@ RESET MASTER; -- echo ####################################################################### ### setup --- connection master -# master-slave-reset starts the slave automatically --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection slave # slave suppressions @@ -404,12 +405,9 @@ call mtr.add_suppression("Can't generate a unique log-filename .*"); -- source include/io_thd_fault_injection.inc ### clean up --- disable_warnings --- source include/stop_slave.inc --- enable_warnings +-- source include/stop_slave_sql.inc SET GLOBAL debug=@old_debug; RESET SLAVE; RESET MASTER; --- source include/start_slave.inc --- connection master --- source include/master-slave-end.inc +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test index 4c6402359fe..a20853e35a9 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_grant.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test @@ -41,3 +41,4 @@ show grants for x@y; drop user x@y; drop database d1; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test index 9dca61d8f75..265bde2ccf6 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test @@ -69,16 +69,17 @@ if (`SELECT @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`) CONCAT($data, $data, $data, $data, $data, $data)); # Below code fakes the result of 'ROW' mode. --echo Got one of the listed errors - --echo --source include/wait_for_slave_sql_error_and_skip.inc - --echo include/start_slave.inc + # Ensure same message as in the case binlog_format=row below + --echo include/wait_for_slave_sql_error_and_skip.inc [errno=1590] } if (`SELECT @@binlog_format = 'ROW'`) { --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE eval INSERT INTO t2 (a, data) VALUES (2, CONCAT($data, $data, $data, $data, $data, $data)); - # Incident event - --let $slave_sql_errno=1590 + + # 1590=ER_SLAVE_INCIDENT + --let $slave_sql_errno= 1590 --source include/wait_for_slave_sql_error_and_skip.inc } --enable_warnings @@ -101,8 +102,8 @@ eval UPDATE t2, t1 SET t2.data = CONCAT($data, $data, $data, $data), t1.data = CONCAT($data, $data, $data, $data); --enable_query_log -# Incident event ---let $slave_sql_errno=1590 +# 1590=ER_SLAVE_INCIDENT +--let $slave_sql_errno= 1590 --source include/wait_for_slave_sql_error_and_skip.inc #--echo ######################################################################################## @@ -192,8 +193,9 @@ BEGIN; CREATE TABLE t5 (a int); --enable_query_log -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 3 - BEGIN - COMMIT @@ -221,8 +223,9 @@ BEGIN; --enable_query_log COMMIT; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 4 - BEGIN - ROLLBACK @@ -250,8 +253,9 @@ BEGIN; --enable_query_log ROLLBACK; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 5 - PROCEDURE @@ -299,8 +303,9 @@ eval CALL p1($data); --enable_query_log ROLLBACK; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 6 - XID @@ -330,8 +335,9 @@ SAVEPOINT sv; ROLLBACK TO sv; COMMIT; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 7 - NON-TRANS TABLE @@ -374,8 +380,8 @@ BEGIN; --enable_query_log COMMIT; -# Incident event ---let $slave_sql_errno=1590 +# 1590=ER_SLAVE_INCIDENT +--let $slave_sql_errno= 1590 --source include/wait_for_slave_sql_error_and_skip.inc sync_slave_with_master; @@ -420,7 +426,7 @@ while ($n) --enable_query_log COMMIT; -connection slave; +--connection slave --let $slave_sql_errno= 1197 source include/wait_for_slave_sql_error.inc; @@ -443,14 +449,16 @@ SELECT count(*) FROM t1; --echo # CLEAN --echo ######################################################################################## ---disable_warnings connection master; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; +# t4 exists only if binlog_format!=row, so so a warning is generated +# if binog_format=row +--disable_warnings DROP TABLE IF EXISTS t4; -DROP TABLE IF EXISTS t5; -DROP TABLE IF EXISTS t6; -DROP PROCEDURE p1; --enable_warnings -source include/master-slave-end.inc; +DROP TABLE t5; +DROP PROCEDURE p1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bit.test b/mysql-test/suite/rpl/t/rpl_bit.test index 07b0778296c..2ee4074c4e3 100644 --- a/mysql-test/suite/rpl/t/rpl_bit.test +++ b/mysql-test/suite/rpl/t/rpl_bit.test @@ -92,3 +92,4 @@ DROP TABLE IF EXISTS test.t1; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bit_npk.test b/mysql-test/suite/rpl/t/rpl_bit_npk.test index 12b587919f9..40f375b92f3 100644 --- a/mysql-test/suite/rpl/t/rpl_bit_npk.test +++ b/mysql-test/suite/rpl/t/rpl_bit_npk.test @@ -114,3 +114,4 @@ DROP TABLE IF EXISTS test.t3; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_blackhole.test b/mysql-test/suite/rpl/t/rpl_blackhole.test index 6bf66422d62..d39df0cbde4 100644 --- a/mysql-test/suite/rpl/t/rpl_blackhole.test +++ b/mysql-test/suite/rpl/t/rpl_blackhole.test @@ -82,3 +82,4 @@ source extra/rpl_tests/rpl_blackhole.test; connection master; DROP TABLE t1,t2; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug26395.test b/mysql-test/suite/rpl/t/rpl_bug26395.test index 97c152d52e9..aeb0da9511d 100644 --- a/mysql-test/suite/rpl/t/rpl_bug26395.test +++ b/mysql-test/suite/rpl/t/rpl_bug26395.test @@ -95,3 +95,5 @@ connection slave; DROP TABLE tinnodb; # Warning: do not add more tests here. The binlog is in a bad state. +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug31076.test b/mysql-test/suite/rpl/t/rpl_bug31076.test index 9176bafe022..d81d646ebe3 100644 --- a/mysql-test/suite/rpl/t/rpl_bug31076.test +++ b/mysql-test/suite/rpl/t/rpl_bug31076.test @@ -134,3 +134,4 @@ SELECT * FROM visits_events; DROP DATABASE track; sync_slave_with_master; --echo End of 5.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug33931.test b/mysql-test/suite/rpl/t/rpl_bug33931.test index 3327a36622c..c2cf5811938 100644 --- a/mysql-test/suite/rpl/t/rpl_bug33931.test +++ b/mysql-test/suite/rpl/t/rpl_bug33931.test @@ -3,23 +3,14 @@ # Bug #33932 assertion at handle_slave_sql if init_slave_thread() fails source include/have_debug.inc; -source include/have_log_bin.inc; - -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); - - -connection master; -reset master; +source include/master-slave.inc; connection slave; # Add suppression for expected warnings in slaves error log call mtr.add_suppression("Failed during slave I/O thread initialization"); ---disable_warnings -stop slave; ---enable_warnings +--source include/stop_slave.inc reset slave; # Set debug flags on slave to force errors to occur @@ -27,18 +18,13 @@ SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_ start slave; -connection master; -save_master_pos; -connection slave; - # # slave is going to stop because of emulated failures # but there won't be any crashes nor asserts hit. # -source include/wait_for_slave_to_stop.inc; # 1593 = ER_SLAVE_FATAL_ERROR ---let $slave_sql_errno= 1593 +--let $slave_sql_errno= 1593 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc @@ -47,3 +33,8 @@ source include/wait_for_slave_to_stop.inc; # SET GLOBAL debug=""; +# Clear Last_SQL_Error +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug38694.test b/mysql-test/suite/rpl/t/rpl_bug38694.test index 41b11d271b9..48f950ad6ef 100644 --- a/mysql-test/suite/rpl/t/rpl_bug38694.test +++ b/mysql-test/suite/rpl/t/rpl_bug38694.test @@ -8,3 +8,4 @@ source include/master-slave.inc; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test index 33bd9d51b11..65af5e72865 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master.test +++ b/mysql-test/suite/rpl/t/rpl_change_master.test @@ -49,3 +49,4 @@ connection slave; sync_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_charset.test b/mysql-test/suite/rpl/t/rpl_charset.test index ed0d835f22d..3ed9147508e 100644 --- a/mysql-test/suite/rpl/t/rpl_charset.test +++ b/mysql-test/suite/rpl/t/rpl_charset.test @@ -1,3 +1,2 @@ let $engine_type=myisam; source extra/rpl_tests/rpl_charset.test; - diff --git a/mysql-test/suite/rpl/t/rpl_charset_sjis.test b/mysql-test/suite/rpl/t/rpl_charset_sjis.test index 2469b0db8a2..a3a3de8c1d0 100644 --- a/mysql-test/suite/rpl/t/rpl_charset_sjis.test +++ b/mysql-test/suite/rpl/t/rpl_charset_sjis.test @@ -23,3 +23,4 @@ sync_slave_with_master; connection master; # End of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf index 141aaa7788d..104963c7d82 100644 --- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf +++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf @@ -17,11 +17,8 @@ log-slave-updates innodb [ENV] -SLAVE_MYPORT1= @mysqld.3.port -SLAVE_MYSOCK1= @mysqld.3.socket - -SLAVE_MYPORT2= @mysqld.4.port -SLAVE_MYSOCK2= @mysqld.4.socket - - +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYSOCK_3= @mysqld.3.socket +SERVER_MYPORT_4= @mysqld.4.port +SERVER_MYSOCK_4= @mysqld.4.socket diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test index 3633462d68e..6099637e3e9 100644 --- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test +++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test @@ -1,24 +1,32 @@ -############################################################# -# Author: Serge Kozlov -# Date: 03/12/2008 -# Purpose: Testing circular replication based on schema -# A->B->C->D->A with using AUTO_INCREMENT_INCREMENT, -# AUTO_INCREMENT_OFFSET variables and failover -############################################################# +# ==== Purpose ==== +# +# Setup: circular replication on four hosts, i.e., topology +# server_1 -> server_2 -> server_3 -> server_4 -> server_1 +# +# Tested properties: +# - Correctly configured autoinc works. +# - Manual failover works. +# +# ==== Related bugs and worklogs ==== +# +# WL#3754 +# BUG#49978 + --source include/have_innodb.inc # Set up circular ring and new names for servers ---echo *** Set up circular ring by schema A->B->C->D->A *** ---source include/circular_rpl_for_4_hosts_init.inc +--echo *** Set up circular replication on four servers *** +--let $rpl_topology= 1->2->3->4->1 +--source include/rpl_init.inc --echo # Preparing data. --echo *** Preparing data *** ---connection master_a +--connection server_1 CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB; ---source include/circular_rpl_for_4_hosts_sync.inc ---connection master_d +--source include/rpl_sync.inc +--connection server_4 --echo # @@ -28,121 +36,134 @@ CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, --echo *** Testing schema A->B->C->D->A *** --echo # insert data via all hosts ---connection master_a +--connection server_1 INSERT INTO t1(b,c) VALUES('A',1); ---sync_slave_with_master master_b +--sync_slave_with_master server_2 INSERT INTO t1(b,c) VALUES('B',1); ---sync_slave_with_master master_c +--sync_slave_with_master server_3 INSERT INTO t1(b,c) VALUES('C',1); ---sync_slave_with_master master_d +--sync_slave_with_master server_4 INSERT INTO t1(b,c) VALUES('D',1); ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 1 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 1 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 1 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 1 ORDER BY a,b; --echo --echo *** Testing schema A->B->D->A if C has failure *** --echo --echo * Do failure for C and then make new connection B->D * + +# Note: server_N has auto_increment_offset=N. Below, we insert value 6 +# in the autoinc column on server_3 (and prevent it from replicating +# further using SQL_SLAVE_SKIP_COUNTER on server_4). Due to the +# auto_increment_offset setting, the autoinc value 6 is normally +# generated on server_2. When we later insert a row on server_2, we +# thus cause a duplicate key error on server_3. + # Do not replicate next event from C ---connection master_d -connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2); +--connection server_4 STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; source include/start_slave.inc; -disconnect slave; ---connection master_c +--connection server_3 INSERT INTO t1 VALUES(6,'C',2); ---save_master_pos ---connection master_b +--sync_slave_with_master server_4 + +--connection server_2 INSERT INTO t1(b,c) VALUES('B',2); # Wait while C will stop. ---connection master_c -source include/wait_for_slave_sql_to_stop.inc; ---connection master_a +--connection server_3 +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error.inc +--connection server_1 INSERT INTO t1(b,c) VALUES('A',2); ---connection master_d +--connection server_4 INSERT INTO t1(b,c) VALUES('D',2); # Sync all servers except C ---connection master_b +--connection server_2 let $wait_condition= SELECT COUNT(*)=3 FROM t1 WHERE a > 4; +--let $server_connection= server_1 --source include/wait_condition.inc --echo --echo * Data on servers (C failed) * # Masters C,D shouldn't have correct data ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 2 ORDER BY a,b; --echo --echo * Reconfigure replication to schema A->B->D->A * # Exclude Master C ---connection master_c -STOP SLAVE; +--connection server_3 +--source include/stop_slave_io.inc --let $pos_c= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1) --let $file_c= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1) ---connection master_d -STOP SLAVE; ---replace_result $SLAVE_MYPORT MASTER_B_PORT $file_c LOG_FILE $pos_c LOG_POS ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT,master_user='root',master_log_file='$file_c',master_log_pos=$pos_c -connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2); + +--connection server_4 +--source include/stop_slave.inc + +--let $rpl_topology= 1->2->4->1,2->3 +--let $rpl_master_log_file= 4:$file_c +--let $rpl_master_log_pos= 4:$pos_c +--source include/rpl_change_topology.inc + +#--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2 $file_c LOG_FILE $pos_c LOG_POS +#--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SERVER_MYPORT_2,master_user='root',master_log_file='$file_c',master_log_pos=$pos_c source include/start_slave.inc; -disconnect slave; ---connection master_b ---sync_slave_with_master master_d ---sync_slave_with_master master_a +--connection server_2 +--sync_slave_with_master server_4 +--sync_slave_with_master server_1 --echo --echo * Check data inserted before failure * ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 2 ORDER BY a,b; --echo --echo * Check data inserted after failure * ---connection master_a +--connection server_1 INSERT INTO t1(b,c) VALUES('A',3); ---connection master_b +--connection server_2 INSERT INTO t1(b,c) VALUES('B',3); ---connection master_d +--connection server_4 INSERT INTO t1(b,c) VALUES('D',3); -connection master_a; +connection server_1; ---sync_slave_with_master master_b ---sync_slave_with_master master_d ---sync_slave_with_master master_a ---sync_slave_with_master master_b +--let $rpl_only_running_threads= 1 +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_a +--connection server_1 --echo --echo *** Testing restoring scheme A->B->C->D->A after failure *** @@ -150,158 +171,150 @@ SELECT 'Master D',a,b FROM t1 WHERE c = 3 ORDER BY a,b; # Master D will ignore a next event from C so that event will not be # distributed to other servers --echo * Remove wrong event from C and restore B->C->D * ---connection master_d +--connection server_4 source include/stop_slave.inc; ---connection master_c +--connection server_3 DELETE FROM t1 WHERE a = 6; START SLAVE; ---connection master_b ---sync_slave_with_master master_c +--connection server_2 +--sync_slave_with_master server_3 RESET MASTER; --let $file_d= query_get_value(SHOW MASTER STATUS, File, 1) --let $pos_d= query_get_value(SHOW MASTER STATUS, Position, 1) ---connection master_d +--connection server_4 RESET SLAVE; ---replace_result $SLAVE_MYPORT1 MASTER_C_PORT $file_d LOG_FILE $pos_d LOG_POS ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT1,master_user='root',master_log_file='$file_d',master_log_pos=$pos_d +--let $rpl_topology= 1->2->3->4->1 +--let $rpl_master_log_file= 4:$file_d +--let $rpl_master_log_pos= 4:$pos_d +--source include/rpl_change_topology.inc +#--replace_result $SERVER_MYPORT_3 SERVER_MYPORT_3 $file_d LOG_FILE $pos_d LOG_POS +#--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SERVER_MYPORT_3,master_user='root',master_log_file='$file_d',master_log_pos=$pos_d START SLAVE; ---connection master_c ---sync_slave_with_master master_d ---source include/circular_rpl_for_4_hosts_sync.inc +--connection server_3 +--sync_slave_with_master server_4 +--source include/rpl_sync.inc --echo --echo * Check data inserted before restoring schema A->B->C->D->A * ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_b +--sync_slave_with_master server_2 SELECT 'Master B',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_c +--sync_slave_with_master server_3 SELECT 'Master C',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_d +--sync_slave_with_master server_4 SELECT 'Master D',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_a +--sync_slave_with_master server_1 --echo --echo * Check data inserted after restoring schema A->B->C->D->A * ---connection master_a +--connection server_1 INSERT INTO t1(b,c) VALUES('A',4); ---connection master_b +--connection server_2 INSERT INTO t1(b,c) VALUES('B',4); ---connection master_c +--connection server_3 INSERT INTO t1(b,c) VALUES('C',4); ---connection master_d +--connection server_4 INSERT INTO t1(b,c) VALUES('D',4); ---connection master_a +--connection server_1 ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_a +--connection server_1 --echo --echo * Transactions with commits * # Testing mixing of transactions and regular inserts ---connection master_a +--connection server_1 BEGIN; ---connection master_c +--connection server_3 BEGIN; let $counter= 100; ---connection master_a +--connection server_1 --disable_query_log while ($counter) { - --connection master_a + --connection server_1 INSERT INTO t2(b,c) VALUES('A',1); - --connection master_b + --connection server_2 INSERT INTO t2(b,c) VALUES('B',1); - --connection master_c + --connection server_3 INSERT INTO t2(b,c) VALUES('C',1); - --connection master_d + --connection server_4 INSERT INTO t2(b,c) VALUES('D',1); dec $counter; } ---connection master_a +--connection server_1 COMMIT; ---connection master_c +--connection server_3 COMMIT; ---connection master_a +--connection server_1 --enable_query_log ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_b +--connection server_2 SELECT 'Master B',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_c +--connection server_3 SELECT 'Master C',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_d +--connection server_4 SELECT 'Master D',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_a +--connection server_1 --echo --echo * Transactions with rollbacks * # Testing mixing of transactions with rollback and regular inserts ---connection master_a +--connection server_1 BEGIN; ---connection master_c +--connection server_3 BEGIN; let $counter= 100; ---connection master_a +--connection server_1 --disable_query_log while ($counter) { - --connection master_a + --connection server_1 INSERT INTO t2(b,c) VALUES('A',2); - --connection master_b + --connection server_2 INSERT INTO t2(b,c) VALUES('B',2); - --connection master_c + --connection server_3 INSERT INTO t2(b,c) VALUES('C',2); - --connection master_d + --connection server_4 INSERT INTO t2(b,c) VALUES('D',2); dec $counter; } ---connection master_a +--connection server_1 ROLLBACK; ---connection master_c +--connection server_3 ROLLBACK; ---connection master_a +--connection server_1 --enable_query_log ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_b +--connection server_2 SELECT 'Master B',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_c +--connection server_3 SELECT 'Master C',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_d +--connection server_4 SELECT 'Master D',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_a +--connection server_1 --echo # Clean up --echo *** Clean up *** ---connection master_a +--connection server_1 DROP TABLE t1,t2; ---source include/circular_rpl_for_4_hosts_sync.inc ---connection master_a -STOP SLAVE; -RESET SLAVE; ---connection master_b -STOP SLAVE; -RESET SLAVE; ---connection master_c -STOP SLAVE; -RESET SLAVE; ---connection master_d -STOP SLAVE; -RESET SLAVE; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_colSize.test b/mysql-test/suite/rpl/t/rpl_colSize.test index c20f2c3fd35..0a64817bf36 100644 --- a/mysql-test/suite/rpl/t/rpl_colSize.test +++ b/mysql-test/suite/rpl/t/rpl_colSize.test @@ -218,3 +218,4 @@ DROP TABLE t1; sync_slave_with_master; # END 5.1 Test Case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_commit_after_flush.test b/mysql-test/suite/rpl/t/rpl_commit_after_flush.test index 47df391d6be..5e070b14301 100644 --- a/mysql-test/suite/rpl/t/rpl_commit_after_flush.test +++ b/mysql-test/suite/rpl/t/rpl_commit_after_flush.test @@ -1,12 +1,6 @@ -##################################### -# Wrapper for rpl_commit_after_flush# -##################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc -- source include/master-slave.inc let $engine_type=innodb; -- source extra/rpl_tests/rpl_commit_after_flush.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error.test b/mysql-test/suite/rpl/t/rpl_concurrency_error.test index da2951afb1a..a5c77e830d6 100644 --- a/mysql-test/suite/rpl/t/rpl_concurrency_error.test +++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test @@ -125,13 +125,11 @@ while ($type) connection master; sync_slave_with_master; -connection master; -let $diff_statement= SELECT * FROM t order by i; -source include/diff_master_slave.inc; +let $rpl_diff_statement= SELECT * FROM t order by i; +source include/rpl_diff.inc; -connection master; -let $diff_statement= SELECT * FROM n order by d, f; -source include/diff_master_slave.inc; +let $rpl_diff_statement= SELECT * FROM n order by d, f; +source include/rpl_diff.inc; --echo ######################################################################## --echo # Cleanup @@ -147,3 +145,4 @@ sync_slave_with_master; connection master; disconnect conn1; disconnect conn2; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_conditional_comments.test b/mysql-test/suite/rpl/t/rpl_conditional_comments.test index 14251d5eb37..88adf3a20f1 100644 --- a/mysql-test/suite/rpl/t/rpl_conditional_comments.test +++ b/mysql-test/suite/rpl/t/rpl_conditional_comments.test @@ -26,15 +26,15 @@ let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); source include/show_binlog_events.inc; let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo --echo # Case 2: --echo # ----------------------------------------------------------------- --echo # Verify whether it can be binlogged correctly when executing prepared --echo # statement. +--connection master PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/'; EXECUTE stmt; DROP TABLE t1; @@ -42,10 +42,10 @@ CREATE TABLE t1(c1 INT); EXECUTE stmt; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc +--connection master --echo SET @value=62; PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; @@ -58,17 +58,17 @@ source include/show_binlog_events.inc; let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo --echo # Case 3: --echo # ----------------------------------------------------------------- --echo # Verify it can restore the '!', if the it is an uncomplete conditional --echo # comments +--connection master --error 1064 SELECT c1 FROM /*!99999 t1 WHEREN; DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_database.test b/mysql-test/suite/rpl/t/rpl_create_database.test index e3e2e637594..5eac3de0d15 100644 --- a/mysql-test/suite/rpl/t/rpl_create_database.test +++ b/mysql-test/suite/rpl/t/rpl_create_database.test @@ -70,3 +70,4 @@ DROP DATABASE IF EXISTS mysqltest_bob; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test index cf26e58c3ec..12183531677 100644 --- a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test @@ -147,4 +147,4 @@ sync_slave_with_master; connection master; DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test index a06dfa54cb1..daf6b7e9ad8 100644 --- a/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test @@ -38,4 +38,4 @@ CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp; source include/show_binlog_events.inc; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_critical_errors.test b/mysql-test/suite/rpl/t/rpl_critical_errors.test index aa1f251b738..bc0d7096f80 100644 --- a/mysql-test/suite/rpl/t/rpl_critical_errors.test +++ b/mysql-test/suite/rpl/t/rpl_critical_errors.test @@ -35,7 +35,7 @@ connection master1; # This sleep is picked so that the query above has started to insert # some rows into t2. If it hasn't the slave will not stop below. let $wait_condition= SELECT COUNT(*) > 1000 FROM t1; -source include/wait_condition.inc +--source include/wait_condition.inc # SHOW PROCESSLIST; @@ -62,4 +62,5 @@ connection slave; # The following should be 0 SELECT COUNT(*) FROM t2; +--source include/rpl_end.inc enable_parsing; diff --git a/mysql-test/suite/rpl/t/rpl_cross_version.test b/mysql-test/suite/rpl/t/rpl_cross_version.test index 8cd268a5fd9..d3e834b5358 100644 --- a/mysql-test/suite/rpl/t/rpl_cross_version.test +++ b/mysql-test/suite/rpl/t/rpl_cross_version.test @@ -10,7 +10,7 @@ # The master's binlog is treated as a relay log that the SQL thread executes. # ---source include/have_log_bin.inc +--source include/master-slave.inc # The test is disabled for windows due to # Bug #42879 CHANGE MASTER RELAY_LOG_FILE=path fails on windows @@ -22,6 +22,10 @@ # --echo ==== Initialize ==== +--connection slave +--source include/stop_slave.inc +RESET SLAVE; + # the relay log contains create t1, t3 tables and load data infile --let $fake_relay_log = $MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001 --source include/setup_fake_relay_log.inc @@ -36,6 +40,8 @@ start slave sql_thread; SELECT COUNT(*) - 17920 as zero FROM t3; --echo ==== Clean up ==== -stop slave sql_thread; +--source include/stop_slave_sql.inc --source include/cleanup_fake_relay_log.inc drop table t1, t3; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_current_user.cnf b/mysql-test/suite/rpl/t/rpl_current_user.cnf index 999ee727a88..58b605ad928 100644 --- a/mysql-test/suite/rpl/t/rpl_current_user.cnf +++ b/mysql-test/suite/rpl/t/rpl_current_user.cnf @@ -1,9 +1,8 @@ !include ../my.cnf [mysqld.3] -server-id=3 -log-bin=slave-bin +log-slave-updates [ENV] -SLAVE_MYPORT1= @mysqld.3.port -SLAVE_MYSOCK1= @mysqld.3.socket +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYSOCK_3= @mysqld.3.socket diff --git a/mysql-test/suite/rpl/t/rpl_current_user.test b/mysql-test/suite/rpl/t/rpl_current_user.test index 72581ed7049..bdb53cbcdfe 100644 --- a/mysql-test/suite/rpl/t/rpl_current_user.test +++ b/mysql-test/suite/rpl/t/rpl_current_user.test @@ -10,34 +10,22 @@ # 'ALTER EVENT'. # ############################################################################## -source include/master-slave.inc; + source include/have_binlog_format_statement.inc; ---echo ---echo # On slave2 -connect (slave2,127.0.0.1,root,,test,$SLAVE_MYPORT1,); -connection slave2; +--let $rpl_topology= 1->2->3 +--source include/rpl_init.inc ---echo # Connect slave2 to slave ---replace_result $SLAVE_MYPORT SLAVE_MYPORT; -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, - MASTER_LOG_FILE='slave-bin.000001', MASTER_USER='root'; -START SLAVE; -source include/wait_for_slave_to_start.inc; +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc + +--let $rpl_connection_name= slave +--let $rpl_server_number= 2 +--source include/rpl_connect.inc + +--connection master ---echo ---echo # [On master] -connection master; ---disable_warnings -DROP VIEW IF EXISTS v_user; -DROP VIEW IF EXISTS v_tables_priv; -DROP VIEW IF EXISTS v_procs_priv; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS my_grant; -DROP PROCEDURE IF EXISTS my_revoke; -DROP FUNCTION IF EXISTS my_user; -DROP EVENT IF EXISTS e1; ---enable_warnings CREATE TABLE t1(c1 char(100)); CREATE VIEW test.v_user AS SELECT * FROM mysql.user WHERE User LIKE 'bug48321%'; CREATE VIEW test.v_tables_priv AS SELECT * FROM mysql.tables_priv WHERE User LIKE 'bug48321%'; @@ -63,75 +51,76 @@ connection conn1; --echo # [On conn1] --echo # Verify 'REVOKE ALL' statement REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(); -let $diff_table= test.v_user; -let $diff_server_list= master, slave, slave2; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ... ON TABLE ...' statement -connection conn1; GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ... ON PROCEDURE...' statement -connection conn1; GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER(); -let $diff_table= test.v_procs_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ... ON *.* ...' statement -connection conn1; GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() WITH GRANT OPTION; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON TABLE ...' statement -connection conn1; REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON PROCEDURE...' statement -connection conn1; REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(); -let $diff_table= test.v_procs_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON *.* ...' statement -connection conn1; REVOKE ALL PRIVILEGES ON *.* FROM CURRENT_USER(); -let $diff_table= test.v_user; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ...' statement in the procedure -connection conn1; CREATE PROCEDURE my_grant() GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); call my_grant; -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON TABLE ...' statement in the procedure -connection conn1; CREATE PROCEDURE my_revoke() REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); call my_revoke; -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'RENAME USER ...' statement -connection conn1; RENAME USER CURRENT_USER TO 'bug48321_2'@'localhost'; -let $diff_table= test.v_user; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; disconnect conn1; @@ -142,7 +131,9 @@ GRANT CREATE USER ON *.* TO 'bug48321_2'@'localhost'; connect (conn1, 127.0.0.1, 'bug48321_2'@'localhost',,); connection conn1; DROP USER CURRENT_USER(); -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; --echo --echo # Verify 'ALTER EVENT...' statement @@ -151,16 +142,17 @@ CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT * FROM t1; --echo # Explicitly assign CURRENT_USER() to definer ALTER DEFINER=CURRENT_USER() EVENT e1 ENABLE; -let $diff_table= test.v_event; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_event, server_2:v_event, server_3:v_event; +source include/diff_tables.inc; -connection master; --echo --echo # Session user will be set as definer, if the statement does not assign --echo # a definer ALTER EVENT e1 ENABLE; -sync_slave_with_master; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_event, server_2:v_event, server_3:v_event; +source include/diff_tables.inc; --echo --echo # Verify that this patch does not affect the calling of CURRENT_USER() @@ -172,8 +164,8 @@ SELECT * FROM t1; sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; ---echo # [On slave2] -sync_slave_with_master slave2; +--echo # [On server_3] +sync_slave_with_master server_3; SELECT * FROM t1; connection master; @@ -183,8 +175,8 @@ SELECT * FROM t1; sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; -sync_slave_with_master slave2; ---echo # [On slave2] +sync_slave_with_master server_3; +--echo # [On server_3] SELECT * FROM t1; connection master; @@ -194,8 +186,8 @@ SELECT * FROM t1; sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; -sync_slave_with_master slave2; ---echo # [On slave2] +sync_slave_with_master server_3; +--echo # [On server_3] SELECT * FROM t1; connection master; @@ -218,8 +210,8 @@ sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; SELECT * FROM t2; -sync_slave_with_master slave2; ---echo # [On slave2] +sync_slave_with_master server_3; +--echo # [On server_3] SELECT * FROM t1; SELECT * FROM t2; @@ -233,6 +225,5 @@ DROP PROCEDURE my_grant; DROP PROCEDURE my_revoke; DROP FUNCTION my_user; DROP EVENT e1; -sync_slave_with_master; -sync_slave_with_master slave2; -source include/master-slave-end.inc; +--source include/rpl_end.inc + diff --git a/mysql-test/suite/rpl/t/rpl_ddl.test b/mysql-test/suite/rpl/t/rpl_ddl.test index 80df16a7a00..83a530131a6 100644 --- a/mysql-test/suite/rpl/t/rpl_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_ddl.test @@ -30,3 +30,4 @@ let $temp_engine_type= MEMORY; let $show_binlog = 0; let $manipulate = 0; -- source extra/rpl_tests/rpl_ddl.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test b/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test index ee907f81b22..b2d4e42a973 100644 --- a/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test @@ -1,10 +1,3 @@ -################################ -# Wrapper for rpl_deadlock.test# -################################ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_delete_no_where.test b/mysql-test/suite/rpl/t/rpl_delete_no_where.test index 64a293b4058..4bfe6d07b5a 100644 --- a/mysql-test/suite/rpl/t/rpl_delete_no_where.test +++ b/mysql-test/suite/rpl/t/rpl_delete_no_where.test @@ -5,3 +5,4 @@ -- source include/master-slave.inc let $engine_type=myisam; -- source extra/rpl_tests/rpl_delete_no_where.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index c65eef6e939..7b535637658 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -224,7 +224,9 @@ DROP USER 'create_rout_db'@'localhost'; # finish entire clean up (remove binlogs) # so that we leave a pristine environment for the # following tests --- source include/master-slave-reset.inc +--let $rpl_only_running_threads= 1 +-- source include/rpl_reset.inc +USE test; # BUG#49119: Master crashes when executing 'REVOKE ... ON # {PROCEDURE|FUNCTION} FROM ...' @@ -249,7 +251,7 @@ DROP USER 'create_rout_db'@'localhost'; -- echo ######## BUG#49119 ####### -- echo ### i) test case from the 'how to repeat section' --- source include/master-slave-reset.inc + -- connection master CREATE TABLE t1(c1 INT); @@ -270,7 +272,7 @@ DROP PROCEDURE p1; -- echo ### ii) Test case in which REVOKE partially succeeds -- connection master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master CREATE TABLE t1(c1 INT); @@ -330,8 +332,7 @@ DROP USER 'user49119'@'localhost'; # Bug #51987 revoke privileges logs wrong error code # --- connection master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master grant all on *.* to foo@"1.2.3.4"; @@ -345,11 +346,7 @@ revoke all privileges, grant option from "foo"; ## assertion: slave replicates revoke and does not fail because master ## logged revoke with correct expected error code --- let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1) - if ($err) -{ - -- die UNEXPECTED ERROR AT SLAVE: $err -} +--source include/check_slave_no_error.inc -- connection master DROP USER foo@"1.2.3.4"; @@ -357,8 +354,7 @@ DROP USER foo@"1.2.3.4"; --echo --echo # Bug#27606 GRANT statement should be replicated with DEFINER information ---connection master ---source include/master-slave-reset.inc +--source include/rpl_reset.inc --connection master GRANT SELECT, INSERT ON mysql.user TO user_bug27606@localhost; @@ -375,5 +371,5 @@ SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606'; --connection master DROP USER user_bug27606@localhost; ---source include/master-slave-end.inc --echo "End of test" +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop.test b/mysql-test/suite/rpl/t/rpl_drop.test index 336edad6fc5..748a5759513 100644 --- a/mysql-test/suite/rpl/t/rpl_drop.test +++ b/mysql-test/suite/rpl/t/rpl_drop.test @@ -2,15 +2,12 @@ # exist, must be binlogged with a non-zero error code) source include/master-slave.inc; source include/have_innodb.inc; ---disable_warnings -drop table if exists t1, t2; ---enable_warnings + create table t1 (a int); --error 1051 drop table t1, t2; -save_master_pos; -connection slave; -sync_with_master; +--sync_slave_with_master + # End of 4.1 tests # BUG#55625 RBR breaks on failing 'CREATE TABLE' @@ -65,3 +62,5 @@ SET @@global.binlog_format= @old_binlog_format; SET @@global.binlog_format= @old_binlog_format; # End of 5.1 tests + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_db.test b/mysql-test/suite/rpl/t/rpl_drop_db.test index 11e93e7307a..c3194f08f52 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_db.test +++ b/mysql-test/suite/rpl/t/rpl_drop_db.test @@ -58,4 +58,5 @@ drop table t1; drop database mysqltest1; sync_slave_with_master; -source include/stop_slave.inc; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test index f2a4dd70da6..0b6d1458893 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_temp.test +++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test @@ -67,3 +67,4 @@ connection master; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_view.test b/mysql-test/suite/rpl/t/rpl_drop_view.test index 11633a0a7e8..99c5edb928d 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_view.test +++ b/mysql-test/suite/rpl/t/rpl_drop_view.test @@ -34,3 +34,4 @@ select * from v3; connection master; drop table t1, t2, t3; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test index ab1de6a2e9f..618576f5641 100644 --- a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test +++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test @@ -6,33 +6,21 @@ # of their server id). # It also will test BUG#13861. -source include/master-slave.inc; source include/have_innodb.inc; - -# set up "dual head" - -# Needed for debug info in wait_for_slave_sql_to_stop. -let $master_connection= slave; -connection slave; -reset master; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"; - -source include/start_slave.inc; +--let $rpl_topology= 1->2->1 +--source include/rpl_init.inc # now we test it -connection slave; +connection server_2; create table t1 (n int); let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1); let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1); let $master_log_pos_1= `SELECT $master_log_pos_1 + 3`; -sync_slave_with_master master; +--sync_slave_with_master server_1 # # BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if @@ -42,7 +30,7 @@ source include/stop_slave.inc; create table t2 (n int); # create one ignored event -sync_slave_with_master; +--sync_slave_with_master server_2 show tables; @@ -59,7 +47,8 @@ insert into t3 values(3); commit; insert into t3 values(4); -connection master; + +connection server_1; # bug is that START SLAVE UNTIL may stop too late, we test that by # asking it to stop before creation of t3. @@ -89,26 +78,20 @@ source include/start_slave.inc; # BUG#13023 is that Exec_master_log_pos may stay too low "forever": -connection master; +connection server_1; create table t4 (n int); # create 3 ignored events create table t5 (n int); create table t6 (n int); -sync_slave_with_master; -sync_slave_with_master master; +--sync_slave_with_master server_2 # then BUG#13023 caused hang below ("master" looks behind, while it's # not in terms of updates done). +--sync_slave_with_master server_1 show tables; # cleanup - -source include/stop_slave.inc; -reset slave; -drop table t1,t2,t3,t4,t5,t6; - -sync_slave_with_master; - -# End of 4.1 tests +drop table t1, t2, t3, t4, t5, t6; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_empty_master_crash.test b/mysql-test/suite/rpl/t/rpl_empty_master_crash.test index 863b450a6d9..a657b82fc94 100644 --- a/mysql-test/suite/rpl/t/rpl_empty_master_crash.test +++ b/mysql-test/suite/rpl/t/rpl_empty_master_crash.test @@ -10,3 +10,4 @@ connection slave; load table t1 from master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test index f358c0ee356..01ef5298e48 100644 --- a/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test +++ b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test @@ -62,3 +62,6 @@ DROP TABLE test.t4; sync_slave_with_master; # End of 4.1 tests # Adding comment for force manual merge 5.0 -> wl1012. delete me if needed + + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_events.test b/mysql-test/suite/rpl/t/rpl_events.test index 327ad9bf22c..ed5ebd3dbc4 100644 --- a/mysql-test/suite/rpl/t/rpl_events.test +++ b/mysql-test/suite/rpl/t/rpl_events.test @@ -111,3 +111,4 @@ DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test b/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test deleted file mode 100644 index e9685baf01b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test +++ /dev/null @@ -1,13 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-08 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using innodb -########################################### --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc --- source include/master-slave.inc -let $engine_type = 'InnoDB'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test b/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test deleted file mode 100644 index d56df394ccf..00000000000 --- a/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test +++ /dev/null @@ -1,12 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-07 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using MyISAM -########################################### --- source include/have_binlog_format_row.inc --- source include/master-slave.inc -let $engine_type = 'MyISAM'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test b/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test similarity index 66% rename from mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test rename to mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test index 5255a9cfbad..11211e51286 100644 --- a/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test @@ -7,10 +7,11 @@ let $engine_type = 'InnoDB'; set binlog_format=row; --- source extra/rpl_tests/rpl_extraMaster_Col.test +-- source extra/rpl_tests/rpl_extra_col_master.test set binlog_format=statement; --- source extra/rpl_tests/rpl_extraMaster_Col.test +-- source extra/rpl_tests/rpl_extra_col_master.test set binlog_format=mixed; --- source extra/rpl_tests/rpl_extraMaster_Col.test +-- source extra/rpl_tests/rpl_extra_col_master.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test b/mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test similarity index 64% rename from mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test rename to mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test index e6b41eabd0d..2343d430784 100644 --- a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test @@ -6,10 +6,11 @@ let $engine_type = 'MyISAM'; set binlog_format=row; --- source extra/rpl_tests/rpl_extraMaster_Col.test +-- source extra/rpl_tests/rpl_extra_col_master.test set binlog_format=statement; --- source extra/rpl_tests/rpl_extraMaster_Col.test +-- source extra/rpl_tests/rpl_extra_col_master.test set binlog_format=mixed; --- source extra/rpl_tests/rpl_extraMaster_Col.test +-- source extra/rpl_tests/rpl_extra_col_master.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test b/mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test new file mode 100644 index 00000000000..8b2cb2ded1c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test @@ -0,0 +1,6 @@ +-- source include/have_binlog_format_row.inc +-- source include/have_innodb.inc +-- source include/master-slave.inc +let $engine_type = 'InnoDB'; +-- source extra/rpl_tests/rpl_extra_col_slave.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test b/mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test new file mode 100644 index 00000000000..52d312de878 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test @@ -0,0 +1,5 @@ +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc +let $engine_type = 'MyISAM'; +-- source extra/rpl_tests/rpl_extra_col_slave.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_failed_optimize.test b/mysql-test/suite/rpl/t/rpl_failed_optimize.test index 81e8342b5c0..798b3ef8b41 100644 --- a/mysql-test/suite/rpl/t/rpl_failed_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_failed_optimize.test @@ -1,10 +1,3 @@ -####################################### -# Wrapper for rpl_failed_optimize.test# -####################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=InnoDB; diff --git a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test index aa2dee0fe57..8e1c9eb98b2 100644 --- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test +++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test @@ -204,4 +204,4 @@ SELECT * FROM t3; connection master; echo [on master]; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt index 95bca94fd3a..eb35347af33 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt @@ -1 +1 @@ --O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.1/data/relay-log +-O max_binlog_size=1M diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh deleted file mode 100755 index a321dd690cd..00000000000 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh +++ /dev/null @@ -1,5 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*.index - - diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt index e2aa63225a3..eb35347af33 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt @@ -1 +1 @@ --O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.2/data/relay-log +-O max_binlog_size=1M diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh deleted file mode 100755 index e46ea6d400b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh +++ /dev/null @@ -1,4 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/master-data/master.info -rm -f $MYSQLTEST_VARDIR/master-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/master-data/*.index - diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test index 487f910ba2b..d5d362bac0f 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test @@ -1,33 +1,12 @@ # Testing if "flush logs" command bouncing resulting in logs created in a loop # in case of bi-directional replication --- source include/master-slave.inc +--let $rpl_topology= 1->2->1 +--source include/rpl_init.inc let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR/ show variables like 'relay_log%'; -connection slave; ---disable_warnings -stop slave; ---enable_warnings ---replace_result $MASTER_MYPORT MASTER_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$MASTER_MYPORT; -start slave; - -# -# Start replication slave -> master -# -connection master; ---disable_warnings -stop slave; ---enable_warnings ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$SLAVE_MYPORT; - -source include/start_slave.inc; - # # Flush logs of slave # @@ -39,16 +18,16 @@ source include/start_slave.inc; CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM; let $wait_binlog_event= CREATE TABLE t1; --source include/wait_for_binlog_event.inc -sync_slave_with_master; +sync_slave_with_master server_2; -connection master; +connection server_1; INSERT INTO t1 VALUE(1); FLUSH LOGS; -sync_slave_with_master; +sync_slave_with_master server_2; INSERT INTO t1 VALUE(2); let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1); -sync_slave_with_master master; +sync_slave_with_master server_1; # # Check that the master server's slave threads are still running and show @@ -59,7 +38,9 @@ sync_slave_with_master master; --source include/show_slave_status.inc --disable_query_log -connection master; +connection server_1; DROP TABLE t1; -sync_slave_with_master; +sync_slave_with_master server_2; --enable_query_log + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test index d085bff2012..ce28c0334ec 100644 --- a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test @@ -1,10 +1,3 @@ -################################### -# Wrapper for rpl_foreign_key.test# -################################### -# Change Author: JBM -# Change Date: 2006-01-17 -# Change: FK not supported, skip test when NDB is forced -#################################### -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_found_rows.test b/mysql-test/suite/rpl/t/rpl_found_rows.test index ff8d2c3107a..3e5d741d788 100644 --- a/mysql-test/suite/rpl/t/rpl_found_rows.test +++ b/mysql-test/suite/rpl/t/rpl_found_rows.test @@ -114,9 +114,8 @@ DELETE FROM logtbl; DROP PROCEDURE just_log; DROP PROCEDURE calc_and_log; DROP FUNCTION log_rows; -sync_slave_with_master; -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc --echo #### 2. Using mixed mode #### @@ -254,3 +253,4 @@ DROP PROCEDURE log_me_inner; DROP FUNCTION log_rows; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_free_items.test b/mysql-test/suite/rpl/t/rpl_free_items.test index 043e84160b8..581409cfc10 100644 --- a/mysql-test/suite/rpl/t/rpl_free_items.test +++ b/mysql-test/suite/rpl/t/rpl_free_items.test @@ -20,3 +20,4 @@ drop table t2; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_geometry.test b/mysql-test/suite/rpl/t/rpl_geometry.test index eac98924b98..769c49c96b1 100644 --- a/mysql-test/suite/rpl/t/rpl_geometry.test +++ b/mysql-test/suite/rpl/t/rpl_geometry.test @@ -23,4 +23,4 @@ sync_slave_with_master; connection master; drop table t1, t2; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_get_lock.test b/mysql-test/suite/rpl/t/rpl_get_lock.test index 87366f41ba2..f87932113ac 100644 --- a/mysql-test/suite/rpl/t/rpl_get_lock.test +++ b/mysql-test/suite/rpl/t/rpl_get_lock.test @@ -22,9 +22,7 @@ while ($1) dec $1; } enable_query_log; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select get_lock("lock",3); select * from t1; # There is no point in testing REPLICATIION of the IS_*_LOCK @@ -41,8 +39,9 @@ select is_free_lock("lock2"); select is_free_lock(NULL); connection master1; drop table t1; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; + + +--source include/rpl_end.inc # End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test index 28f13c17042..ec1d6d57555 100644 --- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test +++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test @@ -7,12 +7,6 @@ # So they can't be verified by test case here. # Finish the following tests by calling its common test script: # extra/rpl_tests/rpl_get_master_version_and_clock.test. -# And meanwhile this test checks that the slave I/O thread refuses to start if slave -# and master have the same server id (because this is a useless setup, -# and otherwise SHOW SLAVE STATUS shows progress but all queries are -# ignored, which has caught our customers), unless -# --replicate-same-server-id. -# source include/master-slave.inc; source include/have_debug.inc; @@ -47,20 +41,6 @@ source extra/rpl_tests/rpl_get_master_version_and_clock.test; eval set global debug= '$debug_saved'; -#Test case 3: This test checks that the slave I/O thread refuses to start -#if slave and master have the same server id. -connection slave; -reset master; -# replicate ourselves -source include/stop_slave.inc; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; -start slave; - ---echo *** must be having the replicate-same-server-id IO thread error *** -let $slave_io_errno= 1593; -let $show_slave_io_error= 1; -source include/wait_for_slave_io_error.inc; # cleanup @@ -68,3 +48,4 @@ source include/wait_for_slave_io_error.inc; SET DEBUG_SYNC= 'RESET'; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_grant.test b/mysql-test/suite/rpl/t/rpl_grant.test index 6fbdafc0f9c..1091e5aab0d 100644 --- a/mysql-test/suite/rpl/t/rpl_grant.test +++ b/mysql-test/suite/rpl/t/rpl_grant.test @@ -36,3 +36,5 @@ sync_slave_with_master; --echo **** On Slave **** SELECT user,host FROM mysql.user WHERE user like 'dummy%'; SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test index c96b88a1b1a..141f3699b14 100644 --- a/mysql-test/suite/rpl/t/rpl_idempotency.test +++ b/mysql-test/suite/rpl/t/rpl_idempotency.test @@ -37,10 +37,7 @@ SELECT * FROM t2 ORDER BY a; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +--source include/check_slave_no_error.inc # An insert of a row that already exists. Since we are replacing the # row if it already exists, the most apropriate representation is @@ -53,10 +50,7 @@ INSERT IGNORE INTO t1 VALUES (-2); SELECT * FROM t1 ORDER BY a; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +--source include/check_slave_no_error.inc # BUG#19958: RBR idempotency issue for UPDATE and DELETE @@ -80,10 +74,7 @@ SELECT * FROM t2 ORDER BY a; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +--source include/check_slave_no_error.inc connection master; DROP TABLE t1, t2; @@ -211,12 +202,9 @@ select * from ti1 order by b /* must be (2),(3) */; --echo *** slave must stop (Trying to delete a referenced foreing key) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1451 = ER_ROW_ID_REFERENCED_2 +--let $slave_sql_errno= 1451 +--source include/wait_for_slave_sql_error.inc select * from ti1 order by b /* must be (1),(2),(3) - not deleted */; set foreign_key_checks= 0; @@ -245,12 +233,9 @@ insert into ti2 set a=3, b=3 /* offending write event */; --echo *** slave must stop (Trying to insert an invalid foreign key) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1452 = ER_NO_REFERENCED_ROW_2 +--let $slave_sql_errno= 1452 +--source include/wait_for_slave_sql_error.inc select * from ti2 order by b /* must be (2,2) */; set foreign_key_checks= 0; @@ -284,12 +269,9 @@ insert into ti1 set b=1 /* offending write event */; --echo *** slave must stop (Trying to insert a dupliacte key) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error.inc set foreign_key_checks= 0; delete from ti1 where b=1; @@ -319,12 +301,9 @@ DELETE FROM t1 WHERE a = -2; --echo *** slave must stop (Key was not found) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1032 = ER_KEY_NOT_FOUND +--let $slave_sql_errno= 1032 +--source include/wait_for_slave_sql_error.inc set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; @@ -337,12 +316,9 @@ connection master; DELETE FROM t2 WHERE a = -2; --echo *** slave must stop (Key was not found) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1032 = ER_KEY_NOT_FOUND +--let $slave_sql_errno= 1032 +source include/wait_for_slave_sql_error.inc; set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; @@ -359,12 +335,9 @@ UPDATE t1 SET a = 1 WHERE a = -1; --echo *** slave must stop (Key was not found) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1032 = ER_KEY_NOT_FOUND +--let $slave_sql_errno= 1032 +source include/wait_for_slave_sql_error.inc; set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; @@ -379,12 +352,9 @@ UPDATE t2 SET a = 1 WHERE a = -1; --echo *** slave must stop (Key was not found) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1032 = ER_KEY_NOT_FOUND +--let $slave_sql_errno= 1032 +source include/wait_for_slave_sql_error.inc; set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; @@ -399,6 +369,6 @@ connection master; set @@session.binlog_format= @save_binlog_format; drop table t1,t2,ti2,ti1; ---source include/master-slave-end.inc +--source include/rpl_end.inc --echo *** end of tests diff --git a/mysql-test/suite/rpl/t/rpl_ignore_grant.test b/mysql-test/suite/rpl/t/rpl_ignore_grant.test index 2e6e2ce9a31..34074ba8ca9 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_grant.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_grant.test @@ -57,3 +57,4 @@ delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_revoke.test b/mysql-test/suite/rpl/t/rpl_ignore_revoke.test index 00171605a92..db20e807afc 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_revoke.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_revoke.test @@ -49,3 +49,4 @@ sync_slave_with_master; # Since changes to mysql.* are ignored, the revoke need to # be done on slave as well delete from mysql.user where user="user_foo"; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table.test b/mysql-test/suite/rpl/t/rpl_ignore_table.test index b5666ad6e91..1ab7393d8fc 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_table.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test @@ -175,4 +175,6 @@ connection master; DROP TABLE t5; sync_slave_with_master; -call mtr.force_restart(); +--source include/force_restart.inc + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table_update.test b/mysql-test/suite/rpl/t/rpl_ignore_table_update.test index fe030f90411..840052e2f25 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_table_update.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_table_update.test @@ -36,3 +36,4 @@ sync_with_master; drop table mysqltest_foo,mysqltest_bar,t1; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_incident.test b/mysql-test/suite/rpl/t/rpl_incident.test index 08096d03c11..b65441c7d50 100644 --- a/mysql-test/suite/rpl/t/rpl_incident.test +++ b/mysql-test/suite/rpl/t/rpl_incident.test @@ -37,3 +37,4 @@ source include/check_slave_is_running.inc; connection master; DROP TABLE t1; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_init_slave.test b/mysql-test/suite/rpl/t/rpl_init_slave.test index 58d1f6bdc01..1803b146819 100644 --- a/mysql-test/suite/rpl/t/rpl_init_slave.test +++ b/mysql-test/suite/rpl/t/rpl_init_slave.test @@ -25,10 +25,10 @@ set global init_connect="set @c=1"; show variables like 'init_connect'; connection master; sync_slave_with_master; -source include/stop_slave.inc; # Restore changed global variable set global init_connect= @my_global_init_connect; set global max_connections= default; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test index 180821730ec..cf72de18e13 100644 --- a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test +++ b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test @@ -53,10 +53,11 @@ start slave; # slave is going to stop because of emulated failures # but there won't be any crashes nor asserts hit. # -source include/wait_for_slave_to_stop.inc; +# 1593 = ER_SLAVE_FATAL_ERROR +--let $slave_sql_errno= 1593 +--let $show_slave_sql_error= 1 +--source include/wait_for_slave_sql_error.inc -let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1); -echo Reporting the following error: $error; call mtr.add_suppression("Failed during slave I/O thread initialization"); SET GLOBAL debug= ""; @@ -66,22 +67,23 @@ SET GLOBAL debug= ""; ###################################################################### connection slave; ---disable_warnings -stop slave; ---enable_warnings -source include/wait_for_slave_to_stop.inc; - reset slave; SET GLOBAL init_slave= "garbage"; start slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1); -echo Reporting the following error: $error; +# 1064 = ER_PARSE_ERROR +--let $slave_sql_errno= 1064 +--let $show_slave_sql_error= 1 +--source include/wait_for_slave_sql_error.inc ###################################################################### # Clean up ###################################################################### SET GLOBAL init_slave= ""; + +# Clean up Last_SQL_Error +--source include/stop_slave_io.inc +RESET SLAVE; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_innodb.test b/mysql-test/suite/rpl/t/rpl_innodb.test index 64a85d27c88..b9b6080cfe5 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_innodb.test @@ -120,6 +120,6 @@ connection master; FLUSH LOGS; DROP DATABASE mysqltest1; --- source include/master-slave-end.inc +--source include/rpl_end.inc --echo End of 5.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test index 124cf4a956f..6b82f2f5334 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test @@ -150,4 +150,4 @@ DROP TABLE test.regular_tbl; DROP TABLE test.bykey_tbl; DROP TABLE test.byrange_tbl; ---source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test b/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test index 4311328b064..9bfce61804b 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test @@ -62,5 +62,5 @@ connection master; DROP PROCEDURE test.proc_norm; DROP TABLE test.regular_tbl; ---source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test b/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test index 6eb9c7075e4..5147e67c160 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -8,7 +6,4 @@ --source include/have_binlog_format_mixed.inc --source include/have_innodb.inc let $engine_type= innodb; - --source suite/rpl/include/rpl_mixed_ddl.inc - -# End 5.1 Test Case diff --git a/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test b/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test index d48e847a6c8..d04ced0f476 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -8,7 +6,4 @@ --source include/have_binlog_format_mixed.inc --source include/have_innodb.inc let $engine_type= innodb; - --source suite/rpl/include/rpl_mixed_dml.inc - -# End 5.1 Test Case diff --git a/mysql-test/suite/rpl/t/rpl_insert.test b/mysql-test/suite/rpl/t/rpl_insert.test index d304dfb6cc7..05793230b19 100644 --- a/mysql-test/suite/rpl/t/rpl_insert.test +++ b/mysql-test/suite/rpl/t/rpl_insert.test @@ -38,3 +38,4 @@ connection master; USE test; DROP SCHEMA mysqlslap; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_insert_id.test b/mysql-test/suite/rpl/t/rpl_insert_id.test index 45cc32c9d39..f2f62a207a0 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_id.test +++ b/mysql-test/suite/rpl/t/rpl_insert_id.test @@ -1,10 +1,6 @@ ################################# # Wrapper for rpl_insert_id.test# ################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=myisam; diff --git a/mysql-test/suite/rpl/t/rpl_insert_id_pk.test b/mysql-test/suite/rpl/t/rpl_insert_id_pk.test index 01f30b78ac5..c0d68855f85 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_id_pk.test +++ b/mysql-test/suite/rpl/t/rpl_insert_id_pk.test @@ -1,10 +1,6 @@ ################################# # Wrapper for rpl_insert_id.test# ################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_insert_ignore.test b/mysql-test/suite/rpl/t/rpl_insert_ignore.test index 2709430f85d..1d6c8e7168e 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_ignore.test +++ b/mysql-test/suite/rpl/t/rpl_insert_ignore.test @@ -7,3 +7,4 @@ let $engine_type=innodb; let $engine_type2=myisam; -- source extra/rpl_tests/rpl_insert_ignore.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_insert_select.test b/mysql-test/suite/rpl/t/rpl_insert_select.test index 677be526982..23bc7ecd167 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_select.test +++ b/mysql-test/suite/rpl/t/rpl_insert_select.test @@ -17,3 +17,4 @@ select * from t1; connection master; drop table t1,t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features.test b/mysql-test/suite/rpl/t/rpl_invoked_features.test index e73964a6e14..7082117b9eb 100644 --- a/mysql-test/suite/rpl/t/rpl_invoked_features.test +++ b/mysql-test/suite/rpl/t/rpl_invoked_features.test @@ -308,3 +308,4 @@ DROP EVENT IF EXISTS e11; --sync_slave_with_master slave # End 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_killed_ddl.test b/mysql-test/suite/rpl/t/rpl_killed_ddl.test index 69648267ca4..6d86285484a 100644 --- a/mysql-test/suite/rpl/t/rpl_killed_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_killed_ddl.test @@ -139,7 +139,7 @@ disable_warnings; ######## DATABASE ######## -let $diff_statement= SHOW DATABASES LIKE 'd%'; +--let $rpl_diff_statement= SHOW DATABASES LIKE \'d%\' send CREATE DATABASE d2; source include/kill_query_and_diff_master_slave.inc; @@ -158,7 +158,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## EVENT ######## -let $diff_statement= SELECT event_name, event_body, execute_at FROM information_schema.events where event_name like 'e%'; +--let $rpl_diff_statement= SELECT event_name, event_body, execute_at FROM information_schema.events where event_name like \'e%\' send CREATE EVENT e2 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY @@ -179,7 +179,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## FUNCTION ######## -let $diff_statement= SHOW FUNCTION STATUS LIKE 'f%'; +--let $rpl_diff_statement= SHOW FUNCTION STATUS LIKE \'f%\' send CREATE FUNCTION f2 () RETURNS INT DETERMINISTIC RETURN 1; @@ -208,7 +208,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## PROCEDURE ######## -let $diff_statement= SHOW PROCEDURE STATUS LIKE 'p%'; +--let $rpl_diff_statement= SHOW PROCEDURE STATUS LIKE \'p%\' DELIMITER //; send CREATE PROCEDURE p2 (OUT rows INT) @@ -231,7 +231,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## TABLE ######## -let $diff_statement= SHOW TABLES LIKE 't%'; +--let $rpl_diff_statement= SHOW TABLES LIKE \'t%\' send CREATE TABLE t2 (b int); source include/kill_query_and_diff_master_slave.inc; @@ -244,7 +244,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## INDEX ######## -let $diff_statement= SHOW INDEX FROM t1; +--let $rpl_diff_statement= SHOW INDEX FROM t1 send CREATE INDEX i2 on t1 (a); source include/kill_query_and_diff_master_slave.inc; @@ -257,7 +257,7 @@ source include/kill_query_and_diff_master_slave.inc; # Tempoarily disabled, see bug#25705 -# let $diff_statement= SELECT * FROM mysql.server WHERE name like 's%'; +# --let $rpl_diff_statement= SELECT * FROM mysql.server WHERE name like \'s%\' # send CREATE SERVER s2 # FOREIGN DATA WRAPPER mysql @@ -281,7 +281,7 @@ connection master; CREATE TABLE IF NOT EXISTS t4 (a int); connection master1; -let $diff_statement= SHOW TRIGGERS LIKE 'v%'; +--let $rpl_diff_statement= SHOW TRIGGERS LIKE \'v%\' DELIMITER //; send CREATE TRIGGER tr2 BEFORE INSERT ON t4 @@ -300,7 +300,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## VIEW ######## -let $diff_statement= SHOW TABLES LIKE 'v%'; +--let $rpl_diff_statement= SHOW TABLES LIKE \'v%\' send CREATE VIEW v2 AS SELECT a FROM t1 WHERE a > 100; source include/kill_query_and_diff_master_slave.inc; @@ -313,7 +313,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## DROP TABLE ######## -let $diff_statement= SHOW TABLES LIKE 't%'; +--let $rpl_diff_statement= SHOW TABLES LIKE \'t%\' send DROP TABLE t1; source include/kill_query_and_diff_master_slave.inc; @@ -354,3 +354,4 @@ DROP PROCEDURE IF EXISTS p2; DROP PROCEDURE IF EXISTS p3; DROP PROCEDURE IF EXISTS p4; enable_warnings; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test index 5b31b094b62..a8c7c2c1f5b 100644 --- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test +++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test @@ -25,7 +25,7 @@ connection master; INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; SELECT * FROM t1; connection slave; ---source include/wait_for_slave_sql_to_stop.inc + # show the error message #1105 = ER_UNKNOWN_ERROR --let $slave_sql_errno= 1105 @@ -81,17 +81,25 @@ ON DUPLICATE KEY UPDATE t1.field_3 = t2.field_c; SELECT * FROM t1; connection slave; ---source include/wait_for_slave_sql_to_stop.inc + # show the error message #1105 = ER_UNKNOWN_ERROR --let $slave_sql_errno= 1105 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc + # show that it was not replicated SELECT * FROM t1; connection master; + +# clean up drop table t1, t2; connection slave; drop table t1, t2; +# clear error message in sql thread +--source include/stop_slave_io.inc +RESET SLAVE; # End of 5.0 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_load_from_master.test b/mysql-test/suite/rpl/t/rpl_load_from_master.test index 0f085457817..6d09f71e809 100644 --- a/mysql-test/suite/rpl/t/rpl_load_from_master.test +++ b/mysql-test/suite/rpl/t/rpl_load_from_master.test @@ -179,3 +179,4 @@ drop database mysqltest2; drop database mysqltest3; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_load_table_from_master.test b/mysql-test/suite/rpl/t/rpl_load_table_from_master.test index aad113878d3..5474124c337 100644 --- a/mysql-test/suite/rpl/t/rpl_load_table_from_master.test +++ b/mysql-test/suite/rpl/t/rpl_load_table_from_master.test @@ -96,3 +96,4 @@ drop table t1; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata.test b/mysql-test/suite/rpl/t/rpl_loaddata.test index 6f9ee4ef80a..4682e1e59eb 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata.test @@ -1,7 +1,3 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_loaddata.test diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_charset.test b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test index 031a0f6c351..768b61d5741 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_charset.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test @@ -48,3 +48,4 @@ source include/rpl_loaddata_charset.inc; # LOAD DATA LOCAL INFILE let $LOAD_LOCAL=0; source include/rpl_loaddata_charset.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test index b8975308a86..ecbaddb6995 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test @@ -23,3 +23,4 @@ connection master; DROP TABLE t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_m.test b/mysql-test/suite/rpl/t/rpl_loaddata_m.test index 42c3ad99f33..bbe11bbb887 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_m.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_m.test @@ -50,3 +50,4 @@ DROP TABLE test.t1; sync_slave_with_master; # End of test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_map.test b/mysql-test/suite/rpl/t/rpl_loaddata_map.test index 1db7c4a893b..24c8221c20f 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_map.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_map.test @@ -71,3 +71,4 @@ connection master; drop table t2; sync_slave_with_master; remove_file $MYSQLTEST_VARDIR/tmp/bug30435_5k.txt; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_s.test b/mysql-test/suite/rpl/t/rpl_loaddata_s.test index 2dd2218eb5c..80785bb562f 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_s.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_s.test @@ -26,3 +26,4 @@ source include/show_binlog_events.inc; connection master; drop table test.t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_simple.test b/mysql-test/suite/rpl/t/rpl_loaddata_simple.test index 439c2b48ca5..a09d3feec42 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_simple.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_simple.test @@ -12,3 +12,4 @@ SELECT * FROM t1 ORDER BY word; connection master; drop table t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test index 63e65834e5b..d6bc0ba2ed5 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test @@ -19,3 +19,4 @@ connection master; drop table t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddatalocal.test b/mysql-test/suite/rpl/t/rpl_loaddatalocal.test index a93a82d6d9f..572c660faf7 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddatalocal.test +++ b/mysql-test/suite/rpl/t/rpl_loaddatalocal.test @@ -168,3 +168,4 @@ SET SESSION sql_mode=@old_mode; sync_slave_with_master; connection master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loadfile.test b/mysql-test/suite/rpl/t/rpl_loadfile.test index adb23d2c2bc..ced0054c52c 100644 --- a/mysql-test/suite/rpl/t/rpl_loadfile.test +++ b/mysql-test/suite/rpl/t/rpl_loadfile.test @@ -58,8 +58,7 @@ # vii) assert that the contents of master and slave # table are the same -connection master; -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc connection master; let $file= $MYSQLTEST_VARDIR/tmp/bug_39701.data; @@ -105,11 +104,12 @@ sync_slave_with_master; # if the file was removed before the slave started, # meaning that contents were indeed transfered # through binlog (in row format) -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; # CLEAN UP +--connection master DROP TABLE t1; DROP PROCEDURE p; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_locale.test b/mysql-test/suite/rpl/t/rpl_locale.test index 2f2d637e1b4..0d6692dd89c 100644 --- a/mysql-test/suite/rpl/t/rpl_locale.test +++ b/mysql-test/suite/rpl/t/rpl_locale.test @@ -22,3 +22,4 @@ sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test index 239ddc5c8d4..484ffa52a44 100644 --- a/mysql-test/suite/rpl/t/rpl_log_pos.test +++ b/mysql-test/suite/rpl/t/rpl_log_pos.test @@ -24,7 +24,7 @@ start slave; let $slave_io_errno= 1236; let $show_slave_io_error= 1; source include/wait_for_slave_io_error.inc; -source include/stop_slave.inc; +source include/stop_slave_sql.inc; connection master; source include/show_master_status.inc; @@ -44,3 +44,4 @@ drop table t1; sync_slave_with_master; --echo End of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test index ecdf10ac2c2..b0d3b23b4e1 100644 --- a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test +++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test @@ -58,10 +58,10 @@ FLUSH LOGS; # error to slave. call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log'); connection slave; -source include/wait_for_slave_io_to_stop.inc; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); -echo Last_IO_Error; -echo $last_error; +# 1236 = ER_MASTER_FATAL_ERROR_READING_BINLOG +--let $slave_io_errno= 1236 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc connection master; @@ -103,4 +103,4 @@ SHOW TABLES; connection master; DROP TABLE t1, t2, t3, t4; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_many_optimize.test b/mysql-test/suite/rpl/t/rpl_many_optimize.test index 91fab0b27a8..d5e9f69b4bc 100644 --- a/mysql-test/suite/rpl/t/rpl_many_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_many_optimize.test @@ -20,3 +20,4 @@ drop table t1; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_master_pos_wait.test b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test index 2f7b18ae04b..a6a49950300 100644 --- a/mysql-test/suite/rpl/t/rpl_master_pos_wait.test +++ b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test @@ -27,3 +27,5 @@ echo "*** must be NULL ***"; select master_pos_wait('foo', 98); # End of 4.1 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test index b84042160cd..9b7bfd35579 100644 --- a/mysql-test/suite/rpl/t/rpl_misc_functions.test +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -122,3 +122,4 @@ DROP FUNCTION test_replication_sf; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test b/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test index 55f6ad61446..d2aa8363060 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test @@ -76,3 +76,4 @@ sync_slave_with_master; connection master; DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test index 6a1f81abed3..96f7ae2e85b 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test @@ -44,3 +44,4 @@ drop table t2,t3,t5; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete.test b/mysql-test/suite/rpl/t/rpl_multi_delete.test index a251cbf8833..9df8ca4d29a 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_delete.test +++ b/mysql-test/suite/rpl/t/rpl_multi_delete.test @@ -24,3 +24,4 @@ connection slave; sync_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete2.test b/mysql-test/suite/rpl/t/rpl_multi_delete2.test index 81379d4056b..7317dfa8732 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_delete2.test +++ b/mysql-test/suite/rpl/t/rpl_multi_delete2.test @@ -66,3 +66,4 @@ drop database mysqltest_to; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_engine.test b/mysql-test/suite/rpl/t/rpl_multi_engine.test index 31c4a2050d7..b1dbf99f114 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_engine.test +++ b/mysql-test/suite/rpl/t/rpl_multi_engine.test @@ -102,3 +102,4 @@ DROP TABLE t1; sync_slave_with_master; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_update.test b/mysql-test/suite/rpl/t/rpl_multi_update.test index a6111455d16..710337816da 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update.test @@ -1,7 +1,3 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_multi_update.test diff --git a/mysql-test/suite/rpl/t/rpl_multi_update2.test b/mysql-test/suite/rpl/t/rpl_multi_update2.test index 812a486ad69..497568f2738 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update2.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update2.test @@ -8,3 +8,4 @@ --source include/master-slave.inc let $engine_type=MyISAM; --source extra/rpl_tests/rpl_multi_update2.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_update3.test b/mysql-test/suite/rpl/t/rpl_multi_update3.test index 5da91c26b04..f6e70f14b30 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update3.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update3.test @@ -8,3 +8,4 @@ --source include/master-slave.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_multi_update3.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_update4.test b/mysql-test/suite/rpl/t/rpl_multi_update4.test index 4991a385f6f..8f069b9c18f 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update4.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update4.test @@ -43,3 +43,4 @@ drop database d2; sync_slave_with_master; # End of test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test index bf5c6d2b921..beefd8bc0cf 100644 --- a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test +++ b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test @@ -54,3 +54,5 @@ if (!`SELECT '$before_position'='$after_position'`) DROP DATABASE `mysqltest-1`; connection slave; DROP DATABASE `#mysql50#mysqltest-1`; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_name_const.test b/mysql-test/suite/rpl/t/rpl_name_const.test index adb71d452ef..4cacafa0523 100644 --- a/mysql-test/suite/rpl/t/rpl_name_const.test +++ b/mysql-test/suite/rpl/t/rpl_name_const.test @@ -45,3 +45,4 @@ select * from t1 order by id; connection master; drop table t1; drop procedure test_procedure; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test index 9ff2e2d081e..2c5db21b0e3 100644 --- a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test +++ b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test @@ -50,8 +50,9 @@ INSERT INTO t1 VALUES (RAND()); INSERT INTO t1 VALUES (LAST_INSERT_ID()); --sync_slave_with_master ---let $diff_table_1= master:test.t1 ---let $diff_table_2= slave:test.t1 +--let $diff_tables= master:t1, slave:t1 --source include/diff_tables.inc +--connection master DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_not_null_innodb.test b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test index dca0ea6589c..1e67ba4eda1 100644 --- a/mysql-test/suite/rpl/t/rpl_not_null_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test @@ -17,3 +17,4 @@ let $engine=Innodb; --source extra/rpl_tests/rpl_not_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_not_null_myisam.test b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test index 0c036f5bfd7..dcfaf006dad 100644 --- a/mysql-test/suite/rpl/t/rpl_not_null_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test @@ -16,3 +16,4 @@ let $engine=MyISAM; --source extra/rpl_tests/rpl_not_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_optimize.test b/mysql-test/suite/rpl/t/rpl_optimize.test index 87eb9dce818..b31a9e422fd 100644 --- a/mysql-test/suite/rpl/t/rpl_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_optimize.test @@ -56,3 +56,4 @@ sync_with_master; # starts, this test wil demonstrate nothing but will pass. # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test index 08a533e22ca..b11bd0a227e 100644 --- a/mysql-test/suite/rpl/t/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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; eval select count(*) from `$db`.`t1` /* must be 1 */; SHOW STATUS LIKE 'Slave_running'; select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; connection master; eval drop database $db; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # # Bug #23755: Replicated event larger that max_allowed_packet infinitely re-transmits @@ -89,17 +85,21 @@ connection master; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); -# The slave I/O thread must stop after trying to read the above event -connection slave; ---source include/wait_for_slave_io_to_stop.inc -let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1); ---echo Slave_IO_Running = $slave_io_running (expect No) + # # Bug#42914: The slave I/O thread must stop after trying to read the above # event, However there is no Last_IO_Error report. # -let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); -eval SELECT "$last_io_error" AS Last_IO_Error; + +# The slave I/O thread must stop after trying to read the above event +connection slave; +# 1153 = ER_NET_PACKET_TOO_LARGE +--let $slave_io_errno= 1153 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc + +# TODO: this is needed because of BUG#55790. Remove once that is fixed. +--source include/stop_slave_sql.inc # # Bug#42914: On the master, if a binary log event is larger than @@ -107,7 +107,14 @@ eval SELECT "$last_io_error" AS Last_IO_Error; # is sent to a slave when it requests a dump from the master, thus leading the # I/O thread to stop. However, there is no Last_IO_Error reported. # -source include/master-slave-reset.inc; + +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc +--connection master +DROP TABLE t1; +--sync_slave_with_master + + connection master; CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM; sync_slave_with_master; @@ -117,12 +124,10 @@ INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), R connection slave; # The slave I/O thread must stop after receiving -# ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master. ---source include/wait_for_slave_io_to_stop.inc -let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1); ---echo Slave_IO_Running = $slave_io_running (expect No) -let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); -eval SELECT "$last_io_error" AS Last_IO_Error; +# 1236=ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master. +--let $slave_io_errno= 1236 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc # Remove the bad binlog and clear error status on slave. STOP SLAVE; @@ -165,4 +170,8 @@ eval SET @@global.net_buffer_length= $old_net_buffer_length; connection slave; DROP TABLE t1; +# Clear Last_IO_Error +RESET SLAVE; + +--source include/rpl_end.inc # End of tests diff --git a/mysql-test/suite/rpl/t/rpl_plugin_load.test b/mysql-test/suite/rpl/t/rpl_plugin_load.test index 100683922ad..5f9725a8e66 100644 --- a/mysql-test/suite/rpl/t/rpl_plugin_load.test +++ b/mysql-test/suite/rpl/t/rpl_plugin_load.test @@ -56,5 +56,5 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE'; sync_slave_with_master; # # Cleanup ---source include/master-slave-end.inc +--source include/rpl_end.inc --echo End of test diff --git a/mysql-test/suite/rpl/t/rpl_ps.test b/mysql-test/suite/rpl/t/rpl_ps.test index b00dec6b80c..e93c68d0e10 100644 --- a/mysql-test/suite/rpl/t/rpl_ps.test +++ b/mysql-test/suite/rpl/t/rpl_ps.test @@ -72,75 +72,36 @@ stop slave; ############################################################################### ---echo --echo # Connection: slave ---echo --connection slave ---echo START SLAVE; ---echo --echo # Connection: master ---echo --connection master ---echo CREATE DATABASE mysqltest1; CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32)); ---echo PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)'; ---echo EXECUTE stmt_d_1; ---echo use mysqltest1; ---echo EXECUTE stmt_d_1; ---echo ---save_master_pos - ---echo --echo # Connection: slave ---echo ---connection slave ---sync_with_master +--sync_slave_with_master ---echo SELECT * FROM t1; ---echo --echo # Connection: master ---echo --connection master ---echo DROP DATABASE mysqltest1; ---echo use test; DROP TABLE t1; ---echo ---save_master_pos ---echo ---echo # Connection: slave ---echo ---connection slave ---sync_with_master - ---echo -STOP SLAVE; - ---echo ---echo ######################################################################## - -############################################################################### - -reset master; -reset slave; -disconnect master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test index ec50311fc7c..86dd2eb78eb 100644 --- a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test +++ b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test @@ -38,3 +38,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp --remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql --remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_read_only.test b/mysql-test/suite/rpl/t/rpl_read_only.test index 62864b62a28..c791bc3e1ea 100644 --- a/mysql-test/suite/rpl/t/rpl_read_only.test +++ b/mysql-test/suite/rpl/t/rpl_read_only.test @@ -111,3 +111,4 @@ sync_slave_with_master; set global read_only=0; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test b/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test index 156d53ef856..ca16a583fe5 100644 --- a/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test @@ -1,22 +1,4 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test b/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test index 1d8563e7fd9..13719cbdc33 100644 --- a/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test @@ -1,21 +1,3 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### -- source include/not_ndb_default.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/suite/rpl/t/rpl_relayrotate.test b/mysql-test/suite/rpl/t/rpl_relayrotate.test index ec3e6be4bea..c1db2f334fa 100644 --- a/mysql-test/suite/rpl/t/rpl_relayrotate.test +++ b/mysql-test/suite/rpl/t/rpl_relayrotate.test @@ -9,3 +9,4 @@ -- source include/master-slave.inc let $engine_type=innodb; -- source extra/rpl_tests/rpl_relayrotate.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_relayspace.test b/mysql-test/suite/rpl/t/rpl_relayspace.test index 0fc564cdb46..bb34ec25bcd 100644 --- a/mysql-test/suite/rpl/t/rpl_relayspace.test +++ b/mysql-test/suite/rpl/t/rpl_relayspace.test @@ -35,3 +35,4 @@ start slave; select master_pos_wait('master-bin.001',200,6)=-1; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_replicate_do.test b/mysql-test/suite/rpl/t/rpl_replicate_do.test index 382e198aaf9..c6cbf819deb 100644 --- a/mysql-test/suite/rpl/t/rpl_replicate_do.test +++ b/mysql-test/suite/rpl/t/rpl_replicate_do.test @@ -88,3 +88,4 @@ connection master; drop table t1; drop table t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test index bcfef919fad..f1907456ed5 100644 --- a/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test +++ b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test @@ -28,3 +28,4 @@ connection master; drop database mysqltest1; drop database mysqltest2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_report.test b/mysql-test/suite/rpl/t/rpl_report.test index 8798905d372..a73442917fa 100644 --- a/mysql-test/suite/rpl/t/rpl_report.test +++ b/mysql-test/suite/rpl/t/rpl_report.test @@ -19,3 +19,4 @@ set @@global.report_host='my.new.address.net'; --echo end of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db.test b/mysql-test/suite/rpl/t/rpl_rewrt_db.test index 585b08be0b3..996ad0a10c7 100644 --- a/mysql-test/suite/rpl/t/rpl_rewrt_db.test +++ b/mysql-test/suite/rpl/t/rpl_rewrt_db.test @@ -237,3 +237,4 @@ connection master; sync_slave_with_master; # end of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt b/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt deleted file mode 100644 index 80190bf6d29..00000000000 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---server-id=2 diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh b/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh deleted file mode 100755 index 81490a54b4b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh +++ /dev/null @@ -1,2 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*relay* diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test index a2f7b522f1f..6ed690f91bf 100644 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test @@ -18,19 +18,14 @@ -- source include/have_binlog_format_mixed_or_statement.inc connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK); + # Create empty file let $MYSQLD_SLAVE_DATADIR= `select @@datadir`; write_file $MYSQLD_SLAVE_DATADIR/master.info; EOF chmod 0000 $MYSQLD_SLAVE_DATADIR/master.info; connection slave; ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings # START SLAVE will fail because it can't read the file (mode 000) # (system error 13) @@ -97,11 +92,9 @@ connection master; set insert_id=1234; insert into t2 values(NULL); connection slave; ---source include/wait_for_slave_sql_to_stop.inc - -#restart slave skipping one event -set global sql_slave_skip_counter=1; -start slave; +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error_and_skip.inc connection master; @@ -194,3 +187,5 @@ show binlog events in ''; purge master logs before now(); --echo End of 5.0 tests +--source include/stop_slave.inc +CHANGE MASTER TO MASTER_HOST = ''; diff --git a/mysql-test/suite/rpl/t/rpl_row_001.test b/mysql-test/suite/rpl/t/rpl_row_001.test index 99eaebcdcaf..2dfc5e63d42 100644 --- a/mysql-test/suite/rpl/t/rpl_row_001.test +++ b/mysql-test/suite/rpl/t/rpl_row_001.test @@ -7,3 +7,4 @@ -- source include/master-slave.inc let $engine_type=MYISAM; -- source extra/rpl_tests/rpl_row_001.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_4_bytes.test b/mysql-test/suite/rpl/t/rpl_row_4_bytes.test index 73ef6dd2345..6130f74983e 100644 --- a/mysql-test/suite/rpl/t/rpl_row_4_bytes.test +++ b/mysql-test/suite/rpl/t/rpl_row_4_bytes.test @@ -31,3 +31,4 @@ select * from t2 order by a; connection master; DROP DATABASE mysqltest1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_NOW.test b/mysql-test/suite/rpl/t/rpl_row_NOW.test index c28b714277e..d732c6e6733 100644 --- a/mysql-test/suite/rpl/t/rpl_row_NOW.test +++ b/mysql-test/suite/rpl/t/rpl_row_NOW.test @@ -72,3 +72,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave. sync_slave_with_master; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_USER.test b/mysql-test/suite/rpl/t/rpl_row_USER.test index 7b13ebc50ee..010e0e6ea05 100644 --- a/mysql-test/suite/rpl/t/rpl_row_USER.test +++ b/mysql-test/suite/rpl/t/rpl_row_USER.test @@ -58,3 +58,4 @@ DROP USER ''@'localhost%'; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_UUID.test b/mysql-test/suite/rpl/t/rpl_row_UUID.test index b0ef96463d0..ce3a4ed40a9 100644 --- a/mysql-test/suite/rpl/t/rpl_row_UUID.test +++ b/mysql-test/suite/rpl/t/rpl_row_UUID.test @@ -7,3 +7,4 @@ -- source include/master-slave.inc let $engine_type=myisam; --source extra/rpl_tests/rpl_row_UUID.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test index b1f37e0bfe4..915e747dd45 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test @@ -34,13 +34,15 @@ USE test_ignore; connection master; DROP DATABASE test_ignore; +USE test; +DROP TABLE t1; sync_slave_with_master; +USE test; + # Bug#19995: Extreneous table maps generated for statements that does # not generate rows ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a INT); @@ -55,9 +57,7 @@ DROP TABLE t1; # BUG#17620: Replicate (Row Based) Fails when Query Cache enabled on # slave --echo ================ Test for BUG#17620 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc --echo **** On Slave **** connection slave; @@ -89,12 +89,13 @@ sync_slave_with_master; SELECT * FROM t1; SET GLOBAL QUERY_CACHE_SIZE=0; +--connection master +DROP TABLE t1; + # Bug#22550: Replication of BIT columns failing --echo ================ Test for BUG#22550 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; @@ -120,9 +121,7 @@ sync_slave_with_master; # field does not work --echo ================ Test for BUG#22583 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc # disabling warnings temporarily for ENGINE=INNODB to work without InnoDB --disable_warnings @@ -227,13 +226,10 @@ sync_slave_with_master; # row-based replication # -disable_query_log; -source include/master-slave-reset.inc; -enable_query_log; +--source include/rpl_reset.inc --echo **** On Master **** connection master; -SET SESSION BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT PRIMARY KEY, b SET('master','slave')); INSERT INTO t1 VALUES (1,'master,slave'), (2,'master,slave'); --echo **** On Slave **** @@ -241,7 +237,7 @@ sync_slave_with_master; UPDATE t1 SET a = 5, b = 'slave' WHERE a = 1; SELECT * FROM t1 ORDER BY a; # since bug#31552/31609 idempotency is not default any longer. In -# order the preceeding test UPDATE t1 to pass the mode is switched +# order for the preceeding test UPDATE t1 to pass, the mode is switched # temprorarily set @@global.slave_exec_mode= 'IDEMPOTENT'; --echo **** On Master **** @@ -255,9 +251,10 @@ let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); disable_query_log; eval SELECT "$last_error" AS Last_SQL_Error; enable_query_log; + SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; --echo **** On Master **** connection master; DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test index c5648fa1d77..f1f5c584543 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test @@ -4,3 +4,4 @@ let $type= 'MYISAM' ; let $extra_index= ; -- source extra/rpl_tests/rpl_row_basic.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test index 3786a697e3f..d5dfcd7b75c 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test @@ -6,3 +6,4 @@ let $type= 'INNODB' ; let $extra_index= ; -- source extra/rpl_tests/rpl_row_basic.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test b/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test index 687b3bc785d..3ec79ec8cd5 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test @@ -208,3 +208,4 @@ SHOW CREATE TABLE t1; DROP TABLE IF EXISTS t1; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test b/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test index 6aa6c2a31b9..eaf86688a29 100644 --- a/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test @@ -12,3 +12,4 @@ let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_row_blob.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test b/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test index 11f5336502a..482ccb7ecc0 100644 --- a/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test @@ -11,3 +11,4 @@ let $engine_type=myisam; -- source extra/rpl_tests/rpl_row_blob.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_colSize.test b/mysql-test/suite/rpl/t/rpl_row_colSize.test index 078e6886ec7..04434517518 100644 --- a/mysql-test/suite/rpl/t/rpl_row_colSize.test +++ b/mysql-test/suite/rpl/t/rpl_row_colSize.test @@ -166,3 +166,4 @@ DROP TABLE IF EXISTS t1; sync_slave_with_master; # END 5.1 Test Case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_conflicts.test b/mysql-test/suite/rpl/t/rpl_row_conflicts.test index 59757e2e802..ce5332966ef 100644 --- a/mysql-test/suite/rpl/t/rpl_row_conflicts.test +++ b/mysql-test/suite/rpl/t/rpl_row_conflicts.test @@ -20,6 +20,8 @@ SET @old_slave_exec_mode= @@global.slave_exec_mode; SET @@global.slave_exec_mode = 'STRICT'; source extra/rpl_tests/rpl_conflicts.test; +--source include/rpl_reset.inc + --echo ######## Run with slave_exec_mode=IDEMPOTENT ######## @@ -28,4 +30,4 @@ source extra/rpl_tests/rpl_conflicts.test; SET @@global.slave_exec_mode= @old_slave_exec_mode; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test index 148032f2987..bfe480f724e 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -29,7 +29,7 @@ SET GLOBAL storage_engine=memory; START SLAVE; --enable_query_log ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a INT, b INT); @@ -65,7 +65,7 @@ SELECT * FROM t5 ORDER BY a,b,c; --query_vertical SHOW CREATE TABLE t6 SELECT * FROM t6 ORDER BY a,b,c; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; # Test for erroneous constructions @@ -84,7 +84,7 @@ SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; CREATE TEMPORARY TABLE tt4 (a INT, b INT); @@ -97,7 +97,7 @@ SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; CREATE TABLE t8 LIKE t4; @@ -127,7 +127,7 @@ START SLAVE; # table' from log): --echo ================ BUG#22864 ================ ---source include/master-slave-reset.inc +--source include/rpl_reset.inc connection master; SET AUTOCOMMIT=0; @@ -164,15 +164,7 @@ SET AUTOCOMMIT=1; sync_slave_with_master; # Some tests with temporary tables -connection slave; -STOP SLAVE; -RESET SLAVE; - -connection master; -RESET MASTER; - -connection slave; -START SLAVE; +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a INT); @@ -198,7 +190,7 @@ connection master; TRUNCATE TABLE t2; sync_slave_with_master; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; BEGIN; @@ -247,7 +239,7 @@ sync_slave_with_master; # BUG#34707: Row based replication: slave creates table within wrong database # -source include/master-slave-reset.inc; +--source include/rpl_reset.inc connection master; --disable_warnings @@ -269,7 +261,7 @@ sync_slave_with_master; # with RBL # -source include/master-slave-reset.inc; +--source include/rpl_reset.inc connection master; CREATE TEMPORARY TABLE t7(c1 INT); @@ -299,6 +291,7 @@ DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3; DROP TEMPORARY TABLES t7; DROP TABLES t4, t5; DROP TABLES IF EXISTS bug48506_t4; + sync_slave_with_master; # @@ -308,9 +301,10 @@ sync_slave_with_master; connection master; CREATE TABLE t1 SELECT 1; CREATE TABLE IF NOT EXISTS t1 SELECT 1; -let $diff_table=test.t1; -source include/rpl_diff_tables.inc; +--let $diff_tables= master:test.t1,slave:test.t1 +--source include/diff_tables.inc DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc + --echo end of the tests diff --git a/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test b/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test index a0e74567349..db41ff09117 100644 --- a/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test +++ b/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test @@ -1,7 +1,3 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc let $engine_type=myisam; -- source extra/rpl_tests/rpl_row_delayed_ins.test diff --git a/mysql-test/suite/rpl/t/rpl_row_drop.test b/mysql-test/suite/rpl/t/rpl_row_drop.test index d18ebc2846b..eca2ae0f643 100644 --- a/mysql-test/suite/rpl/t/rpl_row_drop.test +++ b/mysql-test/suite/rpl/t/rpl_row_drop.test @@ -43,3 +43,4 @@ DROP TABLE IF EXISTS t2; sync_slave_with_master; --enable_warnings --enable_query_log +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_find_row.test b/mysql-test/suite/rpl/t/rpl_row_find_row.test index 9163ab54406..7f633c5aa97 100644 --- a/mysql-test/suite/rpl/t/rpl_row_find_row.test +++ b/mysql-test/suite/rpl/t/rpl_row_find_row.test @@ -50,7 +50,7 @@ DROP TABLE t; # but it gets disabled sometime. # Replication does not break anymore. # --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master CREATE TABLE t (a int, b int, c int, key(b)); @@ -84,8 +84,7 @@ DROP TABLE t; # As a consquence, the wrong row would be updated. # --- connection master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT, UNIQUE KEY(c1,c3), KEY(c2)); @@ -94,11 +93,11 @@ INSERT INTO t1(c1,c2) VALUES(1,2); UPDATE t1 SET c1=1000 WHERE c2=2; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE t1; -- sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test index 667e1d9a1a8..06955ef5a80 100644 --- a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test @@ -14,4 +14,3 @@ let $rename_event_pos= 897; --disable_ps_protocol -- source extra/rpl_tests/rpl_flsh_tbls.test --enable_ps_protocol - diff --git a/mysql-test/suite/rpl/t/rpl_row_func001.test b/mysql-test/suite/rpl/t/rpl_row_func001.test index 53fb55118e6..6ff97388b31 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func001.test +++ b/mysql-test/suite/rpl/t/rpl_row_func001.test @@ -55,3 +55,4 @@ DROP TABLE test.t1; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_func002.test b/mysql-test/suite/rpl/t/rpl_row_func002.test index 44a704bfbc5..2f4e3fdd910 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func002.test +++ b/mysql-test/suite/rpl/t/rpl_row_func002.test @@ -102,3 +102,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func00 # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_func003.test b/mysql-test/suite/rpl/t/rpl_row_func003.test index 30b24cf4174..a17d70e4b04 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func003.test +++ b/mysql-test/suite/rpl/t/rpl_row_func003.test @@ -11,3 +11,4 @@ -- source include/master-slave.inc let $engine_type=INNODB; -- source extra/rpl_tests/rpl_row_func003.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test index 0c038c41ebf..b695428dd38 100644 --- a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test +++ b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test @@ -29,14 +29,16 @@ INSERT INTO t1 VALUES (1); --echo [on slave] connection slave; # slave should have stopped because can't find table t1 ---source include/wait_for_slave_sql_to_stop.inc -# see if we have a good error message: -let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); ---echo Last_SQL_Error = $err +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc --echo ==== Clean up ==== -source include/stop_slave.inc; +source include/stop_slave_io.inc; +RESET SLAVE; --echo [on master] connection master; DROP TABLE t1; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test b/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test index 9aeb57c4fa2..71ae0cb5e17 100644 --- a/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test +++ b/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test @@ -12,3 +12,4 @@ set @@global.binlog_format = row; connection master; set @@global.binlog_format = @old_global_binlog_format; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_log.test b/mysql-test/suite/rpl/t/rpl_row_log.test index 197f83c85af..b156a4c8dd4 100644 --- a/mysql-test/suite/rpl/t/rpl_row_log.test +++ b/mysql-test/suite/rpl/t/rpl_row_log.test @@ -15,3 +15,4 @@ let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_log.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_log_innodb.test b/mysql-test/suite/rpl/t/rpl_row_log_innodb.test index 16e775287b3..631fb29c7bc 100644 --- a/mysql-test/suite/rpl/t/rpl_row_log_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_log_innodb.test @@ -12,3 +12,4 @@ let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_log.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test index 3328d582692..6c9c2c056b0 100644 --- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test +++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test @@ -357,3 +357,4 @@ DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test index 67e4c4fb14d..57d67c5c71b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test @@ -8,3 +8,4 @@ -- let $engine= InnoDB -- source extra/rpl_tests/rpl_record_compare.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test b/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test index 43fa99a51da..e40cd615ca6 100644 --- a/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test @@ -12,7 +12,7 @@ -- echo ## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0 ## Added here because AFAIK it's only MyISAM and NDB that use Field_bits --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master -- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=$engine DEFAULT CHARSET=latin1 @@ -22,10 +22,10 @@ INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); UPDATE t1 SET c1= 0; -- sync_slave_with_master --- let $diff_table_1= master:test.t1 --- let $diff_table_2= slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE t1; -- sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp001.test b/mysql-test/suite/rpl/t/rpl_row_sp001.test index 1595c4a21d5..07345781225 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp001.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp001.test @@ -148,3 +148,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_sl --remove_file $MYSQLTEST_VARDIR/tmp/sp001_slave.sql # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test index e272e34e715..aec421407c9 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test @@ -1,10 +1,3 @@ -################################# -# Wrapper for rpl_row_sp002.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_row_sp003.test b/mysql-test/suite/rpl/t/rpl_row_sp003.test index 391ecd59b22..d4f1ce3ac6b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp003.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp003.test @@ -11,3 +11,4 @@ -- source include/master-slave.inc let $engine_type=INNODB; -- source extra/rpl_tests/rpl_row_sp003.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp005.test b/mysql-test/suite/rpl/t/rpl_row_sp005.test index f5a74325b7c..2a06a6ae1dc 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp005.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp005.test @@ -112,3 +112,4 @@ DROP TABLE IF EXISTS test.t3; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test index e5be4e6dc28..df3952bead1 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test @@ -11,3 +11,4 @@ -- source include/master-slave.inc let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_row_sp006.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test index 41af5a5f997..fcac31df780 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test @@ -1,10 +1,3 @@ -################################# -# Wrapper for rpl_row_sp007.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_row_sp008.test b/mysql-test/suite/rpl/t/rpl_row_sp008.test index b1295820c99..8c3e2966647 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp008.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp008.test @@ -55,3 +55,4 @@ DROP TABLE IF EXISTS test.t2; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp009.test b/mysql-test/suite/rpl/t/rpl_row_sp009.test index 92d47c6f50f..2f05a55e6f8 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp009.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp009.test @@ -103,3 +103,4 @@ DROP TABLE test.t2; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp010.test b/mysql-test/suite/rpl/t/rpl_row_sp010.test index 28b82217517..71ab3c1a772 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp010.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp010.test @@ -78,3 +78,4 @@ DROP TABLE IF EXISTS test.t2; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp011.test b/mysql-test/suite/rpl/t/rpl_row_sp011.test index 25c2fc9ad26..d2a323faad2 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp011.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp011.test @@ -109,3 +109,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_sl --remove_file $MYSQLTEST_VARDIR/tmp/sp011_slave.sql # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp012.test b/mysql-test/suite/rpl/t/rpl_row_sp012.test index 3a8d295121c..23bc92b51cf 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp012.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp012.test @@ -73,3 +73,4 @@ sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test index 9b24c78e62d..b9b7a2cfc0e 100644 --- a/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test +++ b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test @@ -28,5 +28,6 @@ select count(*) from t1; connection master; drop table t1; connection slave; # slave SQL thread is stopped -source include/stop_slave.inc; drop table t1; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test index ab4914e15fa..030ec7d6541 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test @@ -6,3 +6,4 @@ let $engine_type = 'MyISAM'; -- source extra/rpl_tests/rpl_row_tabledefs.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test index 7824fbfb663..35eddfc3ed4 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test @@ -7,3 +7,4 @@ let $engine_type = 'InnoDB'; -- source extra/rpl_tests/rpl_row_tabledefs.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test index d854aa64dc5..e8ac74f0125 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test +++ b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test @@ -193,8 +193,7 @@ FLUSH LOGS; -- connection master -- echo ### assertion: the slave replicated event successfully and tables match --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc DROP TABLE `t1`; @@ -229,7 +228,7 @@ DROP TABLE `t1`; # in both cases: when slave is replaying events and when # mysqlbinlog is used to read the binary log --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master # Create several tables with field_metadata_size ranging @@ -313,8 +312,7 @@ FLUSH LOGS; while($ntables) { -- echo ### assertion: the slave replicated event successfully and tables match for t$ntables - -- let $diff_table_1=master:test.t$ntables - -- let $diff_table_2=slave:test.t$ntables + -- let $diff_tables= master:t$ntables, slave:t$ntables -- source include/diff_tables.inc -- connection master @@ -337,4 +335,4 @@ while($ntables) ## For debugging purposes you might want not to remove these -- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog -- remove_file $generated_sql --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig001.test b/mysql-test/suite/rpl/t/rpl_row_trig001.test index 8669034713a..39f2662b569 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig001.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig001.test @@ -113,3 +113,4 @@ sync_slave_with_master; diff_files $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig002.test b/mysql-test/suite/rpl/t/rpl_row_trig002.test index 7ca8a68f060..2835d07ce2a 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig002.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig002.test @@ -78,3 +78,4 @@ DROP TABLE test.t3; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig003.test b/mysql-test/suite/rpl/t/rpl_row_trig003.test index 5d667e29d69..a4c32e8947a 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig003.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig003.test @@ -152,3 +152,4 @@ DROP TABLE IF EXISTS test.t3; diff_files $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig004.test b/mysql-test/suite/rpl/t/rpl_row_trig004.test index a918c602d56..fa5f973c355 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig004.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig004.test @@ -16,3 +16,4 @@ let $engine_type=INNODB; -- source extra/rpl_tests/rpl_trig004.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test b/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test index 60e1cd73200..394bf949f72 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test +++ b/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test @@ -32,4 +32,4 @@ SELECT * FROM t2; DROP TABLE t1; connection master; DROP TABLE t2; ---source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test b/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test index 069700546ce..9e6485d6630 100644 --- a/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test +++ b/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test @@ -33,3 +33,4 @@ connection master; DROP TABLE t1, t2; sync_slave_with_master; connection master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test index 9e3cbbd325a..afd964ca81a 100644 --- a/mysql-test/suite/rpl/t/rpl_row_until.test +++ b/mysql-test/suite/rpl/t/rpl_row_until.test @@ -4,9 +4,6 @@ # Note: The test is dependent on binlog positions -# prepare version for substitutions -let $VERSION=`select version()`; - # Create some events on master connection master; CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); @@ -121,3 +118,10 @@ START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=561; START SLAVE; --replace_result 740 MASTER_LOG_POS START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=740; + +--source include/stop_slave.inc +# Clear slave IO error. +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_view01.test b/mysql-test/suite/rpl/t/rpl_row_view01.test index 77e4b98f780..cc60ab9912c 100644 --- a/mysql-test/suite/rpl/t/rpl_row_view01.test +++ b/mysql-test/suite/rpl/t/rpl_row_view01.test @@ -95,3 +95,4 @@ sync_slave_with_master; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_wide_table.test b/mysql-test/suite/rpl/t/rpl_row_wide_table.test index 7b17d7c4866..b1d16133096 100644 --- a/mysql-test/suite/rpl/t/rpl_row_wide_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_wide_table.test @@ -337,3 +337,4 @@ sync_slave_with_master; # END of Test Case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_server_id1.test b/mysql-test/suite/rpl/t/rpl_server_id1.test index c97f7975278..90198a4ac5e 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id1.test +++ b/mysql-test/suite/rpl/t/rpl_server_id1.test @@ -4,21 +4,19 @@ # ignored, which has caught our customers), unless # --replicate-same-server-id. -source include/master-slave.inc; -connection slave; -reset master; +--let $rpl_topology= 2->2 +--let $rpl_skip_start_slave= 1 +--source include/rpl_init.inc -# replicate ourselves -source include/stop_slave.inc; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; -start slave; +--connection server_2 +START SLAVE; +# 1593 = ER_SLAVE_FATAL_ERROR +--let $slave_io_errno= 1593 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc -let $slave_param= Last_IO_Errno; -let $slave_param_value= 1593; -source include/wait_for_slave_param.inc; ---echo *** must be having the replicate-same-server-id IO thread error *** -let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1); -let $last_io_error= query_get_value("show slave status", Last_IO_Error, 1); -echo Slave_IO_Errno= $last_io_errno; -echo Slave_IO_Error= $last_io_error; +--source include/stop_slave_sql.inc +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_server_id2.test b/mysql-test/suite/rpl/t/rpl_server_id2.test index 488a3aa6ab6..32d5e1ec8f2 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id2.test +++ b/mysql-test/suite/rpl/t/rpl_server_id2.test @@ -61,3 +61,4 @@ drop table t2; sync_slave_with_master; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_session_var.test b/mysql-test/suite/rpl/t/rpl_session_var.test index 50efc8930a1..4ea07d4f9d6 100644 --- a/mysql-test/suite/rpl/t/rpl_session_var.test +++ b/mysql-test/suite/rpl/t/rpl_session_var.test @@ -63,3 +63,4 @@ drop table t1; save_master_pos; connection slave; sync_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_set_charset.test b/mysql-test/suite/rpl/t/rpl_set_charset.test index c70eb2681f5..53ec08f752f 100644 --- a/mysql-test/suite/rpl/t/rpl_set_charset.test +++ b/mysql-test/suite/rpl/t/rpl_set_charset.test @@ -33,3 +33,4 @@ connection slave; sync_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_set_null_innodb.test b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test index dba79b78fa1..2d0c34e1d0a 100644 --- a/mysql-test/suite/rpl/t/rpl_set_null_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test @@ -4,3 +4,4 @@ -- let $engine= InnoDB -- source extra/rpl_tests/rpl_set_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_set_null_myisam.test b/mysql-test/suite/rpl/t/rpl_set_null_myisam.test index 7b433071553..13cd7c3e4a8 100644 --- a/mysql-test/suite/rpl/t/rpl_set_null_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_set_null_myisam.test @@ -3,3 +3,4 @@ -- let $engine= MyISAM -- source extra/rpl_tests/rpl_set_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_show_slave_running.test b/mysql-test/suite/rpl/t/rpl_show_slave_running.test index 8a3e56975ad..e589e126186 100644 --- a/mysql-test/suite/rpl/t/rpl_show_slave_running.test +++ b/mysql-test/suite/rpl/t/rpl_show_slave_running.test @@ -80,3 +80,4 @@ connection slave; eval set global debug= '$debug_saved'; SET DEBUG_SYNC= 'RESET'; --echo End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test index 8d176ac0c3b..2853c95b212 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_error.test +++ b/mysql-test/suite/rpl/t/rpl_skip_error.test @@ -167,3 +167,4 @@ DROP TABLE t1; DROP TABLE t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test b/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test index 1a0ff8d52f0..70ebba0047b 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test +++ b/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test @@ -62,7 +62,9 @@ SELECT * FROM t2 ORDER BY a; SELECT * FROM t3 ORDER BY a; --connection slave ---source include/wait_for_slave_sql_to_stop.inc +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc SHOW TABLES LIKE 't%'; if (`SELECT @@BINLOG_FORMAT = 'ROW'`) { --replace_regex /AA/AA_for_row_or_XX_for_stmt_mixed/ @@ -77,7 +79,7 @@ if (!`SELECT @@BINLOG_FORMAT = 'ROW'`) { SELECT * FROM t2 ORDER BY a; } ---source include/stop_slave.inc +--source include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; --source include/start_slave.inc @@ -107,7 +109,9 @@ INSERT INTO t1 VALUES(2, 'B'); UPDATE t1 SET b = 'X' WHERE a = 2; --connection slave ---source include/wait_for_slave_sql_to_stop.inc +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc --connection master SELECT * FROM t1 ORDER BY a; @@ -119,7 +123,7 @@ SHOW TABLES LIKE 't%'; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; ---source include/stop_slave.inc +--source include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; --source include/start_slave.inc @@ -151,7 +155,9 @@ INSERT INTO t3 VALUES (3, 'C'), (4, 'D'); COMMIT; --connection slave ---source include/wait_for_slave_sql_to_stop.inc +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc --connection master SELECT * FROM t1 ORDER BY a; @@ -163,7 +169,7 @@ SHOW TABLES LIKE 't%'; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; -source include/stop_slave.inc; +source include/stop_slave_io.inc; RENAME TABLE t3_bak TO t3; source include/start_slave.inc; @@ -174,3 +180,4 @@ DROP TABLE t1,t2,t3; --sync_slave_with_master # End of 5.1 test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_in.test b/mysql-test/suite/rpl/t/rpl_slave_load_in.test index 54ebdffce69..80a27479ae2 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_in.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_in.test @@ -31,12 +31,10 @@ commit; ########################################################################## sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; ########################################################################## @@ -48,3 +46,4 @@ drop table t1; drop table t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test index b7342fd1c40..d80a2ed9e25 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test @@ -42,8 +42,12 @@ connection master; drop table t1; -connection slave; +--source include/sync_slave_io_with_master.inc +--source include/stop_slave_io.inc +RESET SLAVE; drop table t1; call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3"); +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test b/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test index 68c41abf537..0481581998c 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test @@ -5,20 +5,17 @@ --source include/have_log_bin.inc --source include/not_embedded.inc -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); -connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,); +--let $rpl_skip_start_slave= 1 +--source include/master-slave.inc -connection slave; - ---replace_result $MASTER_MYPORT MASTER_MYPORT -eval CHANGE MASTER TO MASTER_USER='root', - MASTER_CONNECT_RETRY=1, - MASTER_HOST='127.0.0.1', - MASTER_PORT=$MASTER_MYPORT; +--connection slave START SLAVE; +# Why 12??? +--let $slave_sql_errno= 12 +source include/wait_for_slave_sql_error.inc; -source include/wait_for_slave_sql_to_stop.inc; -let $errno=query_get_value("show slave status", Last_SQL_Errno, 1); -echo $errno; +--source include/stop_slave_io.inc +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test index 4c5930d74fe..2dddabf4b4c 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -299,3 +299,4 @@ connection master; DROP TABLE t10; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_status.test b/mysql-test/suite/rpl/t/rpl_slave_status.test index 4edf1802a5d..83a18474976 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_status.test +++ b/mysql-test/suite/rpl/t/rpl_slave_status.test @@ -55,15 +55,20 @@ source include/stop_slave.inc; START SLAVE; source include/wait_for_slave_sql_to_start.inc; ---echo ==== Verify that Slave_IO_Running = No ==== -let $result= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); ---echo Slave_IO_Running = $result (should be No) +--echo ==== Verify that Slave IO thread stopped with error ==== +# 1045 = ER_ACCESS_DENIED_ERROR +--let $slave_io_errno= 1045 +--source include/wait_for_slave_io_error.inc --echo ==== Cleanup (Note that slave IO thread is not running) ==== -DROP TABLE t1; -# cleanup: slave io thread has been stopped "irrecoverably" -# so we clean up mess manually + +# cleanup: slave io thread has is stopped so we reset replication +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc --echo [on master] connection master; DROP TABLE t1; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test index ced4859ebe7..76664705f99 100644 --- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test +++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test @@ -195,7 +195,7 @@ disconnect extra2; # BUG#50620: Adding an index to a table prevents slave from logging into slow log # --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master SET @old_log_output= @@log_output; @@ -306,3 +306,4 @@ DROP TABLE t1; -- sync_slave_with_master SET @@global.log_output= @old_log_output; SET @@global.long_query_time= @old_long_query_time; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sp.test b/mysql-test/suite/rpl/t/rpl_sp.test index 243136a0d38..10e23eb5928 100644 --- a/mysql-test/suite/rpl/t/rpl_sp.test +++ b/mysql-test/suite/rpl/t/rpl_sp.test @@ -643,3 +643,4 @@ drop function mysqltestbug36570_f1; # Cleanup sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sp004.test b/mysql-test/suite/rpl/t/rpl_sp004.test index 967e7007c15..b916c78a6fb 100644 --- a/mysql-test/suite/rpl/t/rpl_sp004.test +++ b/mysql-test/suite/rpl/t/rpl_sp004.test @@ -95,3 +95,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_sl # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects.test b/mysql-test/suite/rpl/t/rpl_sp_effects.test index 63ac3a8ad9c..df13ff253b1 100644 --- a/mysql-test/suite/rpl/t/rpl_sp_effects.test +++ b/mysql-test/suite/rpl/t/rpl_sp_effects.test @@ -261,3 +261,4 @@ SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creato sync_slave_with_master; --echo end of the tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sporadic_master.test b/mysql-test/suite/rpl/t/rpl_sporadic_master.test index 824f7abc9f5..2a60a5c5e29 100644 --- a/mysql-test/suite/rpl/t/rpl_sporadic_master.test +++ b/mysql-test/suite/rpl/t/rpl_sporadic_master.test @@ -27,3 +27,4 @@ drop table t1,t2; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ssl.test b/mysql-test/suite/rpl/t/rpl_ssl.test index 803b08eeec5..0ba88a62242 100644 --- a/mysql-test/suite/rpl/t/rpl_ssl.test +++ b/mysql-test/suite/rpl/t/rpl_ssl.test @@ -97,4 +97,14 @@ drop user replssl@localhost; drop table t1; sync_slave_with_master; +--source include/stop_slave.inc +CHANGE MASTER TO + master_user = 'root', + master_ssl = 0, + master_ssl_ca = '', + master_ssl_cert = '', + master_ssl_key = ''; + --echo End of 5.0 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ssl1.test b/mysql-test/suite/rpl/t/rpl_ssl1.test index eca6a8cf46e..0a64415dbd8 100644 --- a/mysql-test/suite/rpl/t/rpl_ssl1.test +++ b/mysql-test/suite/rpl/t/rpl_ssl1.test @@ -9,11 +9,8 @@ source include/master-slave.inc; connection master; grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int); -save_master_pos; -#syncing with master -connection slave; -sync_with_master; +sync_slave_with_master; #trying to use this user without ssl stop slave; @@ -37,9 +34,7 @@ start slave; #avoiding unneeded sleeps connection master; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; #checking that replication is ok select * from t1; @@ -56,9 +51,8 @@ start slave; connection master; drop user replssl@localhost; drop table t1; -save_master_pos; -connection slave; -sync_with_master; + +sync_slave_with_master; source include/show_slave_status.inc; source include/check_slave_is_running.inc; # End of 4.1 tests @@ -90,6 +84,19 @@ select * from t1; source include/show_slave_status.inc; --source include/check_slave_is_running.inc +# ==== Clean up ==== + connection master; drop table t1; sync_slave_with_master; +--source include/stop_slave.inc +CHANGE MASTER TO + master_host="127.0.0.1", + master_ssl_ca ='', + master_ssl_cert='', + master_ssl_key='', + master_ssl_verify_server_cert=0, + master_ssl=0; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test index d9b87427321..5011dd7735a 100644 --- a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test @@ -121,3 +121,4 @@ drop table t1i, t2m; sync_slave_with_master; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test index aee067b2d4a..9841ecb040a 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_000001.test +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -1,2 +1,128 @@ -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_000001.test +# Requires binlog_format=statement format since query involving +# get_lock() is logged in row format if binlog_format=mixed or row. +-- source include/have_binlog_format_statement.inc +-- source include/master-slave.inc + +--let $engine_type= myisam +CALL mtr.add_suppression("Statement may not be safe to log in statement format."); + +# Load some data into t1 +create table t1 (word char(20) not null); +load data infile '../../std_data/words.dat' into table t1; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1; +select * from t1 limit 10; + +# +# Test slave with wrong password +# +sync_slave_with_master; +stop slave; +connection master; +set password for root@"localhost" = password('foo'); +connection slave; +start slave; +connection master; +# +# Give slave time to do at last one failed connect retry +# This one must be short so that the slave will not stop retrying +real_sleep 2; +set password for root@"localhost" = password(''); +# Give slave time to connect (will retry every second) +sleep 2; + +create table t3(n int); +insert into t3 values(1),(2); +sync_slave_with_master; +select * from t3; +select sum(length(word)) from t1; +connection master; +drop table t1,t3; +sync_slave_with_master; + +# Test if the slave SQL thread can be more than 16K behind the slave +# I/O thread (> IO_SIZE) + +connection master; +# we'll use table-level locking to delay slave SQL thread +eval create table t1 (n int) engine=$engine_type; +sync_slave_with_master; +connection master; +reset master; +connection slave; +stop slave; +reset slave; + +connection master; +let $1=5000; +# Generate 16K of relay log +disable_query_log; +while ($1) +{ + eval insert into t1 values($1); + dec $1; +} +enable_query_log; + +# Try to cause a large relay log lag on the slave by locking t1 +connection slave; +lock tables t1 read; +start slave; +#hope this is long enough for I/O thread to fetch over 16K relay log data +sleep 3; +unlock tables; + +#test handling of aborted connection in the middle of update + +connection master; +create table t2(id int); +insert into t2 values(connection_id()); + +connection master1; +# Avoid generating result +create temporary table t3(n int); +--disable_warnings +insert into t3 select get_lock('crash_lock%20C', 1) from t2; +--enable_warnings + +connection master; +send update t1 set n = n + get_lock('crash_lock%20C', 2); +connection master1; +sleep 3; +select (@id := id) - id from t2; +kill @id; +# We don't drop t3 as this is a temporary table +drop table t2; +connection master; +# The get_lock function causes warning for unsafe statement. +--disable_warnings +--error 1317,2013 +reap; +--enable_warnings +connection slave; +# The SQL slave thread should now have stopped because the query was killed on +# the master (so it has a non-zero error code in the binlog). +# 1053 = ER_SERVER_SHUTDOWN +--let $slave_sql_errno= 1053 +--source include/wait_for_slave_sql_error_and_skip.inc + +select count(*) from t1; +connection master1; +drop table t1; +create table t1 (n int); +insert into t1 values(3456); +insert into mysql.user (Host, User, Password) + VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); +select select_priv,user from mysql.user where user = _binary'blafasel2'; +update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; +select select_priv,user from mysql.user where user = _binary'blafasel2'; +sync_slave_with_master; +select n from t1; +select select_priv,user from mysql.user where user = _binary'blafasel2'; +connection master1; +drop table t1; +delete from mysql.user where user="blafasel2"; +sync_slave_with_master; + +# End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test b/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test index a8139bbbcd2..6381150217f 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test +++ b/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test @@ -108,3 +108,4 @@ DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; enable_warnings; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test b/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test index f0c36c7b40c..2a899b06a2d 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test +++ b/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test @@ -228,3 +228,4 @@ sync_slave_with_master; --echo ################################################################################### SET @commands= 'clean'; --source extra/rpl_tests/rpl_mixing_engines.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_conflicts.test b/mysql-test/suite/rpl/t/rpl_stm_conflicts.test index 07b7a0bf8f7..cd9e71cbff9 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_conflicts.test +++ b/mysql-test/suite/rpl/t/rpl_stm_conflicts.test @@ -1,11 +1,6 @@ -# See the top of mysql-test/extra/rpl_tests/rpl_conflicts.test for an -# explanation of what this test does. -# -# This test file is for statement-logging mode. - source include/have_binlog_format_mixed_or_statement.inc; source include/master-slave.inc; source extra/rpl_tests/rpl_conflicts.test; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test index 69866cad267..b72a2e1532d 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test @@ -11,4 +11,4 @@ source extra/rpl_tests/rpl_stm_create_if_not_exists.test; let $is_temporary=1; source extra/rpl_tests/rpl_stm_create_if_not_exists.test; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test index a8a33d05e8b..71272c1d01d 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test @@ -3,6 +3,3 @@ let $rename_event_pos= 656; -- source extra/rpl_tests/rpl_flsh_tbls.test - -# End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012. Delete me if needed. diff --git a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test index d55e3a4da2c..e9ee040c890 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test +++ b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test @@ -18,3 +18,4 @@ set @@global.binlog_format = mixed; connection master; set @@global.binlog_format = @old_global_binlog_format; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_loadfile.test b/mysql-test/suite/rpl/t/rpl_stm_loadfile.test index 3db8385a2f2..acf8c9a1bde 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_loadfile.test +++ b/mysql-test/suite/rpl/t/rpl_stm_loadfile.test @@ -18,3 +18,4 @@ -- source extra/rpl_tests/rpl_loadfile.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_log.test b/mysql-test/suite/rpl/t/rpl_stm_log.test index 7bc17fbaada..7e7e1d4033f 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_log.test +++ b/mysql-test/suite/rpl/t/rpl_stm_log.test @@ -7,3 +7,4 @@ let $engine_type=MyISAM; # End of 4.1 tests # Adding comment for force manual merge 5.0 -> wl1012: Delete me +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test b/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test index 950aa8b322a..1a7139c889a 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test +++ b/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test @@ -6,6 +6,3 @@ # Requires statement logging -- source include/have_binlog_format_mixed_or_statement.inc -- source extra/rpl_tests/rpl_max_relay_size.test - -# End of 4.1 tests -# diff --git a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test index 4086fd03ca1..575180e9177 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test @@ -8,7 +8,7 @@ # BUG#49522: Replication problem with mixed MyISAM/InnoDB # --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master CREATE TABLE `t1` ( @@ -32,12 +32,11 @@ SET AUTOCOMMIT=1; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE `t1`; -- sync_slave_with_master --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_multi_query.test b/mysql-test/suite/rpl/t/rpl_stm_multi_query.test index c39d1fad015..e234f4b9622 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_multi_query.test +++ b/mysql-test/suite/rpl/t/rpl_stm_multi_query.test @@ -3,10 +3,5 @@ # CLIENT_MULTI_STATEMENTS) will be binlogged ONE-query-per-event (not # one binlog event containing all queries) -# Requires statement logging -- source include/have_binlog_format_mixed_or_statement.inc -- source extra/rpl_tests/rpl_multi_query.test - - -# End of 4.1 tests -# diff --git a/mysql-test/suite/rpl/t/rpl_stm_no_op.test b/mysql-test/suite/rpl/t/rpl_stm_no_op.test index 66dc89bd712..1605b177ac4 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_no_op.test +++ b/mysql-test/suite/rpl/t/rpl_stm_no_op.test @@ -91,3 +91,4 @@ select * from t2; connection master; drop table t1, t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test b/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test index d5aac4a43e2..0eb41d1c6bd 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test +++ b/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test @@ -22,3 +22,4 @@ DROP TABLE t1; -- echo # duplicate key error (because it has received event -- echo # with expected error code). -- sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_until.test b/mysql-test/suite/rpl/t/rpl_stm_until.test index ee9501681a1..7f041ae5123 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_until.test +++ b/mysql-test/suite/rpl/t/rpl_stm_until.test @@ -69,7 +69,7 @@ select * from t1; --let $slave_param_value= $master_log_pos_1 --source include/check_slave_param.inc -let $relay_log_file= slave-relay-bin.000004; +let $relay_log_file= slave-relay-bin.000003; let $master_log_pos= $master_log_pos_2; source include/get_relay_log_pos.inc; # try replicate all up to and not including the second insert to t2; @@ -192,10 +192,9 @@ sync_with_master; # to substitute the genuine one with a prepared on 4.1 server. # ---source include/master-slave-reset.inc +--source include/rpl_reset.inc connection master; -drop table if exists t1; # there is create table t1 in bug47142_master-bin.000001 flush logs; let $MYSQLD_DATADIR= `select @@datadir`; --remove_file $MYSQLD_DATADIR/master-bin.000001 @@ -213,9 +212,7 @@ show tables /* t1 must exist */; drop table t1; # drop on slave only, master does not have t1. stop slave; -reset slave; - -connection master; -reset master; # End of tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stop_slave.test index e44cf3e94b7..e7c67448dbe 100644 --- a/mysql-test/suite/rpl/t/rpl_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test @@ -57,4 +57,4 @@ SET GLOBAL debug= '$debug_save'; connection master; DROP TABLE t1, t2; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test index e6c1d5256a0..02bb386fe3b 100644 --- a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test +++ b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test @@ -611,3 +611,4 @@ sync_slave_with_master; connection master; # Restore binlog format setting set global binlog_format =@my_binlog_format; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temp_table.test b/mysql-test/suite/rpl/t/rpl_temp_table.test index 9b73961aeea..4118e9783fa 100644 --- a/mysql-test/suite/rpl/t/rpl_temp_table.test +++ b/mysql-test/suite/rpl/t/rpl_temp_table.test @@ -54,6 +54,7 @@ show status like 'Slave_open_temp_tables'; connect (master2,localhost,root,,); connection master2; drop table if exists t1,t2; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; + + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test index fa3f7929c1c..2369a3c00e2 100644 --- a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test +++ b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test @@ -32,6 +32,7 @@ SHOW STATUS LIKE "Slave_open_temp_tables"; --connection master disconnect master; +--echo [on master1] --connection master1 # waiting DROP TEMPORARY TABLE event to be written into binlog @@ -47,7 +48,10 @@ SHOW STATUS LIKE "Slave_open_temp_tables"; --echo ==== Clean up ==== --echo [on master] ---connection master1 +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc +--connection master DROP TABLE t1; --echo [on slave] @@ -89,8 +93,7 @@ sync_slave_with_master; # 10. in the end the slave should not have open temp tables. # -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master # action: setup environment @@ -191,11 +194,13 @@ COMMIT; source include/show_binlog_events.inc; +--sync_slave_with_master + --echo # Compare the base table. -let diff_table= test.t1; -source include/rpl_diff_tables.inc; +--let $diff_tables= master:t1, slave:t1 +--source include/diff_tables.inc --echo connection master; DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test index 29b214e5169..a195c6de447 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary.test +++ b/mysql-test/suite/rpl/t/rpl_temporary.test @@ -291,10 +291,15 @@ select * from t1; connection master; drop table t1; --remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql +--sync_slave_with_master -# Delete the anonymous users +# Delete the anonymous users. +--source include/stop_slave.inc source include/delete_anonymous_users.inc; - +--connection master +source include/delete_anonymous_users.inc; +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc # @@ -326,9 +331,7 @@ connection slave; DROP USER user43748@127.0.0.1; ---echo -- done. back to master. -connection master; - - --echo End of 5.1 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temporary_errors.test b/mysql-test/suite/rpl/t/rpl_temporary_errors.test index 611f54e821f..7ebaa10e9db 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test +++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test @@ -27,13 +27,13 @@ set @@global.slave_exec_mode= default; SHOW STATUS LIKE 'Slave_retried_transactions'; SELECT * FROM t1; source include/check_slave_is_running.inc; -DROP TABLE t1; --echo **** On Master **** connection master; -SET SQL_LOG_BIN= 0; DROP TABLE t1; -SET SQL_LOG_BIN= 1; +--sync_slave_with_master +--connection master + # BUG#Bug #53259 Unsafe statement binlogged in statement format w/MyIsam temp tables # @@ -71,3 +71,5 @@ ROLLBACK; source include/show_binlog_events.inc; DROP TABLE t_myisam, t_innodb; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_test_framework.cnf b/mysql-test/suite/rpl/t/rpl_test_framework.cnf new file mode 100644 index 00000000000..8934d1c9ae1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_test_framework.cnf @@ -0,0 +1,46 @@ +!include ../my.cnf +[mysqld.1] +log-slave-updates +[mysqld.2] +log-slave-updates +[mysqld.3] +log-slave-updates +[mysqld.4] +log-slave-updates +[mysqld.5] +log-slave-updates +[mysqld.6] +log-slave-updates +[mysqld.7] +log-slave-updates +[mysqld.8] +log-slave-updates +[mysqld.9] +log-slave-updates +#[mysqld.10] +#log-slave-updates +#[mysqld.11] +#log-slave-updates +#[mysqld.12] +#log-slave-updates +#[mysqld.13] +#log-slave-updates +#[mysqld.14] +#log-slave-updates +#[mysqld.15] +#log-slave-updates + +[ENV] +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYPORT_4= @mysqld.4.port +SERVER_MYPORT_5= @mysqld.5.port +SERVER_MYPORT_6= @mysqld.6.port +SERVER_MYPORT_7= @mysqld.7.port +SERVER_MYPORT_8= @mysqld.8.port +SERVER_MYPORT_9= @mysqld.9.port +#SERVER_MYPORT_10= @mysqld.10.port +#SERVER_MYPORT_11= @mysqld.11.port +#SERVER_MYPORT_12= @mysqld.12.port +#SERVER_MYPORT_13= @mysqld.13.port +#SERVER_MYPORT_14= @mysqld.14.port +#SERVER_MYPORT_15= @mysqld.15.port diff --git a/mysql-test/suite/rpl/t/rpl_test_framework.test b/mysql-test/suite/rpl/t/rpl_test_framework.test new file mode 100644 index 00000000000..e0f961caff1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_test_framework.test @@ -0,0 +1,143 @@ +# ==== Purpose ==== +# +# Test that the sync chain generated by +# include/rpl_change_topology.inc (sourced from include/rpl_init.inc) +# is correct. +# +# We test a number of different topologies. Each topology is tested +# in extra/rpl_tests/rpl_test_framework.inc. See +# extra/rpl_tests/rpl_test_framework.inc for details on how the sync +# chain is tested. +# +# ==== Related bugs ==== +# +# BUG#49978: Replication tests don't clean up replication state at the end + + +# We only need to execute this test once. Also, we rely on 'DELETE +# FROM t1' to remove rows in slave tables that don't exist in master +# tables (see include/rpl_test_framework.inc for details). +--source include/have_binlog_format_statement.inc + + +--echo ==== Create t1 on all servers. ==== +if ($mtr_supports_more_than_10_servers) +{ + --let $rpl_server_count= 15 + --let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15 +} +if (!$mtr_supports_more_than_10_servers) +{ + --let $rpl_server_count= 9 + --let $rpl_topology= 1->2->3->4->5->6->7->8->9 +} +--source include/rpl_init.inc +CREATE TABLE t1 (a INT); +--source include/rpl_end.inc + +# Initialize $next_number before first call to +# extra/rpl_tests/rpl_test_framework.text +--let $next_number= 0 + + +--echo ==== Test 3-server topologies ==== + +--let $rpl_server_count= 3 + +--let $rpl_topology= 1 -> 2 +--let $masters= 1,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 2 -> 3 +--let $masters= 1,2 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= none +--let $masters= 1,2,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2, 2->1 +--let $masters= 1,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2->1 +--let $masters= 2,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 2->1->2 +--let $masters= 1,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2->3 +--let $masters= 1 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 2->3->2->1 +--let $masters= 3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2,2->3,3->1 +--let $masters= 3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->3->2->1 +--let $masters= 3 +--source extra/rpl_tests/rpl_test_framework.inc + + +--echo ==== Test 6-server topologies ==== + +--let $rpl_server_count= 6 + +--let $rpl_topology= 1->2->3->4->1->5->6 +--let $masters= 1 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 3->4->5->6->3->1->2 +--let $masters= 4 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 6->5->4->3->2->1 +--let $masters= 6 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2->3->1,4->5->6 +--let $masters= 3,4 +--source extra/rpl_tests/rpl_test_framework.inc + + +--echo ==== Test 9-server topology ==== + +--let $rpl_server_count= 9 + +--let $rpl_topology= 1->2, 2->3, 3->4, 4->5, 5->1, 1->6, 6->7, 6->8, 8->9 +--let $masters= 2 +--source extra/rpl_tests/rpl_test_framework.inc + +if ($mtr_supports_more_than_10_servers) { +--echo ==== Test 15-server topologies ==== + +--let $rpl_server_count= 15 + +--let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15->1 +--let $masters= 2 +--source extra/rpl_tests/rpl_test_framework.inc + +# This is a binary tree +--let $rpl_topology= 1->2->4->8,1->3->6->12,2->5->10,3->7->14,4->9,5->11,6->13,7->15 +--let $masters= 1 +--source extra/rpl_tests/rpl_test_framework.inc +} + +--echo ==== Clean up ==== + +if ($mtr_supports_more_than_10_servers) { + --let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15 +} +if (!$mtr_supports_more_than_10_servers) { + --let $rpl_topology= 1->2->3->4->5->6->7->8->9 +} +--source include/rpl_init.inc +--connection server_1 +DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_timezone.test b/mysql-test/suite/rpl/t/rpl_timezone.test index 45d1f12b5d5..5b8b1df2652 100644 --- a/mysql-test/suite/rpl/t/rpl_timezone.test +++ b/mysql-test/suite/rpl/t/rpl_timezone.test @@ -164,6 +164,8 @@ SET @@session.time_zone = default; connection master; DROP TABLE t1; SET @@session.time_zone = default; +--sync_slave_with_master +--source include/stop_slave.inc # Bug#41719 delayed INSERT into timestamp col needs set time_zone for concurrent binlogging # To test that time_zone is correctly binloging for 'insert delayed' statement @@ -196,4 +198,7 @@ select * from t1 order by a; DROP TABLE t1; SET @@session.time_zone = default; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc + --echo End of 5.0 tests diff --git a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test index b3efb578b68..cbd4ed5a097 100644 --- a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test +++ b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test @@ -12,3 +12,4 @@ LET $ENGINE_TYPE= MyISAM; source extra/rpl_tests/rpl_tmp_table_and_DDL.test; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test index afa80e9c3f5..861b76ed00a 100644 --- a/mysql-test/suite/rpl/t/rpl_trigger.test +++ b/mysql-test/suite/rpl/t/rpl_trigger.test @@ -312,20 +312,19 @@ let $MYSQLD_DATADIR= `select @@datadir`; FLUSH LOGS; # Stop master server ---echo --> Stop master server ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---shutdown_server 10 ---source include/wait_until_disconnected.inc +--let $rpl_server_number= 1 +--source include/rpl_stop_server.inc + # Replace binlog remove_file $MYSQLD_DATADIR/master-bin.000001; copy_file $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLD_DATADIR/master-bin.000001; - ---echo --> Start master server ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---enable_reconnect ---source include/wait_until_connected_again.inc + +--let $rpl_server_number= 1 +--source include/rpl_start_server.inc + let $binlog_version= query_get_value(SHOW BINLOG EVENTS, Info, 1); + # Make the slave to replay the new binlog. --echo --> Master binlog: $binlog_version @@ -501,7 +500,8 @@ sync_slave_with_master; # connection master; -source include/master-slave-reset.inc; +--source include/rpl_reset.inc + source include/have_innodb.inc; connection slave; source include/have_innodb.inc; @@ -518,12 +518,10 @@ insert into t1 values ( 1 ); rollback; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; --source include/diff_tables.inc -let $diff_table_1=master:test.log; -let $diff_table_2=slave:test.log; +let $diff_tables= master:log, slave:log; --source include/diff_tables.inc connection master; @@ -533,3 +531,4 @@ sync_slave_with_master; # # End of tests # +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_trunc_temp.test b/mysql-test/suite/rpl/t/rpl_trunc_temp.test index 88ecb7c18b0..0e7d5483f62 100644 --- a/mysql-test/suite/rpl/t/rpl_trunc_temp.test +++ b/mysql-test/suite/rpl/t/rpl_trunc_temp.test @@ -52,3 +52,6 @@ let $wait_binlog_event= DROP; source include/wait_for_binlog_event.inc; show status like 'Slave_open_temp_tables'; + + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test b/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test index a0f0ea04f44..bea6332963e 100644 --- a/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test @@ -1,4 +1,3 @@ --source include/not_ndb_default.inc let $engine=MyISAM; --source extra/rpl_tests/rpl_truncate.test - diff --git a/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test b/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test index a31fd62a29a..093cf56a316 100644 --- a/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test +++ b/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test @@ -1,6 +1,4 @@ - --source include/have_innodb.inc --source include/not_ndb_default.inc - let $engine=InnoDB; --source extra/rpl_tests/rpl_truncate.test diff --git a/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test b/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test index e7882b28065..d4aae5736b4 100644 --- a/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test @@ -6,17 +6,16 @@ # BUG#49618: Field length stored incorrectly in binary log for InnoDB # -source include/reset_master_and_slave.inc; - connection master; CREATE TABLE t1(b1 BIT(1), b2 BIT(2), b3 BIT(3)) ENGINE=InnoDB; INSERT INTO t1 VALUES (b'0', b'01', b'101'); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; DROP TABLE t1; sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_udf.test b/mysql-test/suite/rpl/t/rpl_udf.test index 262ad04630c..452431e2f52 100644 --- a/mysql-test/suite/rpl/t/rpl_udf.test +++ b/mysql-test/suite/rpl/t/rpl_udf.test @@ -20,3 +20,4 @@ set binlog_format=statement; # Embedded server doesn't support binlogging --source include/rpl_udf.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_user.test b/mysql-test/suite/rpl/t/rpl_user.test index b8fe41d03c4..caa17b47733 100644 --- a/mysql-test/suite/rpl/t/rpl_user.test +++ b/mysql-test/suite/rpl/t/rpl_user.test @@ -59,3 +59,4 @@ select Host,User from mysql.user where Host='fakehost'; # connection master; source include/show_binlog_events.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_user_variables.test b/mysql-test/suite/rpl/t/rpl_user_variables.test index 8d570f28f64..d496458c3fb 100644 --- a/mysql-test/suite/rpl/t/rpl_user_variables.test +++ b/mysql-test/suite/rpl/t/rpl_user_variables.test @@ -378,4 +378,5 @@ DROP FUNCTION f2; DROP TABLE t1; sync_slave_with_master; -stop slave; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_variables.test b/mysql-test/suite/rpl/t/rpl_variables.test index 6c3b3ab6d8a..001b8a6bc8e 100644 --- a/mysql-test/suite/rpl/t/rpl_variables.test +++ b/mysql-test/suite/rpl/t/rpl_variables.test @@ -109,9 +109,7 @@ SET @user_text = 'Alunda'; # Stop slave so that we get a fresh sql thread, reading the slave's # global values of variables into its local copies. ---echo [on master] -connection master; -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc # We would have wanted to set this together with the other variables # above, but can't because it affects how the slave works. @@ -679,30 +677,11 @@ EXECUTE p61; EXECUTE p62; EXECUTE p63; EXECUTE p64; # Show the result in table test.tstmt on master... SELECT * FROM tstmt ORDER BY id; -let $diff_table_1=master:test.tstmt; -# ... then compare test.tstmt on master to the other tables on master... -let $diff_table_2=master:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=master:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=master:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=master:test.tprep; -source include/diff_tables.inc; +--sync_slave_with_master -# ... and to all tables on slave. -connection master; -sync_slave_with_master; -let $diff_table_2=slave:test.tstmt; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tprep; +# ... then compare test.tstmt on master to the other tables on master and slave. +let $diff_tables= master:tstmt,tproc,tfunc,ttrig,tprep, slave:tstmt,tproc,tfunc,ttrig,tprep; source include/diff_tables.inc; @@ -737,3 +716,4 @@ SET @@global.sync_binlog= @s_sync_binlog; connection master; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_variables_stm.test b/mysql-test/suite/rpl/t/rpl_variables_stm.test index 85152ae878a..f2f535f27d1 100644 --- a/mysql-test/suite/rpl/t/rpl_variables_stm.test +++ b/mysql-test/suite/rpl/t/rpl_variables_stm.test @@ -575,29 +575,11 @@ EXECUTE p61; EXECUTE p62; EXECUTE p63; EXECUTE p64; # Show the result in table test.tstmt on master... SELECT * FROM tstmt ORDER BY id; -let $diff_table_1=master:test.tstmt; -# ... then compare test.tstmt on master to the other tables on master... -let $diff_table_2=master:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=master:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=master:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=master:test.tprep; -source include/diff_tables.inc; +--sync_slave_with_master -# ... and to all tables on slave. -sync_slave_with_master; -let $diff_table_2=slave:test.tstmt; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tprep; +# ... then compare test.tstmt on master to the other tables on master and slave. +let $diff_tables= master:tstmt,tproc,tfunc,ttrig,tprep, slave:tstmt,tproc,tfunc,ttrig,tprep; source include/diff_tables.inc; @@ -634,3 +616,4 @@ SET @@global.collation_database= @s_collation_database; connection master; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_view.test b/mysql-test/suite/rpl/t/rpl_view.test index 1053514bfec..5d878fda205 100644 --- a/mysql-test/suite/rpl/t/rpl_view.test +++ b/mysql-test/suite/rpl/t/rpl_view.test @@ -183,3 +183,4 @@ DROP TABLE t1; sync_slave_with_master; --echo End of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result index 28ca1ac43b9..eae70ca5a69 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET storage_engine=ndb; === NDB -> MYISAM === @@ -805,3 +801,4 @@ TRUNCATE TABLE t1; DROP TABLE IF EXISTS t1; drop table mysql.ndb_apply_status; set @@global.slave_exec_mode= @old_slave_exec_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result index 6babf49dcaa..136aee25fe2 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=NDB; @@ -38,3 +34,4 @@ DROP PROCEDURE test.p1; DROP FUNCTION test.fn1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result index 0fcd361da21..5e44591f87e 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] *** on slave there should be zero rows *** select count(*) from mysql.ndb_apply_status; count(*) @@ -18,3 +14,4 @@ select count(*) from mysql.ndb_apply_status; count(*) 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result index dd4cc90a75f..c537fb85ad2 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ***************** Test 1 ************************ CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; @@ -168,3 +164,4 @@ a 32 42 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result index d43165e2b5e..6109ea0b742 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', `nom` char(4) default NULL, `prenom` char(4) default NULL, @@ -140,7 +136,8 @@ set GLOBAL slave_transaction_retries=1; **** On Master **** UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; **** On Slave **** -Last_SQL_Error = Could not execute Write_rows event on table test.t1; Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB, Error_code: 1297; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log master-bin.000001, end_log_pos 6834 +include/wait_for_slave_sql_error.inc [errno=1205 ] +Last_SQL_Error = 'Could not execute Write_rows event on table test.t1; Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB, Error_code: 1297; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log master-bin.000001, end_log_pos 6834' set GLOBAL slave_transaction_retries=10; include/start_slave.inc select * from t1 order by nid; @@ -191,3 +188,4 @@ c1 104 105 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result index c11de8c27e3..537af85d766 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 ( a int not null primary key, b text not null @@ -133,3 +129,4 @@ S testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 S testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 S testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result index 055efffbd6a..4fb33dc4b6b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; ***** Table Create Section **** @@ -154,3 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result index dfbd7a37d8e..7ff7830449f 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result @@ -1,12 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -RESET MASTER; -CHANGE MASTER TO master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; -START SLAVE; +include/rpl_init.inc [topology=1->2->1] +include/rpl_connect.inc [creating master] +include/rpl_connect.inc [creating slave] CREATE TABLE t1 (a int key, b int) ENGINE=ndb; SHOW TABLES; Tables_in_test @@ -17,11 +11,12 @@ SELECT * FROM t1 ORDER BY a; a b 1 2 2 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT * FROM t1 ORDER BY a; a b 1 2 2 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc STOP SLAVE; DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result index b7d4a3d76db..75aa37f99f3 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result @@ -1,21 +1,8 @@ -STOP SLAVE; -STOP SLAVE; -STOP SLAVE; -STOP SLAVE; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_MYPORT,master_user='root'; -START SLAVE; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=SLAVE_MYPORT1,master_user='root'; -START SLAVE; +include/rpl_init.inc [topology=1->2,4->3] +include/rpl_connect.inc [creating master] +include/rpl_connect.inc [creating master1] +include/rpl_connect.inc [creating slave] +include/rpl_connect.inc [creating slave1] *** Check server_id of mysqld servers *** SHOW VARIABLES LIKE "server_id"; @@ -45,20 +32,20 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, *** Basic testing *** Insert rows via all hosts Check data on both clusters -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] *** Transaction testing *** BEGIN; BEGIN; COMMIT; COMMIT; Check data on both clusters -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] BEGIN; BEGIN; ROLLBACK; ROLLBACK; Check data on both clusters -Comparing tables master:test.t1 and slave:test.t1 -DROP TABLE t1; +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result index 99438d663bb..f3a4c132ee3 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a int key, b int) ENGINE=NDB; SHOW TABLES; Tables_in_test @@ -12,9 +8,9 @@ RESET MASTER; INSERT INTO t1 VALUES (1,2); INSERT INTO t1 VALUES (2,3); STOP SLAVE; -CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=SLAVE_PORT,MASTER_USER="root"; +include/rpl_change_topology.inc [new topology=1->2->1] START SLAVE; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT * FROM t1 ORDER BY a; a b 1 2 @@ -25,5 +21,6 @@ SELECT * FROM t1 ORDER BY a; a b 1 2 2 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result index 3fc4ca26967..21546ed6524 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT) ENGINE=NDB; begin; insert into t1 values(1); @@ -11,3 +7,4 @@ flush tables with read lock; commit; unlock tables; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result index a6e2144f532..aa67c678773 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] show variables like 'collation_server'; Variable_name Value collation_server ucs2_unicode_ci @@ -25,3 +21,4 @@ nid nom prenom 1 XYZ1 ABC1 ==== clean up ==== DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result index 6a0c863440e..6fda18ba207 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' @@ -70,3 +66,4 @@ drop datafile 'datafile02.dat' engine=ndb; DROP TABLESPACE ts1 ENGINE=NDB; DROP LOGFILE GROUP lg1 ENGINE=NDB; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result index c906f00bd40..acead977487 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] --- Doing pre test cleanup --- DROP TABLE IF EXISTS t1; CREATE LOGFILE GROUP lg1 @@ -788,3 +784,4 @@ drop datafile 'datafile02.dat' engine=ndb; DROP TABLESPACE ts1 ENGINE=NDB; DROP LOGFILE GROUP lg1 ENGINE=NDB; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result index e668b57293e..3ceb66f076a 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] -------- switch to master ------- SET AUTOCOMMIT = 1; @@ -1626,3 +1622,4 @@ use test; -------- switch to master ------- DROP DATABASE mysqltest1; DROP DATABASE mysqltest3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result index 1cecb030181..5f61e4d7803 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int, b int) engine=NDB; insert into t1 values(1,1); select * from t1; @@ -13,3 +9,4 @@ delete from t1; select * from t1; a b drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result index 316f5fc7e31..6171d10657f 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS replica; CREATE DATABASE replica; CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; @@ -56,3 +52,4 @@ Tables_in_test USE test; DROP TABLE t1, t2; DROP DATABASE IF EXISTS replica; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result index dda2844f6d0..6ac55944e33 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; @@ -24,3 +20,4 @@ ERROR 23000: Duplicate entry '3' for key 'PRIMARY' INSERT INTO t1 VALUES (3, repeat('bad too',1)); ERROR 23000: Duplicate entry '3' for key 'PRIMARY' DROP TABLE IF EXISTS t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result index 1a79affabe6..9ae340d713e 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); **** Diff Table Def Start **** *** On Slave *** @@ -54,7 +50,8 @@ a b c 3 4 QA TESTING *** Start Slave *** START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size. +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.' STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -83,10 +80,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3' *** Drop t3 *** DROP TABLE t3; *** Create t4 on slave *** @@ -108,10 +103,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3' *** Drop t4 *** DROP TABLE t4; *** Create t5 on slave *** @@ -133,10 +126,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246' *** Drop t5 *** DROP TABLE t5; *** Create t6 on slave *** @@ -157,7 +148,8 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** -Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3' SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -231,10 +223,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5' *** Drop t10 *** DROP TABLE t10; *** Create t11 on slave *** @@ -255,10 +245,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252' *** Drop t11 *** DROP TABLE t11; *** Create t12 on slave *** @@ -468,10 +456,8 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; ******************************************** *** Expect slave to fail with Error 1060 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1060] +Last_SQL_Error = 'Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'' *** Try to insert in master **** INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); SELECT * FROM t15 ORDER BY c1; @@ -571,9 +557,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2' ** DROP table t17 *** DROP TABLE t17; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result index 7e750f2ce2a..3829d1468fd 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); DROP FUNCTION IF EXISTS test.f1; DROP TABLE IF EXISTS test.t1; @@ -28,3 +24,4 @@ ROLLBACK; SET AUTOCOMMIT=1; DROP FUNCTION test.f1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result index e2755c04f28..019b8bc4cf0 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; INSERT INTO t1 VALUES ("row1","will go away",1); SELECT * FROM t1 ORDER BY c3; @@ -32,11 +28,12 @@ SELECT * FROM t1 ORDER BY c3; c1 c2 c3 row3 C 3 row4 D 4 -Checking that both slave threads are running. +include/check_slave_is_running.inc STOP SLAVE; CHANGE MASTER TO master_log_file = 'master-bin.000001', master_log_pos = ; +include/check_slave_no_error.inc START SLAVE; SELECT * FROM t1 ORDER BY c3; c1 c2 c3 @@ -62,5 +59,6 @@ COMMIT; SELECT * FROM t1; c1 c2 c3 row2 new on slave 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result index 4c96ccf85ee..9fb019bf6e5 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET storage_engine=innodb; --- Doing pre test cleanup --- DROP TABLE IF EXISTS t1; @@ -917,3 +913,4 @@ DELETE FROM t1; --- End test 5 key partition testing --- --- Do Cleanup --- DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result index 7c3f331958f..a01841af003 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int, unique(a)) engine=ndbcluster; create table t2 (a int, unique(a)) engine=innodb; begin; @@ -101,3 +97,4 @@ select count(*) from t2; count(*) 0 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result index 030845e89e2..195392ae0c5 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, b int unsigned, @@ -68,3 +64,4 @@ a b 5 5 6 6 drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result index 85ecb13bd66..a20e5d03595 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] include/stop_slave.inc reset master; reset slave; @@ -256,18 +252,13 @@ slave-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status) slave-bin.000002 # Write_rows # # table_id: # slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000002 # Query # # COMMIT -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -289,3 +280,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result index 7caa88a16a1..d8b01dc1f5b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE tmyisam (a int) ENGINE = MYISAM; CREATE TABLE tinnodb (a int) ENGINE = INNODB; CREATE TABLE tndb (a int) ENGINE = NDB; @@ -477,10 +473,11 @@ a 151 152 [on slave] -Comparing tables master:test.tmyisam and slave:test.tmyisam -Comparing tables master:test.tinnodb and slave:test.tinnodb -Comparing tables master:test.tndb and slave:test.tndb +include/diff_tables.inc [master:tmyisam, slave:tmyisam] +include/diff_tables.inc [master:tinnodb, slave:tinnodb] +include/diff_tables.inc [master:tndb, slave:tndb] ==== Clean up ==== [on master] DROP TABLE tmyisam, tinnodb, tndb; [on slave] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result index 92fda774da5..3e88f846164 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result @@ -1,10 +1,6 @@ ==== Initialization ==== -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ---- setup master ---- CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM; CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB; @@ -274,13 +270,14 @@ a 34 57 58 -Comparing tables master:test.myisam_innodb and slave:test.myisam_innodb -Comparing tables master:test.innodb_myisam and slave:test.innodb_myisam -Comparing tables master:test.myisam_ndb and slave:test.myisam_ndb -Comparing tables master:test.ndb_myisam and slave:test.ndb_myisam -Comparing tables master:test.innodb_ndb and slave:test.innodb_ndb -Comparing tables master:test.ndb_innodb and slave:test.ndb_innodb +include/diff_tables.inc [master:myisam_innodb, slave:myisam_innodb] +include/diff_tables.inc [master:innodb_myisam, slave:innodb_myisam] +include/diff_tables.inc [master:myisam_ndb, slave:myisam_ndb] +include/diff_tables.inc [master:ndb_myisam, slave:ndb_myisam] +include/diff_tables.inc [master:innodb_ndb, slave:innodb_ndb] +include/diff_tables.inc [master:ndb_innodb, slave:ndb_innodb] ==== Clean up ==== drop table myisam_innodb, innodb_myisam; drop table myisam_ndb, ndb_myisam; drop table innodb_ndb, ndb_innodb; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result index 05524ae1ae3..97463efae94 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; reset master; SHOW TABLES; @@ -27,11 +23,8 @@ SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) FROM mysql.ndb_binlog_index WHERE epoch = ; @the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) 106 master-bin.000001 -CHANGE MASTER TO -master_port=, -master_log_file = 'MASTER_LOG_FILE', -master_log_pos = MASTER_LOG_POS ; -start slave; +include/rpl_change_topology.inc [new topology=3->2] +include/start_slave.inc INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); DELETE FROM t1 WHERE c3 = 1; UPDATE t1 SET c2="should go away" WHERE c3 = 2; @@ -54,4 +47,4 @@ row4 D 4 row5 E 5 ==== clean up ==== DROP TABLE t1; -STOP SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result index 5d00ae6598c..f3142678ff8 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] drop table if exists t1,t2; CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, @@ -53,3 +49,4 @@ select * from t1; a 3 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result index dc4e11c9c9e..d1cc10a930c 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] -------- Test for BUG#9361 -------- CREATE TABLE t1 ( @@ -195,3 +191,4 @@ idpro price nbprice 2 1.0000 2 3 2.0000 1 DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result index eb7d88c812b..d167a85bb8b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET storage_engine=myisam; --- Doing pre test cleanup --- DROP TABLE IF EXISTS t1; @@ -917,3 +913,4 @@ DELETE FROM t1; --- End test 5 key partition testing --- --- Do Cleanup --- DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result index 4e28a7e5865..801e1c0a9f2 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS replica; CREATE DATABASE replica; CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; @@ -52,3 +48,4 @@ Tables_in_test USE test; DROP TABLE t1, t2; DROP DATABASE IF EXISTS replica; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result index 7f75bdedd65..333e943d3ca 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (word CHAR(20) NOT NULL); LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; @@ -53,3 +49,4 @@ SELECT n FROM t1; n 3456 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result index 473cd63169c..b37f55b36a4 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result @@ -1,35 +1,22 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] +include/rpl_reset.inc CREATE TABLE t1 (c1 BIT, c2 INT) Engine=NDB; INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 CHAR) Engine=NDB; INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; SELECT * FROM t1; c1 w UPDATE t1 SET c1=NULL WHERE c1='w'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result index d7922c61b52..e28e438610f 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; @@ -47,3 +43,4 @@ a DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result index 047402f826f..2dd1754745b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP PROCEDURE IF EXISTS p1; @@ -42,3 +38,4 @@ DROP TABLE t1; DROP TABLE t2; DROP PROCEDURE p1; DROP PROCEDURE p2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result index 367738b21e5..f57becd18fe 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET binlog_format = STATEMENT; *** Test 1 *** @@ -123,12 +119,7 @@ master-bin.000002 # Xid 1 COMMIT /* XID */ ** Test 4 ** -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; @@ -142,3 +133,4 @@ master-bin.000001 # Xid 1 COMMIT /* XID */ *** DUMP MASTER & SLAVE FOR COMPARE ******** DROP DATABASE tpcb; ****** Do dumps compare ************ +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result index 49d068d5fe4..457933ae5f7 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] STOP SLAVE; CREATE DATABASE ndbsynctest; USE ndbsynctest; @@ -68,7 +64,7 @@ CHANGE MASTER TO master_log_file = 'master-bin.000001', master_log_pos = ; START SLAVE; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; hex(c1) hex(c2) c3 1 1 row1 @@ -89,3 +85,4 @@ Position File epoch inserts updates deletes schemaops reset slave; select * from mysql.ndb_apply_status; server_id epoch log_name start_pos end_pos +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result index ba5f0dea91c..c6d9e29183e 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TRIGGER test.t1_bi_t2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -28,3 +24,4 @@ n f DROP TRIGGER test.t1_bi_t2; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result index 04a75bf3479..12f171531b5 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'NDB' ; SELECT * FROM t1; C1 C2 @@ -422,11 +418,7 @@ a b c **** Test for BUG#31552 **** **** On Master **** DELETE FROM t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); **** On Master **** @@ -436,7 +428,7 @@ DELETE FROM t1; SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 set @@global.slave_exec_mode= default; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 **** Test for BUG#37076 **** @@ -478,50 +470,44 @@ j INT NOT NULL) ENGINE = 'NDB' ; [expecting slave to replicate correctly] INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] [expecting slave to replicate correctly] INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] [expecting slave to stop] INSERT INTO t3 VALUES (1, "", 1); INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] [expecting slave to stop] INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to stop] INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] drop table t1, t2, t3, t4, t5, t6, t7; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='NDB' ; INSERT INTO t1 VALUES (1), (2), (3); UPDATE t1 SET a = 10; ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( @@ -575,7 +561,7 @@ ERROR 23000: Duplicate entry '6' for key 'PRIMARY' DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; *** results: t2 must be consistent **** -Comparing tables master:test.t2 and master:test.t2 +include/diff_tables.inc [master:t2, master:t2] DROP TABLE t1, t2; EOF OF TESTS CREATE TABLE t1 (a int) ENGINE='NDB' ; @@ -591,7 +577,7 @@ UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; CREATE TABLE t1 (a bit) ENGINE='NDB' ; INSERT IGNORE INTO t1 VALUES (NULL); @@ -633,5 +619,6 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result index 14d3baee1b0..dd84fea8258 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] **** On Master **** CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; INSERT INTO t1 VALUES (1,1), (2,2); @@ -87,3 +83,4 @@ master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t1 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test index 3b075808481..8279d814deb 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test @@ -33,3 +33,4 @@ CREATE TABLE mysql.ndb_apply_status --connection slave drop table mysql.ndb_apply_status; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test index 560efec255b..265b2f412dc 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test @@ -32,3 +32,4 @@ CREATE TABLE mysql.ndb_apply_status --connection slave drop table mysql.ndb_apply_status; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test index e954c72fd1d..1d0ee48bd20 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test @@ -17,3 +17,4 @@ SET storage_engine=ndb; --echo connection slave; --source extra/rpl_tests/rpl_ndb_2multi_basic.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test index 41f91d62dec..df751214b40 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test @@ -48,3 +48,4 @@ SET storage_engine=innodb; connection slave; drop table mysql.ndb_apply_status; set @@global.slave_exec_mode= @old_slave_exec_mode; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test index ea623a06fd1..e2bcb143ab0 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test @@ -6,3 +6,4 @@ --source include/ndb_master-slave.inc let $engine_type=NDB; --source extra/rpl_tests/rpl_row_UUID.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test index cc74acc6490..92f71e294b2 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test @@ -24,3 +24,4 @@ select count(*) from mysql.ndb_apply_status; connection master; drop table t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test index 5e0584e332a..d2921424d6a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test @@ -116,3 +116,4 @@ drop table t1; # End cleanup sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test index b90e6fff8bc..12bd8d533c5 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test @@ -179,3 +179,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BAN --dec $2 } +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test index c03738bc48b..1871c332c29 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test @@ -188,7 +188,6 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; # Wait for deadlock to be detected. # When detected, the slave will stop, so we just wait for it to stop. connection slave; -source include/wait_for_slave_sql_to_stop.inc; # Replication should have stopped, since max retries were not enough. # verify with show slave status @@ -259,4 +258,4 @@ SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; # cleanup --connection master DROP TABLE t1; --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test index 822f1f224cd..560cebe2a41 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test @@ -139,3 +139,4 @@ drop table t1; #let $VERSION=`select version()`; #--replace_result $VERSION VERSION #show binlog events; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test index e29f24998fe..ad4510d57c2 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test @@ -8,3 +8,4 @@ let $engine_type=NDBCLUSTER; -- source extra/rpl_tests/rpl_row_blob.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test index e63b7c5e8ff..233d4338256 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test @@ -1,15 +1,16 @@ --source include/have_ndb.inc ---source include/ndb_master-slave.inc # set up circular replication +--let $rpl_topology= 1->2->1 +--source include/rpl_init.inc ---connection slave -RESET MASTER; +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc ---connection master ---replace_result $SLAVE_MYPORT SLAVE_PORT ---eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root" -START SLAVE; +--let $rpl_connection_name= slave +--let $rpl_server_number= 2 +--source include/rpl_connect.inc # create the table on the "slave" @@ -51,3 +52,6 @@ STOP SLAVE; --connection master DROP TABLE t1; -- sync_slave_with_master + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf index b1b010ef0f3..b234f9a8c2c 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf @@ -15,14 +15,7 @@ skip-slave-start [mysqld.2.slave] server-id= 2 -master-host= 127.0.0.1 -master-port= @mysqld.2.1.port -master-password= @mysqld.2.1.#password -master-user= @mysqld.2.1.#user -master-connect-retry= 1 -init-rpl-role= slave log-bin -skip-slave-start ndb_connectstring= @mysql_cluster.slave.ndb_connectstring [ENV] diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test index 8721e85780d..2d1f75f148d 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test @@ -75,9 +75,7 @@ let $wait_condition= SELECT COUNT(*)=40 FROM t1 WHERE c = 1; # Check data --echo Check data on both clusters -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; - +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; --echo *** Transaction testing *** @@ -116,9 +114,7 @@ let $wait_condition= SELECT COUNT(*)=400 FROM t1 WHERE c = 2; --source include/wait_condition.inc --echo Check data on both clusters -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; - +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; # Start transaction and then roll back @@ -155,18 +151,17 @@ let $wait_condition= SELECT COUNT(*)=200 FROM t1 WHERE c = 3; --source include/wait_condition.inc --echo Check data on both clusters -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; - +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; # Clean up --connection master -DROP TABLE t1; ---connection slave ---disable_warnings DROP TABLE IF EXISTS t1; ---enable_warnings +--connection slave +# Wait until table is dropped on slave. +--let $query= SELECT COUNT(*) FROM t1 +--source include/wait_for_query_to_fail.inc --echo # End of test 5.1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test index 8b0f869c1a3..19af5d54559 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test @@ -31,9 +31,9 @@ INSERT INTO t1 VALUES (2,3); # Replicate back to the master to test this mixed event on the master STOP SLAVE; +--let $rpl_topology= 1->2->1 +--source include/rpl_change_topology.inc connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=$SLAVE_MYPORT,MASTER_USER="root"; START SLAVE; @@ -76,3 +76,6 @@ source include/check_slave_is_running.inc; -- connection master DROP TABLE t1; -- sync_slave_with_master + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test index 8c45ac5dbdd..2353a2a8b5a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test @@ -8,3 +8,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_commit_after_flush.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test index 8d5ad334766..f2eec56e176 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test @@ -41,3 +41,4 @@ select * from t1 order by nid; connection master; DROP TABLE t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test index ac0ab01f8dd..dbe6929bbef 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test @@ -82,4 +82,4 @@ drop datafile 'datafile02.dat' engine=ndb; DROP TABLESPACE ts1 ENGINE=NDB; DROP LOGFILE GROUP lg1 ENGINE=NDB; --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test index c84854e89e8..373cc88fb00 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test @@ -308,3 +308,4 @@ DROP LOGFILE GROUP lg1 ENGINE=NDB; --sync_slave_with_master # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test index 654d1c08944..5798bff163a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test @@ -31,3 +31,4 @@ let $temp_engine_type= MEMORY; let $show_binlog = 0; let $manipulate = 0; -- source extra/rpl_tests/rpl_ddl.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test index 6b1d932f9a6..76484e5b5ae 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test @@ -6,3 +6,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_delete_no_where.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test index ffe8551d00f..7b42d86a260 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test @@ -54,3 +54,4 @@ DROP DATABASE IF EXISTS replica; --sync_slave_with_master # End 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test index ee6abd580f5..9d5db57f988 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test @@ -43,3 +43,4 @@ INSERT INTO t1 VALUES (3, repeat('bad too',1)); connection master; DROP TABLE IF EXISTS t1, t2; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test index 9cf4f8dba0b..67101c11d26 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test @@ -11,3 +11,4 @@ let $engine_type = 'NDB'; -- source extra/rpl_tests/rpl_extraSlave_Col.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test index c02d82e2dc9..ca1f1d9463f 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test @@ -10,4 +10,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_row_func003.test --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test index 99c9df40094..da22e0ae8f8 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test @@ -106,4 +106,4 @@ connection master; DROP TABLE IF EXISTS t1; # End of 5.1 Test --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test index 92374c26742..b9ad0f6375e 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test @@ -13,3 +13,4 @@ -- source include/ndb_master-slave.inc SET storage_engine=innodb; --source extra/rpl_tests/rpl_ndb_2multi_eng.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test index fcc2928c5e2..eaf34a0131d 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test @@ -64,3 +64,4 @@ connection master; drop table t1,t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test index e6c66011fb7..edbc3d17334 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test @@ -6,3 +6,4 @@ let $engine_type=NDB; let $engine_type2=myisam; -- source extra/rpl_tests/rpl_insert_ignore.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test index 75fe2688b4a..8411daa5e88 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test @@ -64,3 +64,4 @@ CREATE TABLE SERVER # --exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbCreate >> $NDB_TOOLS_OUTPUT --exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbAsyncGenerator >> $NDB_TOOLS_OUTPUT +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test index d32a05bf92a..7ce9d17a0c9 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test @@ -11,3 +11,4 @@ let $engine_type=NDB; -- source extra/rpl_tests/rpl_log.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test index 22ccabe3745..52fd19669bd 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test @@ -448,16 +448,13 @@ SELECT * FROM tndb ORDER BY a; --echo [on slave] --sync_slave_with_master -let $diff_table_1=master:test.tmyisam; -let $diff_table_2=slave:test.tmyisam; +let $diff_tables= master:tmyisam, slave:tmyisam; source include/diff_tables.inc; -let $diff_table_1=master:test.tinnodb; -let $diff_table_2=slave:test.tinnodb; +let $diff_tables= master:tinnodb, slave:tinnodb; source include/diff_tables.inc; -let $diff_table_1=master:test.tndb; -let $diff_table_2=slave:test.tndb; +let $diff_tables= master:tndb, slave:tndb; source include/diff_tables.inc; @@ -470,4 +467,4 @@ DROP TABLE tmyisam, tinnodb, tndb; --echo [on slave] sync_slave_with_master; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test index 7d7cd5770cf..d994393d75a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test @@ -316,28 +316,22 @@ SELECT * FROM ndb_myisam ORDER BY a; SELECT * FROM innodb_ndb ORDER BY a; SELECT * FROM ndb_innodb ORDER BY a; -let $diff_table_1=master:test.myisam_innodb; -let $diff_table_2=slave:test.myisam_innodb; +let $diff_tables= master:myisam_innodb, slave:myisam_innodb; source include/diff_tables.inc; -let $diff_table_1=master:test.innodb_myisam; -let $diff_table_2=slave:test.innodb_myisam; +let $diff_tables= master:innodb_myisam, slave:innodb_myisam; source include/diff_tables.inc; -let $diff_table_1=master:test.myisam_ndb; -let $diff_table_2=slave:test.myisam_ndb; +let $diff_tables= master:myisam_ndb, slave:myisam_ndb; source include/diff_tables.inc; -let $diff_table_1=master:test.ndb_myisam; -let $diff_table_2=slave:test.ndb_myisam; +let $diff_tables= master:ndb_myisam, slave:ndb_myisam; source include/diff_tables.inc; -let $diff_table_1=master:test.innodb_ndb; -let $diff_table_2=slave:test.innodb_ndb; +let $diff_tables= master:innodb_ndb, slave:innodb_ndb; source include/diff_tables.inc; -let $diff_table_1=master:test.ndb_innodb; -let $diff_table_2=slave:test.ndb_innodb; +let $diff_tables= master:ndb_innodb, slave:ndb_innodb; source include/diff_tables.inc; @@ -347,3 +341,4 @@ drop table myisam_innodb, innodb_myisam; drop table myisam_ndb, ndb_myisam; drop table innodb_ndb, ndb_innodb; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test index e9107fd90bd..65093319fbe 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test @@ -1,6 +1,11 @@ --source include/have_multi_ndb.inc --source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc + +# We need server 3 later on in this test. +--let $rpl_server_count= 3 +--source include/master-slave.inc + +--connection master # note: server2 is another "master" connected to the master cluster @@ -38,13 +43,12 @@ let $the_pos= `SELECT @the_pos` ; let $the_file= `SELECT @the_file` ; # now connect the slave to the _other_ "master" -connection slave; ---replace_result $MASTER_MYPORT1 $the_pos MASTER_LOG_POS $the_file MASTER_LOG_FILE -eval CHANGE MASTER TO - master_port=$MASTER_MYPORT1, - master_log_file = '$the_file', - master_log_pos = $the_pos ; -start slave; +--let $rpl_topology= 3->2 +--let $rpl_master_log_file= 2:$the_file +--let $rpl_master_log_pos= 2:$the_pos +--source include/rpl_change_topology.inc +--connection slave +--source include/start_slave.inc # insert some more values on the first master connection master; @@ -61,7 +65,6 @@ connection server2; INSERT INTO t1 VALUES ("row5","E",5); SELECT * FROM t1 ORDER BY c3; sync_slave_with_master; -connection slave; SELECT * FROM t1 ORDER BY c3; --echo ==== clean up ==== @@ -69,4 +72,4 @@ connection server2; DROP TABLE t1; sync_slave_with_master; -STOP SLAVE; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test index 6b86f8146f8..40ec8d2b6c5 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test @@ -11,3 +11,4 @@ let $engine_type=NDB; --source extra/rpl_tests/rpl_multi_update2.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test index f144965e9b0..fc618becd3c 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test @@ -6,3 +6,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_multi_update3.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test index a9e56d17139..33a4b029914 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test @@ -12,3 +12,4 @@ -- source include/ndb_master-slave.inc SET storage_engine=myisam; --source extra/rpl_tests/rpl_ndb_2multi_eng.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test index b0b9dd9e7da..83cc64993b0 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test @@ -7,3 +7,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_relayrotate.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test index 1f305d20c92..a88ac18f711 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test @@ -55,3 +55,4 @@ DROP DATABASE IF EXISTS replica; --sync_slave_with_master # End 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test index f5b05080131..083b1e59242 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test @@ -5,3 +5,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_row_001.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test index 454807d9591..41641ec793b 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test @@ -4,3 +4,4 @@ -- let $engine= NDB -- source extra/rpl_tests/rpl_set_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test index 6453f45aa75..cff9bb7837a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test @@ -8,3 +8,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDBCLUSTER; -- source extra/rpl_tests/rpl_row_sp003.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test index c2c7be6112c..5ad34c6a573 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test @@ -8,3 +8,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDBCLUSTER; -- source extra/rpl_tests/rpl_row_sp006.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test index 7c65e04717a..60d7d6b3d10 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test @@ -35,3 +35,4 @@ SET binlog_format = STATEMENT; let $off_set = 6; let $rpl_format = 'SBR'; --source extra/rpl_tests/rpl_ndb_apply_status.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test index b91ff198c51..f3722a1c8a4 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test @@ -98,3 +98,5 @@ reset slave; select * from mysql.ndb_apply_status; # End 5.1 Test +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test index 7f7e08685bf..a283aa60504 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test @@ -12,3 +12,4 @@ let $engine_type=NDB; -- source extra/rpl_tests/rpl_trig004.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test index 543393b980d..fdb0293676b 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test @@ -9,3 +9,4 @@ --exec echo Running mgmapi_logevent --exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "$NDB_CONNECTSTRING" "$NDB_CONNECTSTRING_SLAVE" 1 >> $NDB_EXAMPLES_OUTPUT +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test index 3a17de1bc9e..ac31e4de654 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test @@ -5,4 +5,4 @@ let $type= 'NDB' ; let $extra_index= ; -- source extra/rpl_tests/rpl_row_basic.test --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test index 898bf310dc5..a539720d6e7 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test @@ -63,4 +63,4 @@ connection master; DROP TABLE t1; source include/show_binlog_events.inc; --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test index 549227db61a..7c9684d5cbb 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test @@ -9,3 +9,4 @@ --source include/have_binlog_format_mixed.inc --source include/big_test.inc --source suite/rpl_ndb/t/rpl_truncate_7ndb.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test index 2cc31c91388..d4607dc6bf1 100644 --- a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test +++ b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test @@ -100,3 +100,4 @@ SET @@global.init_slave= @start_init_slave; # End of functionality Testing for init_slave # ################################################## +--source include/rpl_end.inc diff --git a/mysql-test/t/init_file.test b/mysql-test/t/init_file.test index 7eb5381651d..d73a9c60e8e 100644 --- a/mysql-test/t/init_file.test +++ b/mysql-test/t/init_file.test @@ -33,4 +33,4 @@ drop table t1, t2; # MTR will restart server anyway, but by forcing it we avoid being warned # about the apparent side effect -call mtr.force_restart(); +--source include/force_restart.inc From f68e75498464088b75d9e3a039c1aac6f98cf0cf Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Sun, 19 Dec 2010 18:16:01 +0100 Subject: [PATCH 08/20] Disabled part of rpl_change_master that fails sporadically because of BUG#59037. --- mysql-test/suite/rpl/r/rpl_change_master.result | 14 -------------- mysql-test/suite/rpl/t/rpl_change_master.test | 2 ++ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result index fc9cce177da..6674ab168ef 100644 --- a/mysql-test/suite/rpl/r/rpl_change_master.result +++ b/mysql-test/suite/rpl/r/rpl_change_master.result @@ -15,18 +15,4 @@ n 1 2 drop table t1; -include/rpl_reset.inc -create table t1 (a int); -insert into t1 values (1); -flush logs; -insert into t1 values (2); -include/stop_slave.inc -delete from t1 where a=2; -CHANGE MASTER TO relay_log_file='slave-relay-bin.000005', relay_log_pos=4; -start slave sql_thread; -include/wait_for_slave_sql_to_start.inc -start slave io_thread; -include/wait_for_slave_io_to_start.inc -set global relay_log_purge=1; -drop table t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test index 2fcc208c471..c31359a84d8 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master.test +++ b/mysql-test/suite/rpl/t/rpl_change_master.test @@ -52,6 +52,7 @@ sync_slave_with_master; # BUG#12190 CHANGE MASTER has differ path requiremts on MASTER_LOG_FILE and RELAY_LOG_FILE # +if ($bug_59037_is_fixed == 'true') { --source include/rpl_reset.inc connection master; @@ -97,5 +98,6 @@ source include/wait_for_slave_io_to_start.inc; eval set global relay_log_purge=$relay_log_purge; connection master; drop table t1; +} --source include/rpl_end.inc From dd4c094652ef907af66704a4b02ed26ae1a79986 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Mon, 20 Dec 2010 10:00:14 +0100 Subject: [PATCH 09/20] Bug #59021 Valgrind warning in key_unpack() Introduced by fix for Bug#57687 sql/sql_select.cc: Add missing initialization of key_part_info->key_part_flag --- sql/sql_select.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e14b872d18e..3b8dc2e170a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -10720,6 +10720,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, (ha_base_keytype) key_part_info->type == HA_KEYTYPE_VARTEXT1 || (ha_base_keytype) key_part_info->type == HA_KEYTYPE_VARTEXT2) ? 0 : FIELDFLAG_BINARY; + key_part_info->key_part_flag= 0; if (!using_unique_constraint) { cur_group->buff=(char*) group_buff; From 1a3d5fbfc7aa45463354b57586e24a630727c73e Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Mon, 20 Dec 2010 10:07:35 +0100 Subject: [PATCH 10/20] Fixed pb failure. Problem: Warnings for truncated data were generated on hosts with long host names because @@hostname was inserted into a CHAR(40) column. Fix: Change CHAR(40) to TEXT. --- mysql-test/suite/binlog/r/binlog_unsafe.result | 12 ++---------- mysql-test/suite/binlog/t/binlog_unsafe.test | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index b851e472689..77fe5eb0b5e 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -1,8 +1,8 @@ ==== Setup tables ==== CREATE TABLE t1 (a INT); -CREATE TABLE t2 (a CHAR(40)); +CREATE TABLE t2 (a TEXT); CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY); -CREATE TABLE trigger_table (a CHAR(7)); +CREATE TABLE trigger_table (a TEXT); CREATE TABLE trigger_table2 (a INT); ==== Non-deterministic statements ==== INSERT DELAYED INTO t1 VALUES (5); @@ -28,7 +28,6 @@ Warnings: Note 1592 Statement may not be safe to log in statement format. INSERT INTO t2 VALUES (@@hostname); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 Note 1592 Statement may not be safe to log in statement format. ---- Insert from stored procedure ---- CREATE PROCEDURE proc() @@ -49,7 +48,6 @@ Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. -Warning 1265 Data truncated for column 'a' at row 6 Note 1592 Statement may not be safe to log in statement format. ---- Insert from stored function ---- CREATE FUNCTION func() @@ -74,7 +72,6 @@ Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. -Warning 1265 Data truncated for column 'a' at row 6 Note 1592 Statement may not be safe to log in statement format. ---- Insert from trigger ---- CREATE TRIGGER trig @@ -97,7 +94,6 @@ Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. -Warning 1265 Data truncated for column 'a' at row 6 Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. ---- Insert from prepared statement ---- @@ -128,7 +124,6 @@ Warnings: Note 1592 Statement may not be safe to log in statement format. EXECUTE p7; Warnings: -Warning 1265 Data truncated for column 'a' at row 1 Note 1592 Statement may not be safe to log in statement format. ---- Insert from nested call of triggers / functions / procedures ---- CREATE PROCEDURE proc1() @@ -165,7 +160,6 @@ Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. -Warning 1265 Data truncated for column 'a' at row 6 Note 1592 Statement may not be safe to log in statement format. ==== Variables that should *not* be unsafe ==== INSERT INTO t1 VALUES (@@session.pseudo_thread_id); @@ -309,8 +303,6 @@ INSERT INTO t2 VALUES (@@global.init_slave); INSERT INTO t2 VALUES (@@hostname); END| INSERT INTO trigger_table VALUES ('bye.'); -Warnings: -Warning 1265 Data truncated for column 'a' at row 6 DROP FUNCTION fun_check_log_bin; DROP FUNCTION func6; DROP FUNCTION func7; diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index 5e399f3e602..a86e49e475a 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -71,9 +71,9 @@ source include/have_binlog_format_statement.inc; --echo ==== Setup tables ==== CREATE TABLE t1 (a INT); -CREATE TABLE t2 (a CHAR(40)); +CREATE TABLE t2 (a TEXT); CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY); -CREATE TABLE trigger_table (a CHAR(7)); +CREATE TABLE trigger_table (a TEXT); CREATE TABLE trigger_table2 (a INT); From 894ea29b9933a466e1ebc507cdedf74bebbdd4af Mon Sep 17 00:00:00 2001 From: Anitha Gopi Date: Mon, 20 Dec 2010 19:49:35 +0530 Subject: [PATCH 11/20] Bug #59055 : Remove ndb tests from repository. Removal of tests from sys_vars is pending. It has some issues that are yet to be resolved --- mysql-test/collections/default.experimental | 53 +- mysql-test/collections/default.weekly | 2 +- mysql-test/r/ctype_utf8mb4_ndb.result | 1876 - mysql-test/suite/funcs_1/r/is_cml_ndb.result | 98 - .../suite/funcs_1/r/is_columns_ndb.result | 228 - .../suite/funcs_1/r/is_engines_ndb.result | 8 - .../suite/funcs_1/r/is_tables_ndb.result | 167 - mysql-test/suite/funcs_1/r/ndb_bitdata.result | 3 - mysql-test/suite/funcs_1/r/ndb_cursors.result | 3 - .../suite/funcs_1/r/ndb_func_view.result | 5294 - .../suite/funcs_1/r/ndb_storedproc_02.result | 1398 - .../suite/funcs_1/r/ndb_storedproc_03.result | 496 - .../suite/funcs_1/r/ndb_storedproc_06.result | 395 - .../suite/funcs_1/r/ndb_storedproc_07.result | 178 - .../suite/funcs_1/r/ndb_storedproc_08.result | 835 - .../suite/funcs_1/r/ndb_storedproc_10.result | 400 - .../suite/funcs_1/r/ndb_trig_0102.result | 366 - mysql-test/suite/funcs_1/r/ndb_trig_03.result | 675 - .../suite/funcs_1/r/ndb_trig_03e.result | 1620 - .../suite/funcs_1/r/ndb_trig_0407.result | 470 - mysql-test/suite/funcs_1/r/ndb_trig_08.result | 527 - mysql-test/suite/funcs_1/r/ndb_trig_09.result | 269 - .../suite/funcs_1/r/ndb_trig_1011ext.result | 394 - mysql-test/suite/funcs_1/r/ndb_views.result | 22914 --- mysql-test/suite/funcs_1/t/is_cml_ndb.test | 42 - .../suite/funcs_1/t/is_columns_ndb.test | 37 - .../suite/funcs_1/t/is_engines_ndb.test | 15 - mysql-test/suite/funcs_1/t/is_tables_ndb.test | 22 - mysql-test/suite/funcs_1/t/ndb_bitdata.test | 18 - mysql-test/suite/funcs_1/t/ndb_cursors.test | 19 - mysql-test/suite/funcs_1/t/ndb_func_view.test | 16 - .../suite/funcs_1/t/ndb_storedproc_02.test | 9 - .../suite/funcs_1/t/ndb_storedproc_03.test | 9 - .../suite/funcs_1/t/ndb_storedproc_06.test | 9 - .../suite/funcs_1/t/ndb_storedproc_07.test | 9 - .../suite/funcs_1/t/ndb_storedproc_08.test | 9 - .../suite/funcs_1/t/ndb_storedproc_10.test | 9 - mysql-test/suite/funcs_1/t/ndb_trig_0102.test | 10 - mysql-test/suite/funcs_1/t/ndb_trig_03.test | 10 - mysql-test/suite/funcs_1/t/ndb_trig_03e.test | 25 - mysql-test/suite/funcs_1/t/ndb_trig_0407.test | 10 - mysql-test/suite/funcs_1/t/ndb_trig_08.test | 10 - mysql-test/suite/funcs_1/t/ndb_trig_09.test | 10 - .../suite/funcs_1/t/ndb_trig_1011ext.test | 10 - mysql-test/suite/funcs_1/t/ndb_views.test | 24 - mysql-test/suite/funcs_2/r/ndb_charset.result | 119156 --------------- mysql-test/suite/funcs_2/t/ndb_charset.test | 14 - mysql-test/suite/ndb/my.cnf | 22 - .../suite/ndb/r/loaddata_autocom_ndb.result | 23 - mysql-test/suite/ndb/r/ndb_alter_table.result | 437 - .../suite/ndb/r/ndb_alter_table2.result | 41 - .../suite/ndb/r/ndb_alter_table3.result | 35 - .../suite/ndb/r/ndb_auto_increment.result | 445 - mysql-test/suite/ndb/r/ndb_autoinc.result | 37 - mysql-test/suite/ndb/r/ndb_basic.result | 930 - .../suite/ndb/r/ndb_binlog_basic.result | 48 - .../suite/ndb/r/ndb_binlog_ddl_multi.result | 196 - .../suite/ndb/r/ndb_binlog_discover.result | 17 - .../suite/ndb/r/ndb_binlog_format.result | 41 - .../suite/ndb/r/ndb_binlog_ignore_db.result | 11 - .../suite/ndb/r/ndb_binlog_log_bin.result | 80 - .../suite/ndb/r/ndb_binlog_multi.result | 80 - mysql-test/suite/ndb/r/ndb_bitfield.result | 224 - mysql-test/suite/ndb/r/ndb_blob.result | 591 - .../suite/ndb/r/ndb_blob_partition.result | 104 - mysql-test/suite/ndb/r/ndb_bug26793.result | 8 - mysql-test/suite/ndb/r/ndb_bug31477.result | 98 - mysql-test/suite/ndb/r/ndb_cache.result | 191 - mysql-test/suite/ndb/r/ndb_cache2.result | 623 - mysql-test/suite/ndb/r/ndb_cache_multi.result | 74 - .../suite/ndb/r/ndb_cache_multi2.result | 75 - mysql-test/suite/ndb/r/ndb_charset.result | 320 - .../suite/ndb/r/ndb_condition_pushdown.result | 1920 - mysql-test/suite/ndb/r/ndb_config.result | 14 - mysql-test/suite/ndb/r/ndb_config2.result | 1 - mysql-test/suite/ndb/r/ndb_cursor.result | 42 - mysql-test/suite/ndb/r/ndb_database.result | 13 - mysql-test/suite/ndb/r/ndb_dd_alter.result | 560 - mysql-test/suite/ndb/r/ndb_dd_basic.result | 535 - mysql-test/suite/ndb/r/ndb_dd_ddl.result | 315 - .../suite/ndb/r/ndb_dd_disk2memory.result | 505 - mysql-test/suite/ndb/r/ndb_dd_dump.result | 452 - .../suite/ndb/r/ndb_dd_sql_features.result | 599 - mysql-test/suite/ndb/r/ndb_gis.result | 1100 - mysql-test/suite/ndb/r/ndb_grant.result | 444 - mysql-test/suite/ndb/r/ndb_index.result | 154 - .../suite/ndb/r/ndb_index_ordered.result | 839 - .../suite/ndb/r/ndb_index_unique.result | 692 - mysql-test/suite/ndb/r/ndb_insert.result | 659 - mysql-test/suite/ndb/r/ndb_limit.result | 72 - mysql-test/suite/ndb/r/ndb_load.result | 80 - .../suite/ndb/r/ndb_loaddatalocal.result | 46 - mysql-test/suite/ndb/r/ndb_lock.result | 200 - mysql-test/suite/ndb/r/ndb_lock_table.result | 11 - mysql-test/suite/ndb/r/ndb_minmax.result | 120 - mysql-test/suite/ndb/r/ndb_multi.result | 145 - mysql-test/suite/ndb/r/ndb_multi_row.result | 68 - .../suite/ndb/r/ndb_partition_error.result | 47 - .../suite/ndb/r/ndb_partition_error2.result | 3 - .../suite/ndb/r/ndb_partition_key.result | 312 - .../suite/ndb/r/ndb_partition_list.result | 51 - .../suite/ndb/r/ndb_partition_range.result | 275 - .../suite/ndb/r/ndb_read_multi_range.result | 494 - mysql-test/suite/ndb/r/ndb_rename.result | 24 - mysql-test/suite/ndb/r/ndb_replace.result | 99 - mysql-test/suite/ndb/r/ndb_restore.result | 501 - .../suite/ndb/r/ndb_restore_compat.result | 119 - .../ndb_restore_different_endian_data.result | 200 - .../suite/ndb/r/ndb_restore_partition.result | 460 - .../suite/ndb/r/ndb_restore_print.result | 312 - mysql-test/suite/ndb/r/ndb_row_format.result | 65 - mysql-test/suite/ndb/r/ndb_single_user.result | 119 - mysql-test/suite/ndb/r/ndb_sp.result | 44 - mysql-test/suite/ndb/r/ndb_subquery.result | 92 - mysql-test/suite/ndb/r/ndb_temporary.result | 21 - .../suite/ndb/r/ndb_tmp_table_and_DDL.result | 90 - mysql-test/suite/ndb/r/ndb_transaction.result | 257 - mysql-test/suite/ndb/r/ndb_trigger.result | 315 - mysql-test/suite/ndb/r/ndb_truncate.result | 23 - mysql-test/suite/ndb/r/ndb_types.result | 76 - mysql-test/suite/ndb/r/ndb_update.result | 96 - .../suite/ndb/r/ndb_update_no_read.result | 75 - mysql-test/suite/ndb/r/ndb_view.result | 24 - mysql-test/suite/ndb/r/ndbapi.result | 22 - mysql-test/suite/ndb/r/ps_7ndb.result | 3128 - .../suite/ndb/r/strict_autoinc_5ndb.result | 28 - mysql-test/suite/ndb/t/disabled.def | 18 - .../suite/ndb/t/loaddata_autocom_ndb.test | 4 - mysql-test/suite/ndb/t/ndb_alter_table.test | 458 - mysql-test/suite/ndb/t/ndb_alter_table2.test | 84 - mysql-test/suite/ndb/t/ndb_alter_table3.test | 48 - .../suite/ndb/t/ndb_auto_increment.test | 293 - mysql-test/suite/ndb/t/ndb_autoinc.test | 45 - mysql-test/suite/ndb/t/ndb_basic.test | 861 - mysql-test/suite/ndb/t/ndb_binlog_basic.test | 80 - .../suite/ndb/t/ndb_binlog_ddl_multi.test | 190 - .../suite/ndb/t/ndb_binlog_discover.test | 36 - mysql-test/suite/ndb/t/ndb_binlog_format.test | 35 - .../ndb/t/ndb_binlog_ignore_db-master.opt | 1 - .../suite/ndb/t/ndb_binlog_ignore_db.test | 16 - .../suite/ndb/t/ndb_binlog_log_bin.test | 49 - mysql-test/suite/ndb/t/ndb_binlog_multi.test | 82 - mysql-test/suite/ndb/t/ndb_bitfield.test | 124 - mysql-test/suite/ndb/t/ndb_blob.test | 519 - .../suite/ndb/t/ndb_blob_partition.test | 97 - mysql-test/suite/ndb/t/ndb_bug26793.test | 35 - mysql-test/suite/ndb/t/ndb_bug31477.test | 109 - mysql-test/suite/ndb/t/ndb_cache.test | 122 - mysql-test/suite/ndb/t/ndb_cache2.test | 361 - mysql-test/suite/ndb/t/ndb_cache_multi.test | 71 - mysql-test/suite/ndb/t/ndb_cache_multi2.test | 125 - mysql-test/suite/ndb/t/ndb_charset.test | 257 - .../suite/ndb/t/ndb_condition_pushdown.test | 2054 - mysql-test/suite/ndb/t/ndb_config.test | 23 - mysql-test/suite/ndb/t/ndb_config2.test | 7 - mysql-test/suite/ndb/t/ndb_cursor.test | 47 - mysql-test/suite/ndb/t/ndb_database.test | 24 - mysql-test/suite/ndb/t/ndb_dd_alter.test | 274 - mysql-test/suite/ndb/t/ndb_dd_basic.test | 485 - mysql-test/suite/ndb/t/ndb_dd_ddl.test | 470 - .../suite/ndb/t/ndb_dd_disk2memory.test | 292 - mysql-test/suite/ndb/t/ndb_dd_dump.test | 289 - .../suite/ndb/t/ndb_dd_sql_features.test | 551 - mysql-test/suite/ndb/t/ndb_gis.test | 5 - mysql-test/suite/ndb/t/ndb_grant.later | 385 - mysql-test/suite/ndb/t/ndb_index.test | 131 - mysql-test/suite/ndb/t/ndb_index_ordered.test | 488 - mysql-test/suite/ndb/t/ndb_index_unique.test | 361 - mysql-test/suite/ndb/t/ndb_insert.test | 641 - mysql-test/suite/ndb/t/ndb_limit.test | 85 - mysql-test/suite/ndb/t/ndb_load.test | 24 - mysql-test/suite/ndb/t/ndb_loaddatalocal.test | 71 - mysql-test/suite/ndb/t/ndb_lock.test | 269 - mysql-test/suite/ndb/t/ndb_lock_table.test | 15 - mysql-test/suite/ndb/t/ndb_minmax.test | 65 - mysql-test/suite/ndb/t/ndb_multi.test | 154 - mysql-test/suite/ndb/t/ndb_multi_row.test | 76 - .../suite/ndb/t/ndb_partition_error.test | 74 - .../ndb/t/ndb_partition_error2-master.opt | 1 - .../suite/ndb/t/ndb_partition_error2.test | 14 - mysql-test/suite/ndb/t/ndb_partition_key.test | 244 - .../suite/ndb/t/ndb_partition_list.test | 68 - .../suite/ndb/t/ndb_partition_range.test | 269 - .../suite/ndb/t/ndb_read_multi_range.test | 340 - mysql-test/suite/ndb/t/ndb_rename.test | 36 - mysql-test/suite/ndb/t/ndb_replace.test | 104 - mysql-test/suite/ndb/t/ndb_restore.test | 413 - .../suite/ndb/t/ndb_restore_compat.test | 67 - .../t/ndb_restore_different_endian_data.test | 185 - .../ndb/t/ndb_restore_partition-master.opt | 1 - .../suite/ndb/t/ndb_restore_partition.test | 375 - mysql-test/suite/ndb/t/ndb_restore_print.test | 193 - mysql-test/suite/ndb/t/ndb_row_format.test | 86 - mysql-test/suite/ndb/t/ndb_single_user.test | 174 - mysql-test/suite/ndb/t/ndb_sp.test | 42 - mysql-test/suite/ndb/t/ndb_subquery.test | 79 - mysql-test/suite/ndb/t/ndb_temporary.test | 38 - .../suite/ndb/t/ndb_tmp_table_and_DDL.test | 11 - mysql-test/suite/ndb/t/ndb_transaction.test | 298 - mysql-test/suite/ndb/t/ndb_trigger.test | 221 - mysql-test/suite/ndb/t/ndb_truncate.test | 41 - mysql-test/suite/ndb/t/ndb_types.test | 85 - mysql-test/suite/ndb/t/ndb_update.test | 94 - .../suite/ndb/t/ndb_update_no_read.test | 79 - mysql-test/suite/ndb/t/ndb_view.test | 29 - mysql-test/suite/ndb/t/ndbapi.test | 44 - mysql-test/suite/ndb/t/ps_7ndb.test | 25 - .../suite/ndb/t/strict_autoinc_5ndb.test | 10 - .../suite/ndb_team/r/ndb_autodiscover.result | 397 - .../suite/ndb_team/r/ndb_autodiscover2.result | 13 - .../suite/ndb_team/r/ndb_autodiscover3.result | 53 - .../suite/ndb_team/r/ndb_backup_print.result | 65 - .../ndb_team/r/ndb_dd_backuprestore.result | 512 - .../ndb_team/r/rpl_ndb_dd_advance.result | 323 - .../ndb_team/r/rpl_ndb_extraColMaster.result | 1752 - .../ndb_team/r/rpl_ndb_mix_innodb.result | 143 - mysql-test/suite/ndb_team/t/disabled.def | 20 - .../suite/ndb_team/t/ndb_autodiscover.test | 555 - .../ndb_team/t/ndb_autodiscover2-master.opt | 1 - .../suite/ndb_team/t/ndb_autodiscover2.test | 21 - .../suite/ndb_team/t/ndb_autodiscover3.test | 104 - .../suite/ndb_team/t/ndb_backup_print.test | 68 - .../ndb_team/t/ndb_dd_backuprestore.test | 349 - .../suite/ndb_team/t/rpl_ndb_dd_advance.test | 404 - .../ndb_team/t/rpl_ndb_extraColMaster.test | 16 - .../ndb_team/t/rpl_ndb_mix_innodb-master.opt | 1 - .../suite/ndb_team/t/rpl_ndb_mix_innodb.test | 35 - .../suite/parts/r/ndb_dd_backuprestore.result | 512 - .../r/part_supported_sql_func_ndb.result | 9918 -- .../parts/r/partition_alter1_1_2_ndb.result | 27726 ---- .../parts/r/partition_alter1_1_ndb.result | 24316 --- .../parts/r/partition_alter1_2_ndb.result | 35540 ----- .../r/partition_auto_increment_ndb.result | 1047 - .../suite/parts/r/partition_engine_ndb.result | 5203 - .../suite/parts/r/partition_int_ndb.result | 557 - .../parts/r/partition_mgm_lc0_ndb.result | 198 - .../parts/r/partition_mgm_lc1_ndb.result | 236 - .../parts/r/partition_mgm_lc2_ndb.result | 236 - .../suite/parts/r/partition_syntax_ndb.result | 1820 - .../suite/parts/r/partition_value_ndb.result | 189 - .../suite/parts/t/ndb_dd_backuprestore.test | 347 - .../parts/t/part_supported_sql_func_ndb.test | 46 - .../parts/t/partition_alter1_1_2_ndb.test | 88 - .../suite/parts/t/partition_alter1_1_ndb.test | 88 - .../suite/parts/t/partition_alter1_2_ndb.test | 89 - .../parts/t/partition_auto_increment_ndb.test | 41 - .../suite/parts/t/partition_basic_ndb.test | 92 - .../suite/parts/t/partition_engine_ndb.test | 88 - .../suite/parts/t/partition_int_ndb.test | 54 - .../suite/parts/t/partition_mgm_lc0_ndb.test | 49 - .../parts/t/partition_mgm_lc1_ndb-master.opt | 1 - .../suite/parts/t/partition_mgm_lc1_ndb.test | 46 - .../parts/t/partition_mgm_lc2_ndb-master.opt | 1 - .../suite/parts/t/partition_mgm_lc2_ndb.test | 45 - .../suite/parts/t/partition_syntax_ndb.test | 89 - .../suite/parts/t/partition_value_ndb.test | 94 - .../suite/rpl/r/rpl_row_tabledefs_7ndb.result | 288 - mysql-test/suite/rpl_ndb/combinations | 5 - mysql-test/suite/rpl_ndb/my.cnf | 70 - .../suite/rpl_ndb/r/rpl_ndb_2innodb.result | 928 - .../suite/rpl_ndb/r/rpl_ndb_2myisam.result | 928 - .../suite/rpl_ndb/r/rpl_ndb_2ndb.result | 400 - .../suite/rpl_ndb/r/rpl_ndb_2other.result | 804 - .../suite/rpl_ndb/r/rpl_ndb_UUID.result | 37 - .../rpl_ndb/r/rpl_ndb_apply_status.result | 17 - .../suite/rpl_ndb/r/rpl_ndb_auto_inc.result | 167 - .../suite/rpl_ndb/r/rpl_ndb_bank.result | 120 - .../suite/rpl_ndb/r/rpl_ndb_basic.result | 194 - .../r/rpl_ndb_binlog_format_errors.result | 174 - .../suite/rpl_ndb/r/rpl_ndb_blob.result | 132 - .../suite/rpl_ndb/r/rpl_ndb_blob2.result | 153 - .../suite/rpl_ndb/r/rpl_ndb_circular.result | 22 - .../rpl_ndb/r/rpl_ndb_circular_2ch.result | 51 - .../rpl_ndb/r/rpl_ndb_circular_simplex.result | 26 - .../r/rpl_ndb_commit_afterflush.result | 10 - .../rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result | 24 - .../suite/rpl_ndb/r/rpl_ndb_dd_basic.result | 69 - .../rpl_ndb/r/rpl_ndb_dd_partitions.result | 787 - mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result | 1625 - .../rpl_ndb/r/rpl_ndb_delete_nowhere.result | 12 - .../suite/rpl_ndb/r/rpl_ndb_do_db.result | 55 - .../suite/rpl_ndb/r/rpl_ndb_do_table.result | 23 - .../suite/rpl_ndb/r/rpl_ndb_extraCol.result | 612 - .../suite/rpl_ndb/r/rpl_ndb_func003.result | 27 - .../suite/rpl_ndb/r/rpl_ndb_idempotent.result | 64 - .../suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result | 916 - .../rpl_ndb/r/rpl_ndb_innodb_trans.result | 100 - .../rpl_ndb/r/rpl_ndb_insert_ignore.result | 67 - .../suite/rpl_ndb/r/rpl_ndb_load.result | 42 - mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result | 290 - .../rpl_ndb_mixed_engines_transactions.result | 483 - ...pl_ndb_mixed_implicit_commit_binlog.result | 660 - .../rpl_ndb/r/rpl_ndb_mixed_tables.result | 243 - .../suite/rpl_ndb/r/rpl_ndb_multi.result | 54 - .../rpl_ndb/r/rpl_ndb_multi_update2.result | 52 - .../rpl_ndb/r/rpl_ndb_multi_update3.result | 194 - .../suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result | 916 - .../rpl_ndb/r/rpl_ndb_relayrotate.result | 16 - .../suite/rpl_ndb/r/rpl_ndb_rep_ignore.result | 51 - .../suite/rpl_ndb/r/rpl_ndb_row_001.result | 52 - .../rpl_ndb_row_implicit_commit_binlog.result | 661 - .../suite/rpl_ndb/r/rpl_ndb_set_null.result | 22 - .../suite/rpl_ndb/r/rpl_ndb_sp003.result | 46 - .../suite/rpl_ndb/r/rpl_ndb_sp006.result | 43 - .../suite/rpl_ndb/r/rpl_ndb_stm_innodb.result | 136 - .../suite/rpl_ndb/r/rpl_ndb_sync.result | 88 - .../suite/rpl_ndb/r/rpl_ndb_trig004.result | 27 - .../suite/rpl_ndb/r/rpl_ndbapi_multi.result | 8 - .../suite/rpl_ndb/r/rpl_row_basic_7ndb.result | 644 - .../suite/rpl_ndb/r/rpl_truncate_7ndb.result | 90 - .../rpl_ndb/r/rpl_truncate_7ndb_2.result | 91 - mysql-test/suite/rpl_ndb/t/disabled.def | 16 - .../rpl_ndb/t/rpl_ndb_2innodb-master.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_2innodb.test | 40 - .../rpl_ndb/t/rpl_ndb_2myisam-master.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_2myisam.test | 39 - .../suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt | 1 - mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test | 20 - .../suite/rpl_ndb/t/rpl_ndb_2other-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_2other.test | 51 - mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test | 9 - .../rpl_ndb/t/rpl_ndb_apply_status-master.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_apply_status.test | 27 - .../suite/rpl_ndb/t/rpl_ndb_auto_inc.test | 119 - mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test | 182 - mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test | 263 - .../t/rpl_ndb_binlog_format_errors-master.opt | 1 - .../t/rpl_ndb_binlog_format_errors-slave.opt | 1 - .../t/rpl_ndb_binlog_format_errors.test | 264 - mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test | 145 - mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test | 16 - .../suite/rpl_ndb/t/rpl_ndb_circular.test | 61 - .../suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf | 24 - .../suite/rpl_ndb/t/rpl_ndb_circular_2ch.test | 167 - .../rpl_ndb/t/rpl_ndb_circular_simplex.test | 82 - .../rpl_ndb/t/rpl_ndb_commit_afterflush.test | 15 - .../t/rpl_ndb_ctype_ucs2_def-master.opt | 1 - .../rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test | 47 - .../suite/rpl_ndb/t/rpl_ndb_dd_basic.test | 85 - .../t/rpl_ndb_dd_partitions-master.opt | 1 - .../rpl_ndb/t/rpl_ndb_dd_partitions-slave.opt | 1 - .../rpl_ndb/t/rpl_ndb_dd_partitions.test | 311 - mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test | 34 - .../rpl_ndb/t/rpl_ndb_delete_nowhere.test | 12 - .../suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt | 1 - mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test | 60 - .../rpl_ndb/t/rpl_ndb_do_table-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_do_table.test | 49 - .../suite/rpl_ndb/t/rpl_ndb_extraCol.test | 14 - .../suite/rpl_ndb/t/rpl_ndb_func003.test | 16 - .../suite/rpl_ndb/t/rpl_ndb_idempotent.test | 109 - .../rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt | 1 - .../rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test | 16 - .../rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_innodb_trans.test | 70 - .../rpl_ndb/t/rpl_ndb_insert_ignore.test | 12 - mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test | 67 - .../suite/rpl_ndb/t/rpl_ndb_log-master.opt | 1 - mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test | 14 - ..._ndb_mixed_engines_transactions-master.opt | 1 - ...l_ndb_mixed_engines_transactions-slave.opt | 1 - .../t/rpl_ndb_mixed_engines_transactions.test | 473 - .../rpl_ndb_mixed_implicit_commit_binlog.test | 11 - .../rpl_ndb/t/rpl_ndb_mixed_tables-master.opt | 1 - .../rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_mixed_tables.test | 369 - mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test | 75 - .../rpl_ndb/t/rpl_ndb_multi_update2-slave.opt | 1 - .../rpl_ndb/t/rpl_ndb_multi_update2.test | 14 - .../rpl_ndb/t/rpl_ndb_multi_update3.test | 12 - .../rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test | 15 - .../rpl_ndb/t/rpl_ndb_relayrotate-slave.opt | 3 - .../suite/rpl_ndb/t/rpl_ndb_relayrotate.test | 10 - .../rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_rep_ignore.test | 61 - .../suite/rpl_ndb/t/rpl_ndb_row_001.test | 11 - .../t/rpl_ndb_row_implicit_commit_binlog.test | 11 - .../suite/rpl_ndb/t/rpl_ndb_set_null.test | 7 - mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test | 14 - mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test | 14 - .../rpl_ndb/t/rpl_ndb_stm_innodb-master.opt | 1 - .../rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt | 1 - .../suite/rpl_ndb/t/rpl_ndb_stm_innodb.test | 41 - mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test | 103 - .../suite/rpl_ndb/t/rpl_ndb_trig004.test | 18 - .../suite/rpl_ndb/t/rpl_ndbapi_multi.test | 12 - .../suite/rpl_ndb/t/rpl_row_basic_7ndb.test | 8 - .../suite/rpl_ndb/t/rpl_truncate_7ndb.test | 66 - .../rpl_ndb/t/rpl_truncate_7ndb_2-master.opt | 1 - .../suite/rpl_ndb/t/rpl_truncate_7ndb_2.test | 12 - mysql-test/suite/stress/r/ddl_ndb.result | 216 - mysql-test/suite/stress/t/ddl_ndb.test | 58 - mysql-test/t/ctype_utf8mb4_ndb.test | 7 - mysql-test/t/disabled.def | 1 - 398 files changed, 3 insertions(+), 326553 deletions(-) delete mode 100644 mysql-test/r/ctype_utf8mb4_ndb.result delete mode 100644 mysql-test/suite/funcs_1/r/is_cml_ndb.result delete mode 100644 mysql-test/suite/funcs_1/r/is_columns_ndb.result delete mode 100644 mysql-test/suite/funcs_1/r/is_engines_ndb.result delete mode 100644 mysql-test/suite/funcs_1/r/is_tables_ndb.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_bitdata.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_cursors.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_func_view.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_storedproc_02.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_storedproc_03.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_storedproc_06.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_storedproc_07.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_storedproc_08.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_storedproc_10.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_0102.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_03.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_03e.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_0407.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_08.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_09.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb_views.result delete mode 100644 mysql-test/suite/funcs_1/t/is_cml_ndb.test delete mode 100644 mysql-test/suite/funcs_1/t/is_columns_ndb.test delete mode 100644 mysql-test/suite/funcs_1/t/is_engines_ndb.test delete mode 100644 mysql-test/suite/funcs_1/t/is_tables_ndb.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_bitdata.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_cursors.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_func_view.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_storedproc_02.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_storedproc_03.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_storedproc_06.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_storedproc_07.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_storedproc_08.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_storedproc_10.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_0102.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_03.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_03e.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_0407.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_08.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_09.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb_views.test delete mode 100644 mysql-test/suite/funcs_2/r/ndb_charset.result delete mode 100644 mysql-test/suite/funcs_2/t/ndb_charset.test delete mode 100644 mysql-test/suite/ndb/my.cnf delete mode 100644 mysql-test/suite/ndb/r/loaddata_autocom_ndb.result delete mode 100644 mysql-test/suite/ndb/r/ndb_alter_table.result delete mode 100644 mysql-test/suite/ndb/r/ndb_alter_table2.result delete mode 100644 mysql-test/suite/ndb/r/ndb_alter_table3.result delete mode 100644 mysql-test/suite/ndb/r/ndb_auto_increment.result delete mode 100644 mysql-test/suite/ndb/r/ndb_autoinc.result delete mode 100644 mysql-test/suite/ndb/r/ndb_basic.result delete mode 100644 mysql-test/suite/ndb/r/ndb_binlog_basic.result delete mode 100644 mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result delete mode 100644 mysql-test/suite/ndb/r/ndb_binlog_discover.result delete mode 100644 mysql-test/suite/ndb/r/ndb_binlog_format.result delete mode 100644 mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result delete mode 100644 mysql-test/suite/ndb/r/ndb_binlog_log_bin.result delete mode 100644 mysql-test/suite/ndb/r/ndb_binlog_multi.result delete mode 100644 mysql-test/suite/ndb/r/ndb_bitfield.result delete mode 100644 mysql-test/suite/ndb/r/ndb_blob.result delete mode 100644 mysql-test/suite/ndb/r/ndb_blob_partition.result delete mode 100644 mysql-test/suite/ndb/r/ndb_bug26793.result delete mode 100644 mysql-test/suite/ndb/r/ndb_bug31477.result delete mode 100644 mysql-test/suite/ndb/r/ndb_cache.result delete mode 100644 mysql-test/suite/ndb/r/ndb_cache2.result delete mode 100644 mysql-test/suite/ndb/r/ndb_cache_multi.result delete mode 100644 mysql-test/suite/ndb/r/ndb_cache_multi2.result delete mode 100644 mysql-test/suite/ndb/r/ndb_charset.result delete mode 100644 mysql-test/suite/ndb/r/ndb_condition_pushdown.result delete mode 100644 mysql-test/suite/ndb/r/ndb_config.result delete mode 100644 mysql-test/suite/ndb/r/ndb_config2.result delete mode 100644 mysql-test/suite/ndb/r/ndb_cursor.result delete mode 100644 mysql-test/suite/ndb/r/ndb_database.result delete mode 100644 mysql-test/suite/ndb/r/ndb_dd_alter.result delete mode 100644 mysql-test/suite/ndb/r/ndb_dd_basic.result delete mode 100644 mysql-test/suite/ndb/r/ndb_dd_ddl.result delete mode 100644 mysql-test/suite/ndb/r/ndb_dd_disk2memory.result delete mode 100644 mysql-test/suite/ndb/r/ndb_dd_dump.result delete mode 100644 mysql-test/suite/ndb/r/ndb_dd_sql_features.result delete mode 100644 mysql-test/suite/ndb/r/ndb_gis.result delete mode 100644 mysql-test/suite/ndb/r/ndb_grant.result delete mode 100644 mysql-test/suite/ndb/r/ndb_index.result delete mode 100644 mysql-test/suite/ndb/r/ndb_index_ordered.result delete mode 100644 mysql-test/suite/ndb/r/ndb_index_unique.result delete mode 100644 mysql-test/suite/ndb/r/ndb_insert.result delete mode 100644 mysql-test/suite/ndb/r/ndb_limit.result delete mode 100644 mysql-test/suite/ndb/r/ndb_load.result delete mode 100644 mysql-test/suite/ndb/r/ndb_loaddatalocal.result delete mode 100644 mysql-test/suite/ndb/r/ndb_lock.result delete mode 100644 mysql-test/suite/ndb/r/ndb_lock_table.result delete mode 100644 mysql-test/suite/ndb/r/ndb_minmax.result delete mode 100644 mysql-test/suite/ndb/r/ndb_multi.result delete mode 100644 mysql-test/suite/ndb/r/ndb_multi_row.result delete mode 100644 mysql-test/suite/ndb/r/ndb_partition_error.result delete mode 100644 mysql-test/suite/ndb/r/ndb_partition_error2.result delete mode 100644 mysql-test/suite/ndb/r/ndb_partition_key.result delete mode 100644 mysql-test/suite/ndb/r/ndb_partition_list.result delete mode 100644 mysql-test/suite/ndb/r/ndb_partition_range.result delete mode 100644 mysql-test/suite/ndb/r/ndb_read_multi_range.result delete mode 100644 mysql-test/suite/ndb/r/ndb_rename.result delete mode 100644 mysql-test/suite/ndb/r/ndb_replace.result delete mode 100644 mysql-test/suite/ndb/r/ndb_restore.result delete mode 100644 mysql-test/suite/ndb/r/ndb_restore_compat.result delete mode 100644 mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result delete mode 100644 mysql-test/suite/ndb/r/ndb_restore_partition.result delete mode 100644 mysql-test/suite/ndb/r/ndb_restore_print.result delete mode 100644 mysql-test/suite/ndb/r/ndb_row_format.result delete mode 100644 mysql-test/suite/ndb/r/ndb_single_user.result delete mode 100644 mysql-test/suite/ndb/r/ndb_sp.result delete mode 100644 mysql-test/suite/ndb/r/ndb_subquery.result delete mode 100644 mysql-test/suite/ndb/r/ndb_temporary.result delete mode 100644 mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result delete mode 100644 mysql-test/suite/ndb/r/ndb_transaction.result delete mode 100644 mysql-test/suite/ndb/r/ndb_trigger.result delete mode 100644 mysql-test/suite/ndb/r/ndb_truncate.result delete mode 100644 mysql-test/suite/ndb/r/ndb_types.result delete mode 100644 mysql-test/suite/ndb/r/ndb_update.result delete mode 100644 mysql-test/suite/ndb/r/ndb_update_no_read.result delete mode 100644 mysql-test/suite/ndb/r/ndb_view.result delete mode 100644 mysql-test/suite/ndb/r/ndbapi.result delete mode 100644 mysql-test/suite/ndb/r/ps_7ndb.result delete mode 100644 mysql-test/suite/ndb/r/strict_autoinc_5ndb.result delete mode 100644 mysql-test/suite/ndb/t/disabled.def delete mode 100644 mysql-test/suite/ndb/t/loaddata_autocom_ndb.test delete mode 100644 mysql-test/suite/ndb/t/ndb_alter_table.test delete mode 100644 mysql-test/suite/ndb/t/ndb_alter_table2.test delete mode 100644 mysql-test/suite/ndb/t/ndb_alter_table3.test delete mode 100644 mysql-test/suite/ndb/t/ndb_auto_increment.test delete mode 100644 mysql-test/suite/ndb/t/ndb_autoinc.test delete mode 100644 mysql-test/suite/ndb/t/ndb_basic.test delete mode 100644 mysql-test/suite/ndb/t/ndb_binlog_basic.test delete mode 100644 mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test delete mode 100644 mysql-test/suite/ndb/t/ndb_binlog_discover.test delete mode 100644 mysql-test/suite/ndb/t/ndb_binlog_format.test delete mode 100644 mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt delete mode 100644 mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test delete mode 100644 mysql-test/suite/ndb/t/ndb_binlog_log_bin.test delete mode 100644 mysql-test/suite/ndb/t/ndb_binlog_multi.test delete mode 100644 mysql-test/suite/ndb/t/ndb_bitfield.test delete mode 100644 mysql-test/suite/ndb/t/ndb_blob.test delete mode 100644 mysql-test/suite/ndb/t/ndb_blob_partition.test delete mode 100644 mysql-test/suite/ndb/t/ndb_bug26793.test delete mode 100644 mysql-test/suite/ndb/t/ndb_bug31477.test delete mode 100644 mysql-test/suite/ndb/t/ndb_cache.test delete mode 100644 mysql-test/suite/ndb/t/ndb_cache2.test delete mode 100644 mysql-test/suite/ndb/t/ndb_cache_multi.test delete mode 100644 mysql-test/suite/ndb/t/ndb_cache_multi2.test delete mode 100644 mysql-test/suite/ndb/t/ndb_charset.test delete mode 100644 mysql-test/suite/ndb/t/ndb_condition_pushdown.test delete mode 100644 mysql-test/suite/ndb/t/ndb_config.test delete mode 100644 mysql-test/suite/ndb/t/ndb_config2.test delete mode 100644 mysql-test/suite/ndb/t/ndb_cursor.test delete mode 100644 mysql-test/suite/ndb/t/ndb_database.test delete mode 100644 mysql-test/suite/ndb/t/ndb_dd_alter.test delete mode 100644 mysql-test/suite/ndb/t/ndb_dd_basic.test delete mode 100644 mysql-test/suite/ndb/t/ndb_dd_ddl.test delete mode 100644 mysql-test/suite/ndb/t/ndb_dd_disk2memory.test delete mode 100644 mysql-test/suite/ndb/t/ndb_dd_dump.test delete mode 100644 mysql-test/suite/ndb/t/ndb_dd_sql_features.test delete mode 100644 mysql-test/suite/ndb/t/ndb_gis.test delete mode 100644 mysql-test/suite/ndb/t/ndb_grant.later delete mode 100644 mysql-test/suite/ndb/t/ndb_index.test delete mode 100644 mysql-test/suite/ndb/t/ndb_index_ordered.test delete mode 100644 mysql-test/suite/ndb/t/ndb_index_unique.test delete mode 100644 mysql-test/suite/ndb/t/ndb_insert.test delete mode 100644 mysql-test/suite/ndb/t/ndb_limit.test delete mode 100644 mysql-test/suite/ndb/t/ndb_load.test delete mode 100644 mysql-test/suite/ndb/t/ndb_loaddatalocal.test delete mode 100644 mysql-test/suite/ndb/t/ndb_lock.test delete mode 100644 mysql-test/suite/ndb/t/ndb_lock_table.test delete mode 100644 mysql-test/suite/ndb/t/ndb_minmax.test delete mode 100644 mysql-test/suite/ndb/t/ndb_multi.test delete mode 100644 mysql-test/suite/ndb/t/ndb_multi_row.test delete mode 100644 mysql-test/suite/ndb/t/ndb_partition_error.test delete mode 100644 mysql-test/suite/ndb/t/ndb_partition_error2-master.opt delete mode 100644 mysql-test/suite/ndb/t/ndb_partition_error2.test delete mode 100644 mysql-test/suite/ndb/t/ndb_partition_key.test delete mode 100644 mysql-test/suite/ndb/t/ndb_partition_list.test delete mode 100644 mysql-test/suite/ndb/t/ndb_partition_range.test delete mode 100644 mysql-test/suite/ndb/t/ndb_read_multi_range.test delete mode 100644 mysql-test/suite/ndb/t/ndb_rename.test delete mode 100644 mysql-test/suite/ndb/t/ndb_replace.test delete mode 100644 mysql-test/suite/ndb/t/ndb_restore.test delete mode 100644 mysql-test/suite/ndb/t/ndb_restore_compat.test delete mode 100644 mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test delete mode 100644 mysql-test/suite/ndb/t/ndb_restore_partition-master.opt delete mode 100644 mysql-test/suite/ndb/t/ndb_restore_partition.test delete mode 100644 mysql-test/suite/ndb/t/ndb_restore_print.test delete mode 100644 mysql-test/suite/ndb/t/ndb_row_format.test delete mode 100644 mysql-test/suite/ndb/t/ndb_single_user.test delete mode 100644 mysql-test/suite/ndb/t/ndb_sp.test delete mode 100644 mysql-test/suite/ndb/t/ndb_subquery.test delete mode 100644 mysql-test/suite/ndb/t/ndb_temporary.test delete mode 100644 mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test delete mode 100644 mysql-test/suite/ndb/t/ndb_transaction.test delete mode 100644 mysql-test/suite/ndb/t/ndb_trigger.test delete mode 100644 mysql-test/suite/ndb/t/ndb_truncate.test delete mode 100644 mysql-test/suite/ndb/t/ndb_types.test delete mode 100644 mysql-test/suite/ndb/t/ndb_update.test delete mode 100644 mysql-test/suite/ndb/t/ndb_update_no_read.test delete mode 100644 mysql-test/suite/ndb/t/ndb_view.test delete mode 100644 mysql-test/suite/ndb/t/ndbapi.test delete mode 100644 mysql-test/suite/ndb/t/ps_7ndb.test delete mode 100644 mysql-test/suite/ndb/t/strict_autoinc_5ndb.test delete mode 100644 mysql-test/suite/ndb_team/r/ndb_autodiscover.result delete mode 100644 mysql-test/suite/ndb_team/r/ndb_autodiscover2.result delete mode 100644 mysql-test/suite/ndb_team/r/ndb_autodiscover3.result delete mode 100644 mysql-test/suite/ndb_team/r/ndb_backup_print.result delete mode 100644 mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result delete mode 100644 mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result delete mode 100644 mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result delete mode 100644 mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result delete mode 100644 mysql-test/suite/ndb_team/t/disabled.def delete mode 100644 mysql-test/suite/ndb_team/t/ndb_autodiscover.test delete mode 100644 mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt delete mode 100644 mysql-test/suite/ndb_team/t/ndb_autodiscover2.test delete mode 100644 mysql-test/suite/ndb_team/t/ndb_autodiscover3.test delete mode 100644 mysql-test/suite/ndb_team/t/ndb_backup_print.test delete mode 100644 mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test delete mode 100644 mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test delete mode 100644 mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test delete mode 100644 mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt delete mode 100644 mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test delete mode 100644 mysql-test/suite/parts/r/ndb_dd_backuprestore.result delete mode 100644 mysql-test/suite/parts/r/part_supported_sql_func_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_alter1_1_2_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_alter1_1_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_alter1_2_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_auto_increment_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_engine_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_int_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_syntax_ndb.result delete mode 100644 mysql-test/suite/parts/r/partition_value_ndb.result delete mode 100644 mysql-test/suite/parts/t/ndb_dd_backuprestore.test delete mode 100644 mysql-test/suite/parts/t/part_supported_sql_func_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_alter1_1_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_alter1_2_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_auto_increment_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_basic_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_engine_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_int_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt delete mode 100644 mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt delete mode 100644 mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_syntax_ndb.test delete mode 100644 mysql-test/suite/parts/t/partition_value_ndb.test delete mode 100644 mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result delete mode 100644 mysql-test/suite/rpl_ndb/combinations delete mode 100644 mysql-test/suite/rpl_ndb/my.cnf delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result delete mode 100644 mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result delete mode 100644 mysql-test/suite/rpl_ndb/t/disabled.def delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_implicit_commit_binlog.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_row_implicit_commit_binlog.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt delete mode 100644 mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test delete mode 100644 mysql-test/suite/stress/r/ddl_ndb.result delete mode 100644 mysql-test/suite/stress/t/ddl_ndb.test delete mode 100644 mysql-test/t/ctype_utf8mb4_ndb.test diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 818691e2e73..aad3c62b0ea 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -32,61 +32,12 @@ sys_vars.plugin_dir_basic # Bug#52223 2010-11-24 alik Test " sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10 sys_vars.wait_timeout_func # Bug#41255 2010-04-26 alik wait_timeout_func fails -# Declare all NDB-tests in ndb and rpl_ndb test suites experimental. -# Usually the test cases from ndb and rpl_ndb test suites are not run in PB, -# but they run by gcov. -# - -ndb.* -rpl_ndb.* -rpl_ndb.rpl_ndb_log # Bug#38998 - -# Declare all NDB-tests in other test suites experimental. - -stress.ddl_ndb - +# BUG #59055 : All ndb tests should be removed from the repository +# Leaving the sys_vars tests for now. sys_vars.all_vars.test fails on removing ndb tests sys_vars.ndb_log_update_as_write_basic sys_vars.have_ndbcluster_basic sys_vars.ndb_log_updated_only_basic -funcs_1.ndb_storedproc_10 -funcs_1.ndb_bitdata -funcs_1.ndb_trig_03 -funcs_1.ndb_trig_0102 -funcs_1.is_tables_ndb -funcs_1.is_columns_ndb -funcs_1.ndb_trig_0407 -funcs_1.ndb_trig_1011ext -funcs_1.ndb_storedproc_06 -funcs_1.ndb_views -funcs_1.is_cml_ndb -funcs_1.ndb_storedproc_02 -funcs_1.ndb_storedproc_03 -funcs_1.ndb_trig_03e -funcs_1.is_engines_ndb -funcs_1.ndb_trig_08 -funcs_1.ndb_storedproc_07 -funcs_1.ndb_storedproc_08 -funcs_1.ndb_func_view -funcs_1.ndb_trig_09 -funcs_1.ndb_cursors - -funcs_2.ndb_charset - -parts.ndb_dd_backuprestore # joro : NDB tests marked as experimental as agreed with bochklin -parts.part_supported_sql_func_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_alter1_1_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_alter1_1_2_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_alter1_2_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_auto_increment_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_basic_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_engine_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_int_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_mgm_lc0_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin -parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin main.gis-rtree # svoj: due to BUG#38965 main.type_float # svoj: due to BUG#38965 main.type_newdecimal # svoj: due to BUG#38965 diff --git a/mysql-test/collections/default.weekly b/mysql-test/collections/default.weekly index 426bcfa53c4..99a4f2130e3 100644 --- a/mysql-test/collections/default.weekly +++ b/mysql-test/collections/default.weekly @@ -1,2 +1,2 @@ perl mysql-test-run.pl --timer --force --parallel=auto --comment=1st --experimental=collections/default.experimental 1st -perl mysql-test-run.pl --timer --force --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_ndb parts.partition_alter1_2_innodb parts.partition_alter1_2_ndb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb rpl_ndb.rpl_truncate_7ndb_2 +perl mysql-test-run.pl --timer --force --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb diff --git a/mysql-test/r/ctype_utf8mb4_ndb.result b/mysql-test/r/ctype_utf8mb4_ndb.result deleted file mode 100644 index 2a11c13ce57..00000000000 --- a/mysql-test/r/ctype_utf8mb4_ndb.result +++ /dev/null @@ -1,1876 +0,0 @@ -drop table if exists t1,t2; -# -# Start of 5.5 tests -# -set names utf8mb4; -select left(_utf8mb4 0xD0B0D0B1D0B2,1); -left(_utf8mb4 0xD0B0D0B1D0B2,1) -а -select right(_utf8mb4 0xD0B0D0B2D0B2,1); -right(_utf8mb4 0xD0B0D0B2D0B2,1) -в -select locate('he','hello'); -locate('he','hello') -1 -select locate('he','hello',2); -locate('he','hello',2) -0 -select locate('lo','hello',2); -locate('lo','hello',2) -4 -select locate('HE','hello'); -locate('HE','hello') -1 -select locate('HE','hello',2); -locate('HE','hello',2) -0 -select locate('LO','hello',2); -locate('LO','hello',2) -4 -select locate('HE','hello' collate utf8mb4_bin); -locate('HE','hello' collate utf8mb4_bin) -0 -select locate('HE','hello' collate utf8mb4_bin,2); -locate('HE','hello' collate utf8mb4_bin,2) -0 -select locate('LO','hello' collate utf8mb4_bin,2); -locate('LO','hello' collate utf8mb4_bin,2) -0 -select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2); -locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2) -2 -select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2); -locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2) -2 -select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2); -locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2) -2 -select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin); -locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin) -0 -select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin); -locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin) -0 -select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1); -length(_utf8mb4 0xD0B1) bit_length(_utf8mb4 0xD0B1) char_length(_utf8mb4 0xD0B1) -2 16 1 -select 'a' like 'a'; -'a' like 'a' -1 -select 'A' like 'a'; -'A' like 'a' -1 -select 'A' like 'a' collate utf8mb4_bin; -'A' like 'a' collate utf8mb4_bin -0 -select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%'); -_utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%') -1 -select convert(_latin1'Günter André' using utf8mb4) like CONVERT(_latin1'GÜNTER%' USING utf8mb4); -convert(_latin1'G?nter Andr?' using utf8mb4) like CONVERT(_latin1'G?NTER%' USING utf8mb4) -1 -select CONVERT(_koi8r'×ÁÓÑ' USING utf8mb4) LIKE CONVERT(_koi8r'÷áóñ' USING utf8mb4); -CONVERT(_koi8r'????' USING utf8mb4) LIKE CONVERT(_koi8r'????' USING utf8mb4) -1 -select CONVERT(_koi8r'÷áóñ' USING utf8mb4) LIKE CONVERT(_koi8r'×ÁÓÑ' USING utf8mb4); -CONVERT(_koi8r'????' USING utf8mb4) LIKE CONVERT(_koi8r'????' USING utf8mb4) -1 -SELECT 'a' = 'a '; -'a' = 'a ' -1 -SELECT 'a\0' < 'a'; -'a\0' < 'a' -1 -SELECT 'a\0' < 'a '; -'a\0' < 'a ' -1 -SELECT 'a\t' < 'a'; -'a\t' < 'a' -1 -SELECT 'a\t' < 'a '; -'a\t' < 'a ' -1 -SELECT 'a' = 'a ' collate utf8mb4_bin; -'a' = 'a ' collate utf8mb4_bin -1 -SELECT 'a\0' < 'a' collate utf8mb4_bin; -'a\0' < 'a' collate utf8mb4_bin -1 -SELECT 'a\0' < 'a ' collate utf8mb4_bin; -'a\0' < 'a ' collate utf8mb4_bin -1 -SELECT 'a\t' < 'a' collate utf8mb4_bin; -'a\t' < 'a' collate utf8mb4_bin -1 -SELECT 'a\t' < 'a ' collate utf8mb4_bin; -'a\t' < 'a ' collate utf8mb4_bin -1 -CREATE TABLE t1 (a char(10) character set utf8mb4 not null) ENGINE ndb; -INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a '); -SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1; -hex(a) STRCMP(a,'a') STRCMP(a,'a ') -61 0 0 -61 0 0 -6100 -1 -1 -6109 -1 -1 -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 -select insert("aa",100,1,"b"),insert("aa",1,3,"b"); -insert("aa",100,1,"b") insert("aa",1,3,"b") -aa b -select char_length(left(@a:='теÑÑ‚',5)), length(@a), @a; -char_length(left(@a:='теÑÑ‚',5)) length(@a) @a -4 8 теÑÑ‚ -create table t1 ENGINE ndb select date_format("2004-01-19 10:10:10", "%Y-%m-%d"); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -select * from t1; -date_format("2004-01-19 10:10:10", "%Y-%m-%d") -2004-01-19 -drop table t1; -set names utf8mb4; -set LC_TIME_NAMES='fr_FR'; -create table t1 (s1 char(20) character set latin1) engine ndb; -insert into t1 values (date_format('2004-02-02','%M')); -select hex(s1) from t1; -hex(s1) -66E97672696572 -drop table t1; -create table t1 (s1 char(20) character set koi8r) engine ndb; -set LC_TIME_NAMES='ru_RU'; -insert into t1 values (date_format('2004-02-02','%M')); -insert into t1 values (date_format('2004-02-02','%b')); -insert into t1 values (date_format('2004-02-02','%W')); -insert into t1 values (date_format('2004-02-02','%a')); -select hex(s1), s1 from t1; -hex(s1) s1 -E6C5D7 Фев -E6C5D7D2C1CCD1 Ð¤ÐµÐ²Ñ€Ð°Ð»Ñ -F0CEC4 Пнд -F0CFCEC5C4C5CCD8CEC9CB Понедельник -drop table t1; -set LC_TIME_NAMES='en_US'; -set names koi8r; -create table t1 (s1 char(1) character set utf8mb4) engine ndb; -insert into t1 values (_koi8r'ÁÂ'); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -select s1,hex(s1),char_length(s1),octet_length(s1) from t1; -s1 hex(s1) char_length(s1) octet_length(s1) -Á D0B0 1 2 -drop table t1; -create table t1 (s1 tinytext character set utf8mb4) engine ndb; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 select repeat('a',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',300); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -select hex(s1) from t1; -hex(s1) -616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 -61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F -D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61D18F61 -D18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18F -D18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18FD18F -select length(s1),char_length(s1) from t1; -length(s1) char_length(s1) -254 127 -254 127 -255 170 -255 170 -255 255 -drop table t1; -create table t1 (s1 text character set utf8mb4) engine ndb; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 select repeat('a',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',66000); -Warnings: -Warning 1265 Data truncated for column 's1' at row 1 -select length(s1),char_length(s1) from t1; -length(s1) char_length(s1) -65534 32767 -65534 32767 -65535 43690 -65535 43690 -65535 65535 -drop table t1; -create table t1 (s1 char(10) character set utf8mb4) engine ndb; -insert into t1 values (0x41FF); -Warnings: -Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 -select hex(s1) from t1; -hex(s1) -41 -drop table t1; -create table t1 (s1 varchar(10) character set utf8mb4) engine ndb; -insert into t1 values (0x41FF); -Warnings: -Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 -select hex(s1) from t1; -hex(s1) -41 -drop table t1; -create table t1 (s1 text character set utf8mb4) engine ndb; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 values (0x41FF); -Warnings: -Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 -select hex(s1) from t1; -hex(s1) -41 -drop table t1; -create table t1 (a text character set utf8mb4, primary key(a(371))) engine ndb; -ERROR 42000: BLOB column 'a' can't be used in key specification with the used table type -CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES ( 'test' ); -SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a; -a a -test test -SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = 'test' and b.a = 'test'; -a a -test test -SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a and a.a = 'test'; -a a -test test -DROP TABLE t1; -create table t1 (a char(255) character set utf8mb4) engine ndb; -insert into t1 values('b'),('b'); -select * from t1 where a = 'b'; -a -b -b -select * from t1 where a = 'b' and a = 'b'; -a -b -b -select * from t1 where a = 'b' and a != 'b'; -a -drop table t1; -set collation_connection=utf8mb4_general_ci; -drop table if exists t1; -create table t1 as -select repeat(' ', 64) as s1, repeat(' ',64) as s2 -union -select null, null; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `s1` varchar(64) CHARACTER SET utf8mb4 DEFAULT NULL, - `s2` varchar(64) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -delete from t1; -insert into t1 values('aaa','aaa'); -insert into t1 values('aaa|qqq','qqq'); -insert into t1 values('gheis','^[^a-dXYZ]+$'); -insert into t1 values('aab','^aa?b'); -insert into t1 values('Baaan','^Ba*n'); -insert into t1 values('aaa','qqq|aaa'); -insert into t1 values('qqq','qqq|aaa'); -insert into t1 values('bbb','qqq|aaa'); -insert into t1 values('bbb','qqq'); -insert into t1 values('aaa','aba'); -insert into t1 values(null,'abc'); -insert into t1 values('def',null); -insert into t1 values(null,null); -insert into t1 values('ghi','ghi['); -select HIGH_PRIORITY s1 regexp s2 from t1; -s1 regexp s2 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -NULL -NULL -NULL -NULL -drop table t1; -set names utf8mb4; -set names utf8mb4; -select 'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' -1 -select 'ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]' -1 -select ' ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -' ваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' -1 -select ' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -' ваÑÑ ' rlike '[[:<:]]ваÑÑ[[:>:]]' -1 -select 'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'ваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]' -0 -select 'zваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'zваÑÑ' rlike '[[:<:]]ваÑÑ[[:>:]]' -0 -select 'zваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]'; -'zваÑÑz' rlike '[[:<:]]ваÑÑ[[:>:]]' -0 -CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8mb4_unicode_ci) ENGINE ndb; -ALTER TABLE t1 ADD COLUMN b CHAR(20); -DROP TABLE t1; -set names utf8mb4; -create table t1 (a enum('aaaa','проба') character set utf8mb4) engine ndb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` enum('aaaa','проба') CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -insert into t1 values ('проба'); -select * from t1; -a -проба -create table t2 engine ndb select ifnull(a,a) from t1; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `ifnull(a,a)` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -select * from t2; -ifnull(a,a) -проба -drop table t1; -drop table t2; -create table t1 ( -str varchar(255) character set utf8mb4 not null, -key str (str(2)) -) engine=ndb; -INSERT INTO t1 VALUES ('str'); -INSERT INTO t1 VALUES ('str2'); -select * from t1 where str='str'; -str -str -drop table t1; -create table t1 ( -str varchar(255) character set utf8mb4 not null, -key str (str(2)) -) engine=ndb; -INSERT INTO t1 VALUES ('str'); -INSERT INTO t1 VALUES ('str2'); -select * from t1 where str='str'; -str -str -drop table t1; -create table t1 ( -str varchar(255) character set utf8mb4 not null, -key str using btree (str(2)) -) engine=ndb; -INSERT INTO t1 VALUES ('str'); -INSERT INTO t1 VALUES ('str2'); -select * from t1 where str='str'; -str -str -drop table t1; -CREATE TABLE t1 (a varchar(32) BINARY) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES ('test'); -SELECT a FROM t1 WHERE a LIKE '%te'; -a -DROP TABLE t1; -SET NAMES utf8mb4; -CREATE TABLE t1 ( -subject varchar(255) character set utf8mb4 collate utf8mb4_unicode_ci, -p varchar(15) character set utf8mb4 -) ENGINE= ndb DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES ('è°·å·ä¿ŠäºŒã¨ç”³ã—ã¾ã™ãŒã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆäºˆç´„ã®ä¼šå“¡ç™»éŒ²ã‚’ã—ã¾ã—ãŸã¨ã“ã‚ã€ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’é–“é•ãˆã¦ã—ã¾ã„会員IDãŒå—ã‘å–ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ã§ã—ãŸã€‚é–“é•ãˆã‚¢ãƒ‰ãƒ¬ã‚¹ã¯tani-shun@n.vodafone.ne.jpを書ãè¾¼ã¿ã¾ã—ãŸã€‚ã©ã†ã™ã‚Œã°ã‚ˆã„ã§ã™ã‹ï¼Ÿ ãã®ä»–ã€ä½æ‰€ç­‰ã¯é–“é•ãˆã‚ã‚Šã¾ã›ã‚“。連絡ãã ã•ã„。よã‚ã—ããŠé¡˜ã„ã—ã¾ã™ã€‚m(__)m','040312-000057'); -INSERT INTO t1 VALUES ('aaa','bbb'); -SELECT length(subject) FROM t1; -length(subject) -3 -432 -SELECT length(subject) FROM t1 ORDER BY 1; -length(subject) -3 -432 -DROP TABLE t1; -set names utf8mb4; -create table t1 ( -a int primary key, -b varchar(6), -index b3(b(3)) -) engine=ndb character set=utf8mb4; -insert into t1 values(1,'foo'),(2,'foobar'); -select * from t1 where b like 'foob%'; -a b -2 foobar -alter table t1 engine=innodb; -select * from t1 where b like 'foob%'; -a b -2 foobar -drop table t1; -create table t1 ( -a enum('петÑ','ваÑÑ','анюта') character set utf8mb4 not null default 'анюта', -b set('петÑ','ваÑÑ','анюта') character set utf8mb4 not null default 'анюта' -) engine ndb; -create table t2 engine ndb select concat(a,_utf8mb4'') as a, concat(b,_utf8mb4'')as b from t1; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', - `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -drop table t2; -drop table t1; -select 'c' like '\_' as want0; -want0 -0 -SELECT SUBSTR('ваÑÑ',-2); -SUBSTR('ваÑÑ',-2) -ÑÑ -create table t1 (id integer, a varchar(100) character set utf8mb4 collate utf8mb4_unicode_ci) engine ndb; -insert into t1 values (1, 'Test'); -select * from t1 where soundex(a) = soundex('Test'); -id a -1 Test -select * from t1 where soundex(a) = soundex('TEST'); -id a -1 Test -select * from t1 where soundex(a) = soundex('test'); -id a -1 Test -drop table t1; -select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB); -soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB) -阅000 -select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)); -hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)) -E99885303030 -select soundex(_utf8mb4 0xD091D092D093); -soundex(_utf8mb4 0xD091D092D093) -Б000 -select hex(soundex(_utf8mb4 0xD091D092D093)); -hex(soundex(_utf8mb4 0xD091D092D093)) -D091303030 -SET collation_connection='utf8mb4_general_ci'; -create table t1 select repeat('a',4000) a; -delete from t1; -insert into t1 values ('a'), ('a '), ('a\t'); -select collation(a),hex(a) from t1 order by a; -collation(a) hex(a) -utf8mb4_general_ci 6109 -utf8mb4_general_ci 61 -utf8mb4_general_ci 6120 -drop table t1; -select @@collation_connection; -@@collation_connection -utf8mb4_general_ci -create table t1 ROW_FORMAT=DYNAMIC select repeat('a',50) as c1 ; -insert into t1 values('abcdef'); -insert into t1 values('_bcdef'); -insert into t1 values('a_cdef'); -insert into t1 values('ab_def'); -insert into t1 values('abc_ef'); -insert into t1 values('abcd_f'); -insert into t1 values('abcde_'); -select c1 as c1u from t1 where c1 like 'ab\_def'; -c1u -ab_def -select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; -c2h -ab_def -drop table t1; -drop table if exists t1; -create table t1 as select repeat(' ', 64) as s1; -select collation(s1) from t1; -collation(s1) -utf8mb4_general_ci -delete from t1; -insert into t1 values ('a'),('ae'),(_latin1 0xE4); -insert into t1 values ('o'),('oe'),(_latin1 0xF6); -insert into t1 values ('s'),('ss'),(_latin1 0xDF); -insert into t1 values ('u'),('ue'),(_latin1 0xFC); -select s1, hex(s1) from t1 order by s1, binary s1; -s1 hex(s1) -a 61 -ä C3A4 -ae 6165 -o 6F -ö C3B6 -oe 6F65 -s 73 -ß C39F -ss 7373 -u 75 -ü C3BC -ue 7565 -select group_concat(s1 order by binary s1) from t1 group by s1; -group_concat(s1 order by binary s1) -a,ä -ae -o,ö -oe -s,ß -ss -u,ü -ue -drop table t1; -SET collation_connection='utf8mb4_bin'; -create table t1 select repeat('a',4000) a; -delete from t1; -insert into t1 values ('a'), ('a '), ('a\t'); -select collation(a),hex(a) from t1 order by a; -collation(a) hex(a) -utf8mb4_bin 6109 -utf8mb4_bin 61 -utf8mb4_bin 6120 -drop table t1; -select @@collation_connection; -@@collation_connection -utf8mb4_bin -create table t1 ROW_FORMAT=DYNAMIC select repeat('a',50) as c1 ; -insert into t1 values('abcdef'); -insert into t1 values('_bcdef'); -insert into t1 values('a_cdef'); -insert into t1 values('ab_def'); -insert into t1 values('abc_ef'); -insert into t1 values('abcd_f'); -insert into t1 values('abcde_'); -select c1 as c1u from t1 where c1 like 'ab\_def'; -c1u -ab_def -select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; -c2h -ab_def -drop table t1; -CREATE TABLE t1 ( -user varchar(255) NOT NULL default '' -) ENGINE=ndb DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES ('one'),('two'); -SELECT CHARSET('a'); -CHARSET('a') -utf8mb4 -SELECT user, CONCAT('<', user, '>') AS c FROM t1; -user c -one -two -DROP TABLE t1; -create table t1 (f1 varchar(1) not null) default charset utf8mb4 engine ndb; -insert into t1 values (''), (''); -select concat(concat(_latin1'->',f1),_latin1'<-') from t1; -concat(concat(_latin1'->',f1),_latin1'<-') --><- --><- -drop table t1; -select convert(_koi8r'É' using utf8mb4) < convert(_koi8r'Ê' using utf8mb4); -convert(_koi8r'?' using utf8mb4) < convert(_koi8r'?' using utf8mb4) -1 -set names latin1; -create table t1 (a varchar(10)) character set utf8mb4 engine ndb; -insert into t1 values ('test'); -select ifnull(a,'') from t1; -ifnull(a,'') -test -drop table t1; -select repeat(_utf8mb4'+',3) as h union select NULL; -h -+++ -NULL -select ifnull(NULL, _utf8mb4'string'); -ifnull(NULL, _utf8mb4'string') -string -set names utf8mb4; -create table t1 (s1 char(5) character set utf8mb4 collate utf8mb4_lithuanian_ci) engine ndb; -insert into t1 values ('I'),('K'),('Y'); -select * from t1 where s1 < 'K' and s1 = 'Y'; -s1 -I -Y -select * from t1 where 'K' > s1 and s1 = 'Y'; -s1 -I -Y -drop table t1; -create table t1 (s1 char(5) character set utf8mb4 collate utf8mb4_czech_ci) engine ndb; -insert into t1 values ('c'),('d'),('h'),('ch'),('CH'),('cH'),('Ch'),('i'); -select * from t1 where s1 > 'd' and s1 = 'CH'; -s1 -CH -Ch -ch -select * from t1 where 'd' < s1 and s1 = 'CH'; -s1 -CH -Ch -ch -select * from t1 where s1 = 'cH' and s1 <> 'ch'; -s1 -cH -select * from t1 where 'cH' = s1 and s1 <> 'ch'; -s1 -cH -drop table t1; -create table t1 (a varchar(255)) default character set utf8mb4 engine ndb; -insert into t1 values (1.0); -drop table t1; -create table t1 ( -id int not null, -city varchar(20) not null, -key (city(7),id) -) character set=utf8mb4 engine ndb; -insert into t1 values (1,'Durban North'); -insert into t1 values (2,'Durban'); -select * from t1 where city = 'Durban'; -id city -2 Durban -select * from t1 where city = 'Durban '; -id city -2 Durban -drop table t1; -create table t1 (x set('A', 'B') default 0) character set utf8mb4 engine ndb; -ERROR 42000: Invalid default value for 'x' -create table t1 (x enum('A', 'B') default 0) character set utf8mb4 engine ndb; -ERROR 42000: Invalid default value for 'x' -SET NAMES UTF8; -CREATE TABLE t1 ( -`id` int(20) NOT NULL auto_increment, -`country` varchar(100) NOT NULL default '', -`shortcode` varchar(100) NOT NULL default '', -`operator` varchar(100) NOT NULL default '', -`momid` varchar(30) NOT NULL default '', -`keyword` varchar(160) NOT NULL default '', -`content` varchar(160) NOT NULL default '', -`second_token` varchar(160) default NULL, -`gateway_id` int(11) NOT NULL default '0', -`created` datetime NOT NULL default '0000-00-00 00:00:00', -`msisdn` varchar(15) NOT NULL default '', -PRIMARY KEY (`id`), -UNIQUE KEY `MSCCSPK_20030521130957121` (`momid`), -KEY `IX_mobile_originated_message_keyword` (`keyword`), -KEY `IX_mobile_originated_message_created` (`created`), -KEY `IX_mobile_originated_message_support` (`msisdn`,`momid`,`keyword`,`gateway_id`,`created`) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4; -INSERT INTO t1 VALUES -(1,'blah','464','aaa','fkc1c9ilc20x0hgae7lx6j09','ERR','ERR Имри.Ðфимим.Ðеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ðд.Д имдимримрад.Ðдимримримрмдиримримримр м.Дадимфшьмримд им.Ðдимимрн имадми','ИМРИ.ÐФИМИМ.ÐЕИМИМРИМДМРИМРМРИРОР',3,'2005-06-01 17:30:43','1234567890'), -(2,'blah','464','aaa','haxpl2ilc20x00bj4tt2m5ti','11','11 g','G',3,'2005-06-02 22:43:10','1234567890'); -CREATE TABLE t2 ( -`msisdn` varchar(15) NOT NULL default '', -`operator_id` int(11) NOT NULL default '0', -`created` datetime NOT NULL default '0000-00-00 00:00:00', -UNIQUE KEY `PK_user` (`msisdn`) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4; -INSERT INTO t2 VALUES ('1234567890',2,'2005-05-24 13:53:25'); -SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890'; -content msisdn -ERR Имри.Ðфимим.Ðеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ðд.Д имдимримрад.Ðдимримримрмдиримримримр м.Дадимфшьмримд им.Ðдимимрн имадми 1234567890 -11 g 1234567890 -DROP TABLE t1,t2; -create table t1 (a char(20) character set utf8mb4) engine ndb; -insert into t1 values ('123456'),('андрей'); -alter table t1 modify a char(2) character set utf8mb4; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 -select char_length(a), length(a), a from t1 order by a; -char_length(a) length(a) a -2 2 12 -2 4 ан -drop table t1; -set names utf8mb4; -select 'andre%' like 'andreñ%' escape 'ñ'; -'andre%' like 'andreñ%' escape 'ñ' -1 -set names utf8mb4; -select 'a\\' like 'a\\'; -'a\\' like 'a\\' -1 -select 'aa\\' like 'a%\\'; -'aa\\' like 'a%\\' -1 -create table t1 (a char(10), key(a)) character set utf8mb4 engine ndb; -insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); -select * from t1 where a like "abc%"; -a -abc -abcd -select * from t1 where a like concat("abc","%"); -a -abc -abcd -select * from t1 where a like "ABC%"; -a -abc -abcd -select * from t1 where a like "test%"; -a -test -select * from t1 where a like "te_t"; -a -test -select * from t1 where a like "%a%"; -a -a -abc -abcd -select * from t1 where a like "%abcd%"; -a -abcd -select * from t1 where a like "%abc\d%"; -a -abcd -drop table t1; -CREATE TABLE t1 ( -a varchar(255) NOT NULL default '', -KEY a (a) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; -insert into t1 values (_utf8mb4 0xe880bd); -insert into t1 values (_utf8mb4 0x5b); -select hex(a) from t1; -hex(a) -5B -E880BD -drop table t1; -set names 'latin1'; -create table t1 (a varchar(255)) default charset=utf8mb4 engine ndb; -select * from t1 where find_in_set('-1', a); -a -drop table t1; -create table t1 (a int) engine ndb; -insert into t1 values (48),(49),(50); -set names utf8mb4; -select distinct char(a) from t1; -char(a) -0 -1 -2 -drop table t1; -CREATE TABLE t1 (t TINYTEXT CHARACTER SET utf8mb4) ENGINE ndb; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -INSERT INTO t1 VALUES(REPEAT('a', 100)); -CREATE TABLE t2 ENGINE ndb SELECT COALESCE(t) AS bug FROM t1; -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -SELECT LENGTH(bug) FROM t2; -LENGTH(bug) -100 -DROP TABLE t2; -DROP TABLE t1; -CREATE TABLE t1 (item varchar(255)) default character set utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES (N'\\'); -INSERT INTO t1 VALUES (_utf8mb4'\\'); -INSERT INTO t1 VALUES (N'Cote d\'Ivoire'); -INSERT INTO t1 VALUES (_utf8mb4'Cote d\'Ivoire'); -SELECT item FROM t1 ORDER BY item; -item -Cote d'Ivoire -Cote d'Ivoire -\ -\ -DROP TABLE t1; -SET NAMES utf8mb4; -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 't1' -CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=ndb DEFAULT CHARSET=utf8mb4; -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); -INSERT INTO t1 VALUES('uu'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uU'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uu'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uuABC'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('UuABC'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uuABC'); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -alter table t1 add b int; -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',1); -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',2); -delete from t1 where b=1; -INSERT INTO t1 VALUES('UUABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',1); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3); -INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',4); -delete from t1 where b=3; -INSERT INTO t1 VALUES('uUABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3); -check table t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -drop table t1; -set names utf8mb4; -create table t1 (s1 char(5) character set utf8mb4) engine ndb; -insert into t1 values -('a'),('b'),(null),('ペテルグル'),('ü'),('Y'); -create index it1 on t1 (s1); -select s1 as before_delete_general_ci from t1 where s1 like 'ペテ%'; -before_delete_general_ci -ペテルグル -delete from t1 where s1 = 'Y'; -select s1 as after_delete_general_ci from t1 where s1 like 'ペテ%'; -after_delete_general_ci -ペテルグル -drop table t1; -set names utf8mb4; -create table t1 (s1 char(5) character set utf8mb4 collate utf8mb4_unicode_ci) engine ndb; -insert into t1 values -('a'),('b'),(null),('ペテルグル'),('ü'),('Y'); -create index it1 on t1 (s1); -select s1 as before_delete_unicode_ci from t1 where s1 like 'ペテ%'; -before_delete_unicode_ci -ペテルグル -delete from t1 where s1 = 'Y'; -select s1 as after_delete_unicode_ci from t1 where s1 like 'ペテ%'; -after_delete_unicode_ci -ペテルグル -drop table t1; -set names utf8mb4; -create table t1 (s1 char(5) character set utf8mb4 collate utf8mb4_bin) engine ndb; -insert into t1 values -('a'),('b'),(null),('ペテルグル'),('ü'),('Y'); -create index it1 on t1 (s1); -select s1 as before_delete_bin from t1 where s1 like 'ペテ%'; -before_delete_bin -ペテルグル -delete from t1 where s1 = 'Y'; -select s1 as after_delete_bin from t1 where s1 like 'ペテ%'; -after_delete_bin -ペテルグル -drop table t1; -set names utf8mb4; -create table t1 (a varchar(30) not null primary key) -engine=ndb default character set utf8mb4 collate utf8mb4_general_ci; -insert into t1 values ('ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'); -insert into t1 values ('ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ'); -select a as gci1 from t1 where a like 'ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ%'; -gci1 -ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ -select a as gci2 from t1 where a like 'ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'; -gci2 -ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã -drop table t1; -set names utf8mb4; -create table t1 (a varchar(30) not null primary key) -engine=ndb default character set utf8mb4 collate utf8mb4_unicode_ci; -insert into t1 values ('ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'); -insert into t1 values ('ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ'); -select a as uci1 from t1 where a like 'ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ%'; -uci1 -ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ -select a as uci2 from t1 where a like 'ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'; -uci2 -ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã -drop table t1; -set names utf8mb4; -create table t1 (a varchar(30) not null primary key) -engine=ndb default character set utf8mb4 collate utf8mb4_bin; -insert into t1 values ('ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'); -insert into t1 values ('ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ'); -select a as bin1 from t1 where a like 'ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ%'; -bin1 -ã•ã—ã™ã›ãã‹ããã‘ã“ã‚ã„ã†ãˆãŠ -select a as bin2 from t1 where a like 'ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã'; -bin2 -ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã•ã—ã™ã›ã -drop table t1; -SET NAMES utf8mb4; -CREATE TABLE t1 (id int PRIMARY KEY, -a varchar(16) collate utf8mb4_unicode_ci NOT NULL default '', -b int, -f varchar(128) default 'XXX', -INDEX (a(4)) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -INSERT INTO t1(id, a, b) VALUES -(1, 'cccc', 50), (2, 'cccc', 70), (3, 'cccc', 30), -(4, 'cccc', 30), (5, 'cccc', 20), (6, 'bbbbbb', 40), -(7, 'dddd', 30), (8, 'aaaa', 10), (9, 'aaaa', 50), -(10, 'eeeee', 40), (11, 'bbbbbb', 60); -SELECT id, a, b FROM t1; -id a b -1 cccc 50 -10 eeeee 40 -11 bbbbbb 60 -2 cccc 70 -3 cccc 30 -4 cccc 30 -5 cccc 20 -6 bbbbbb 40 -7 dddd 30 -8 aaaa 10 -9 aaaa 50 -SELECT id, a, b FROM t1 WHERE a BETWEEN 'aaaa' AND 'bbbbbb'; -id a b -11 bbbbbb 60 -6 bbbbbb 40 -8 aaaa 10 -9 aaaa 50 -SELECT id, a FROM t1 WHERE a='bbbbbb'; -id a -11 bbbbbb -6 bbbbbb -SELECT id, a FROM t1 WHERE a='bbbbbb' ORDER BY b; -id a -6 bbbbbb -11 bbbbbb -DROP TABLE t1; -SET NAMES utf8mb4; -CREATE TABLE t1 ( -a CHAR(13) DEFAULT '', -INDEX(a) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -INSERT INTO t1 VALUES -('Käli Käli 2-4'), ('Käli Käli 2-4'), -('Käli Käli 2+4'), ('Käli Käli 2+4'), -('Käli Käli 2-6'), ('Käli Käli 2-6'); -INSERT INTO t1 SELECT * FROM t1; -CREATE TABLE t2 ( -a CHAR(13) DEFAULT '', -INDEX(a) -) ENGINE=ndb DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -INSERT INTO t2 VALUES -('Kali Kali 2-4'), ('Kali Kali 2-4'), -('Kali Kali 2+4'), ('Kali Kali 2+4'), -('Kali Kali 2-6'), ('Kali Kali 2-6'); -INSERT INTO t2 SELECT * FROM t2; -SELECT a FROM t1 WHERE a LIKE 'Käli Käli 2+4'; -a -Käli Käli 2+4 -Käli Käli 2+4 -Käli Käli 2+4 -Käli Käli 2+4 -SELECT a FROM t2 WHERE a LIKE 'Kali Kali 2+4'; -a -Kali Kali 2+4 -Kali Kali 2+4 -Kali Kali 2+4 -Kali Kali 2+4 -EXPLAIN SELECT a FROM t1 WHERE a LIKE 'Käli Käli 2+4'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 53 NULL 10 Using where with pushed condition -EXPLAIN SELECT a FROM t1 WHERE a = 'Käli Käli 2+4'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 53 const 10 Using where with pushed condition -EXPLAIN SELECT a FROM t2 WHERE a LIKE 'Kali Kali 2+4'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range a a 14 NULL 10 Using where with pushed condition -EXPLAIN SELECT a FROM t2 WHERE a = 'Kali Kali 2+4'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref a a 14 const 10 Using where with pushed condition -DROP TABLE t1,t2; -CREATE TABLE t1 ( -a char(255) DEFAULT '', -KEY(a(10)) -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -INSERT INTO t1 VALUES ('Käli Käli 2-4'); -SELECT * FROM t1 WHERE a LIKE 'Käli Käli 2%'; -a -Käli Käli 2-4 -INSERT INTO t1 VALUES ('Käli Käli 2-4'); -SELECT * FROM t1 WHERE a LIKE 'Käli Käli 2%'; -a -Käli Käli 2-4 -Käli Käli 2-4 -DROP TABLE t1; -CREATE TABLE t1 ( -a char(255) DEFAULT '' -) ENGINE=ndb DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -INSERT INTO t1 VALUES ('Käli Käli 2-4'); -INSERT INTO t1 VALUES ('Käli Käli 2-4'); -SELECT * FROM t1 WHERE a LIKE 'Käli Käli 2%'; -a -Käli Käli 2-4 -Käli Käli 2-4 -ALTER TABLE t1 ADD KEY (a(10)); -SELECT * FROM t1 WHERE a LIKE 'Käli Käli 2%'; -a -Käli Käli 2-4 -Käli Käli 2-4 -DROP TABLE t1; -SET NAMES latin2; -create table t1(a char(200) collate utf8mb4_unicode_ci NOT NULL default '') -default charset=utf8mb4 collate=utf8mb4_unicode_ci engine ndb; -insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65')); -explain select distinct a from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary -SELECT COUNT(*) FROM (SELECT DISTINCT a FROM t1) AS t2; -COUNT(*) -1 -explain select a from t1 group by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort -SELECT COUNT(*) FROM (SELECT a FROM t1 GROUP BY a) AS t2; -COUNT(*) -1 -drop table t1; -create table t1(a char(10)) default charset utf8mb4 engine ndb; -insert into t1 values ('123'), ('456'); -explain -select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort -1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where; Using join buffer -select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; -substr(Z.a,-1) a -3 123 -6 456 -drop table t1; -SET CHARACTER SET utf8mb4; -SHOW VARIABLES LIKE 'character\_set\_%'; -Variable_name Value -character_set_client utf8mb4 -character_set_connection latin1 -character_set_database latin1 -character_set_filesystem binary -character_set_results utf8mb4 -character_set_server latin1 -character_set_system utf8 -CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; -USE crashtest; -CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8mb4 ENGINE ndb; -INSERT INTO crashtest VALUES ('35'), ('36'), ('37'); -SELECT * FROM crashtest ORDER BY CHAR(crash USING utf8mb4); -crash -35 -36 -37 -INSERT INTO crashtest VALUES ('-1000'); -EXPLAIN SELECT * FROM crashtest ORDER BY CHAR(crash USING utf8mb4); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE crashtest ALL NULL NULL NULL NULL 4 Using filesort -SELECT * FROM crashtest ORDER BY CHAR(crash USING utf8mb4); -crash --1000 -35 -36 -37 -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FFFFFC' -DROP TABLE crashtest; -DROP DATABASE crashtest; -USE test; -SET CHARACTER SET default; -CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa'); -SELECT id FROM t1; -id -aa -aa -xxx -yyy -SELECT DISTINCT id FROM t1; -id -aa -xxx -yyy -SELECT DISTINCT id FROM t1 ORDER BY id; -id -aa -xxx -yyy -DROP TABLE t1; -create table t1 ( -a varchar(26) not null -) default character set utf8mb4 ENGINE ndb; -insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); -select * from t1; -a -abcdefghijklmnopqrstuvwxyz -alter table t1 change a a varchar(20) character set utf8mb4 not null; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -select * from t1; -a -abcdefghijklmnopqrst -alter table t1 change a a char(15) character set utf8mb4 not null; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -select * from t1; -a -abcdefghijklmno -alter table t1 change a a char(10) character set utf8mb4 not null; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -select * from t1; -a -abcdefghij -alter table t1 change a a varchar(5) character set utf8mb4 not null; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -select * from t1; -a -abcde -drop table t1; -set names utf8mb4; -select hex(char(1 using utf8mb4)); -hex(char(1 using utf8mb4)) -01 -select char(0xd1,0x8f using utf8mb4); -char(0xd1,0x8f using utf8mb4) -Ñ -select char(0xd18f using utf8mb4); -char(0xd18f using utf8mb4) -Ñ -select char(53647 using utf8mb4); -char(53647 using utf8mb4) -Ñ -select char(0xff,0x8f using utf8mb4); -char(0xff,0x8f using utf8mb4) - -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF8F' -select convert(char(0xff,0x8f) using utf8mb4); -convert(char(0xff,0x8f) using utf8mb4) - -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF8F' -set sql_mode=traditional; -select char(0xff,0x8f using utf8mb4); -char(0xff,0x8f using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF8F' -select char(195 using utf8mb4); -char(195 using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'C3' -select char(196 using utf8mb4); -char(196 using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'C4' -select char(2557 using utf8mb4); -char(2557 using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FD' -select convert(char(0xff,0x8f) using utf8mb4); -convert(char(0xff,0x8f) using utf8mb4) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF8F' -select hex(convert(char(2557 using latin1) using utf8mb4)); -hex(convert(char(2557 using latin1) using utf8mb4)) -09C3BD -select hex(char(195)); -hex(char(195)) -C3 -select hex(char(196)); -hex(char(196)) -C4 -select hex(char(2557)); -hex(char(2557)) -09FD -set names utf8mb4; -create table t1 (a char(1)) default character set utf8mb4 engine ndb; -create table t2 (a char(1)) default character set utf8mb4 engine ndb; -insert into t1 values('a'),('a'),(0xE38182),(0xE38182); -insert into t1 values('i'),('i'),(0xE38184),(0xE38184); -select * from t1 union distinct select * from t2; -a -a -i -ã‚ -ã„ -drop table t1,t2; -set names utf8mb4; -create table t1 (a char(10), b varchar(10)) engine ndb; -insert into t1 values ('bar','kostja'); -insert into t1 values ('kostja','bar'); -prepare my_stmt from "select * from t1 where a=?"; -set @a:='bar'; -execute my_stmt using @a; -a b -bar kostja -set @a:='kostja'; -execute my_stmt using @a; -a b -kostja bar -set @a:=null; -execute my_stmt using @a; -a b -drop table if exists t1; -drop table if exists t1; -drop view if exists v1, v2; -set names utf8mb4; -create table t1(col1 varchar(12) character set utf8mb4 collate utf8mb4_unicode_ci) engine ndb; -insert into t1 values('t1_val'); -create view v1 as select 'v1_val' as col1; -select coercibility(col1), collation(col1) from v1; -coercibility(col1) collation(col1) -4 utf8mb4_general_ci -create view v2 as select col1 from v1 union select col1 from t1; -select coercibility(col1), collation(col1)from v2; -coercibility(col1) collation(col1) -2 utf8mb4_unicode_ci -2 utf8mb4_unicode_ci -drop view v1, v2; -create view v1 as select 'v1_val' collate utf8mb4_swedish_ci as col1; -select coercibility(col1), collation(col1) from v1; -coercibility(col1) collation(col1) -0 utf8mb4_swedish_ci -create view v2 as select col1 from v1 union select col1 from t1; -select coercibility(col1), collation(col1) from v2; -coercibility(col1) collation(col1) -0 utf8mb4_swedish_ci -0 utf8mb4_swedish_ci -drop view v1, v2; -drop table t1; -set names utf8mb4; -create table t1 (a varchar(10) character set latin1, b int) engine ndb; -insert into t1 values ('a',1); -select concat(a, if(b>10, N'x', N'y')) from t1; -concat(a, if(b>10, N'x', N'y')) -ay -select concat(a, if(b>10, N'æ', N'ß')) from t1; -ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat' -drop table t1; -set names utf8mb4; -create table t1 (a varchar(10) character set latin1, b int) engine ndb; -insert into t1 values ('a',1); -select concat(a, if(b>10, _utf8mb4'x', _utf8mb4'y')) from t1; -concat(a, if(b>10, _utf8mb4'x', _utf8mb4'y')) -ay -select concat(a, if(b>10, _utf8mb4'æ', _utf8mb4'ß')) from t1; -ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat' -drop table t1; -set names utf8mb4; -create table t1 (a varchar(10) character set latin1, b int) engine ndb; -insert into t1 values ('a',1); -select concat(a, if(b>10, _utf8mb4 0x78, _utf8mb4 0x79)) from t1; -concat(a, if(b>10, _utf8mb4 0x78, _utf8mb4 0x79)) -ay -select concat(a, if(b>10, _utf8mb4 0xC3A6, _utf8mb4 0xC3AF)) from t1; -ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat' -drop table t1; -set names utf8mb4; -create table t1 (a varchar(10) character set latin1, b int) engine ndb; -insert into t1 values ('a',1); -select concat(a, if(b>10, 'x' 'x', 'y' 'y')) from t1; -concat(a, if(b>10, 'x' 'x', 'y' 'y')) -ayy -select concat(a, if(b>10, 'x' 'æ', 'y' 'ß')) from t1; -ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat' -drop table t1; -CREATE TABLE t1 ( -colA int(11) NOT NULL, -colB varchar(255) character set utf8mb4 NOT NULL, -PRIMARY KEY (colA) -) ENGINE=ndb DEFAULT CHARSET=latin1; -INSERT INTO t1 (colA, colB) VALUES (1, 'foo'), (2, 'foo bar'); -CREATE TABLE t2 ( -colA int(11) NOT NULL, -colB varchar(255) character set utf8mb4 NOT NULL, -KEY bad (colA,colB(3)) -) ENGINE=ndb DEFAULT CHARSET=latin1; -INSERT INTO t2 (colA, colB) VALUES (1, 'foo'),(2, 'foo bar'); -SELECT * FROM t1 JOIN t2 ON t1.colA=t2.colA AND t1.colB=t2.colB -WHERE t1.colA < 3; -colA colB colA colB -1 foo 1 foo -2 foo bar 2 foo bar -DROP TABLE t1, t2; -SELECT 'н1234567890' UNION SELECT _binary '1'; -н1234567890 -н1234567890 -1 -SELECT 'н1234567890' UNION SELECT 1; -н1234567890 -н1234567890 -1 -SELECT '1' UNION SELECT 'н1234567890'; -1 -1 -н1234567890 -SELECT 1 UNION SELECT 'н1234567890'; -1 -1 -н1234567890 -CREATE TABLE t1 (c VARCHAR(11)) CHARACTER SET utf8mb4 ENGINE ndb; -CREATE TABLE t2 (b CHAR(1) CHARACTER SET binary, i INT) ENGINE ndb; -INSERT INTO t1 (c) VALUES ('н1234567890'); -INSERT INTO t2 (b, i) VALUES ('1', 1); -SELECT c FROM t1 UNION SELECT b FROM t2; -c -н1234567890 -1 -SELECT c FROM t1 UNION SELECT i FROM t2; -c -н1234567890 -1 -SELECT b FROM t2 UNION SELECT c FROM t1; -b -1 -н1234567890 -SELECT i FROM t2 UNION SELECT c FROM t1; -i -1 -н1234567890 -DROP TABLE t1, t2; -set sql_mode=traditional; -select hex(char(0xFF using utf8mb4)); -hex(char(0xFF using utf8mb4)) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF' -select hex(convert(0xFF using utf8mb4)); -hex(convert(0xFF using utf8mb4)) -NULL -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 0x616263FF); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 X'616263FF'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 B'001111111111'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select (_utf8mb4 X'616263FF'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -set sql_mode=default; -select hex(char(0xFF using utf8mb4)); -hex(char(0xFF using utf8mb4)) - -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF' -select hex(convert(0xFF using utf8mb4)); -hex(convert(0xFF using utf8mb4)) - -Warnings: -Warning 1300 Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 0x616263FF); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 X'616263FF'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select hex(_utf8mb4 B'001111111111'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -select (_utf8mb4 X'616263FF'); -ERROR HY000: Invalid utf8mb4 character string: 'FF' -CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) ENGINE ndb; -INSERT INTO t1 VALUES (70000, 1092), (70001, 1085), (70002, 1065); -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -ALTER TABLE t1 ADD UNIQUE (b); -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -DROP INDEX b ON t1; -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -ALTER TABLE t1 ADD INDEX (b); -SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) from t1 GROUP BY b; -CONVERT(a, CHAR) CONVERT(b, CHAR) -70000 1092 -70001 1085 -70002 1065 -DROP TABLE t1; -# -# Bug#26474: Add Sinhala script (Sri Lanka) collation to MySQL -# -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -predicted_order int NOT NULL, -utf8mb4_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES (19, x'E0B696'), (30, x'E0B69AE0B798'), (61, x'E0B6AF'), (93, x'E0B799'), (52, x'E0B6A6'), (73, x'E0B6BBE0B78AE2808D'), (3, x'E0B686'), (56, x'E0B6AA'), (55, x'E0B6A9'), (70, x'E0B6B9'), (94, x'E0B79A'), (80, x'E0B785'), (25, x'E0B69AE0B791'), (48, x'E0B6A2'), (13, x'E0B690'), (86, x'E0B793'), (91, x'E0B79F'), (81, x'E0B786'), (79, x'E0B784'), (14, x'E0B691'), (99, x'E0B78A'), (8, x'E0B68B'), (68, x'E0B6B7'), (22, x'E0B69A'), (16, x'E0B693'), (33, x'E0B69AE0B7B3'), (38, x'E0B69AE0B79D'), (21, x'E0B683'), (11, x'E0B68E'), (77, x'E0B782'), (40, x'E0B69AE0B78A'), (101, x'E0B78AE2808DE0B6BB'), (35, x'E0B69AE0B79A'), (1, x'E0B7B4'), (9, x'E0B68C'), (96, x'E0B79C'), (6, x'E0B689'), (95, x'E0B79B'), (88, x'E0B796'), (64, x'E0B6B3'), (26, x'E0B69AE0B792'), (82, x'E0B78F'), (28, x'E0B69AE0B794'), (39, x'E0B69AE0B79E'), (97, x'E0B79D'), (2, x'E0B685'), (75, x'E0B780'), (34, x'E0B69AE0B799'), (69, x'E0B6B8'), (83, x'E0B790'), (18, x'E0B695'), (90, x'E0B7B2'), (17, x'E0B694'), (72, x'E0B6BB'), (66, x'E0B6B5'), (59, x'E0B6AD'), (44, x'E0B69E'), (15, x'E0B692'), (23, x'E0B69AE0B78F'), (65, x'E0B6B4'), (42, x'E0B69C'), (63, x'E0B6B1'), (85, x'E0B792'), (47, x'E0B6A1'), (49, x'E0B6A3'), (92, x'E0B7B3'), (78, x'E0B783'), (36, x'E0B69AE0B79B'), (4, x'E0B687'), (24, x'E0B69AE0B790'), (87, x'E0B794'), (37, x'E0B69AE0B79C'), (32, x'E0B69AE0B79F'), (29, x'E0B69AE0B796'), (43, x'E0B69D'), (62, x'E0B6B0'), (100, x'E0B78AE2808DE0B6BA'), (60, x'E0B6AE'), (45, x'E0B69F'), (12, x'E0B68F'), (46, x'E0B6A0'), (50, x'E0B6A5'), (51, x'E0B6A4'), (5, x'E0B688'), (76, x'E0B781'), (89, x'E0B798'), (74, x'E0B6BD'), (10, x'E0B68D'), (57, x'E0B6AB'), (71, x'E0B6BA'), (58, x'E0B6AC'), (27, x'E0B69AE0B793'), (54, x'E0B6A8'), (84, x'E0B791'), (31, x'E0B69AE0B7B2'), (98, x'E0B79E'), (53, x'E0B6A7'), (41, x'E0B69B'), (67, x'E0B6B6'), (7, x'E0B68A'), (20, x'E0B682'); -SELECT predicted_order, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_sinhala_ci; -predicted_order hex(utf8mb4_encoding) -1 E0B7B4 -2 E0B685 -3 E0B686 -4 E0B687 -5 E0B688 -6 E0B689 -7 E0B68A -8 E0B68B -9 E0B68C -10 E0B68D -11 E0B68E -12 E0B68F -13 E0B690 -14 E0B691 -15 E0B692 -16 E0B693 -17 E0B694 -18 E0B695 -19 E0B696 -20 E0B682 -21 E0B683 -22 E0B69A -23 E0B69AE0B78F -24 E0B69AE0B790 -25 E0B69AE0B791 -26 E0B69AE0B792 -27 E0B69AE0B793 -28 E0B69AE0B794 -29 E0B69AE0B796 -30 E0B69AE0B798 -31 E0B69AE0B7B2 -32 E0B69AE0B79F -33 E0B69AE0B7B3 -34 E0B69AE0B799 -35 E0B69AE0B79A -36 E0B69AE0B79B -37 E0B69AE0B79C -38 E0B69AE0B79D -39 E0B69AE0B79E -40 E0B69AE0B78A -41 E0B69B -42 E0B69C -43 E0B69D -44 E0B69E -45 E0B69F -46 E0B6A0 -47 E0B6A1 -48 E0B6A2 -49 E0B6A3 -50 E0B6A5 -51 E0B6A4 -52 E0B6A6 -53 E0B6A7 -54 E0B6A8 -55 E0B6A9 -56 E0B6AA -57 E0B6AB -58 E0B6AC -59 E0B6AD -60 E0B6AE -61 E0B6AF -62 E0B6B0 -63 E0B6B1 -64 E0B6B3 -65 E0B6B4 -66 E0B6B5 -67 E0B6B6 -68 E0B6B7 -69 E0B6B8 -70 E0B6B9 -71 E0B6BA -72 E0B6BB -73 E0B6BBE0B78AE2808D -74 E0B6BD -75 E0B780 -76 E0B781 -77 E0B782 -78 E0B783 -79 E0B784 -80 E0B785 -81 E0B786 -82 E0B78F -83 E0B790 -84 E0B791 -85 E0B792 -86 E0B793 -87 E0B794 -88 E0B796 -89 E0B798 -90 E0B7B2 -91 E0B79F -92 E0B7B3 -93 E0B799 -94 E0B79A -95 E0B79B -96 E0B79C -97 E0B79D -98 E0B79E -99 E0B78A -100 E0B78AE2808DE0B6BA -101 E0B78AE2808DE0B6BB -DROP TABLE t1; -# -# Bug#32914 Character sets: illegal characters in utf8mb4 and utf32 columns -# -create table t1 (utf8mb4 char(1) character set utf8mb4) engine ndb; -Testing [F0][90..BF][80..BF][80..BF] -insert into t1 values (0xF0908080); -insert into t1 values (0xF0BFBFBF); -insert into t1 values (0xF08F8080); -Warnings: -Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1 -select hex(utf8mb4) from t1; -hex(utf8mb4) - -F0908080 -F0BFBFBF -delete from t1; -Testing [F2..F3][80..BF][80..BF][80..BF] -insert into t1 values (0xF2808080); -insert into t1 values (0xF2BFBFBF); -select hex(utf8mb4) from t1; -hex(utf8mb4) -F2808080 -F2BFBFBF -delete from t1; -Testing [F4][80..8F][80..BF][80..BF] -insert into t1 values (0xF4808080); -insert into t1 values (0xF48F8080); -insert into t1 values (0xF4908080); -Warnings: -Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1 -select hex(utf8mb4) from t1; -hex(utf8mb4) - -F4808080 -F48F8080 -drop table t1; -# -# Check strnxfrm() with odd length -# -set max_sort_length=5; -select @@max_sort_length; -@@max_sort_length -5 -create table t1 (a varchar(128) character set utf8mb4 collate utf8mb4_general_ci) engine ndb; -insert into t1 values ('a'),('b'),('c'); -select * from t1 order by a; -a -a -b -c -alter table t1 modify a varchar(128) character set utf8mb4 collate utf8mb4_bin; -select * from t1 order by a; -a -a -b -c -drop table t1; -set max_sort_length=default; -# -# Bug#26180: Can't add columns to tables created with utf8mb4 text indexes -# -# -# Testing 4-byte values. -# -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -u_decimal int NOT NULL, -utf8mb4_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t1 VALUES (119040, x'f09d8480'), -# G CLEF -(119070, x'f09d849e'), -# HALF NOTE -(119134, x'f09d859e'), -# MUSICAL SYMBOL CROIX -(119247, x'f09d878f'), -# MATHEMATICAL BOLD ITALIC CAPITAL DELTA -(120607, x'f09d9c9f'), -# SANS-SERIF BOLD ITALIC CAPITAL PI -(120735, x'f09d9e9f'), -# (last 4 byte character) -(1114111, x'f48fbfbf'), -# VARIATION SELECTOR-256 -(917999, x'f3a087af'); -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480'); -INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab'); -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); -Warnings: -Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1 -SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding; -u_decimal hex(utf8mb4_encoding) -1114111 F48FBFBF -119040 F09D8480 -119070 F09D849E -119070 F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 -119070 F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 -119134 F09D859E -119247 F09D878F -120607 F09D9C9F -120735 F09D9E9F -65131 EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB -917999 F3A087AF -INSERT INTO t1 VALUES (1114111, x'f5808080'); -Warnings: -Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1 -SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE -table_name= 't1' AND column_name= 'utf8mb4_encoding'; -character_maximum_length character_octet_length -10 40 -DROP TABLE IF EXISTS t2; -CREATE TABLE t2 ( -u_decimal int NOT NULL, -utf8mb3_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8mb3 ENGINE ndb; -INSERT INTO t2 VALUES (42856, x'ea9da8'); -INSERT INTO t2 VALUES (65131, x'efb9ab'); -INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); -Warnings: -Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1 -SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE -table_name= 't2' AND column_name= 'utf8mb3_encoding'; -character_maximum_length character_octet_length -10 30 -UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; -Warnings: -Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1 -UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856; -SELECT HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) FROM t1; -HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) -EA9DA8 -EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9ABEA9DA8 -F09D8480EA9DA8 -F09D849EEA9DA8 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8 -F09D859EEA9DA8 -F09D878FEA9DA8 -F09D9C9FEA9DA8 -F09D9E9FEA9DA8 -F3A087AFEA9DA8 -F48FBFBFEA9DA8 -SELECT HEX(CONCAT(utf8mb4_encoding, utf8mb3_encoding)) FROM t1,t2; -HEX(CONCAT(utf8mb4_encoding, utf8mb3_encoding)) - -EA9DA8 -EFB9AB -EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB -EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9ABEA9DA8 -EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9ABEFB9AB -F09D8480 -F09D8480EA9DA8 -F09D8480EFB9AB -F09D849E -F09D849EEA9DA8 -F09D849EEFB9AB -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EA9DA8 -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EFB9AB -F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480EFB9AB -F09D859E -F09D859EEA9DA8 -F09D859EEFB9AB -F09D878F -F09D878FEA9DA8 -F09D878FEFB9AB -F09D9C9F -F09D9C9FEA9DA8 -F09D9C9FEFB9AB -F09D9E9F -F09D9E9FEA9DA8 -F09D9E9FEFB9AB -F3A087AF -F3A087AFEA9DA8 -F3A087AFEFB9AB -F48FBFBF -F48FBFBFEA9DA8 -F48FBFBFEFB9AB -SELECT count(*) FROM t1, t2 -WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding; -count(*) -33 -ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `u_decimal` int(11) NOT NULL, - `utf8mb4_encoding` varchar(10) NOT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb4_encoding),utf8mb4_encoding FROM t1; -u_decimal hex(utf8mb4_encoding) utf8mb4_encoding -1114111 -1114111 3F ? -119040 3F ? -119070 3F ? -119070 3F3F3F3F3F3F3F3F3F3F ?????????? -119070 3F3F3F3F3F3F3F3F3F3F ?????????? -119134 3F ? -119247 3F ? -120607 3F ? -120735 3F ? -65131 EFB9AB3F3F3F3F3FEFB9ABEFB9AB3FEFB9AB ﹫?????﹫﹫?﹫ -917999 3F ? -ALTER TABLE t2 CONVERT TO CHARACTER SET utf8mb4; -SHOW CREATE TABLE t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `u_decimal` int(11) NOT NULL, - `utf8mb3_encoding` varchar(10) NOT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 -SELECT u_decimal,hex(utf8mb3_encoding) FROM t2; -u_decimal hex(utf8mb3_encoding) -1114111 -42856 EA9DA8 -65131 EFB9AB -ALTER TABLE t2 CONVERT TO CHARACTER SET utf8mb3; -SHOW CREATE TABLE t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `u_decimal` int(11) NOT NULL, - `utf8mb3_encoding` varchar(10) NOT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb3_encoding) FROM t2; -u_decimal hex(utf8mb3_encoding) -1114111 -42856 EA9DA8 -65131 EFB9AB -ALTER TABLE t1 MODIFY utf8mb4_encoding VARCHAR(10) CHARACTER SET utf8mb3; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `u_decimal` int(11) NOT NULL, - `utf8mb4_encoding` varchar(10) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb4_encoding) FROM t1; -u_decimal hex(utf8mb4_encoding) -1114111 -1114111 3F -119040 3F -119070 3F -119070 3F3F3F3F3F3F3F3F3F3F -119070 3F3F3F3F3F3F3F3F3F3F -119134 3F -119247 3F -120607 3F -120735 3F -65131 EFB9AB3F3F3F3F3FEFB9ABEFB9AB3FEFB9AB -917999 3F -ALTER TABLE t1 MODIFY utf8mb4_encoding VARCHAR(10) CHARACTER SET utf8mb4; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `u_decimal` int(11) NOT NULL, - `utf8mb4_encoding` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb4_encoding) FROM t1; -u_decimal hex(utf8mb4_encoding) -1114111 -1114111 3F -119040 3F -119070 3F -119070 3F3F3F3F3F3F3F3F3F3F -119070 3F3F3F3F3F3F3F3F3F3F -119134 3F -119247 3F -120607 3F -120735 3F -65131 EFB9AB3F3F3F3F3FEFB9ABEFB9AB3FEFB9AB -917999 3F -ALTER TABLE t2 MODIFY utf8mb3_encoding VARCHAR(10) CHARACTER SET utf8mb4; -SHOW CREATE TABLE t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `u_decimal` int(11) NOT NULL, - `utf8mb3_encoding` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=utf8 -SELECT u_decimal,hex(utf8mb3_encoding) FROM t2; -u_decimal hex(utf8mb3_encoding) -1114111 -42856 EA9DA8 -65131 EFB9AB -DROP TABLE IF EXISTS t3; -CREATE TABLE t3 ( -u_decimal int NOT NULL, -utf8mb3_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8 ENGINE ndb; -INSERT INTO t3 SELECT * FROM t1; -DROP TABLE IF EXISTS t4; -CREATE TABLE t4 ( -u_decimal int NOT NULL, -utf8mb4_encoding VARCHAR(10) NOT NULL -) CHARACTER SET utf8mb4 ENGINE ndb; -INSERT INTO t3 SELECT * FROM t2; -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -DROP TABLE t4; -# -# Testing that mixing utf8 and utf8mb4 collations returns utf8mb4 -# -SELECT CHARSET(CONCAT(_utf8mb4'a',_utf8'b')); -CHARSET(CONCAT(_utf8mb4'a',_utf8'b')) -utf8mb4 -CREATE TABLE t1 (utf8mb4 VARCHAR(10) CHARACTER SET utf8mb4 NOT NULL) ENGINE ndb; -INSERT INTO t1 VALUES (x'ea9da8'),(x'f48fbfbf'); -SELECT CONCAT(utf8mb4, _utf8 x'ea9da8') FROM t1 LIMIT 0; -CONCAT(utf8mb4, _utf8 x'ea9da8') -CREATE TABLE t2 (utf8mb3 VARCHAR(10) CHARACTER SET utf8mb3 NOT NULL) ENGINE ndb; -INSERT INTO t2 VALUES (x'ea9da8'); -SELECT HEX(CONCAT(utf8mb4, utf8mb3)) FROM t1,t2 ORDER BY 1; -HEX(CONCAT(utf8mb4, utf8mb3)) -EA9DA8EA9DA8 -F48FBFBFEA9DA8 -SELECT CHARSET(CONCAT(utf8mb4, utf8mb3)) FROM t1, t2 LIMIT 1; -CHARSET(CONCAT(utf8mb4, utf8mb3)) -utf8mb4 -SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3; -utf8mb4 utf8mb3 -ô¿¿ ê¨ -SELECT * FROM t1, t2 WHERE t1.utf8mb4 = t2.utf8mb3; -utf8mb4 utf8mb3 -ê¨ ê¨ -SELECT * FROM t1, t2 WHERE t1.utf8mb4 < t2.utf8mb3; -utf8mb4 utf8mb3 -DROP TABLE t1; -DROP TABLE t2; -# -# Check that mixing utf8mb4 with an invalid utf8 constant returns error -# -CREATE TABLE t1 (utf8mb4 VARCHAR(10) CHARACTER SET utf8mb4) ENGINE ndb; -INSERT INTO t1 VALUES (x'f48fbfbf'); -SELECT CONCAT(utf8mb4, _utf8 '¿') FROM t1; -ERROR HY000: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat' -SELECT CONCAT('a', _utf8 '¿') FROM t1; -ERROR HY000: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8_general_ci,COERCIBLE) for operation 'concat' -DROP TABLE t1; -# -# End of 5.5 tests -# -# -# End of tests -# diff --git a/mysql-test/suite/funcs_1/r/is_cml_ndb.result b/mysql-test/suite/funcs_1/r/is_cml_ndb.result deleted file mode 100644 index 22f90433acf..00000000000 --- a/mysql-test/suite/funcs_1/r/is_cml_ndb.result +++ /dev/null @@ -1,98 +0,0 @@ -USE test; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 -( -f1 CHAR UNICODE, -f2 CHAR(0) UNICODE, -f3 CHAR(10) UNICODE, -f5 VARCHAR(0) UNICODE, -f6 VARCHAR(255) UNICODE, -f7 VARCHAR(260) UNICODE, -f8 TEXT UNICODE, -f9 TINYTEXT UNICODE, -f10 MEDIUMTEXT UNICODE, -f11 LONGTEXT UNICODE, -PRIMARY KEY(f1) -) ENGINE = NDB; -SELECT * FROM information_schema.columns -WHERE table_schema LIKE 'test%' -ORDER BY table_schema, table_name, column_name; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -def test t1 f1 1 NO char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) PRI select,insert,update,references -def test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references -def test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -def test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references -def test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references -def test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references -def test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references -def test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references -def test t1 f8 7 NULL YES text 32767 65535 NULL NULL ucs2 ucs2_general_ci text select,insert,update,references -def test t1 f9 8 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -########################################################################## -# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH -########################################################################## -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -2.0000 char ucs2 ucs2_general_ci -2.0000 longtext ucs2 ucs2_general_ci -2.0000 mediumtext ucs2 ucs2_general_ci -2.0000 text ucs2 ucs2_general_ci -2.0000 varchar ucs2 ucs2_general_ci -2.0079 tinytext ucs2 ucs2_general_ci -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -NULL char ucs2 ucs2_general_ci -NULL varchar ucs2 ucs2_general_ci ---> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values ---> are 0, which is intended behavior, and the result of 0 / 0 IS NULL -SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -TABLE_SCHEMA, -TABLE_NAME, -COLUMN_NAME, -DATA_TYPE, -CHARACTER_MAXIMUM_LENGTH, -CHARACTER_OCTET_LENGTH, -CHARACTER_SET_NAME, -COLLATION_NAME, -COLUMN_TYPE -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; -COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE -2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1) -NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0) -2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10) -NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0) -2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255) -2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260) -2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text -2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext -2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext -2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext -DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/r/is_columns_ndb.result b/mysql-test/suite/funcs_1/r/is_columns_ndb.result deleted file mode 100644 index 8a1691ec7d2..00000000000 --- a/mysql-test/suite/funcs_1/r/is_columns_ndb.result +++ /dev/null @@ -1,228 +0,0 @@ -DROP DATABASE IF EXISTS test1; -CREATE DATABASE test1; -USE test; -USE test; -USE test; -DROP TABLE IF EXISTS t1, t2, t4, t10, t11; -CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t1; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t2; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t4; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t10; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t11; -drop TABLE if exists t3; -CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t3.txt' INTO TABLE t3; -drop database if exists test4; -CREATE database test4; -use test4; -CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) -ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t4.txt' INTO TABLE t6; -use test; -drop TABLE if exists t7, t8; -CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb; -CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t7.txt' INTO TABLE t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -LOAD DATA INFILE '/std_data/funcs_1/t7.txt' INTO TABLE t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -drop TABLE if exists t9; -CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = ndb; -LOAD DATA INFILE '/std_data/funcs_1/t9.txt' INTO TABLE t9; -SELECT * FROM information_schema.columns -WHERE table_schema LIKE 'test%' -ORDER BY table_schema, table_name, column_name; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -def test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -def test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -def test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -def test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -def test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -########################################################################## -# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH -########################################################################## -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -1.0000 char latin1 latin1_swedish_ci -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL -ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; -COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME -NULL date NULL NULL -NULL int NULL NULL ---> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values ---> are 0, which is intended behavior, and the result of 0 / 0 IS NULL -SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -TABLE_SCHEMA, -TABLE_NAME, -COLUMN_NAME, -DATA_TYPE, -CHARACTER_MAXIMUM_LENGTH, -CHARACTER_OCTET_LENGTH, -CHARACTER_SET_NAME, -COLLATION_NAME, -COLUMN_TYPE -FROM information_schema.columns -WHERE table_schema LIKE 'test%' -ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; -COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE -1.0000 test t1 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t1 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t1 f3 date NULL NULL NULL NULL date -NULL test t1 f4 int NULL NULL NULL NULL int(11) -1.0000 test t1 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t1 f6 int NULL NULL NULL NULL int(11) -1.0000 test t10 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t10 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t10 f3 date NULL NULL NULL NULL date -NULL test t10 f4 int NULL NULL NULL NULL int(11) -1.0000 test t10 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t10 f6 int NULL NULL NULL NULL int(11) -1.0000 test t11 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t11 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t11 f3 date NULL NULL NULL NULL date -NULL test t11 f4 int NULL NULL NULL NULL int(11) -1.0000 test t11 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t11 f6 int NULL NULL NULL NULL int(11) -1.0000 test t2 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t2 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t2 f3 date NULL NULL NULL NULL date -NULL test t2 f4 int NULL NULL NULL NULL int(11) -1.0000 test t2 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t2 f6 int NULL NULL NULL NULL int(11) -1.0000 test t3 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t3 f2 char 20 20 latin1 latin1_swedish_ci char(20) -NULL test t3 f3 int NULL NULL NULL NULL int(11) -1.0000 test t4 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t4 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t4 f3 date NULL NULL NULL NULL date -NULL test t4 f4 int NULL NULL NULL NULL int(11) -1.0000 test t4 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t4 f6 int NULL NULL NULL NULL int(11) -1.0000 test t7 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t7 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t7 f3 date NULL NULL NULL NULL date -NULL test t7 f4 int NULL NULL NULL NULL int(11) -1.0000 test t8 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test t8 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t8 f3 date NULL NULL NULL NULL date -NULL test t8 f4 int NULL NULL NULL NULL int(11) -NULL test t9 f1 int NULL NULL NULL NULL int(11) -1.0000 test t9 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test t9 f3 int NULL NULL NULL NULL int(11) -1.0000 test4 t6 f1 char 20 20 latin1 latin1_swedish_ci char(20) -1.0000 test4 t6 f2 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test4 t6 f3 date NULL NULL NULL NULL date -NULL test4 t6 f4 int NULL NULL NULL NULL int(11) -1.0000 test4 t6 f5 char 25 25 latin1 latin1_swedish_ci char(25) -NULL test4 t6 f6 int NULL NULL NULL NULL int(11) -DROP DATABASE test1; -DROP DATABASE test4; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t7; -DROP TABLE test.t8; -DROP TABLE test.t9; -DROP TABLE test.t10; -DROP TABLE test.t11; diff --git a/mysql-test/suite/funcs_1/r/is_engines_ndb.result b/mysql-test/suite/funcs_1/r/is_engines_ndb.result deleted file mode 100644 index 238609fc09e..00000000000 --- a/mysql-test/suite/funcs_1/r/is_engines_ndb.result +++ /dev/null @@ -1,8 +0,0 @@ -SELECT * FROM information_schema.engines -WHERE ENGINE = 'ndbcluster'; -ENGINE ndbcluster -SUPPORT YES -COMMENT Clustered, fault-tolerant tables -TRANSACTIONS YES -XA NO -SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_tables_ndb.result b/mysql-test/suite/funcs_1/r/is_tables_ndb.result deleted file mode 100644 index fe737a676ad..00000000000 --- a/mysql-test/suite/funcs_1/r/is_tables_ndb.result +++ /dev/null @@ -1,167 +0,0 @@ -DROP DATABASE IF EXISTS test1; -DROP DATABASE IF EXISTS test2; -CREATE DATABASE test1; -CREATE DATABASE test2; -CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = ; -CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = ; -CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = ; -SELECT *, -LEFT( table_comment, -IF(INSTR(table_comment,'InnoDB free') = 0 -AND INSTR(table_comment,'number_of_replicas') = 0, -LENGTH(table_comment), -INSTR(table_comment,'InnoDB free') -+ INSTR(table_comment,'number_of_replicas') - 1)) -AS "user_comment", -'-----------------------------------------------------' AS "Separator" -FROM information_schema.tables -WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' -ORDER BY table_schema,table_name; -TABLE_CATALOG def -TABLE_SCHEMA test1 -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG def -TABLE_SCHEMA test1 -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG def -TABLE_SCHEMA test2 -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -SHOW TABLES FROM test1; -Tables_in_test1 -t1 -t2 -SHOW TABLES FROM test2; -Tables_in_test2 -t1 -DROP USER testuser1@localhost; -CREATE USER testuser1@localhost; -GRANT SELECT ON test1.* TO testuser1@localhost; -# Establish connection testuser1 (user=testuser1) -SELECT *, -LEFT( table_comment, -IF(INSTR(table_comment,'InnoDB free') = 0 -AND INSTR(table_comment,'number_of_replicas') = 0, -LENGTH(table_comment), -INSTR(table_comment,'InnoDB free') -+ INSTR(table_comment,'number_of_replicas') - 1)) -AS "user_comment", -'-----------------------------------------------------' AS "Separator" -FROM information_schema.tables -WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE' -ORDER BY table_schema,table_name; -TABLE_CATALOG def -TABLE_SCHEMA test1 -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -TABLE_CATALOG def -TABLE_SCHEMA test1 -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- -SHOW TABLES FROM test1; -Tables_in_test1 -t1 -t2 -SHOW TABLES FROM test2; -ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2' -# Switch to connection default and close connection testuser1 -DROP USER testuser1@localhost; -DROP DATABASE test1; -DROP DATABASE test2; diff --git a/mysql-test/suite/funcs_1/r/ndb_bitdata.result b/mysql-test/suite/funcs_1/r/ndb_bitdata.result deleted file mode 100644 index 917157fcdae..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_bitdata.result +++ /dev/null @@ -1,3 +0,0 @@ - -NOT YET IMPLEMENTED: bitdata tests --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_cursors.result b/mysql-test/suite/funcs_1/r/ndb_cursors.result deleted file mode 100644 index 9f20e51204b..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_cursors.result +++ /dev/null @@ -1,3 +0,0 @@ - -NOT YET IMPLEMENTED: cursor tests --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_func_view.result b/mysql-test/suite/funcs_1/r/ndb_func_view.result deleted file mode 100644 index e788dfd9fc1..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_func_view.result +++ /dev/null @@ -1,5294 +0,0 @@ -DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1_values -( -id BIGINT AUTO_INCREMENT, -select_id BIGINT, -PRIMARY KEY(id) -) ENGINE = ; -ALTER TABLE t1_values ADD my_char_30 CHAR(30); -ALTER TABLE t1_values ADD my_varchar_1000 VARCHAR(1000); -ALTER TABLE t1_values ADD my_binary_30 BINARY(30); -ALTER TABLE t1_values ADD my_varbinary_1000 VARBINARY(1000); -ALTER TABLE t1_values ADD my_datetime DATETIME; -ALTER TABLE t1_values ADD my_date DATE; -ALTER TABLE t1_values ADD ts_dummy TIMESTAMP; -ALTER TABLE t1_values ADD my_timestamp TIMESTAMP; -ALTER TABLE t1_values ADD my_time TIME; -ALTER TABLE t1_values ADD my_year YEAR; -ALTER TABLE t1_values ADD my_bigint BIGINT; -ALTER TABLE t1_values ADD my_double DOUBLE; -ALTER TABLE t1_values ADD my_decimal DECIMAL(64,30); -SET sql_mode = 'traditional'; -INSERT INTO t1_values SET id = 0; -INSERT INTO t1_values SET -my_char_30 = '', -my_varchar_1000 = '', -my_binary_30 = '', -my_varbinary_1000 = '', -my_datetime = '0001-01-01 00:00:00', -my_date = '0001-01-01', -my_timestamp = '1970-01-01 03:00:01', -my_time = '-838:59:59', -my_year = '1901', -my_bigint = -9223372036854775808, -my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , -my_double = -1.7976931348623E+308; -INSERT INTO t1_values SET -my_char_30 = '<--------30 characters------->', -my_varchar_1000 = CONCAT('<---------1000 characters', -RPAD('',965,'-'),'--------->'), -my_binary_30 = '<--------30 characters------->', -my_varbinary_1000 = CONCAT('<---------1000 characters', -RPAD('',965,'-'),'--------->'), -my_datetime = '9999-12-31 23:59:59', -my_date = '9999-12-31', -my_timestamp = '2038-01-01 02:59:59', -my_time = '838:59:59', -my_year = 2155, -my_bigint = 9223372036854775807, -my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , -my_double = 1.7976931348623E+308; -INSERT INTO t1_values SET -my_char_30 = ' ---äÖüß@µ*$-- ', -my_varchar_1000 = ' ---äÖüß@µ*$-- ', -my_binary_30 = ' ---äÖüß@µ*$-- ', -my_varbinary_1000 = ' ---äÖüß@µ*$-- ', -my_datetime = '2004-02-29 23:59:59', -my_date = '2004-02-29', -my_timestamp = '2004-02-29 23:59:59', -my_time = '13:00:00', -my_year = 2000, -my_bigint = 0, -my_decimal = 0.0, -my_double = 0; -INSERT INTO t1_values SET -my_char_30 = '-1', -my_varchar_1000 = '-1', -my_binary_30 = '-1', -my_varbinary_1000 = '-1', -my_datetime = '2005-06-28 10:00:00', -my_date = '2005-06-28', -my_timestamp = '2005-06-28 10:00:00', -my_time = '10:00:00', -my_year = 2005, -my_bigint = -1, -my_decimal = -1.000000000000000000000000000000, -my_double = -0.1E+1; -PREPARE ins_sel_with_result FROM "INSERT INTO t1_selects SET my_select = @my_select, -disable_result = 'No'" ; -PREPARE ins_sel_no_result FROM "INSERT INTO t1_selects SET my_select = @my_select, -disable_result = 'Yes'" ; -SET sql_mode = 'traditional'; -SET @my_select = 'SELECT sqrt(my_bigint), my_bigint, id FROM t1_values'; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = 4; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = -25; -##### 1.1.1. CAST --> BINARY -##### 1.1.2. CAST --> CHAR -##### 1.1.3. CAST --> DATE -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = '2005-06-27'; -INSERT INTO t1_values SET select_id = @select_id, -my_varchar_1000 = '2005-06-27'; -INSERT INTO t1_values SET select_id = @select_id, -my_binary_30 = '2005-06-27'; -INSERT INTO t1_values SET select_id = @select_id, -my_varbinary_1000 = '2005-06-27'; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = 20050627; -INSERT INTO t1_values SET select_id = @select_id, -my_double = +20.050627E+6; -##### 1.1.4. CAST --> DATETIME -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = '2005-06-27 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_varchar_1000 = '2005-06-27 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_binary_30 = '2005-06-27 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_varbinary_1000 = '2005-06-27 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = 200506271758; -INSERT INTO t1_values SET select_id = @select_id, -my_double = +0.0200506271758E+13; -##### 1.1.5. CAST --> TIME -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = '1 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_varchar_1000 = '1 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_binary_30 = '1 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_varbinary_1000 = '1 17:58'; -INSERT INTO t1_values SET select_id = @select_id, -my_bigint = 1758; -INSERT INTO t1_values SET select_id = @select_id, -my_double = +1.758E+3; -##### 1.1.6. CAST --> DECIMAL -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = '-3333.3333'; -INSERT INTO t1_values SET select_id = @select_id, -my_varchar_1000 = '-3333.3333'; -INSERT INTO t1_values SET select_id = @select_id, -my_binary_30 = '-3333.3333'; -INSERT INTO t1_values SET select_id = @select_id, -my_varbinary_1000 = '-3333.3333'; -INSERT INTO t1_values SET select_id = @select_id, -my_double = -0.33333333E+4; -##### 1.1.7. CAST --> SIGNED INTEGER - -"Attention: CAST --> SIGNED INTEGER - Bug#5913 Traditional mode: BIGINT range not correctly delimited - Status: To be fixed later" --------------------------------------------------------------------------------- -##### 1.1.8. CAST --> UNSIGNED INTEGER - -"Attention: CAST --> UNSIGNED INTEGER - The file with expected results suffers from Bug 5913" --------------------------------------------------------------------------------- - -some statements disabled because of -Bug#5913 Traditional mode: BIGINT range not correctly delimited --------------------------------------------------------------------------------- -SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT BIT_LENGTH(my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT BIT_LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT BIT_LENGTH(my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT BIT_LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT INSTR(my_char_30, ''char''), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LCASE(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values'; -SET @my_select = -'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values'; -SET @my_select = 'SELECT LENGTH(my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LENGTH(my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = -'SELECT LOAD_FILE(''/std_data/funcs_1/load_file.txt'') - AS my_col, - id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''char'', my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''char'', my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''char'', my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_char_30, my_char_30 ), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_char_30, my_varchar_1000 ), -my_char_30, my_varchar_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_char_30, my_binary_30 ), -my_char_30, my_binary_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_char_30, my_varbinary_1000 ), -my_char_30, my_varbinary_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_char_30 ), -my_varchar_1000, my_char_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_binary_30 ), -my_varchar_1000, my_binary_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), -my_varchar_1000, my_varbinary_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_binary_30, my_binary_30 ), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_binary_30, my_char_30 ), -my_binary_30, my_char_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_binary_30, my_varchar_1000 ), -my_binary_30, my_varchar_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_binary_30, my_varbinary_1000 ), -my_binary_30, my_varbinary_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_char_30 ), -my_varbinary_1000, my_char_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), -my_varbinary_1000, my_varchar_1000 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_binary_30 ), -my_varbinary_1000, my_binary_30 id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', my_char_30, 3), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', my_varchar_1000, 3), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', my_binary_30, 3), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', my_varbinary_1000, 3), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_bigint), -my_bigint, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_double), -my_double, id FROM t1_values'; -SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_decimal), -my_decimal, id FROM t1_values'; -SET @my_select = 'SELECT LOWER(my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LOWER(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LOWER(my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LOWER(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = 'SELECT LTRIM(my_char_30), -my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT LTRIM(my_varchar_1000), -my_varchar_1000, id FROM t1_values'; -SET @my_select = 'SELECT LTRIM(my_binary_30), -my_binary_30, id FROM t1_values'; -SET @my_select = 'SELECT LTRIM(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values'; -SET @my_select = -'SELECT CONCAT(''A'',my_char_30), my_char_30, id FROM t1_values'; -SET @my_select = 'SELECT my_char_30, id FROM t1_values'; -INSERT INTO t1_values SET select_id = @select_id, -my_char_30 = 'Viana do Castelo'; -SET sql_mode = ''; - -"# The basic preparations end and the main test starts here" --------------------------------------------------------------------------------- -CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; -SELECT my_char_30, id FROM t1_values -WHERE select_id = 193 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 193 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values; -SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values -WHERE select_id = 192 OR select_id IS NULL order by id; -CONCAT('A',my_char_30) my_char_30 id -NULL NULL 1 -A 2 -A<--------30 characters-------> <--------30 characters-------> 3 -A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -A-1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 192 OR select_id IS NULL) order by id; -CONCAT('A',my_char_30) my_char_30 id -NULL NULL 1 -A 2 -A<--------30 characters-------> <--------30 characters-------> 3 -A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 -A-1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LTRIM(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT LTRIM(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 191 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 191 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LTRIM(my_binary_30), -my_binary_30, id FROM t1_values; -SELECT LTRIM(my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 190 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 190 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LTRIM(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LTRIM(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 189 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 189 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LTRIM(my_char_30), -my_char_30, id FROM t1_values; -SELECT LTRIM(my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 188 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 188 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOWER(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT LOWER(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 187 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOWER(my_binary_30), -my_binary_30, id FROM t1_values; -SELECT LOWER(my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 186 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOWER(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LOWER(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 185 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOWER(my_char_30), -my_char_30, id FROM t1_values; -SELECT LOWER(my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 184 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_decimal), -my_decimal, id FROM t1_values; -SELECT LOCATE('-', ' - -ABC', my_decimal), -my_decimal, id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 183 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_double), -my_double, id FROM t1_values; -SELECT LOCATE('-', ' - -ABC', my_double), -my_double, id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 182 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_bigint), -my_bigint, id FROM t1_values; -SELECT LOCATE('-', ' - -ABC', my_bigint), -my_bigint, id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 181 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', my_varbinary_1000, 3), -my_varbinary_1000, id FROM t1_values; -SELECT LOCATE('-', my_varbinary_1000, 3), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 180 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', my_binary_30, 3), -my_binary_30, id FROM t1_values; -SELECT LOCATE('-', my_binary_30, 3), -my_binary_30, id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 179 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', my_varchar_1000, 3), -my_varchar_1000, id FROM t1_values; -SELECT LOCATE('-', my_varchar_1000, 3), -my_varchar_1000, id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 178 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('-', my_char_30, 3), -my_char_30, id FROM t1_values; -SELECT LOCATE('-', my_char_30, 3), -my_char_30, id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 177 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_binary_30 ), -my_varbinary_1000, my_binary_30 id FROM t1_values; -SELECT LOCATE(my_varbinary_1000, my_binary_30 ), -my_varbinary_1000, my_binary_30 id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 176 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), -my_varbinary_1000, my_varchar_1000 id FROM t1_values; -SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ), -my_varbinary_1000, my_varchar_1000 id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 175 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_char_30 ), -my_varbinary_1000, my_char_30 id FROM t1_values; -SELECT LOCATE(my_varbinary_1000, my_char_30 ), -my_varbinary_1000, my_char_30 id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 174 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), -my_varbinary_1000, id FROM t1_values; -SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 173 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varbinary_1000 ), -my_binary_30, my_varbinary_1000 id FROM t1_values; -SELECT LOCATE(my_binary_30, my_varbinary_1000 ), -my_binary_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 172 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varchar_1000 ), -my_binary_30, my_varchar_1000 id FROM t1_values; -SELECT LOCATE(my_binary_30, my_varchar_1000 ), -my_binary_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 171 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_char_30 ), -my_binary_30, my_char_30 id FROM t1_values; -SELECT LOCATE(my_binary_30, my_char_30 ), -my_binary_30, my_char_30 id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 170 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_binary_30 ), -my_binary_30, id FROM t1_values; -SELECT LOCATE(my_binary_30, my_binary_30 ), -my_binary_30, id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 169 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), -my_varchar_1000, my_varbinary_1000 id FROM t1_values; -SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ), -my_varchar_1000, my_varbinary_1000 id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 168 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_binary_30 ), -my_varchar_1000, my_binary_30 id FROM t1_values; -SELECT LOCATE(my_varchar_1000, my_binary_30 ), -my_varchar_1000, my_binary_30 id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 167 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_char_30 ), -my_varchar_1000, my_char_30 id FROM t1_values; -SELECT LOCATE(my_varchar_1000, my_char_30 ), -my_varchar_1000, my_char_30 id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 166 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), -my_varchar_1000, id FROM t1_values; -SELECT LOCATE(my_varchar_1000, my_varchar_1000 ), -my_varchar_1000, id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 165 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varbinary_1000 ), -my_char_30, my_varbinary_1000 id FROM t1_values; -SELECT LOCATE(my_char_30, my_varbinary_1000 ), -my_char_30, my_varbinary_1000 id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 164 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_binary_30 ), -my_char_30, my_binary_30 id FROM t1_values; -SELECT LOCATE(my_char_30, my_binary_30 ), -my_char_30, my_binary_30 id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 163 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varchar_1000 ), -my_char_30, my_varchar_1000 id FROM t1_values; -SELECT LOCATE(my_char_30, my_varchar_1000 ), -my_char_30, my_varchar_1000 id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 162 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_char_30 ), -my_char_30, id FROM t1_values; -SELECT LOCATE(my_char_30, my_char_30 ), -my_char_30, id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 161 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('char', my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT LOCATE('char', my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 160 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('char', my_binary_30), -my_binary_30, id FROM t1_values; -SELECT LOCATE('char', my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 159 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('char', my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LOCATE('char', my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 158 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOCATE('char', my_char_30), -my_char_30, id FROM t1_values; -SELECT LOCATE('char', my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 157 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LOAD_FILE('/std_data/funcs_1/load_file.txt') - AS my_col, - id FROM t1_values; -SELECT LOAD_FILE('/std_data/funcs_1/load_file.txt') - AS my_col, - id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL order by id; -my_col id -Here is content from load_file - 1 -Here is content from load_file - 2 -Here is content from load_file - 3 -Here is content from load_file - 4 -Here is content from load_file - 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('/std_data/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 156 OR select_id IS NULL) order by id; -my_col id -Here is content from load_file - 1 -Here is content from load_file - 2 -Here is content from load_file - 3 -Here is content from load_file - 4 -Here is content from load_file - 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 155 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LENGTH(my_binary_30), -my_binary_30, id FROM t1_values; -SELECT LENGTH(my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 154 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LENGTH(my_char_30), -my_char_30, id FROM t1_values; -SELECT LENGTH(my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 152 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values; -SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id -NULL NULL 1 - -1.7976931348623e308 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3 - 0 4 - -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 151 OR select_id IS NULL) order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double) my_double id -NULL NULL 1 - -1.7976931348623e308 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3 - 0 4 - -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values; -SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id -NULL NULL 1 - -9999999999999999999999999999999999.999999999999999999999999999999 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3 - 0.000000000000000000000000000000 4 - -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 150 OR select_id IS NULL) order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal) my_decimal id -NULL NULL 1 - -9999999999999999999999999999999999.999999999999999999999999999999 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999999999999999999999 3 - 0.000000000000000000000000000000 4 - -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values; -SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id -NULL NULL 1 - -9223372036854775808 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 - 0 4 - -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 149 OR select_id IS NULL) order by id; -LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint) my_bigint id -NULL NULL 1 - -9223372036854775808 2 -AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 - 0 4 - -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values; -SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL order by id; -LEFT(my_varbinary_1000, 2) my_varbinary_1000 id -NULL NULL 1 - 2 -<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 148 OR select_id IS NULL) order by id; -LEFT(my_varbinary_1000, 2) my_varbinary_1000 id -NULL NULL 1 - 2 -<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values; -SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL order by id; -LEFT(my_binary_30, 2) my_binary_30 id -NULL NULL 1 - 2 -<- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 147 OR select_id IS NULL) order by id; -LEFT(my_binary_30, 2) my_binary_30 id -NULL NULL 1 - 2 -<- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values; -SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL order by id; -LEFT(my_varchar_1000, 2) my_varchar_1000 id -NULL NULL 1 - 2 -<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 146 OR select_id IS NULL) order by id; -LEFT(my_varchar_1000, 2) my_varchar_1000 id -NULL NULL 1 - 2 -<- <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values; -SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL order by id; -LEFT(my_char_30, 2) my_char_30 id -NULL NULL 1 - 2 -<- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 145 OR select_id IS NULL) order by id; -LEFT(my_char_30, 2) my_char_30 id -NULL NULL 1 - 2 -<- <--------30 characters-------> 3 - - ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT LCASE(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT LCASE(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select lcase(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 144 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT INSTR(my_char_30, 'char'), -my_char_30, id FROM t1_values; -SELECT INSTR(my_char_30, 'char'), -my_char_30, id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL order by id; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 143 OR select_id IS NULL) order by id; -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values; -SELECT BIT_LENGTH(my_varbinary_1000), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL order by id; -BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id -NULL NULL 1 -0 2 -8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -160 ---äÖüß@µ*$-- 4 -16 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 142 OR select_id IS NULL) order by id; -BIT_LENGTH(my_varbinary_1000) my_varbinary_1000 id -NULL NULL 1 -0 2 -8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -160 ---äÖüß@µ*$-- 4 -16 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT BIT_LENGTH(my_binary_30), -my_binary_30, id FROM t1_values; -SELECT BIT_LENGTH(my_binary_30), -my_binary_30, id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL order by id; -BIT_LENGTH(my_binary_30) my_binary_30 id -NULL NULL 1 -240 2 -240 <--------30 characters-------> 3 -240 ---äÖüß@µ*$-- 4 -240 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 141 OR select_id IS NULL) order by id; -BIT_LENGTH(my_binary_30) my_binary_30 id -NULL NULL 1 -240 2 -240 <--------30 characters-------> 3 -240 ---äÖüß@µ*$-- 4 -240 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values; -SELECT BIT_LENGTH(my_varchar_1000), -my_varchar_1000, id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL order by id; -BIT_LENGTH(my_varchar_1000) my_varchar_1000 id -NULL NULL 1 -0 2 -8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -160 ---äÖüß@µ*$-- 4 -16 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 140 OR select_id IS NULL) order by id; -BIT_LENGTH(my_varchar_1000) my_varchar_1000 id -NULL NULL 1 -0 2 -8000 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -160 ---äÖüß@µ*$-- 4 -16 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT BIT_LENGTH(my_char_30), -my_char_30, id FROM t1_values; -SELECT BIT_LENGTH(my_char_30), -my_char_30, id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL order by id; -BIT_LENGTH(my_char_30) my_char_30 id -NULL NULL 1 -0 2 -240 <--------30 characters-------> 3 -152 ---äÖüß@µ*$-- 4 -16 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 139 OR select_id IS NULL) order by id; -BIT_LENGTH(my_char_30) my_char_30 id -NULL NULL 1 -0 2 -240 <--------30 characters-------> 3 -152 ---äÖüß@µ*$-- 4 -16 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_year,'IS_NULL'), -my_year, id FROM t1_values; -SELECT IFNULL(my_year,'IS_NULL'), -my_year, id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL order by id; -IFNULL(my_year,'IS_NULL') my_year id -IS_NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 138 OR select_id IS NULL) order by id; -IFNULL(my_year,'IS_NULL') my_year id -IS_NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_time,'IS_NULL'), -my_time, id FROM t1_values; -SELECT IFNULL(my_time,'IS_NULL'), -my_time, id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL order by id; -IFNULL(my_time,'IS_NULL') my_time id -IS_NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 137 OR select_id IS NULL) order by id; -IFNULL(my_time,'IS_NULL') my_time id -IS_NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_timestamp,'IS_NULL'), -my_timestamp, id FROM t1_values; -SELECT IFNULL(my_timestamp,'IS_NULL'), -my_timestamp, id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL order by id; -IFNULL(my_timestamp,'IS_NULL') my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 136 OR select_id IS NULL) order by id; -IFNULL(my_timestamp,'IS_NULL') my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_date,'IS_NULL'), -my_date, id FROM t1_values; -SELECT IFNULL(my_date,'IS_NULL'), -my_date, id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL order by id; -IFNULL(my_date,'IS_NULL') my_date id -IS_NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 135 OR select_id IS NULL) order by id; -IFNULL(my_date,'IS_NULL') my_date id -IS_NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_datetime,'IS_NULL'), -my_datetime, id FROM t1_values; -SELECT IFNULL(my_datetime,'IS_NULL'), -my_datetime, id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL order by id; -IFNULL(my_datetime,'IS_NULL') my_datetime id -IS_NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 134 OR select_id IS NULL) order by id; -IFNULL(my_datetime,'IS_NULL') my_datetime id -IS_NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_double,'IS_NULL'), -my_double, id FROM t1_values; -SELECT IFNULL(my_double,'IS_NULL'), -my_double, id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL order by id; -IFNULL(my_double,'IS_NULL') my_double id -IS_NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 133 OR select_id IS NULL) order by id; -IFNULL(my_double,'IS_NULL') my_double id -IS_NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_decimal,'IS_NULL'), -my_decimal, id FROM t1_values; -SELECT IFNULL(my_decimal,'IS_NULL'), -my_decimal, id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL order by id; -IFNULL(my_decimal,'IS_NULL') my_decimal id -IS_NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 132 OR select_id IS NULL) order by id; -IFNULL(my_decimal,'IS_NULL') my_decimal id -IS_NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_bigint,'IS_NULL'), -my_bigint, id FROM t1_values; -SELECT IFNULL(my_bigint,'IS_NULL'), -my_bigint, id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL order by id; -IFNULL(my_bigint,'IS_NULL') my_bigint id -IS_NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 131 OR select_id IS NULL) order by id; -IFNULL(my_bigint,'IS_NULL') my_bigint id -IS_NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_varbinary_1000,'IS_NULL'), -my_varbinary_1000, id FROM t1_values; -SELECT IFNULL(my_varbinary_1000,'IS_NULL'), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL order by id; -IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id -IS_NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 130 OR select_id IS NULL) order by id; -IFNULL(my_varbinary_1000,'IS_NULL') my_varbinary_1000 id -IS_NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_binary_30,'IS_NULL'), -my_binary_30, id FROM t1_values; -SELECT IFNULL(my_binary_30,'IS_NULL'), -my_binary_30, id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL order by id; -IFNULL(my_binary_30,'IS_NULL') my_binary_30 id -IS_NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 129 OR select_id IS NULL) order by id; -IFNULL(my_binary_30,'IS_NULL') my_binary_30 id -IS_NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_varchar_1000,'IS_NULL'), -my_varchar_1000, id FROM t1_values; -SELECT IFNULL(my_varchar_1000,'IS_NULL'), -my_varchar_1000, id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL order by id; -IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id -IS_NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 128 OR select_id IS NULL) order by id; -IFNULL(my_varchar_1000,'IS_NULL') my_varchar_1000 id -IS_NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IFNULL(my_char_30,'IS_NULL'), -my_char_30, id FROM t1_values; -SELECT IFNULL(my_char_30,'IS_NULL'), -my_char_30, id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL order by id; -IFNULL(my_char_30,'IS_NULL') my_char_30 id -IS_NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 127 OR select_id IS NULL) order by id; -IFNULL(my_char_30,'IS_NULL') my_char_30 id -IS_NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL'), my_year, id FROM t1_values; -SELECT IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL'), my_year, id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL order by id; -IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL') my_year id -IS NULL NULL 1 -IS NOT NULL 1901 2 -IS NOT NULL 2155 3 -IS NOT NULL 2000 4 -IS NOT NULL 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),'IS NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 126 OR select_id IS NULL) order by id; -IF(my_year IS NULL, 'IS NULL', -'IS NOT NULL') my_year id -IS NULL NULL 1 -IS NOT NULL 1901 2 -IS NOT NULL 2155 3 -IS NOT NULL 2000 4 -IS NOT NULL 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL'), my_time, id FROM t1_values; -SELECT IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL'), my_time, id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL order by id; -IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL') my_time id -IS NULL NULL 1 -IS NOT NULL -838:59:59 2 -IS NOT NULL 838:59:59 3 -IS NOT NULL 13:00:00 4 -IS NOT NULL 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),'IS NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 125 OR select_id IS NULL) order by id; -IF(my_time IS NULL, 'IS NULL', -'IS NOT NULL') my_time id -IS NULL NULL 1 -IS NOT NULL -838:59:59 2 -IS NOT NULL 838:59:59 3 -IS NOT NULL 13:00:00 4 -IS NOT NULL 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL'), my_timestamp, id FROM t1_values; -SELECT IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL'), my_timestamp, id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL order by id; -IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL') my_timestamp id -IS NOT NULL 0000-00-00 00:00:00 1 -IS NOT NULL 1970-01-01 03:00:01 2 -IS NOT NULL 2038-01-01 02:59:59 3 -IS NOT NULL 2004-02-29 23:59:59 4 -IS NOT NULL 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),'IS NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 124 OR select_id IS NULL) order by id; -IF(my_timestamp IS NULL, 'IS NULL', -'IS NOT NULL') my_timestamp id -IS NOT NULL 0000-00-00 00:00:00 1 -IS NOT NULL 1970-01-01 03:00:01 2 -IS NOT NULL 2038-01-01 02:59:59 3 -IS NOT NULL 2004-02-29 23:59:59 4 -IS NOT NULL 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL'), my_date, id FROM t1_values; -SELECT IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL'), my_date, id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL order by id; -IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL') my_date id -IS NULL NULL 1 -IS NOT NULL 0001-01-01 2 -IS NOT NULL 9999-12-31 3 -IS NOT NULL 2004-02-29 4 -IS NOT NULL 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),'IS NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 123 OR select_id IS NULL) order by id; -IF(my_date IS NULL, 'IS NULL', -'IS NOT NULL') my_date id -IS NULL NULL 1 -IS NOT NULL 0001-01-01 2 -IS NOT NULL 9999-12-31 3 -IS NOT NULL 2004-02-29 4 -IS NOT NULL 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL'), my_datetime, id FROM t1_values; -SELECT IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL'), my_datetime, id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL order by id; -IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL') my_datetime id -IS NULL NULL 1 -IS NOT NULL 0001-01-01 00:00:00 2 -IS NOT NULL 9999-12-31 23:59:59 3 -IS NOT NULL 2004-02-29 23:59:59 4 -IS NOT NULL 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),'IS NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 122 OR select_id IS NULL) order by id; -IF(my_datetime IS NULL, 'IS NULL', -'IS NOT NULL') my_datetime id -IS NULL NULL 1 -IS NOT NULL 0001-01-01 00:00:00 2 -IS NOT NULL 9999-12-31 23:59:59 3 -IS NOT NULL 2004-02-29 23:59:59 4 -IS NOT NULL 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL'), my_double, id FROM t1_values; -SELECT IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL'), my_double, id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL order by id; -IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL') my_double id -IS NULL NULL 1 -IS NOT NULL -1.7976931348623e308 2 -IS NOT NULL 1.7976931348623e308 3 -IS NOT NULL 0 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),'IS NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 121 OR select_id IS NULL) order by id; -IF(my_double IS NULL, 'IS NULL', -'IS NOT NULL') my_double id -IS NULL NULL 1 -IS NOT NULL -1.7976931348623e308 2 -IS NOT NULL 1.7976931348623e308 3 -IS NOT NULL 0 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL'), my_decimal, id FROM t1_values; -SELECT IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL'), my_decimal, id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL order by id; -IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL') my_decimal id -IS NULL NULL 1 -IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2 -IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3 -IS NOT NULL 0.000000000000000000000000000000 4 -IS NOT NULL -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),'IS NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 120 OR select_id IS NULL) order by id; -IF(my_decimal IS NULL, 'IS NULL', -'IS NOT NULL') my_decimal id -IS NULL NULL 1 -IS NOT NULL -9999999999999999999999999999999999.999999999999999999999999999999 2 -IS NOT NULL 9999999999999999999999999999999999.999999999999999999999999999999 3 -IS NOT NULL 0.000000000000000000000000000000 4 -IS NOT NULL -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL'), my_bigint, id FROM t1_values; -SELECT IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL'), my_bigint, id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL order by id; -IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL') my_bigint id -IS NULL NULL 1 -IS NOT NULL -9223372036854775808 2 -IS NOT NULL 9223372036854775807 3 -IS NOT NULL 0 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),'IS NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 119 OR select_id IS NULL) order by id; -IF(my_bigint IS NULL, 'IS NULL', -'IS NOT NULL') my_bigint id -IS NULL NULL 1 -IS NOT NULL -9223372036854775808 2 -IS NOT NULL 9223372036854775807 3 -IS NOT NULL 0 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL'), my_varbinary_1000, id FROM t1_values; -SELECT IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL'), my_varbinary_1000, id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL order by id; -IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL') my_varbinary_1000 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 118 OR select_id IS NULL) order by id; -IF(my_varbinary_1000 IS NULL, 'IS NULL', -'IS NOT NULL') my_varbinary_1000 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL'), my_binary_30, id FROM t1_values; -SELECT IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL'), my_binary_30, id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL order by id; -IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL') my_binary_30 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 117 OR select_id IS NULL) order by id; -IF(my_binary_30 IS NULL, 'IS NULL', -'IS NOT NULL') my_binary_30 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL'), my_varchar_1000, id FROM t1_values; -SELECT IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL'), my_varchar_1000, id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL order by id; -IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL') my_varchar_1000 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 116 OR select_id IS NULL) order by id; -IF(my_varchar_1000 IS NULL, 'IS NULL', -'IS NOT NULL') my_varchar_1000 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL'), my_char_30, id FROM t1_values; -SELECT IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL'), my_char_30, id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL order by id; -IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL') my_char_30 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),'IS NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 115 OR select_id IS NULL) order by id; -IF(my_char_30 IS NULL, 'IS NULL', -'IS NOT NULL') my_char_30 id -IS NULL NULL 1 -IS NOT NULL 2 -IS NOT NULL <--------30 characters-------> 3 -IS NOT NULL ---äÖüß@µ*$-- 4 -IS NOT NULL -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), -my_year, id FROM t1_values; -SELECT IF(my_year, 'IS TRUE', 'IS NOT TRUE'), -my_year, id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL order by id; -IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id -IS NOT TRUE NULL 1 -IS TRUE 1901 2 -IS TRUE 2155 3 -IS TRUE 2000 4 -IS TRUE 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,'IS TRUE','IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 114 OR select_id IS NULL) order by id; -IF(my_year, 'IS TRUE', 'IS NOT TRUE') my_year id -IS NOT TRUE NULL 1 -IS TRUE 1901 2 -IS TRUE 2155 3 -IS TRUE 2000 4 -IS TRUE 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), -my_time, id FROM t1_values; -SELECT IF(my_time, 'IS TRUE', 'IS NOT TRUE'), -my_time, id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL order by id; -IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id -IS NOT TRUE NULL 1 -IS TRUE -838:59:59 2 -IS TRUE 838:59:59 3 -IS TRUE 13:00:00 4 -IS TRUE 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,'IS TRUE','IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 113 OR select_id IS NULL) order by id; -IF(my_time, 'IS TRUE', 'IS NOT TRUE') my_time id -IS NOT TRUE NULL 1 -IS TRUE -838:59:59 2 -IS TRUE 838:59:59 3 -IS TRUE 13:00:00 4 -IS TRUE 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), -my_timestamp, id FROM t1_values; -SELECT IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE'), -my_timestamp, id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL order by id; -IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id -IS NOT TRUE 0000-00-00 00:00:00 1 -IS TRUE 1970-01-01 03:00:01 2 -IS TRUE 2038-01-01 02:59:59 3 -IS TRUE 2004-02-29 23:59:59 4 -IS TRUE 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,'IS TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 112 OR select_id IS NULL) order by id; -IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE') my_timestamp id -IS NOT TRUE 0000-00-00 00:00:00 1 -IS TRUE 1970-01-01 03:00:01 2 -IS TRUE 2038-01-01 02:59:59 3 -IS TRUE 2004-02-29 23:59:59 4 -IS TRUE 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), -my_date, id FROM t1_values; -SELECT IF(my_date, 'IS TRUE', 'IS NOT TRUE'), -my_date, id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL order by id; -IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id -IS NOT TRUE NULL 1 -IS TRUE 0001-01-01 2 -IS TRUE 9999-12-31 3 -IS TRUE 2004-02-29 4 -IS TRUE 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,'IS TRUE','IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 111 OR select_id IS NULL) order by id; -IF(my_date, 'IS TRUE', 'IS NOT TRUE') my_date id -IS NOT TRUE NULL 1 -IS TRUE 0001-01-01 2 -IS TRUE 9999-12-31 3 -IS TRUE 2004-02-29 4 -IS TRUE 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), -my_datetime, id FROM t1_values; -SELECT IF(my_datetime, 'IS TRUE', 'IS NOT TRUE'), -my_datetime, id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL order by id; -IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id -IS NOT TRUE NULL 1 -IS TRUE 0001-01-01 00:00:00 2 -IS TRUE 9999-12-31 23:59:59 3 -IS TRUE 2004-02-29 23:59:59 4 -IS TRUE 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,'IS TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 110 OR select_id IS NULL) order by id; -IF(my_datetime, 'IS TRUE', 'IS NOT TRUE') my_datetime id -IS NOT TRUE NULL 1 -IS TRUE 0001-01-01 00:00:00 2 -IS TRUE 9999-12-31 23:59:59 3 -IS TRUE 2004-02-29 23:59:59 4 -IS TRUE 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), -my_double, id FROM t1_values; -SELECT IF(my_double, 'IS TRUE', 'IS NOT TRUE'), -my_double, id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL order by id; -IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id -IS NOT TRUE NULL 1 -IS TRUE -1.7976931348623e308 2 -IS TRUE 1.7976931348623e308 3 -IS NOT TRUE 0 4 -IS TRUE -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,'IS TRUE','IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 109 OR select_id IS NULL) order by id; -IF(my_double, 'IS TRUE', 'IS NOT TRUE') my_double id -IS NOT TRUE NULL 1 -IS TRUE -1.7976931348623e308 2 -IS TRUE 1.7976931348623e308 3 -IS NOT TRUE 0 4 -IS TRUE -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), -my_decimal, id FROM t1_values; -SELECT IF(my_decimal, 'IS TRUE', 'IS NOT TRUE'), -my_decimal, id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL order by id; -IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id -IS NOT TRUE NULL 1 -IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 -IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3 -IS NOT TRUE 0.000000000000000000000000000000 4 -IS TRUE -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,'IS TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 108 OR select_id IS NULL) order by id; -IF(my_decimal, 'IS TRUE', 'IS NOT TRUE') my_decimal id -IS NOT TRUE NULL 1 -IS TRUE -9999999999999999999999999999999999.999999999999999999999999999999 2 -IS TRUE 9999999999999999999999999999999999.999999999999999999999999999999 3 -IS NOT TRUE 0.000000000000000000000000000000 4 -IS TRUE -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), -my_bigint, id FROM t1_values; -SELECT IF(my_bigint, 'IS TRUE', 'IS NOT TRUE'), -my_bigint, id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL order by id; -IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id -IS NOT TRUE NULL 1 -IS TRUE -9223372036854775808 2 -IS TRUE 9223372036854775807 3 -IS NOT TRUE 0 4 -IS TRUE -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,'IS TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 107 OR select_id IS NULL) order by id; -IF(my_bigint, 'IS TRUE', 'IS NOT TRUE') my_bigint id -IS NOT TRUE NULL 1 -IS TRUE -9223372036854775808 2 -IS TRUE 9223372036854775807 3 -IS NOT TRUE 0 4 -IS TRUE -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), -my_varbinary_1000, id FROM t1_values; -SELECT IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE'), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL order by id; -IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 106 OR select_id IS NULL) order by id; -IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE') my_varbinary_1000 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), -my_binary_30, id FROM t1_values; -SELECT IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE'), -my_binary_30, id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL order by id; -IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' -Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 105 OR select_id IS NULL) order by id; -IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' -Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), -my_varchar_1000, id FROM t1_values; -SELECT IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE'), -my_varchar_1000, id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL order by id; -IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 104 OR select_id IS NULL) order by id; -IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE') my_varchar_1000 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), -my_char_30, id FROM t1_values; -SELECT IF(my_char_30, 'IS TRUE', 'IS NOT TRUE'), -my_char_30, id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL order by id; -IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 103 OR select_id IS NULL) order by id; -IF(my_char_30, 'IS TRUE', 'IS NOT TRUE') my_char_30 id -IS NOT TRUE NULL 1 -IS NOT TRUE 2 -IS NOT TRUE <--------30 characters-------> 3 -IS NOT TRUE ---äÖüß@µ*$-- 4 -IS TRUE -1 5 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' -Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), -my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING koi8r), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL order by id; -CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---???????÷@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 102 OR select_id IS NULL) order by id; -CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---???????÷@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), -my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING koi8r), -my_binary_30, id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL order by id; -CONVERT(my_binary_30 USING koi8r) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---???????÷@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 101 OR select_id IS NULL) order by id; -CONVERT(my_binary_30 USING koi8r) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---???????÷@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), -my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING koi8r), -my_varchar_1000, id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL order by id; -CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---????????@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 100 OR select_id IS NULL) order by id; -CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---????????@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), -my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING koi8r), -my_char_30, id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL order by id; -CONVERT(my_char_30 USING koi8r) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---????????@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 99 OR select_id IS NULL) order by id; -CONVERT(my_char_30 USING koi8r) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---????????@??*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), -my_varbinary_1000, id FROM t1_values; -SELECT CONVERT(my_varbinary_1000 USING utf8), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL order by id; -CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 98 OR select_id IS NULL) order by id; -CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), -my_binary_30, id FROM t1_values; -SELECT CONVERT(my_binary_30 USING utf8), -my_binary_30, id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL order by id; -CONVERT(my_binary_30 USING utf8) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 97 OR select_id IS NULL) order by id; -CONVERT(my_binary_30 USING utf8) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), -my_varchar_1000, id FROM t1_values; -SELECT CONVERT(my_varchar_1000 USING utf8), -my_varchar_1000, id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL order by id; -CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 96 OR select_id IS NULL) order by id; -CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), -my_char_30, id FROM t1_values; -SELECT CONVERT(my_char_30 USING utf8), -my_char_30, id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL order by id; -CONVERT(my_char_30 USING utf8) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 95 OR select_id IS NULL) order by id; -CONVERT(my_char_30 USING utf8) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS UNSIGNED INTEGER), -my_year, id FROM t1_values; -SELECT CAST(my_year AS UNSIGNED INTEGER), -my_year, id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL order by id; -CAST(my_year AS UNSIGNED INTEGER) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 94 OR select_id IS NULL) order by id; -CAST(my_year AS UNSIGNED INTEGER) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS UNSIGNED INTEGER), -my_time, id FROM t1_values; -SELECT CAST(my_time AS UNSIGNED INTEGER), -my_time, id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL order by id; -CAST(my_time AS UNSIGNED INTEGER) my_time id -NULL NULL 1 -18446744073701165657 -838:59:59 2 -8385959 838:59:59 3 -130000 13:00:00 4 -100000 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 93 OR select_id IS NULL) order by id; -CAST(my_time AS UNSIGNED INTEGER) my_time id -NULL NULL 1 -18446744073701165657 -838:59:59 2 -8385959 838:59:59 3 -130000 13:00:00 4 -100000 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS UNSIGNED INTEGER), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS UNSIGNED INTEGER), -my_timestamp, id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL order by id; -CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id -0 0000-00-00 00:00:00 1 -19700101030001 1970-01-01 03:00:01 2 -20380101025959 2038-01-01 02:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 92 OR select_id IS NULL) order by id; -CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id -0 0000-00-00 00:00:00 1 -19700101030001 1970-01-01 03:00:01 2 -20380101025959 2038-01-01 02:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS UNSIGNED INTEGER), -my_date, id FROM t1_values; -SELECT CAST(my_date AS UNSIGNED INTEGER), -my_date, id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL order by id; -CAST(my_date AS UNSIGNED INTEGER) my_date id -NULL NULL 1 -10101 0001-01-01 2 -99991231 9999-12-31 3 -20040229 2004-02-29 4 -20050628 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 91 OR select_id IS NULL) order by id; -CAST(my_date AS UNSIGNED INTEGER) my_date id -NULL NULL 1 -10101 0001-01-01 2 -99991231 9999-12-31 3 -20040229 2004-02-29 4 -20050628 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS UNSIGNED INTEGER), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS UNSIGNED INTEGER), -my_datetime, id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL order by id; -CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id -NULL NULL 1 -10101000000 0001-01-01 00:00:00 2 -99991231235959 9999-12-31 23:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 90 OR select_id IS NULL) order by id; -CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id -NULL NULL 1 -10101000000 0001-01-01 00:00:00 2 -99991231235959 9999-12-31 23:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS UNSIGNED INTEGER), -my_double, id FROM t1_values; -SELECT CAST(my_double AS UNSIGNED INTEGER), -my_double, id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL order by id; -CAST(my_double AS UNSIGNED INTEGER) my_double id -NULL NULL 1 -9223372036854775808 -1.7976931348623e308 2 -9223372036854775807 1.7976931348623e308 3 -0 0 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 89 OR select_id IS NULL) order by id; -CAST(my_double AS UNSIGNED INTEGER) my_double id -NULL NULL 1 -9223372036854775808 -1.7976931348623e308 2 -9223372036854775807 1.7976931348623e308 3 -0 0 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS UNSIGNED INTEGER), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS UNSIGNED INTEGER), -my_decimal, id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL order by id; -CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id -NULL NULL 1 -0 -9999999999999999999999999999999999.999999999999999999999999999999 2 -18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3 -0 0.000000000000000000000000000000 4 -0 -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 88 OR select_id IS NULL) order by id; -CAST(my_decimal AS UNSIGNED INTEGER) my_decimal id -NULL NULL 1 -0 -9999999999999999999999999999999999.999999999999999999999999999999 2 -18446744073709551615 9999999999999999999999999999999999.999999999999999999999999999999 3 -0 0.000000000000000000000000000000 4 -0 -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS UNSIGNED INTEGER), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS UNSIGNED INTEGER), -my_bigint, id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL order by id; -CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id -NULL NULL 1 -9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 -18446744073709551615 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 87 OR select_id IS NULL) order by id; -CAST(my_bigint AS UNSIGNED INTEGER) my_bigint id -NULL NULL 1 -9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 -18446744073709551615 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 86 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS UNSIGNED INTEGER) my_varbinary_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS UNSIGNED INTEGER), -my_binary_30, id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL order by id; -CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect INTEGER value: '-1' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 85 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect INTEGER value: '-1' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER), -my_varchar_1000, id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 84 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS UNSIGNED INTEGER) my_varchar_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS UNSIGNED INTEGER), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS UNSIGNED INTEGER), -my_char_30, id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL order by id; -CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 83 OR select_id IS NULL) order by id; -CAST(my_char_30 AS UNSIGNED INTEGER) my_char_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 -18446744073709551615 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' -Warning 1105 Cast to unsigned converted negative integer to it's positive complement -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS SIGNED INTEGER), -my_year, id FROM t1_values; -SELECT CAST(my_year AS SIGNED INTEGER), -my_year, id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL order by id; -CAST(my_year AS SIGNED INTEGER) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 82 OR select_id IS NULL) order by id; -CAST(my_year AS SIGNED INTEGER) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS SIGNED INTEGER), -my_time, id FROM t1_values; -SELECT CAST(my_time AS SIGNED INTEGER), -my_time, id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL order by id; -CAST(my_time AS SIGNED INTEGER) my_time id -NULL NULL 1 --8385959 -838:59:59 2 -8385959 838:59:59 3 -130000 13:00:00 4 -100000 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 81 OR select_id IS NULL) order by id; -CAST(my_time AS SIGNED INTEGER) my_time id -NULL NULL 1 --8385959 -838:59:59 2 -8385959 838:59:59 3 -130000 13:00:00 4 -100000 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS SIGNED INTEGER), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS SIGNED INTEGER), -my_timestamp, id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL order by id; -CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id -0 0000-00-00 00:00:00 1 -19700101030001 1970-01-01 03:00:01 2 -20380101025959 2038-01-01 02:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 80 OR select_id IS NULL) order by id; -CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id -0 0000-00-00 00:00:00 1 -19700101030001 1970-01-01 03:00:01 2 -20380101025959 2038-01-01 02:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS SIGNED INTEGER), -my_date, id FROM t1_values; -SELECT CAST(my_date AS SIGNED INTEGER), -my_date, id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL order by id; -CAST(my_date AS SIGNED INTEGER) my_date id -NULL NULL 1 -10101 0001-01-01 2 -99991231 9999-12-31 3 -20040229 2004-02-29 4 -20050628 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 79 OR select_id IS NULL) order by id; -CAST(my_date AS SIGNED INTEGER) my_date id -NULL NULL 1 -10101 0001-01-01 2 -99991231 9999-12-31 3 -20040229 2004-02-29 4 -20050628 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS SIGNED INTEGER), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS SIGNED INTEGER), -my_datetime, id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL order by id; -CAST(my_datetime AS SIGNED INTEGER) my_datetime id -NULL NULL 1 -10101000000 0001-01-01 00:00:00 2 -99991231235959 9999-12-31 23:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 78 OR select_id IS NULL) order by id; -CAST(my_datetime AS SIGNED INTEGER) my_datetime id -NULL NULL 1 -10101000000 0001-01-01 00:00:00 2 -99991231235959 9999-12-31 23:59:59 3 -20040229235959 2004-02-29 23:59:59 4 -20050628100000 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS SIGNED INTEGER), -my_double, id FROM t1_values; -SELECT CAST(my_double AS SIGNED INTEGER), -my_double, id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL order by id; -CAST(my_double AS SIGNED INTEGER) my_double id -NULL NULL 1 --9223372036854775808 -1.7976931348623e308 2 -9223372036854775807 1.7976931348623e308 3 -0 0 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 77 OR select_id IS NULL) order by id; -CAST(my_double AS SIGNED INTEGER) my_double id -NULL NULL 1 --9223372036854775808 -1.7976931348623e308 2 -9223372036854775807 1.7976931348623e308 3 -0 0 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS SIGNED INTEGER), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS SIGNED INTEGER), -my_decimal, id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL order by id; -CAST(my_decimal AS SIGNED INTEGER) my_decimal id -NULL NULL 1 --9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3 -0 0.000000000000000000000000000000 4 --1 -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 76 OR select_id IS NULL) order by id; -CAST(my_decimal AS SIGNED INTEGER) my_decimal id -NULL NULL 1 --9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3 -0 0.000000000000000000000000000000 4 --1 -1.000000000000000000000000000000 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1292 Truncated incorrect DECIMAL value: '' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS SIGNED INTEGER), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS SIGNED INTEGER), -my_bigint, id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL order by id; -CAST(my_bigint AS SIGNED INTEGER) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 75 OR select_id IS NULL) order by id; -CAST(my_bigint AS SIGNED INTEGER) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 74 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS SIGNED INTEGER) my_varbinary_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS SIGNED INTEGER), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS SIGNED INTEGER), -my_binary_30, id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL order by id; -CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect INTEGER value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 73 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect INTEGER value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS SIGNED INTEGER), -my_varchar_1000, id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 72 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS SIGNED INTEGER) my_varchar_1000 id -NULL NULL 1 -0 2 -0 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS SIGNED INTEGER), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS SIGNED INTEGER), -my_char_30, id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL order by id; -CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 71 OR select_id IS NULL) order by id; -CAST(my_char_30 AS SIGNED INTEGER) my_char_30 id -NULL NULL 1 -0 2 -0 <--------30 characters-------> 3 -0 ---äÖüß@µ*$-- 4 --1 -1 5 -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' -Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)), -my_year, id FROM t1_values; -SELECT CAST(my_year AS DECIMAL(37,2)), -my_year, id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL order by id; -CAST(my_year AS DECIMAL(37,2)) my_year id -NULL NULL 1 -1901.00 1901 2 -2155.00 2155 3 -2000.00 2000 4 -2005.00 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 70 OR select_id IS NULL) order by id; -CAST(my_year AS DECIMAL(37,2)) my_year id -NULL NULL 1 -1901.00 1901 2 -2155.00 2155 3 -2000.00 2000 4 -2005.00 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)), -my_time, id FROM t1_values; -SELECT CAST(my_time AS DECIMAL(37,2)), -my_time, id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL order by id; -CAST(my_time AS DECIMAL(37,2)) my_time id -NULL NULL 1 --8385959.00 -838:59:59 2 -8385959.00 838:59:59 3 -130000.00 13:00:00 4 -100000.00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 69 OR select_id IS NULL) order by id; -CAST(my_time AS DECIMAL(37,2)) my_time id -NULL NULL 1 --8385959.00 -838:59:59 2 -8385959.00 838:59:59 3 -130000.00 13:00:00 4 -100000.00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS DECIMAL(37,2)), -my_timestamp, id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL order by id; -CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id -0.00 0000-00-00 00:00:00 1 -19700101030001.00 1970-01-01 03:00:01 2 -20380101025959.00 2038-01-01 02:59:59 3 -20040229235959.00 2004-02-29 23:59:59 4 -20050628100000.00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 68 OR select_id IS NULL) order by id; -CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id -0.00 0000-00-00 00:00:00 1 -19700101030001.00 1970-01-01 03:00:01 2 -20380101025959.00 2038-01-01 02:59:59 3 -20040229235959.00 2004-02-29 23:59:59 4 -20050628100000.00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)), -my_date, id FROM t1_values; -SELECT CAST(my_date AS DECIMAL(37,2)), -my_date, id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL order by id; -CAST(my_date AS DECIMAL(37,2)) my_date id -NULL NULL 1 -10101.00 0001-01-01 2 -99991231.00 9999-12-31 3 -20040229.00 2004-02-29 4 -20050628.00 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 67 OR select_id IS NULL) order by id; -CAST(my_date AS DECIMAL(37,2)) my_date id -NULL NULL 1 -10101.00 0001-01-01 2 -99991231.00 9999-12-31 3 -20040229.00 2004-02-29 4 -20050628.00 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS DECIMAL(37,2)), -my_datetime, id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL order by id; -CAST(my_datetime AS DECIMAL(37,2)) my_datetime id -NULL NULL 1 -10101000000.00 0001-01-01 00:00:00 2 -99991231235959.00 9999-12-31 23:59:59 3 -20040229235959.00 2004-02-29 23:59:59 4 -20050628100000.00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 66 OR select_id IS NULL) order by id; -CAST(my_datetime AS DECIMAL(37,2)) my_datetime id -NULL NULL 1 -10101000000.00 0001-01-01 00:00:00 2 -99991231235959.00 9999-12-31 23:59:59 3 -20040229235959.00 2004-02-29 23:59:59 4 -20050628100000.00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS DECIMAL(37,2)), -my_double, id FROM t1_values; -SELECT CAST(my_double AS DECIMAL(37,2)), -my_double, id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL order by id; -CAST(my_double AS DECIMAL(37,2)) my_double id -NULL NULL 1 --99999999999999999999999999999999999.99 -1.7976931348623e308 2 -99999999999999999999999999999999999.99 1.7976931348623e308 3 -0.00 0 4 --1.00 -1 5 --3333.33 -3333.3333 30 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 65 OR select_id IS NULL) order by id; -CAST(my_double AS DECIMAL(37,2)) my_double id -NULL NULL 1 --99999999999999999999999999999999999.99 -1.7976931348623e308 2 -99999999999999999999999999999999999.99 1.7976931348623e308 3 -0.00 0 4 --1.00 -1 5 --3333.33 -3333.3333 30 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS DECIMAL(37,2)), -my_decimal, id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL order by id; -CAST(my_decimal AS DECIMAL(37,2)) my_decimal id -NULL NULL 1 --10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 -10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.00 0.000000000000000000000000000000 4 --1.00 -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 64 OR select_id IS NULL) order by id; -CAST(my_decimal AS DECIMAL(37,2)) my_decimal id -NULL NULL 1 --10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2 -10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.00 0.000000000000000000000000000000 4 --1.00 -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS DECIMAL(37,2)), -my_bigint, id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL order by id; -CAST(my_bigint AS DECIMAL(37,2)) my_bigint id -NULL NULL 1 --9223372036854775808.00 -9223372036854775808 2 -9223372036854775807.00 9223372036854775807 3 -0.00 0 4 --1.00 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 63 OR select_id IS NULL) order by id; -CAST(my_bigint AS DECIMAL(37,2)) my_bigint id -NULL NULL 1 --9223372036854775808.00 -9223372036854775808 2 -9223372036854775807.00 9223372036854775807 3 -0.00 0 4 --1.00 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id -NULL NULL 1 -0.00 2 -0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 29 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 62 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id -NULL NULL 1 -0.00 2 -0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 29 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS DECIMAL(37,2)), -my_binary_30, id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL order by id; -CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id -NULL NULL 1 -0.00 2 -0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 28 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 61 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id -NULL NULL 1 -0.00 2 -0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 28 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)), -my_varchar_1000, id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id -NULL NULL 1 -0.00 2 -0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 27 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 60 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id -NULL NULL 1 -0.00 2 -0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 27 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS DECIMAL(37,2)), -my_char_30, id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL order by id; -CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id -NULL NULL 1 -0.00 2 -0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 26 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 59 OR select_id IS NULL) order by id; -CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id -NULL NULL 1 -0.00 2 -0.00 <--------30 characters-------> 3 -0.00 ---äÖüß@µ*$-- 4 --1.00 -1 5 --3333.33 -3333.3333 26 -Warnings: -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Warning 1366 Incorrect decimal value: '' for column '' at row -1 -Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS TIME), -my_year, id FROM t1_values; -SELECT CAST(my_year AS TIME), -my_year, id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL order by id; -CAST(my_year AS TIME) my_year id -NULL NULL 1 -00:19:01 1901 2 -00:21:55 2155 3 -00:20:00 2000 4 -00:20:05 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 58 OR select_id IS NULL) order by id; -CAST(my_year AS TIME) my_year id -NULL NULL 1 -00:19:01 1901 2 -00:21:55 2155 3 -00:20:00 2000 4 -00:20:05 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS TIME), -my_time, id FROM t1_values; -SELECT CAST(my_time AS TIME), -my_time, id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL order by id; -CAST(my_time AS TIME) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 57 OR select_id IS NULL) order by id; -CAST(my_time AS TIME) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS TIME), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS TIME), -my_timestamp, id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL order by id; -CAST(my_timestamp AS TIME) my_timestamp id -00:00:00 0000-00-00 00:00:00 1 -03:00:01 1970-01-01 03:00:01 2 -02:59:59 2038-01-01 02:59:59 3 -23:59:59 2004-02-29 23:59:59 4 -10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 56 OR select_id IS NULL) order by id; -CAST(my_timestamp AS TIME) my_timestamp id -00:00:00 0000-00-00 00:00:00 1 -03:00:01 1970-01-01 03:00:01 2 -02:59:59 2038-01-01 02:59:59 3 -23:59:59 2004-02-29 23:59:59 4 -10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS TIME), -my_date, id FROM t1_values; -SELECT CAST(my_date AS TIME), -my_date, id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL order by id; -CAST(my_date AS TIME) my_date id -NULL NULL 1 -00:00:00 0001-01-01 2 -00:00:00 9999-12-31 3 -00:00:00 2004-02-29 4 -00:00:00 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 55 OR select_id IS NULL) order by id; -CAST(my_date AS TIME) my_date id -NULL NULL 1 -00:00:00 0001-01-01 2 -00:00:00 9999-12-31 3 -00:00:00 2004-02-29 4 -00:00:00 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS TIME), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS TIME), -my_datetime, id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL order by id; -CAST(my_datetime AS TIME) my_datetime id -NULL NULL 1 -00:00:00 0001-01-01 00:00:00 2 -23:59:59 9999-12-31 23:59:59 3 -23:59:59 2004-02-29 23:59:59 4 -10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 54 OR select_id IS NULL) order by id; -CAST(my_datetime AS TIME) my_datetime id -NULL NULL 1 -00:00:00 0001-01-01 00:00:00 2 -23:59:59 9999-12-31 23:59:59 3 -23:59:59 2004-02-29 23:59:59 4 -10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS TIME), -my_double, id FROM t1_values; -SELECT CAST(my_double AS TIME), -my_double, id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL order by id; -CAST(my_double AS TIME) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -00:00:00 0 4 --00:00:01 -1 5 -00:17:58 1758 25 -Warnings: -Warning 1292 Truncated incorrect time value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect time value: '1.7976931348623e308' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 53 OR select_id IS NULL) order by id; -CAST(my_double AS TIME) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -00:00:00 0 4 --00:00:01 -1 5 -00:17:58 1758 25 -Warnings: -Warning 1292 Truncated incorrect time value: '-1.7976931348623e308' -Warning 1292 Truncated incorrect time value: '1.7976931348623e308' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS TIME), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS TIME), -my_bigint, id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL order by id; -CAST(my_bigint AS TIME) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -00:00:00 0 4 --00:00:01 -1 5 -00:17:58 1758 24 -Warnings: -Warning 1292 Truncated incorrect time value: '-9223372036854775808' -Warning 1292 Truncated incorrect time value: '9223372036854775807' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 52 OR select_id IS NULL) order by id; -CAST(my_bigint AS TIME) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -00:00:00 0 4 --00:00:01 -1 5 -00:17:58 1758 24 -Warnings: -Warning 1292 Truncated incorrect time value: '-9223372036854775808' -Warning 1292 Truncated incorrect time value: '9223372036854775807' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS TIME), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS TIME), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 23 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 51 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 23 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS TIME), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS TIME), -my_binary_30, id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL order by id; -CAST(my_binary_30 AS TIME) my_binary_30 id -NULL NULL 1 -00:00:00 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 -NULL -1 5 -41:58:00 1 17:58 22 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect time value: '-1' -Warning 1292 Truncated incorrect time value: '1 17:58' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 50 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS TIME) my_binary_30 id -NULL NULL 1 -00:00:00 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 -NULL -1 5 -41:58:00 1 17:58 22 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -Warning 1292 Truncated incorrect time value: '-1' -Warning 1292 Truncated incorrect time value: '1 17:58' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS TIME), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS TIME), -my_varchar_1000, id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS TIME) my_varchar_1000 id -NULL NULL 1 -NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 21 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 49 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS TIME) my_varchar_1000 id -NULL NULL 1 -NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 21 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$-- ' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS TIME), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS TIME), -my_char_30, id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL order by id; -CAST(my_char_30 AS TIME) my_char_30 id -NULL NULL 1 -NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 20 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$--' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 48 OR select_id IS NULL) order by id; -CAST(my_char_30 AS TIME) my_char_30 id -NULL NULL 1 -NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 --00:00:01 -1 5 -41:58:00 1 17:58 20 -Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---äÖüß@µ*$--' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS DATETIME), -my_year, id FROM t1_values; -SELECT CAST(my_year AS DATETIME), -my_year, id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL order by id; -CAST(my_year AS DATETIME) my_year id -NULL NULL 1 -NULL 1901 2 -NULL 2155 3 -NULL 2000 4 -NULL 2005 5 -Warnings: -Warning 1292 Incorrect datetime value: '1901' -Warning 1292 Incorrect datetime value: '2155' -Warning 1292 Incorrect datetime value: '2000' -Warning 1292 Incorrect datetime value: '2005' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 47 OR select_id IS NULL) order by id; -CAST(my_year AS DATETIME) my_year id -NULL NULL 1 -NULL 1901 2 -NULL 2155 3 -NULL 2000 4 -NULL 2005 5 -Warnings: -Warning 1292 Incorrect datetime value: '1901' -Warning 1292 Incorrect datetime value: '2155' -Warning 1292 Incorrect datetime value: '2000' -Warning 1292 Incorrect datetime value: '2005' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS DATETIME), -my_time, id FROM t1_values; -SELECT CAST(my_time AS DATETIME), -my_time, id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL order by id; -CAST(my_time AS DATETIME) my_time id -NULL NULL 1 -0000-00-00 00:00:00 -838:59:59 2 -0000-00-00 00:00:00 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 46 OR select_id IS NULL) order by id; -CAST(my_time AS DATETIME) my_time id -NULL NULL 1 -0000-00-00 00:00:00 -838:59:59 2 -0000-00-00 00:00:00 838:59:59 3 -0000-00-00 13:00:00 13:00:00 4 -0000-00-00 10:00:00 10:00:00 5 -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATETIME), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS DATETIME), -my_timestamp, id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL order by id; -CAST(my_timestamp AS DATETIME) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 45 OR select_id IS NULL) order by id; -CAST(my_timestamp AS DATETIME) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS DATETIME), -my_date, id FROM t1_values; -SELECT CAST(my_date AS DATETIME), -my_date, id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL order by id; -CAST(my_date AS DATETIME) my_date id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 2 -9999-12-31 00:00:00 9999-12-31 3 -2004-02-29 00:00:00 2004-02-29 4 -2005-06-28 00:00:00 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 44 OR select_id IS NULL) order by id; -CAST(my_date AS DATETIME) my_date id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 2 -9999-12-31 00:00:00 9999-12-31 3 -2004-02-29 00:00:00 2004-02-29 4 -2005-06-28 00:00:00 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATETIME), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS DATETIME), -my_datetime, id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL order by id; -CAST(my_datetime AS DATETIME) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 43 OR select_id IS NULL) order by id; -CAST(my_datetime AS DATETIME) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS DATETIME), -my_double, id FROM t1_values; -SELECT CAST(my_double AS DATETIME), -my_double, id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL order by id; -CAST(my_double AS DATETIME) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -NULL 0 4 -NULL -1 5 -NULL 200506271758 19 -Warnings: -Warning 1292 Incorrect datetime value: '-1.7976931348623e308' -Warning 1292 Incorrect datetime value: '1.7976931348623e308' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Incorrect datetime value: '200506271758' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 42 OR select_id IS NULL) order by id; -CAST(my_double AS DATETIME) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -NULL 0 4 -NULL -1 5 -NULL 200506271758 19 -Warnings: -Warning 1292 Incorrect datetime value: '-1.7976931348623e308' -Warning 1292 Incorrect datetime value: '1.7976931348623e308' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Incorrect datetime value: '200506271758' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATETIME), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS DATETIME), -my_bigint, id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL order by id; -CAST(my_bigint AS DATETIME) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -NULL 0 4 -NULL -1 5 -NULL 200506271758 18 -Warnings: -Warning 1292 Incorrect datetime value: '-9223372036854775808' -Warning 1292 Incorrect datetime value: '9223372036854775807' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Incorrect datetime value: '200506271758' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 41 OR select_id IS NULL) order by id; -CAST(my_bigint AS DATETIME) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -NULL 0 4 -NULL -1 5 -NULL 200506271758 18 -Warnings: -Warning 1292 Incorrect datetime value: '-9223372036854775808' -Warning 1292 Incorrect datetime value: '9223372036854775807' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Incorrect datetime value: '200506271758' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATETIME), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS DATETIME), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 17 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 40 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS DATETIME) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 17 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATETIME), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS DATETIME), -my_binary_30, id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL order by id; -CAST(my_binary_30 AS DATETIME) my_binary_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 16 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 39 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS DATETIME) my_binary_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 16 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Truncated incorrect datetime value: '2005-06-27 17:58' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATETIME), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS DATETIME), -my_varchar_1000, id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 15 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 38 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS DATETIME) my_varchar_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 15 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATETIME), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS DATETIME), -my_char_30, id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL order by id; -CAST(my_char_30 AS DATETIME) my_char_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 14 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 37 OR select_id IS NULL) order by id; -CAST(my_char_30 AS DATETIME) my_char_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 17:58:00 2005-06-27 17:58 14 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS DATE), -my_year, id FROM t1_values; -SELECT CAST(my_year AS DATE), -my_year, id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL order by id; -CAST(my_year AS DATE) my_year id -NULL NULL 1 -NULL 1901 2 -NULL 2155 3 -NULL 2000 4 -NULL 2005 5 -Warnings: -Warning 1292 Incorrect datetime value: '1901' -Warning 1292 Incorrect datetime value: '2155' -Warning 1292 Incorrect datetime value: '2000' -Warning 1292 Incorrect datetime value: '2005' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 36 OR select_id IS NULL) order by id; -CAST(my_year AS DATE) my_year id -NULL NULL 1 -NULL 1901 2 -NULL 2155 3 -NULL 2000 4 -NULL 2005 5 -Warnings: -Warning 1292 Incorrect datetime value: '1901' -Warning 1292 Incorrect datetime value: '2155' -Warning 1292 Incorrect datetime value: '2000' -Warning 1292 Incorrect datetime value: '2005' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS DATE), -my_time, id FROM t1_values; -SELECT CAST(my_time AS DATE), -my_time, id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL order by id; -CAST(my_time AS DATE) my_time id -NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 35 OR select_id IS NULL) order by id; -CAST(my_time AS DATE) my_time id -NULL NULL 1 -0000-00-00 -838:59:59 2 -0000-00-00 838:59:59 3 -0000-00-00 13:00:00 4 -0000-00-00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATE), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS DATE), -my_timestamp, id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL order by id; -CAST(my_timestamp AS DATE) my_timestamp id -0000-00-00 0000-00-00 00:00:00 1 -1970-01-01 1970-01-01 03:00:01 2 -2038-01-01 2038-01-01 02:59:59 3 -2004-02-29 2004-02-29 23:59:59 4 -2005-06-28 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 34 OR select_id IS NULL) order by id; -CAST(my_timestamp AS DATE) my_timestamp id -0000-00-00 0000-00-00 00:00:00 1 -1970-01-01 1970-01-01 03:00:01 2 -2038-01-01 2038-01-01 02:59:59 3 -2004-02-29 2004-02-29 23:59:59 4 -2005-06-28 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS DATE), -my_date, id FROM t1_values; -SELECT CAST(my_date AS DATE), -my_date, id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL order by id; -CAST(my_date AS DATE) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 33 OR select_id IS NULL) order by id; -CAST(my_date AS DATE) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATE), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS DATE), -my_datetime, id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL order by id; -CAST(my_datetime AS DATE) my_datetime id -NULL NULL 1 -0001-01-01 0001-01-01 00:00:00 2 -9999-12-31 9999-12-31 23:59:59 3 -2004-02-29 2004-02-29 23:59:59 4 -2005-06-28 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 32 OR select_id IS NULL) order by id; -CAST(my_datetime AS DATE) my_datetime id -NULL NULL 1 -0001-01-01 0001-01-01 00:00:00 2 -9999-12-31 9999-12-31 23:59:59 3 -2004-02-29 2004-02-29 23:59:59 4 -2005-06-28 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS DATE), -my_double, id FROM t1_values; -SELECT CAST(my_double AS DATE), -my_double, id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL order by id; -CAST(my_double AS DATE) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -NULL 0 4 -NULL -1 5 -2005-06-27 20050627 13 -Warnings: -Warning 1292 Incorrect datetime value: '-1.7976931348623e308' -Warning 1292 Incorrect datetime value: '1.7976931348623e308' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 31 OR select_id IS NULL) order by id; -CAST(my_double AS DATE) my_double id -NULL NULL 1 -NULL -1.7976931348623e308 2 -NULL 1.7976931348623e308 3 -NULL 0 4 -NULL -1 5 -2005-06-27 20050627 13 -Warnings: -Warning 1292 Incorrect datetime value: '-1.7976931348623e308' -Warning 1292 Incorrect datetime value: '1.7976931348623e308' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATE), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS DATE), -my_bigint, id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL order by id; -CAST(my_bigint AS DATE) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -NULL 0 4 -NULL -1 5 -2005-06-27 20050627 12 -Warnings: -Warning 1292 Incorrect datetime value: '-9223372036854775808' -Warning 1292 Incorrect datetime value: '9223372036854775807' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 30 OR select_id IS NULL) order by id; -CAST(my_bigint AS DATE) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -NULL 9223372036854775807 3 -NULL 0 4 -NULL -1 5 -2005-06-27 20050627 12 -Warnings: -Warning 1292 Incorrect datetime value: '-9223372036854775808' -Warning 1292 Incorrect datetime value: '9223372036854775807' -Warning 1292 Incorrect datetime value: '0' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATE), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS DATE), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 11 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 29 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS DATE) my_varbinary_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 11 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATE), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS DATE), -my_binary_30, id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL order by id; -CAST(my_binary_30 AS DATE) my_binary_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 10 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Truncated incorrect date value: '2005-06-27' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 28 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS DATE) my_binary_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 10 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -Warning 1292 Truncated incorrect date value: '2005-06-27' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATE), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS DATE), -my_varchar_1000, id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS DATE) my_varchar_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 9 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 27 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS DATE) my_varchar_1000 id -NULL NULL 1 -NULL 2 -NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 9 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$-- ' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATE), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS DATE), -my_char_30, id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL order by id; -CAST(my_char_30 AS DATE) my_char_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 8 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Incorrect datetime value: '-1' -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 26 OR select_id IS NULL) order by id; -CAST(my_char_30 AS DATE) my_char_30 id -NULL NULL 1 -NULL 2 -NULL <--------30 characters-------> 3 -NULL ---äÖüß@µ*$-- 4 -NULL -1 5 -2005-06-27 2005-06-27 8 -Warnings: -Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<--------30 characters------->' -Warning 1292 Incorrect datetime value: ' ---äÖüß@µ*$--' -Warning 1292 Incorrect datetime value: '-1' -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS CHAR), -my_year, id FROM t1_values; -SELECT CAST(my_year AS CHAR), -my_year, id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL order by id; -CAST(my_year AS CHAR) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 25 OR select_id IS NULL) order by id; -CAST(my_year AS CHAR) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS CHAR), -my_time, id FROM t1_values; -SELECT CAST(my_time AS CHAR), -my_time, id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL order by id; -CAST(my_time AS CHAR) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 24 OR select_id IS NULL) order by id; -CAST(my_time AS CHAR) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS CHAR), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS CHAR), -my_timestamp, id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL order by id; -CAST(my_timestamp AS CHAR) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 23 OR select_id IS NULL) order by id; -CAST(my_timestamp AS CHAR) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS CHAR), -my_date, id FROM t1_values; -SELECT CAST(my_date AS CHAR), -my_date, id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL order by id; -CAST(my_date AS CHAR) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 22 OR select_id IS NULL) order by id; -CAST(my_date AS CHAR) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS CHAR), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS CHAR), -my_datetime, id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL order by id; -CAST(my_datetime AS CHAR) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 21 OR select_id IS NULL) order by id; -CAST(my_datetime AS CHAR) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS CHAR), -my_double, id FROM t1_values; -SELECT CAST(my_double AS CHAR), -my_double, id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL order by id; -CAST(my_double AS CHAR) my_double id -NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 20 OR select_id IS NULL) order by id; -CAST(my_double AS CHAR) my_double id -NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS CHAR), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS CHAR), -my_decimal, id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL order by id; -CAST(my_decimal AS CHAR) my_decimal id -NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 19 OR select_id IS NULL) order by id; -CAST(my_decimal AS CHAR) my_decimal id -NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS CHAR), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS CHAR), -my_bigint, id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL order by id; -CAST(my_bigint AS CHAR) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 18 OR select_id IS NULL) order by id; -CAST(my_bigint AS CHAR) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS CHAR), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS CHAR), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 17 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS CHAR) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS CHAR), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS CHAR), -my_binary_30, id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL order by id; -CAST(my_binary_30 AS CHAR) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 16 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS CHAR) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS CHAR), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS CHAR), -my_varchar_1000, id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 15 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS CHAR) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS CHAR), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS CHAR), -my_char_30, id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL order by id; -CAST(my_char_30 AS CHAR) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 14 OR select_id IS NULL) order by id; -CAST(my_char_30 AS CHAR) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_year AS BINARY), -my_year, id FROM t1_values; -SELECT CAST(my_year AS BINARY), -my_year, id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL order by id; -CAST(my_year AS BINARY) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 13 OR select_id IS NULL) order by id; -CAST(my_year AS BINARY) my_year id -NULL NULL 1 -1901 1901 2 -2155 2155 3 -2000 2000 4 -2005 2005 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_time AS BINARY), -my_time, id FROM t1_values; -SELECT CAST(my_time AS BINARY), -my_time, id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL order by id; -CAST(my_time AS BINARY) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 12 OR select_id IS NULL) order by id; -CAST(my_time AS BINARY) my_time id -NULL NULL 1 --838:59:59 -838:59:59 2 -838:59:59 838:59:59 3 -13:00:00 13:00:00 4 -10:00:00 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_timestamp AS BINARY), -my_timestamp, id FROM t1_values; -SELECT CAST(my_timestamp AS BINARY), -my_timestamp, id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL order by id; -CAST(my_timestamp AS BINARY) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 11 OR select_id IS NULL) order by id; -CAST(my_timestamp AS BINARY) my_timestamp id -0000-00-00 00:00:00 0000-00-00 00:00:00 1 -1970-01-01 03:00:01 1970-01-01 03:00:01 2 -2038-01-01 02:59:59 2038-01-01 02:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_date AS BINARY), -my_date, id FROM t1_values; -SELECT CAST(my_date AS BINARY), -my_date, id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL order by id; -CAST(my_date AS BINARY) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 10 OR select_id IS NULL) order by id; -CAST(my_date AS BINARY) my_date id -NULL NULL 1 -0001-01-01 0001-01-01 2 -9999-12-31 9999-12-31 3 -2004-02-29 2004-02-29 4 -2005-06-28 2005-06-28 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_datetime AS BINARY), -my_datetime, id FROM t1_values; -SELECT CAST(my_datetime AS BINARY), -my_datetime, id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL order by id; -CAST(my_datetime AS BINARY) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 9 OR select_id IS NULL) order by id; -CAST(my_datetime AS BINARY) my_datetime id -NULL NULL 1 -0001-01-01 00:00:00 0001-01-01 00:00:00 2 -9999-12-31 23:59:59 9999-12-31 23:59:59 3 -2004-02-29 23:59:59 2004-02-29 23:59:59 4 -2005-06-28 10:00:00 2005-06-28 10:00:00 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_double AS BINARY), -my_double, id FROM t1_values; -SELECT CAST(my_double AS BINARY), -my_double, id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL order by id; -CAST(my_double AS BINARY) my_double id -NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 8 OR select_id IS NULL) order by id; -CAST(my_double AS BINARY) my_double id -NULL NULL 1 --1.7976931348623e308 -1.7976931348623e308 2 -1.7976931348623e308 1.7976931348623e308 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_decimal AS BINARY), -my_decimal, id FROM t1_values; -SELECT CAST(my_decimal AS BINARY), -my_decimal, id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL order by id; -CAST(my_decimal AS BINARY) my_decimal id -NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 7 OR select_id IS NULL) order by id; -CAST(my_decimal AS BINARY) my_decimal id -NULL NULL 1 --9999999999999999999999999999999999.999999999999999999999999999999 -9999999999999999999999999999999999.999999999999999999999999999999 2 -9999999999999999999999999999999999.999999999999999999999999999999 9999999999999999999999999999999999.999999999999999999999999999999 3 -0.000000000000000000000000000000 0.000000000000000000000000000000 4 --1.000000000000000000000000000000 -1.000000000000000000000000000000 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_bigint AS BINARY), -my_bigint, id FROM t1_values; -SELECT CAST(my_bigint AS BINARY), -my_bigint, id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL order by id; -CAST(my_bigint AS BINARY) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 6 OR select_id IS NULL) order by id; -CAST(my_bigint AS BINARY) my_bigint id -NULL NULL 1 --9223372036854775808 -9223372036854775808 2 -9223372036854775807 9223372036854775807 3 -0 0 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS BINARY), -my_varbinary_1000, id FROM t1_values; -SELECT CAST(my_varbinary_1000 AS BINARY), -my_varbinary_1000, id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL order by id; -CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 5 OR select_id IS NULL) order by id; -CAST(my_varbinary_1000 AS BINARY) my_varbinary_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS BINARY), -my_binary_30, id FROM t1_values; -SELECT CAST(my_binary_30 AS BINARY), -my_binary_30, id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL order by id; -CAST(my_binary_30 AS BINARY) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 4 OR select_id IS NULL) order by id; -CAST(my_binary_30 AS BINARY) my_binary_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS BINARY), -my_varchar_1000, id FROM t1_values; -SELECT CAST(my_varchar_1000 AS BINARY), -my_varchar_1000, id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL order by id; -CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 3 OR select_id IS NULL) order by id; -CAST(my_varchar_1000 AS BINARY) my_varchar_1000 id -NULL NULL 1 - 2 -<---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT CAST(my_char_30 AS BINARY), -my_char_30, id FROM t1_values; -SELECT CAST(my_char_30 AS BINARY), -my_char_30, id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL order by id; -CAST(my_char_30 AS BINARY) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 2 OR select_id IS NULL) order by id; -CAST(my_char_30 AS BINARY) my_char_30 id -NULL NULL 1 - 2 -<--------30 characters-------> <--------30 characters-------> 3 - ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 --1 -1 5 -DROP VIEW v1; - - -CREATE VIEW v1 AS SELECT sqrt(my_bigint), my_bigint, id FROM t1_values; -SELECT sqrt(my_bigint), my_bigint, id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL order by id; -sqrt(my_bigint) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -3037000499.97605 9223372036854775807 3 -0 0 4 -NULL -1 5 -2 4 6 -NULL -25 7 -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci -SELECT v1.* FROM v1 -WHERE v1.id IN (SELECT id FROM t1_values -WHERE select_id = 1 OR select_id IS NULL) order by id; -sqrt(my_bigint) my_bigint id -NULL NULL 1 -NULL -9223372036854775808 2 -3037000499.97605 9223372036854775807 3 -0 0 4 -NULL -1 5 -2 4 6 -NULL -25 7 -DROP VIEW v1; - - -DROP TABLE t1_selects, t1_modes, t1_values; diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result deleted file mode 100644 index 3e2d084aa0c..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result +++ /dev/null @@ -1,1398 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.2 - Syntax checks for the stored procedure-specific -programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: --------------------------------------------------------------------------------- - -Testcase 3.1.2.8: ------------------ - -Ensure that the scope of each BEGIN/END compound statement within a stored -procedure definition is properly applied --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -begin_label: BEGIN -declare x char DEFAULT 'x'; -declare y char DEFAULT 'y'; -set x = '1'; -set y = '2'; -label1: BEGIN -declare x char DEFAULT 'X'; -declare y char DEFAULT 'Y'; -SELECT f1, f2 into x, y from t2 limit 1; -SELECT '1.1', x, y; -label2: BEGIN -declare x char default 'a'; -declare y char default 'b'; -label3: BEGIN -declare x char default 'c'; -declare y char default 'd'; -label4: BEGIN -declare x char default 'e'; -declare y char default 'f'; -label5: BEGIN -declare x char default 'g'; -declare y char default 'h'; -SELECT 5, x, y; -END label5; -SELECT 4, x, y; -END label4; -SELECT 3, x, y; -END label3; -SELECT 2, x, y; -END label2; -END label1; -set @v1 = x; -set @v2 = y; -SELECT '1.2', @v1, @v2; -END begin_label// -CALL sp1(); -1.1 x y -1.1 a a -5 x y -5 g h -4 x y -4 e f -3 x y -3 c d -2 x y -2 a b -1.2 @v1 @v2 -1.2 1 2 -Warnings: -Warning 1265 Data truncated for column 'x' at row 1 -Warning 1265 Data truncated for column 'y' at row 1 -DROP PROCEDURE IF EXISTS sp1; - -Testcase 3.1.2.26: ------------------- - -Ensure that the initial value of every variable declared for a stored procedure -is either NULL or its DEFAULT value, as appropriate. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -set @v1=0; -set @v2=0; -CREATE PROCEDURE sp1( ) -BEGIN -declare x1 char default 'x'; -declare y1 char; -declare x2 tinytext default 'tinytext'; -declare y2 tinytext; -declare x3 datetime default '2005-10-03 12:13:14'; -declare y3 datetime; -declare x4 float default 1.2; -declare y4 float; -declare x5 blob default 'b'; -declare y5 blob; -declare x6 smallint default 127; -declare y6 smallint; -SELECT x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6; -END// -CALL sp1(); -x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6 -x tinytext 2005-10-03 12:13:14 1.2 b 127 NULL NULL NULL NULL NULL NULL -DROP PROCEDURE sp1; - -Testcase 3.1.2.30: ------------------- - -Ensure that, when a stored procedure is called/executed, every variable always -uses the correct value: either the value with which it is initialized or the -value to which it is subsequently SET or otherwise assigned, as appropriate. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( IN invar INT, OUT outvar INT ) -BEGIN -declare x integer; -declare y integer default 1; -set @x = x; -set @y = y; -set @z = 234; -SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1; -SELECT @x, @y, @z, invar; -BEGIN -set @x = 2; -SELECT @x, @y, @z; -SET outvar = @x * invar + @z * @f; -SET invar = outvar; -BEGIN -set @y = null, @z = 'abcd'; -SELECT @x, @y, @z; -END; -END; -END// -SET @invar = 100; -SET @outvar = @invar; -SET @f = 10; -SELECT @x, @y, @z, @invar, @outvar; -@x @y @z @invar @outvar -NULL NULL NULL 100 100 -CALL sp1( @invar, @outvar ); -@x @y @z invar -a` a` 234 100 -@x @y @z -2 a` 234 -@x @y @z -2 NULL abcd -SELECT @x, @y, @z, @invar, @outvar; -@x @y @z @invar @outvar -2 NULL abcd 100 2540 -DROP PROCEDURE sp1; - -Testcase 3.1.2.31: ------------------- - -Ensure that the SELECT ... INTO statement properly assigns values to the -variables in its variable list. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN -declare x integer; declare y integer; -set @x=x; -set @y=y; -SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1; -SELECT @x, @y; -END// -CALL sp1(); -@x @y --5000 1000-01-01 -DROP PROCEDURE sp1; - -Testcase 3.1.2.32: ------------------- - -Ensure that a SELECT ... INTO statement that retrieves multiple rows is -rejected, with an appropriate error message. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN -declare x integer; declare y integer; -set @x=x; -set @y=y; -SELECT f4, f3 into @x, @y from t2; -END// -CALL sp1(); -ERROR 42000: Result consisted of more than one row -DROP PROCEDURE sp1; - -Testcase 3.1.2.33: ------------------- - -Ensure that a SELECT ... INTO statement that retrieves too many columns for the -number of variables in its variable list is rejected, with an appropriate error -message. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN -declare x integer; declare y integer; -set @x=x; -set @y=y; -SELECT f4, f3, f2, f1 into @x, @y from t2; -END// -CALL sp1(); -ERROR 21000: The used SELECT statements have a different number of columns -DROP PROCEDURE sp1; - -Testcase 3.1.2.34: ------------------- - -Ensure that a SELECT ... INTO statement that retrieves too few columns for the -number of variables in its variable list is rejected, with an appropriate error -message. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN -declare x integer; declare y integer; declare z integer; -set @x=x; -set @y=y; -set @z=z; -SELECT f4 into @x, @y, @z from t2; -END// -CALL sp1(); -ERROR 21000: The used SELECT statements have a different number of columns -DROP PROCEDURE sp1; - -Testcase 3.1.2.38: ------------------- - -Ensure that the scope of every condition declared is properly applied. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS h1; -DROP TABLE IF EXISTS res_t1; -create table res_t1(w char unique, x char); -insert into res_t1 values('a', 'b'); -CREATE PROCEDURE h1 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -SELECT '-1-', x1, x2, x3, x4, x5, x6; -BEGIN -declare condname condition for sqlstate '23000'; -declare continue handler for condname set x5 = 1; -set x6 = 0; -insert into res_t1 values ('a', 'b'); -set x6 = 1; -SELECT '-2-', x1, x2, x3, x4, x5, x6; -END; -begin1_label: BEGIN -BEGIN -declare condname condition for sqlstate '20000'; -declare continue handler for condname set x1 = 1; -set x2 = 0; -case x2 -when 1 then set x2=10; -when 2 then set x2=11; -END case; -set x2 = 1; -SELECT '-3-', x1, x2, x3, x4, x5, x6; -begin2_label: BEGIN -BEGIN -declare condname condition for sqlstate '23000'; -declare exit handler for condname set x3 = 1; -set x4= 1; -SELECT '-4a', x1, x2, x3, x4, x5, x6; -insert into res_t1 values ('a', 'b'); -set x4= 2; -SELECT '-4b', x1, x2, x3, x4, x5, x6; -END; -SELECT '-5-', x1, x2, x3, x4, x5, x6; -END begin2_label; -SELECT '-6-', x1, x2, x3, x4, x5, x6; -END; -SELECT '-7-', x1, x2, x3, x4, x5, x6; -END begin1_label; -SELECT 'END', x1, x2, x3, x4, x5, x6; -END// -CALL h1(); --1- x1 x2 x3 x4 x5 x6 --1- 0 0 0 0 0 0 --2- x1 x2 x3 x4 x5 x6 --2- 0 0 0 0 1 1 --3- x1 x2 x3 x4 x5 x6 --3- 1 1 0 0 1 1 --4a x1 x2 x3 x4 x5 x6 --4a 1 1 0 1 1 1 --5- x1 x2 x3 x4 x5 x6 --5- 1 1 1 1 1 1 --6- x1 x2 x3 x4 x5 x6 --6- 1 1 1 1 1 1 --7- x1 x2 x3 x4 x5 x6 --7- 1 1 1 1 1 1 -END x1 x2 x3 x4 x5 x6 -END 1 1 1 1 1 1 -DROP TABLE IF EXISTS tnull; -DROP PROCEDURE IF EXISTS sp1; -CREATE TABLE tnull(f1 int); -CREATE PROCEDURE sp1() -BEGIN -declare cond1 condition for sqlstate '42S02'; -declare continue handler for cond1 set @var2 = 1; -BEGIN -declare cond1 condition for sqlstate '23000'; -declare continue handler for cond1 set @var2 = 1; -END; -insert into tnull values(1); -END// -CALL sp1(); -DROP PROCEDURE h1; -drop table res_t1; -DROP PROCEDURE sp1; -DROP TABLE tnull; - -Testcase 3.1.2.43: ------------------- - -Ensure that the DECLARE ... HANDLER FOR statement can not declare any handler -for a condition declared outside of the scope of the handler. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS h1; -DROP PROCEDURE IF EXISTS h2; -drop table IF EXISTS res_t1; -create table res_t1(w char unique, x char); -insert into res_t1 values ('a', 'b'); -CREATE PROCEDURE h1 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -BEGIN -declare cond_1 condition for sqlstate '23000'; -declare continue handler for cond_1 set x5 = 1; -BEGIN -declare cond_2 condition for sqlstate '20000'; -declare continue handler for cond_1 set x1 = 1; -BEGIN -declare continue handler for cond_2 set x3 = 1; -set x2 = 1; -END; -set x6 = 0; -END; -BEGIN -declare continue handler for cond_1 set x1 = 1; -BEGIN -declare continue handler for cond_2 set x3 = 1; -set x2 = 1; -END; -set x6 = 0; -END; -END; -SELECT x1, x2, x3, x4, x5, x6; -END// -ERROR 42000: Undefined CONDITION: cond_2 -CREATE PROCEDURE h2 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -BEGIN -declare condname condition for sqlstate '23000'; -declare continue handler for condname set x5 = 1; -BEGIN -declare condname condition for sqlstate '20000'; -declare continue handler for condname set x1 = 1; -BEGIN -declare condname condition for sqlstate '42000'; -declare continue handler for condname set x3 = 1; -set x6 = 0; -insert into res_t1 values ('a', 'b'); -set x6 = 1; -set x4= 0; -CALL sp1(); -set x4= 1; -set x2 = 0; -case x2 -when 1 then set x2=10; -when 2 then set x2=11; -END case; -set x2 = 1; -END; -set x2 = 0; -case x2 -when 1 then set x2=10; -when 2 then set x2=11; -END case; -set x2 = 1; -set x6 = 0; -insert into res_t1 values ('a', 'b'); -set x6 = 1; -END; -END; -SELECT x1, x2, x3, x4, x5, x6; -END// -CALL h2(); -x1 x2 x3 x4 x5 x6 -1 1 1 1 1 1 -SELECT * FROM res_t1; -w x -a b -DROP PROCEDURE h2; -drop table res_t1; - -Testcase 3.1.2.44: ------------------- - -Ensure that the DECLARE ... HANDLER FOR statement cannot declare a handler for -any invalid, or undeclared, condition. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS h1; -CREATE PROCEDURE h1 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -BEGIN -declare condname1 condition for sqlstate '23000'; -BEGIN -declare condname2 condition for sqlstate '20000'; -declare continue handler for condname1 set x3 = 1; -declare continue handler for condname2 set x1 = 1; -END; -END; -BEGIN -declare condname3 condition for sqlstate '42000'; -declare continue handler for condname1 set x3 = 1; -declare continue handler for condname2 set x5 = 1; -declare continue handler for condname3 set x1 = 1; -END; -END// -ERROR 42000: Undefined CONDITION: condname1 -CREATE PROCEDURE h1 () -BEGIN -DECLARE x1 INT DEFAULT 0; -BEGIN -DECLARE condname1 CONDITION CHECK SQLSTATE '23000'; -END; -DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHECK SQLSTATE '23000'; -END; -DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; -' at line 5 -CREATE PROCEDURE h1 () -BEGIN -DECLARE x1 INT DEFAULT 0; -BEGIN -DECLARE condname1 CONDITION FOR SQLSTATE 'qwert'; -END; -DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; -END// -ERROR 42000: Bad SQLSTATE: 'qwert' - -Testcase 3.1.2.45 + 3.1.2.50: ------------------------------ - -45. Ensure that the scope of every handler declared is properly applied. -50. Ensure that a CONTINUE handler allows the execution of the stored procedure -. to continue once the handler statement has completed its own execution (that -. is, once the handler action statement has been executed). --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p1undo; -DROP PROCEDURE IF EXISTS h1; -DROP PROCEDURE IF EXISTS sp1; -drop table IF EXISTS res_t1; -==> 'UNDO' is still not supported. -create procedure p1undo () -begin -declare undo handler for sqlexception select '1'; -select * from tqq; -SELECT 'end of 1'; -end;// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'undo handler for sqlexception select '1'; -select * from tqq; -SELECT 'end of 1'; -' at line 3 -create procedure p1 () -begin -declare exit handler for sqlexception select 'exit handler 1'; -begin -declare exit handler for sqlexception select 'exit handler 2'; -begin -declare continue handler for sqlexception select 'continue handler 3'; -drop table if exists tqq; -select * from tqq; -SELECT 'end of BEGIN/END 3'; -end; -drop table if exists tqq; -select * from tqq; -SELECT 'end of BEGIN/END 2'; -end; -select * from tqq; -SELECT 'end of BEGIN/END 1'; -end;// -call p1()// -continue handler 3 -continue handler 3 -end of BEGIN/END 3 -end of BEGIN/END 3 -exit handler 2 -exit handler 2 -exit handler 1 -exit handler 1 -create table res_t1(w char unique, x char); -insert into res_t1 values ('a', 'b'); -CREATE PROCEDURE h1 () -BEGIN -declare x1, x2, x3, x4, x5, x6 int default 0; -BEGIN -declare continue handler for sqlstate '23000' set x5 = 1; -insert into res_t1 values ('a', 'b'); -set x6 = 1; -END; -begin1_label: BEGIN -BEGIN -declare continue handler for sqlstate '23000' set x1 = 1; -insert into res_t1 values ('a', 'b'); -set x2 = 1; -begin2_label: BEGIN -BEGIN -declare exit handler for sqlstate '23000' set x3 = 1; -set x4= 1; -insert into res_t1 values ('a', 'b'); -set x4= 0; -END; -END begin2_label; -END; -END begin1_label; -SELECT x1, x2, x3, x4, x5, x6; -END// -CALL h1(); -x1 x2 x3 x4 x5 x6 -1 1 1 1 1 1 -This will fail, SQLSTATE 00000 is not allowed -CREATE PROCEDURE sp1() -begin1_label:BEGIN -declare exit handler for sqlstate '00000' set @var1 = 5; -set @var2 = 6; -begin2_label:BEGIN -declare continue handler for sqlstate '00000' set @var3 = 7; -set @var4 = 8; -SELECT @var3, @var4; -END begin2_label; -SELECT @var1, @var2; -END begin1_label// -ERROR 42000: Bad SQLSTATE: '00000' -Verify SP wasn't created -CALL sp1(); -ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist -DROP PROCEDURE p1; -DROP PROCEDURE h1; -DROP PROCEDURE IF EXISTS sp1; -DROP TABLE res_t1; - -Testcase 3.1.2.50: ------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -CREATE PROCEDURE sp1 (x int, y int) -BEGIN -set @y=0; -END// -CREATE PROCEDURE sp2 () -BEGIN -declare continue handler for sqlstate '42000' set @x2 = 1; -set @x=1; -SELECT @x2; -CALL sp1(1); -set @x=2; -SELECT @x2, @x; -END// -CALL sp2(); -@x2 -NULL -@x2 @x -1 2 -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; - -Testcase 3.2.2.51: ------------------- - -Ensure that an EXIT handler causes the execution of the stored procedure to -terminate, within its scope, once the handler action statement has been -executed. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -CREATE PROCEDURE sp1 (x int, y int) -BEGIN -set @x=0; -END// -CREATE PROCEDURE sp2 () -BEGIN -declare exit handler for sqlstate '42000' set @x2 = 1; -set @x2=0; -set @x=1; -SELECT '-1-', @x2, @x; -CALL sp1(1); -SELECT '-2-', @x2, @x; -set @x=2; -END// -CALL sp1(1); -ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1 -CALL sp2(); --1- @x2 @x --1- 0 1 -SELECT '-3-', @x2, @x; --3- @x2 @x --3- 1 1 -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; - -Testcase 3.1.2.52: ------------------- - -Ensure that an EXIT handler does not cause the execution of the stored procedure -to terminate outside of its scope. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -CREATE PROCEDURE sp1 (x int, y int) -BEGIN -set @x=0; -END// -CREATE PROCEDURE sp2() -BEGIN -declare continue handler for sqlstate '42000' set @x2 = 2; -set @x2 = 1; -set @x =20; -SELECT '-1-', @x2, @x; -BEGIN -declare exit handler for sqlstate '42000' set @x2 = 11; -SELECT '-2-', @x2, @x; -CALL sp1(1); -SELECT '-3a', @x2, @x; -set @x=21; -SELECT '-3b', @x2, @x; -END; -set @x=22; -SELECT '-4-', @x2, @x; -END// -CALL sp2(); --1- @x2 @x --1- 1 20 --2- @x2 @x --2- 1 20 --4- @x2 @x --4- 11 22 -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; - -Testcase 3.1.2.54: ------------------- - -Ensure that a handler with a condition defined with an SQLSTATE that begins with -“01“ is always exactly equivalent in action to a handler with an SQLWARNING -condition. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp0; -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -DROP PROCEDURE IF EXISTS sp3; -DROP PROCEDURE IF EXISTS sp4; -DROP TABLE IF EXISTS temp; -CREATE TABLE temp( f1 CHAR, f2 CHAR); -CREATE PROCEDURE sp0() -BEGIN -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -CREATE PROCEDURE sp1() -BEGIN -declare continue handler for sqlstate '01000' set @done = 1; -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -CREATE PROCEDURE sp2() -BEGIN -declare continue handler for sqlwarning set @done = 1; -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -CREATE PROCEDURE sp3() -BEGIN -declare exit handler for sqlstate '01000' set @done = 1; -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -CREATE PROCEDURE sp4() -BEGIN -declare exit handler for sqlwarning set @done = 1; -set @done=0; -set @x=0; -insert into temp values('xxx', 'yy'); -set @x=1; -END// -INSERT INTO temp VALUES('0', NULL); -CALL sp0(); -Warnings: -Warning 1265 Data truncated for column 'f1' at row 1 -Warning 1265 Data truncated for column 'f2' at row 1 -SELECT @done, @x; -@done @x -0 1 -INSERT INTO temp VALUES('1', NULL); -CALL sp1(); -SELECT @done, @x; -@done @x -1 1 -INSERT INTO temp VALUES('2', NULL); -CALL sp2(); -SELECT @done, @x; -@done @x -1 1 -INSERT INTO temp VALUES('3', NULL); -CALL sp3(); -SELECT @done, @x; -@done @x -1 0 -INSERT INTO temp VALUES('4', NULL); -CALL sp4(); -SELECT @done, @x; -@done @x -1 0 -SELECT * FROM temp; -f1 f2 -0 NULL -x y -1 NULL -x y -2 NULL -x y -3 NULL -x y -4 NULL -x y -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; -DROP PROCEDURE sp3; -DROP PROCEDURE sp4; -DROP TABLE temp; - -Testcase 3.1.2.56: ------------------- - -Ensure that a handler with a condition defined with an SQLSTATE that begins with -“02“ is always exactly equivalent in action to a handler with a NOT FOUND -condition. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp0; -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -DROP PROCEDURE IF EXISTS sp3; -DROP PROCEDURE IF EXISTS sp4; -CREATE PROCEDURE sp0() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CREATE PROCEDURE sp1() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -declare continue handler for sqlstate '02000' set @done = 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CREATE PROCEDURE sp2() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -declare continue handler for not found set @done = 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CREATE PROCEDURE sp3() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -declare exit handler for sqlstate '02000' set @done = 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CREATE PROCEDURE sp4() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -declare exit handler for not found set @done = 1; -SET @done = 0; -SET @x = 0; -OPEN cur1; -FETCH cur1 INTO f1_value; -SET @x = 1; -FETCH cur1 INTO f1_value; -SET @x = 2; -CLOSE cur1; -END// -CALL sp0(); -ERROR 02000: No data - zero rows fetched, selected, or processed -SELECT @done, @x; -@done @x -0 1 -CALL sp1(); -SELECT @done, @x; -@done @x -1 2 -CALL sp2(); -SELECT @done, @x; -@done @x -1 2 -CALL sp3(); -SELECT @done, @x; -@done @x -1 1 -CALL sp4(); -SELECT @done, @x; -@done @x -1 1 -DROP PROCEDURE sp0; -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; -DROP PROCEDURE sp3; -DROP PROCEDURE sp4; - -Testcase 3.1.2.58: ------------------- - -Ensure that a handler with a condition defined with an SQLSTATE that begins with -anything other that “01“ or “02“ is always exactly equivalent in action to a -handler with an SQLEXCEPTION condition. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp0; -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; -DROP PROCEDURE IF EXISTS sp3; -DROP PROCEDURE IF EXISTS sp4; -CREATE PROCEDURE sp0() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -END// -CREATE PROCEDURE sp1() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -DECLARE continue HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE'; -DECLARE continue HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE'; -DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE'; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -END// -CREATE PROCEDURE sp2() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -DECLARE continue HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE'; -DECLARE continue HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE'; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -END// -CREATE PROCEDURE sp3() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -DECLARE EXIT HANDLER FOR SQLSTATE '20000' SELECT '20000' AS 'SQLSTATE'; -DECLARE EXIT HANDLER FOR SQLSTATE '21000' SELECT '21000' AS 'SQLSTATE'; -DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE'; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -END// -CREATE PROCEDURE sp4() -BEGIN -DECLARE f1_value CHAR(20); -DECLARE cv INT DEFAULT 0; -DECLARE cur1 CURSOR FOR SELECT f1 FROM t2 LIMIT 1; -DECLARE EXIT HANDLER FOR SQLEXCEPTION SELECT 'SQLEXCEPTION' AS 'SQLSTATE'; -DECLARE EXIT HANDLER FOR SQLSTATE '24000' SELECT '24000' AS 'SQLSTATE'; -SET @x = 1; -CASE cv -WHEN 2 THEN SET @x = 2; -WHEN 3 THEN SET @x = 3; -END case; -SET @x = 4; -SELECT f1, f2 FROM t2 -UNION -SELECT f1, f2,3 FROM t2; -SET @x = 5; -FETCH cur1 INTO f1_value; -SET @x = 6; -CLOSE cur1; -END// -CALL sp0(); -ERROR 20000: Case not found for CASE statement -SELECT '-0-', @x; --0- @x --0- 1 -CALL sp1(); -SQLSTATE -20000 -SQLSTATE -21000 -SQLSTATE -24000 -SELECT '-1-', @x; --1- @x --1- 6 -CALL sp2(); -SQLSTATE -SQLEXCEPTION -SQLSTATE -SQLEXCEPTION -SQLSTATE -24000 -SELECT '-2-', @x; --2- @x --2- 6 -CALL sp3(); -SQLSTATE -20000 -SELECT '-3-', @x; --3- @x --3- 1 -CALL sp4(); -SQLSTATE -SQLEXCEPTION -SELECT '-4-', @x; --4- @x --4- 1 -DROP PROCEDURE sp0; -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; -DROP PROCEDURE sp3; -DROP PROCEDURE sp4; - -Testcase 3.1.2.65: ------------------- - -Ensure that FETCH returns the first row of the cursor_s result set -the first time FETCH is executed, that it returns each subsequent row of the -cursor_s result set each of the subsequent times FETCH is executed, and that it -returns a NOT FOUND warning if it is executed after the last row of the cursor_s -result set has already been fetched. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP TABLE IF EXISTS temp; -CREATE TABLE temp( -cnt INT, -f1 CHAR(20), -f2 CHAR(20), -f3 INT, -f4 CHAR(20), -f5 INT); -INSERT INTO temp VALUES(0, 'onip', 'abc', 8760, 'xyz', 10); -CREATE PROCEDURE sp1( ) -BEGIN -declare proceed int default 1; -declare count integer default 1; -declare f1_value char(20); -declare f2_value char(20); -declare f5_value char(20); -declare f4_value integer; -declare f6_value integer; -declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 -where f4 >=-5000 order by f4 limit 3; -open cur1; -while proceed do -SELECT count AS 'loop'; -fetch cur1 into f1_value, f2_value, f4_value, f5_value, f6_value; -insert into temp values (count, f1_value, f2_value, f4_value, f5_value, f6_value); -set count = count + 1; -END while; -END// -CALL sp1(); -loop -1 -loop -2 -loop -3 -loop -4 -ERROR 02000: No data - zero rows fetched, selected, or processed -SELECT * FROM temp; -cnt f1 f2 f3 f4 f5 -0 onip abc 8760 xyz 10 -1 a` a` -5000 a` -5000 -2 aaa aaa -4999 aaa -4999 -3 abaa abaa -4998 abaa -4998 -DROP TABLE temp; -DROP PROCEDURE sp1; - -Testcase 3.1.2.68: ------------------- - -Ensure that FETCH fails with an appropriate error message if the -number of columns to be fetched does not match the number of variables specified -by the FETCH statement. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP PROCEDURE IF EXISTS sp2; ---> not enough columns in FETCH statement -CREATE PROCEDURE sp1( ) -BEGIN -declare newf1 char(20); -declare cur1 cursor for SELECT f1, f2 from t2 limit 10; -declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS ''; -BEGIN -open cur1; -fetch cur1 into newf1; -SELECT newf1; -close cur1; -END; -END// ---> too many columns in FETCH statement -CREATE PROCEDURE sp2( ) -BEGIN -declare newf1 char(20); -declare newf2 char(20); -declare cur1 cursor for SELECT f1 from t2 limit 10; -declare continue handler for sqlstate '02000' SELECT 'HANDLER executed.' AS ''; -BEGIN -open cur1; -fetch cur1 into newf1, newf2; -SELECT newf1, newf2; -close cur1; -END; -END// ---> not enough columns in FETCH statement -CALL sp1(); -ERROR HY000: Incorrect number of FETCH variables ---> too many columns in FETCH statement -CALL sp2(); -ERROR HY000: Incorrect number of FETCH variables -DROP PROCEDURE sp1; -DROP PROCEDURE sp2; - -Testcase 3.1.2.75: ------------------- - -Ensure that, for nested compound statements, a cursor that was declared and -opened during an outer level of the statement is not closed when an inner level -of a compound statement ends. --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS temp1; -DROP PROCEDURE IF EXISTS sp1; -create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) ); -SELECT f1, f2, f4, f5 from t2 order by f4; -f1 f2 f4 f5 -a` a` -5000 a` -aaa aaa -4999 aaa -abaa abaa -4998 abaa -acaaa acaaa -4997 acaaa -adaaaa adaaaa -4996 adaaaa -aeaaaaa aeaaaaa -4995 aeaaaaa -afaaaaaa afaaaaaa -4994 afaaaaaa -agaaaaaaa agaaaaaaa -4993 agaaaaaaa -a^aaaaaaaa a^aaaaaaaa -4992 a^aaaaaaaa -a_aaaaaaaaa a_aaaaaaaaa -4991 a_aaaaaaaaa -CREATE PROCEDURE sp1( ) -BEGIN -declare count integer; -declare from0 char(20); -declare newf1 char(20); -declare newf2 char(20); -declare newf5 char(20); -declare newf4 integer; -declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; -declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5; -open cur1; -open cur2; -BEGIN -declare continue handler for sqlstate '02000' set count = 1; -fetch cur1 into newf1, newf2, newf4, newf5; -SELECT '-1-', count, newf1, newf2, newf4, newf5; -insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5); -set count = 4; -BEGIN -while count > 0 do -fetch cur1 into newf1, newf2, newf4, newf5; -SELECT '-2-', count, newf1, newf2, newf4, newf5; -set count = count - 1; -END while; -SELECT '-3-', count, newf1, newf2, newf4, newf4; -END; -BEGIN -fetch cur1 into newf1, newf2, newf4, newf5; -SELECT '-4-', newf1, newf2, newf4, newf5; -insert into temp1 values ('cur1_in', newf1, newf2, newf4, newf5); -END; -fetch cur2 into newf1, newf2, newf4, newf5; -SELECT '-5-', newf1, newf2, newf4, newf5; -insert into temp1 values ('cur2', newf1, newf2, newf4, newf5); -close cur1; -END; -fetch cur2 into newf1, newf2, newf4, newf5; -SELECT '-6-', newf1, newf2, newf4, newf5; -close cur2; -END// -CALL sp1(); --1- count newf1 newf2 newf4 newf5 --1- NULL a` a` -5000 a` --2- count newf1 newf2 newf4 newf5 --2- 4 aaa aaa -4999 aaa --2- count newf1 newf2 newf4 newf5 --2- 3 abaa abaa -4998 abaa --2- count newf1 newf2 newf4 newf5 --2- 2 acaaa acaaa -4997 acaaa --2- count newf1 newf2 newf4 newf5 --2- 1 adaaaa adaaaa -4996 adaaaa --3- count newf1 newf2 newf4 newf4 --3- 0 adaaaa adaaaa -4996 -4996 --4- newf1 newf2 newf4 newf5 --4- adaaaa adaaaa -4996 adaaaa --5- newf1 newf2 newf4 newf5 --5- a` a` -5000 a` --6- newf1 newf2 newf4 newf5 --6- aaa aaa -4999 aaa -SELECT * from temp1; -f0 f1 f2 f3 f4 -cur1_out a` a` -5000 a` -cur1_in adaaaa adaaaa -4996 adaaaa -cur2 a` a` -5000 a` -DROP PROCEDURE sp1; -drop table temp1; - -Testcase 3.1.2.76: ------------------- - -Ensure that all cursors operate asensitively, so that there is no concurrency -conflict between cursors operating on the same, or similar, sets of results -during execution of one or more stored procedures. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -drop table IF EXISTS temp1; -drop table IF EXISTS temp2; -create table temp1( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer ); -create table temp2( f0 char(10), cnt int, f1 char(20), f2 char(20), f3 date, f4 integer ); -CREATE PROCEDURE sp_inner( ) -BEGIN -declare proceed int default 1; -declare i_count integer default 20; -declare i_newf1 char(20); -declare i_newf2 char(20); -declare i_newf3 date; -declare i_newf4 integer; -declare i_newf11 char(20); -declare i_newf12 char(20); -declare i_newf13 date; -declare i_newf14 integer; -declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 -where f4>=-5000 order by f4 limit 4; -declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 -where f4>=-5000 order by f4 limit 3; -declare continue handler for sqlstate '02000' set proceed=0; -open cur1; -open cur2; -set i_count = 10; -while proceed do -fetch cur1 into i_newf1, i_newf2, i_newf3, i_newf4; -IF proceed THEN -insert into temp1 values ('sp_inner', i_count, i_newf1, i_newf2, i_newf3, i_newf4); -fetch cur2 into i_newf11, i_newf12, i_newf13, i_newf14; -IF proceed THEN -insert into temp2 values ('sp_inner', i_count, i_newf11, i_newf12, i_newf13, i_newf14); -END IF; -END IF; -set i_count = i_count - 1; -END while; -close cur1; -close cur2; -END// -CREATE PROCEDURE sp_outer( ) -BEGIN -DECLARE proceed INT DEFAULT 1; -DECLARE o_count INTEGER DEFAULT 20; -DECLARE o_newf1 CHAR(20); -DECLARE o_newf2 CHAR(20); -DECLARE o_newf3 DATE; -DECLARE o_newf4 INTEGER; -DECLARE o_newf11 CHAR(20); -DECLARE o_newf12 CHAR(20); -DECLARE o_newf13 DATE; -DECLARE o_newf14 INTEGER; -DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 -WHERE f4>=-5000 ORDER BY f4 LIMIT 5; -DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 -WHERE f4>=-5000 ORDER BY f4 LIMIT 5; -DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0; -OPEN cur1; -OPEN cur2; -SET o_count = 1; -WHILE proceed DO -FETCH cur1 INTO o_newf1, o_newf2, o_newf3, o_newf4; -IF proceed THEN -INSERT INTO temp1 VALUES ('_sp_out_', o_count, o_newf1, o_newf2, o_newf3, o_newf4); -CALL sp_inner(); -FETCH cur2 INTO o_newf11, o_newf12, o_newf13, o_newf14; -IF proceed THEN -INSERT INTO temp2 VALUES ('_sp_out_', o_count, o_newf11, o_newf12, o_newf13, o_newf14); -END IF; -END IF; -SET o_count = o_count + 1; -END WHILE; -CLOSE cur1; -CLOSE cur2; -END// -CALL sp_outer(); -SELECT * FROM temp1; -f0 cnt f1 f2 f3 f4 -_sp_out_ 1 a` a` 1000-01-01 -5000 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -_sp_out_ 2 aaa aaa 1000-01-02 -4999 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -_sp_out_ 3 abaa abaa 1000-01-03 -4998 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -_sp_out_ 4 acaaa acaaa 1000-01-04 -4997 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -sp_inner 7 acaaa acaaa 1000-01-04 -4997 -SELECT * FROM temp2; -f0 cnt f1 f2 f3 f4 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 1 a` a` 1000-01-01 -5000 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 2 aaa aaa 1000-01-02 -4999 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 3 abaa abaa 1000-01-03 -4998 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 4 acaaa acaaa 1000-01-04 -4997 -sp_inner 10 a` a` 1000-01-01 -5000 -sp_inner 9 aaa aaa 1000-01-02 -4999 -sp_inner 8 abaa abaa 1000-01-03 -4998 -_sp_out_ 5 adaaaa adaaaa 1000-01-05 -4996 -DROP PROCEDURE sp_outer; -DROP PROCEDURE sp_inner; -DROP TABLE temp1; -DROP TABLE temp2; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_03.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_03.result deleted file mode 100644 index fdbe03e17fc..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_03.result +++ /dev/null @@ -1,496 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.3 - Syntax checks for the stored procedure-specific flow -control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE: --------------------------------------------------------------------------------- - -Testcase 3.1.3.7: ------------------ - -Ensure that the IF statement acts correctly for all variants, including cases -where statements are nested. --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742; -DROP PROCEDURE IF EXISTS sp9; -CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT); -CREATE PROCEDURE sp9( action char(20), subaction char(20) ) -BEGIN -if action = 'action' then -if subaction = 'subaction' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction' , 1); -else -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 2); -END if; -else -if subaction = 'subaction' - then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction' , 3); -elseif subaction = 'subaction1' - then -BEGIN -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values ('none', 'subaction1', 4); -END; -else -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 5); -END if; -END if; -END// -CALL sp9( 'action', 'subaction' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=1; -f1 f2 f3 -action subaction 1 -CALL sp9( 'temp', 'subaction' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=3; -f1 f2 f3 -none subaction 3 -CALL sp9( 'temp', 'subaction1' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=4; -f1 f2 f3 -none subaction1 4 -CALL sp9( 'action', 'temp' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=2; -f1 f2 f3 -action none 2 -CALL sp9( 'temp', 'temp' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 where f3=5; -f1 f2 f3 -none none 5 -DROP PROCEDURE sp9; -DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742; - -Testcase 3.1.3.8.: ------------------- - -Ensure that the CASE statement acts correctly for all variants, including cases -where statements are nested. --------------------------------------------------------------------------------- -drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742; -DROP PROCEDURE IF EXISTS sp10; -create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint); -CREATE PROCEDURE sp10( action char(20), subaction char(20) ) -BEGIN -case action -when 'action' then -case -when subaction = 'subaction_1' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 1); -when subaction = 'subaction_2' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'subaction_2' , 2); -else -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'action', 'none' , 3); -END case; -else -case -when subaction = 'subaction_1' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_1' , 4); -when subaction = 'subaction_2' then -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'subaction_2' , 5); -else -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'none', 'none' , 6); -END case; -END case; -END// -CALL sp10( 'action', 'subaction_1' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -action subaction_2 1 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'action', 'subaction_2' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -action subaction_2 2 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'temp', 'subaction_1' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -none subaction_1 4 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'temp', 'subaction_2' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -none subaction_2 5 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'action', 'temp' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -action none 3 -delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; -CALL sp10( 'temp', 'temp' ); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -none none 6 -DROP PROCEDURE sp10; -DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742; - -Testcase 3.1.3.9 + 3.1.3.15: ----------------------------- - -09. Ensure that the LOOP statement acts correctly for all variants, including -. cases where statements are nested. -15. Ensure that the LEAVE statement acts correctly for all variants, including -. cases where statements are nested. --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742; -DROP PROCEDURE IF EXISTS sp11; -CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT); -CREATE PROCEDURE sp11( ) -BEGIN -declare count1 integer default 1; -declare count2 integer default 1; -label1: loop -if count2 > 3 then leave label1; -END if; -set count1 = 1; -label2: loop -if count1 > 4 then leave label2; -END if; -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1); -set count1 = count1 + 1; -iterate label2; -END loop label2; -set count2 = count2 + 1; -iterate label1; -END loop label1; -END// -CALL sp11(); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -xyz pqr 1 -xyz pqr 2 -xyz pqr 3 -xyz pqr 4 -xyz pqr 1 -xyz pqr 2 -xyz pqr 3 -xyz pqr 4 -xyz pqr 1 -xyz pqr 2 -xyz pqr 3 -xyz pqr 4 -DROP PROCEDURE sp11; -DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742; - -Testcase 3.1.3.16: ------------------- - -Ensure that the ITERATE statement acts correctly for all variants, including -cases where statements are nested. -(tests for this testcase are also included in other testcases) --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp31316; -CREATE PROCEDURE sp31316( ) -BEGIN -declare count1 integer default 1; -declare count2 integer default 1; -label1: loop -if count2 > 3 then leave label1; -END if; -set count1 = 1; -label2: loop -if count1 > 4 then leave label2; -END if; -insert into temp values( count1, count2); -set count1 = count1 + 1; -iterate label3; -END loop label2; -set count2 = count2 + 1; -iterate label1; -END loop label1; -END// -ERROR 42000: ITERATE with no matching label: label3 - -Testcase 3.1.3.18: ------------------- - -Ensure that the REPEAT statement acts correctly for all variants, including -cases where statements are nested. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp17; -DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742; -CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 CHAR(20), f2 VARCHAR(20), f3 SMALLINT); -CREATE PROCEDURE sp17( ) -BEGIN -declare count1 integer default 1; -declare count2 integer default 1; -repeat -set count1 = count1 + 1; -set count2 = 1; -label1: repeat -set count2 = count2 + 1; -insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1); -until count2 > 3 -END repeat label1; -until count1 > 3 -END repeat; -END// -CALL sp17(); -SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742; -f1 f2 f3 -xyz pqr 2 -xyz pqr 2 -xyz pqr 2 -xyz pqr 3 -xyz pqr 3 -xyz pqr 3 -xyz pqr 4 -xyz pqr 4 -xyz pqr 4 -DROP PROCEDURE sp17; -DROP TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742; - -Testcase 3.1.3.24: ------------------- - -Ensure that the WHILE statement acts correctly for all variants, including cases -where statements are nested. --------------------------------------------------------------------------------- -drop table IF EXISTS res_t21; -DROP PROCEDURE IF EXISTS sp21; -create table res_t21(name text(10), surname blob(20), age_averylongfieldname_averylongname_1234569 smallint); -insert into res_t21 values('ashwin', 'mokadam', 25); -CREATE PROCEDURE sp21( ) -BEGIN -declare count1 integer default 0; -declare count2 integer default 0; -while count1 < 3 do -BEGIN -declare ithisissamevariablename int default 100; -SELECT ithisissamevariablename; -BEGIN -declare ithisissamevariablename int default 200; -SELECT ithisissamevariablename; -END; -set count2 = 0; -label1: while count2 < 3 do -BEGIN -declare count1 integer default 7; -set count2 = count2 + 1; -insert into res_t21 values( 'xyz' , 'pqr', count2); -label2: while count1 < 10 do -set count1 = count1 + 1; -insert into res_t21 values( 'xyz' , 'pqr', count1); -END while label2; -END; -END while label1; -set count1 = count1 + 1; -END; -END while; -END// -CALL sp21(); -ithisissamevariablename -100 -ithisissamevariablename -200 -ithisissamevariablename -100 -ithisissamevariablename -200 -ithisissamevariablename -100 -ithisissamevariablename -200 -SELECT * from res_t21; -name surname age_averylongfieldname_averylongname_1234569 -ashwin mokadam 25 -xyz pqr 1 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 2 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 3 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 1 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 2 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 3 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 1 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 2 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -xyz pqr 3 -xyz pqr 8 -xyz pqr 9 -xyz pqr 10 -DROP PROCEDURE sp21; -drop table res_t21; - -Testcase 3.1.3.30: ------------------- - -Ensure that multiple cases of all possible combinations of the control flow -statements, nested within multiple compound statements within a stored -procedure, always act correctly and return the expected result. --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS res_tbl; -DROP PROCEDURE IF EXISTS sp31330; -create table res_tbl (f1 int, f2 text, f3 blob, f4 date, -f5 set('one', 'two', 'three', 'four', 'five') default 'one'); -CREATE PROCEDURE sp31330 (path int) -BEGIN -declare count int default 1; -declare var1 text; -declare var2 blob; -declare var3 date; -declare var4 set('one', 'two', 'three', 'four', 'five') DEFAULT 'five'; -case -when path=1 then -set var3 = '2000-11-09'; -set var1 = 'flowing through case 1'; -label1: loop -if count > 5 then -if var4=1000 then -set var2 = 'exiting out of case 1 - invalid SET'; -END if; -if var4='two' then -set var2 = 'exiting out of case 1'; -END if; -insert into res_tbl values (1, var1, var2, var3, (count-2)); -leave label1; -elseif count = 5 then -set count= count + 2; -set var4='two'; -iterate label1; -else -set count= count + 1; -END if; -set var4='one'; -END loop label1; -when path=2 then -set var3 = '1989-11-09'; -set var1 = 'flowing through case 2'; -set @count3=0; -label2: repeat -set count=count + 1; -set @count2=1; -while @count2 <= 5 do -set @count2 = @count2 + 1; -END while; -SELECT @count2; -set @count3=@count3 + @count2; -until count > 5 -END repeat label2; -set var2 = 'exiting out of case 2'; -set var4 = count-3; -SELECT @count3; -insert into res_tbl values (2, var1, var2, var3, var4); -ELSE BEGIN -set @error_opt='undefined path specified'; -SELECT @error_opt; -END; -END case; -END// -CALL sp31330(); -ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp31330; expected 1, got 0 -CALL sp31330(1); -SELECT * from res_tbl; -f1 f2 f3 f4 f5 -1 flowing through case 1 exiting out of case 1 2000-11-09 one,three -CALL sp31330(2); -@count2 -6 -@count2 -6 -@count2 -6 -@count2 -6 -@count2 -6 -@count3 -30 -SELECT * from res_tbl; -f1 f2 f3 f4 f5 -1 flowing through case 1 exiting out of case 1 2000-11-09 one,three -2 flowing through case 2 exiting out of case 2 1989-11-09 one,two -CALL sp31330(4); -@error_opt -undefined path specified -DROP PROCEDURE sp31330; -drop table res_tbl; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result deleted file mode 100644 index ee1548fe012..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_06.result +++ /dev/null @@ -1,395 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.6 - Privilege Checks: --------------------------------------------------------------------------------- -USE db_storedproc_1; - -root@localhost db_storedproc_1 - -Testcase 3.1.6.1: ------------------ -Ensure that no user may create a stored procedure without the GRANT CREATE -ROUTINE privilege. --------------------------------------------------------------------------------- -create user 'user_1'@'localhost'; -grant all on db_storedproc_1.* to 'user_1'@'localhost'; -revoke create routine on db_storedproc_1.* from 'user_1'@'localhost'; -flush privileges; -DROP PROCEDURE IF EXISTS sp1; - -user_1@localhost db_storedproc_1 -USE db_storedproc_1; -CREATE PROCEDURE sp1(v1 char(20)) -BEGIN -SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; -END// -ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1' -USE db_storedproc_1; - -root@localhost db_storedproc_1 -GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; - -user_1@localhost db_storedproc_1 -USE db_storedproc_1; -CREATE PROCEDURE sp1(v1 char(20)) -BEGIN -SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; -END// -USE db_storedproc_1; - -root@localhost db_storedproc_1 -DROP USER 'user_1'@'localhost'; -DROP PROCEDURE sp1; - -Testcase 3.1.6.2: ------------------ -Ensure that root always has the GRANT CREATE ROUTINE privilege. -(checked by other testscases) --------------------------------------------------------------------------------- -grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; -flush privileges; - -user_1@localhost db_storedproc_1 -DROP PROCEDURE IF EXISTS sp3; -DROP FUNCTION IF EXISTS fn1; -CREATE PROCEDURE sp3(v1 char(20)) -BEGIN -SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; -END// -CREATE FUNCTION fn1(v1 int) returns int -BEGIN -return v1; -END// -USE db_storedproc_1; - -root@localhost db_storedproc_1 -drop user 'user_1'@'localhost'; -DROP PROCEDURE sp3; -DROP FUNCTION fn1; -Warnings: -Warning 1403 There is no such grant defined for user 'user_1' on host 'localhost' on routine 'fn1' - -Testcase 3.1.6.4: ------------------ -Ensure that the default security provision of a stored procedure is SQL SECURITY -DEFINER. --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -grant update on db_storedproc_1.t6 to 'user_1'@'localhost'; -grant execute on db_storedproc_1.* to 'user_1'@'localhost'; -flush privileges; -USE db_storedproc_1; -DROP PROCEDURE IF EXISTS sp4; -CREATE PROCEDURE sp4(v1 char(20)) -BEGIN -SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; -END// - -user_1@localhost db_storedproc_1 -USE db_storedproc_1; -CALL sp4('a'); -f1 f2 f3 f4 f5 f6 -SELECT SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE, -ROUTINE_BODY, ROUTINE_DEFINITION, IS_DETERMINISTIC, -SQL_DATA_ACCESS, SECURITY_TYPE, SQL_MODE, ROUTINE_COMMENT -FROM information_schema.routines -WHERE routine_schema LIKE 'db_sto%'; -SPECIFIC_NAME sp4 -ROUTINE_SCHEMA db_storedproc_1 -ROUTINE_NAME sp4 -ROUTINE_TYPE PROCEDURE -ROUTINE_BODY SQL -ROUTINE_DEFINITION NULL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SECURITY_TYPE DEFINER -SQL_MODE -ROUTINE_COMMENT - -root@localhost db_storedproc_1 -DROP PROCEDURE sp4; -DROP USER 'user_1'@'localhost'; - -Testcase 3.1.6.5: ------------------ -Ensure that a stored procedure defined with SQL SECURITY DEFINER can be -called/executed by any user, using only the privileges (including database -access privileges) associated with the user who created the stored procedure. --------------------------------------------------------------------------------- -USE db_storedproc_1; -CREATE TABLE t3165 ( c1 char(20), c2 char(20), c3 date); -INSERT INTO t3165 VALUES ('inserted', 'outside of SP', NULL); -create user 'user_1'@'localhost'; -create user 'user_2'@'localhost'; -grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; -grant SELECT on db_storedproc_1.* to 'user_2'@'localhost'; -grant execute on db_storedproc_1.* to 'user_2'@'localhost'; -flush privileges; - -user_1@localhost db_storedproc_1 -CREATE PROCEDURE sp5_s_i () sql security definer -BEGIN -SELECT * from db_storedproc_1.t3165; -insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_s_i', 1000); -END// -CREATE PROCEDURE sp5_sel () sql security definer -BEGIN -SELECT * from db_storedproc_1.t3165; -END// -CREATE PROCEDURE sp5_ins () sql security definer -BEGIN -insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000); -END// - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_ins(); -ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' - -root@localhost db_storedproc_1 -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -grant insert on db_storedproc_1.* to 'user_1'@'localhost'; -flush privileges; - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_ins(); -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' - -root@localhost db_storedproc_1 -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -grant SELECT on db_storedproc_1.* to 'user_1'@'localhost'; -flush privileges; - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -c1 c2 c3 -inserted outside of SP NULL -inserted from sp5_ins 2000-10-00 -CALL sp5_ins(); -CALL sp5_sel(); -c1 c2 c3 -inserted outside of SP NULL -inserted from sp5_ins 2000-10-00 -inserted from sp5_s_i 2000-10-00 -inserted from sp5_ins 2000-10-00 - -root@localhost db_storedproc_1 -REVOKE INSERT on db_storedproc_1.* from 'user_1'@'localhost'; -flush privileges; - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -c1 c2 c3 -inserted outside of SP NULL -inserted from sp5_ins 2000-10-00 -inserted from sp5_s_i 2000-10-00 -inserted from sp5_ins 2000-10-00 -ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_ins(); -ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_sel(); -c1 c2 c3 -inserted outside of SP NULL -inserted from sp5_ins 2000-10-00 -inserted from sp5_s_i 2000-10-00 -inserted from sp5_ins 2000-10-00 - -root@localhost db_storedproc_1 -REVOKE SELECT on db_storedproc_1.* from 'user_1'@'localhost'; -flush privileges; - -user_2@localhost db_storedproc_1 -CALL sp5_s_i(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_ins(); -ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165' -CALL sp5_sel(); -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165' - -root@localhost db_storedproc_1 -DROP PROCEDURE sp5_s_i; -DROP PROCEDURE sp5_sel; -DROP PROCEDURE sp5_ins; -DROP TABLE t3165; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; - -Testcase 3.1.6.6: ------------------ -Ensure that a stored procedure defined with SQL SECURITY INVOKER can be -called/executed by any user, using only the privileges (including database -access privileges) associated with the user executing the stored procedure. --------------------------------------------------------------------------------- -USE db_storedproc_1; -CREATE TABLE t3166 ( c1 char(30) ); -INSERT INTO db_storedproc_1.t3166 VALUES ('inserted outside SP'); -create user 'user_1'@'localhost'; -create user 'user_2'@'localhost'; -GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; -GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost'; -GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_1@localhost db_storedproc_1 -CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER -BEGIN -SELECT * from db_storedproc_1.t3166; -insert into db_storedproc_1.t3166 values ('inserted from sp3166_s_i'); -END// -CREATE PROCEDURE sp3166_sel () SQL SECURITY INVOKER -BEGIN -SELECT * from db_storedproc_1.t3166; -END// -CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER -BEGIN -insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins'); -END// - -user_2@localhost db_storedproc_1 -CALL sp3166_s_i(); -c1 -inserted outside SP -ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166' -CALL sp3166_ins(); -ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166' -CALL sp3166_sel(); -c1 -inserted outside SP - -root@localhost db_storedproc_1 -CALL sp3166_sel(); -c1 -inserted outside SP -GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_2@localhost db_storedproc_1 -CALL sp3166_s_i(); -c1 -inserted outside SP -CALL sp3166_ins(); -CALL sp3166_sel(); -c1 -inserted outside SP -inserted from sp3166_s_i -inserted from sp3166_ins - -root@localhost db_storedproc_1 -CALL sp3166_sel(); -c1 -inserted outside SP -inserted from sp3166_s_i -inserted from sp3166_ins -REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_2@localhost db_storedproc_1 -CALL sp3166_s_i(); -ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166' -CALL sp3166_ins(); -CALL sp3166_sel(); -ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166' -CALL sp3166_s_i(); -c1 -inserted outside SP -inserted from sp3166_s_i -inserted from sp3166_ins -inserted from sp3166_ins - -root@localhost db_storedproc_1 -REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_2@localhost db_storedproc_1 -CALL sp3166_s_i(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_s_i' -CALL sp3166_ins(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_ins' -CALL sp3166_sel(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc_1.sp3166_sel' - -root@localhost db_storedproc_1 -DROP PROCEDURE sp3166_s_i; -DROP PROCEDURE sp3166_sel; -DROP PROCEDURE sp3166_ins; -DROP TABLE t3166; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_07.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_07.result deleted file mode 100644 index a520bdfac36..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_07.result +++ /dev/null @@ -1,178 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.7 - SQL mode checks: --------------------------------------------------------------------------------- -USE db_storedproc; - -Testcase 3.1.7.1: ------------------ -Ensure that the sql_mode setting in effect at the time a stored procedure is -created is the same setting under which the stored procedure runs when it is -called/executed. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP TABLE IF EXISTS temp_tbl; -DROP TABLE IF EXISTS result; -CREATE TABLE temp_tbl (f1 tinyint); -CREATE TABLE result (f1 text(200), f2 char(20)); -set @@sql_mode='traditional'; -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -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 -CREATE PROCEDURE sp1() -BEGIN -declare a tinyint; -declare count_ int default 1; -declare continue handler for sqlstate '22003' set count_=1000; -SHOW VARIABLES LIKE 'sql_mode'; -SELECT @@sql_mode into @cur_val_sql_mode; -insert into temp_tbl values (1000); -if count_ = 1000 THEN -INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored'); -ELSE -INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored'); -END if; -END// -SHOW CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -sp1 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 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`() -BEGIN -declare a tinyint; -declare count_ int default 1; -declare continue handler for sqlstate '22003' set count_=1000; -SHOW VARIABLES LIKE 'sql_mode'; -SELECT @@sql_mode into @cur_val_sql_mode; -insert into temp_tbl values (1000); -if count_ = 1000 THEN -INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored'); -ELSE -INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored'); -END if; -END latin1 latin1_swedish_ci latin1_swedish_ci -set @@sql_mode=''; -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -sql_mode -CALL sp1(); -Variable_name Value -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 * from result; -f1 f2 -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 value restored -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -sql_mode -SELECT @@sql_mode; -@@sql_mode - -SET @@sql_mode='TRADITIONAL'; -DROP PROCEDURE sp1; -DROP TABLE temp_tbl; -DROP TABLE result; - -Testcase 3.1.7.2: ------------------ -Ensure that if the sql_mode setting is changed when a stored procedure is run, -that the original setting is restored as soon as the stored procedure execution -is complete. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp2; -... show initial value -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -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 -CREATE PROCEDURE sp2() -BEGIN -SET @@sql_mode='MAXDB'; -SHOW VARIABLES LIKE 'sql_mode'; -END// -SHOW CREATE PROCEDURE sp2; -Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -sp2 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 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`() -BEGIN -SET @@sql_mode='MAXDB'; -SHOW VARIABLES LIKE 'sql_mode'; -END latin1 latin1_swedish_ci latin1_swedish_ci -... show value prior calling procedure -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -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 -... call procedure that changes sql_mode -CALL sp2(); -Variable_name Value -sql_mode PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER -... check whether old value is re-set -SHOW VARIABLES LIKE 'sql_mode'; -Variable_name Value -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 -DROP PROCEDURE sp2; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_08.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_08.result deleted file mode 100644 index 4d85b97369c..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_08.result +++ /dev/null @@ -1,835 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.8 - SHOW statement checks: --------------------------------------------------------------------------------- - -Testcase 3.1.8.9: ------------------ - -Ensure that all stored procedure changes made with ALTER PROCEDURE or ALTER -FUNCTION are properly recorded and displayed when a SHOW CREATE PROCEDURE or -SHOW CREATE PROCEDURE STATUS statement, or a SHOW CREATE FUNCTION or SHOW CREATE -FUNCTION STATUS statement (respectively) is executed. --------------------------------------------------------------------------------- -DROP FUNCTION IF EXISTS fn_1; -DROP FUNCTION IF EXISTS fn_2; -DROP PROCEDURE IF EXISTS sp_1; -DROP PROCEDURE IF EXISTS sp_2; -CREATE PROCEDURE sp_1 (i1 int) -BEGIN -set @x=i1; -END// -CREATE PROCEDURE sp_2 (i1 int) SQL SECURITY INVOKER COMMENT 'created with INVOKER' -BEGIN -set @x=i1; -END// -CREATE FUNCTION fn_1 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns year -BEGIN -set @x=i1; -set @y=@x; -return i4; -END// -CREATE FUNCTION fn_2 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) -RETURNS YEAR -SQL SECURITY INVOKER -COMMENT 'created with INVOKER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END// - -... now check what is stored: ------------------------------ -SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc'; -SPECIFIC_NAME fn_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_1 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME fn_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_2 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT created with INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_1 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_2 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT created with INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SHOW CREATE FUNCTION fn_1; -Function fn_1 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE FUNCTION fn_2; -Function fn_2 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - SQL SECURITY INVOKER - COMMENT 'created with INVOKER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_1; -Procedure sp_1 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int) -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_2; -Procedure sp_2 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int) - SQL SECURITY INVOKER - COMMENT 'created with INVOKER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW FUNCTION STATUS LIKE 'fn_%'; -Db db_storedproc -Name fn_1 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name fn_2 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment created with INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW PROCEDURE STATUS LIKE 'sp_%'; -Db db_storedproc -Name sp_1 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name sp_2 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment created with INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - -... now change some stuff: --------------------------- -ALTER PROCEDURE sp_1 SQL SECURITY INVOKER; -ALTER PROCEDURE sp_1 COMMENT 'new comment, SP changed to INVOKER'; -ALTER PROCEDURE sp_2 SQL SECURITY DEFINER; -ALTER PROCEDURE sp_2 DROP COMMENT; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP COMMENT' at line 1 -ALTER PROCEDURE sp_2 COMMENT 'SP changed to DEFINER'; -ALTER PROCEDURE sp_2 READS SQL DATA; -ALTER FUNCTION fn_1 SQL SECURITY INVOKER; -ALTER FUNCTION fn_1 COMMENT 'new comment, FN changed to INVOKER'; -ALTER FUNCTION fn_1 NO SQL; -ALTER FUNCTION fn_2 SQL SECURITY DEFINER; -ALTER FUNCTION fn_2 COMMENT 'FN changed to DEFINER'; -ALTER FUNCTION fn_2 MODIFIES SQL DATA; - -... now check what is stored: ------------------------------ -SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc'; -SPECIFIC_NAME fn_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_1 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS NO SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT new comment, FN changed to INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME fn_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_2 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS MODIFIES SQL DATA -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT FN changed to DEFINER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_1 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT new comment, SP changed to INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_2 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS READS SQL DATA -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT SP changed to DEFINER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SHOW CREATE FUNCTION fn_1; -Function fn_1 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - NO SQL - SQL SECURITY INVOKER - COMMENT 'new comment, FN changed to INVOKER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE FUNCTION fn_2; -Function fn_2 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - MODIFIES SQL DATA - COMMENT 'FN changed to DEFINER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_1; -Procedure sp_1 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int) - SQL SECURITY INVOKER - COMMENT 'new comment, SP changed to INVOKER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_2; -Procedure sp_2 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int) - READS SQL DATA - COMMENT 'SP changed to DEFINER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW FUNCTION STATUS LIKE 'fn_%'; -Db db_storedproc -Name fn_1 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment new comment, FN changed to INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name fn_2 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment FN changed to DEFINER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW PROCEDURE STATUS LIKE 'sp_%'; -Db db_storedproc -Name sp_1 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment new comment, SP changed to INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name sp_2 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment SP changed to DEFINER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - -... change back to default and check result: --------------------------------------------- -ALTER FUNCTION fn_2 CONTAINS SQL; - -... now check what is stored: ------------------------------ -SELECT * FROM information_schema.routines where routine_schema = 'db_storedproc'; -SPECIFIC_NAME fn_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_1 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS NO SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT new comment, FN changed to INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME fn_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME fn_2 -ROUTINE_TYPE FUNCTION -DATA_TYPE year -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER year(4) -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -set @y=@x; -return i4; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT FN changed to DEFINER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_1 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_1 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS CONTAINS SQL -SQL_PATH NULL -SECURITY_TYPE INVOKER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT new comment, SP changed to INVOKER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SPECIFIC_NAME sp_2 -ROUTINE_CATALOG def -ROUTINE_SCHEMA db_storedproc -ROUTINE_NAME sp_2 -ROUTINE_TYPE PROCEDURE -DATA_TYPE -CHARACTER_MAXIMUM_LENGTH NULL -CHARACTER_OCTET_LENGTH NULL -NUMERIC_PRECISION NULL -NUMERIC_SCALE NULL -CHARACTER_SET_NAME NULL -COLLATION_NAME NULL -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION BEGIN -set @x=i1; -END -EXTERNAL_NAME NULL -EXTERNAL_LANGUAGE NULL -PARAMETER_STYLE SQL -IS_DETERMINISTIC NO -SQL_DATA_ACCESS READS SQL DATA -SQL_PATH NULL -SECURITY_TYPE DEFINER -CREATED -LAST_ALTERED -SQL_MODE -ROUTINE_COMMENT SP changed to DEFINER -DEFINER root@localhost -CHARACTER_SET_CLIENT latin1 -COLLATION_CONNECTION latin1_swedish_ci -DATABASE_COLLATION latin1_swedish_ci -SHOW CREATE FUNCTION fn_1; -Function fn_1 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_1`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - NO SQL - SQL SECURITY INVOKER - COMMENT 'new comment, FN changed to INVOKER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE FUNCTION fn_2; -Function fn_2 -sql_mode -Create Function CREATE DEFINER=`root`@`localhost` FUNCTION `fn_2`(i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) RETURNS year(4) - COMMENT 'FN changed to DEFINER' -BEGIN -set @x=i1; -set @y=@x; -return i4; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_1; -Procedure sp_1 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int) - SQL SECURITY INVOKER - COMMENT 'new comment, SP changed to INVOKER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW CREATE PROCEDURE sp_2; -Procedure sp_2 -sql_mode -Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int) - READS SQL DATA - COMMENT 'SP changed to DEFINER' -BEGIN -set @x=i1; -END -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW FUNCTION STATUS LIKE 'fn_%'; -Db db_storedproc -Name fn_1 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment new comment, FN changed to INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name fn_2 -Type FUNCTION -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment FN changed to DEFINER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -SHOW PROCEDURE STATUS LIKE 'sp_%'; -Db db_storedproc -Name sp_1 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type INVOKER -Comment new comment, SP changed to INVOKER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci -Db db_storedproc -Name sp_2 -Type PROCEDURE -Definer root@localhost -Modified -Created -Security_type DEFINER -Comment SP changed to DEFINER -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - -... cleanup ------------ -DROP FUNCTION fn_1; -DROP FUNCTION fn_2; -DROP PROCEDURE sp_1; - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result deleted file mode 100644 index d731979a095..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result +++ /dev/null @@ -1,400 +0,0 @@ - ---source suite/funcs_1/storedproc/load_sp_tb.inc --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; -CREATE DATABASE db_storedproc; -CREATE DATABASE db_storedproc_1; -USE db_storedproc; -create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t1; -create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t2; -create table t3(f1 char(20),f2 char(20),f3 integer) engine = ; -load data infile '/std_data/funcs_1/t3.txt' into table t3; -create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t4; -USE db_storedproc_1; -create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t6; -USE db_storedproc; -create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) -engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 -create table t9(f1 int, f2 char(25), f3 int) engine = ; -load data infile '/std_data/funcs_1/t9.txt' into table t9; -create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t10; -create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) -engine = ; -load data infile '/std_data/funcs_1/t4.txt' into table t11; - -Section 3.1.10 - CALL checks: --------------------------------------------------------------------------------- -USE db_storedproc; - -Testcase 3.1.10.2 + 3.1.10.5: ------------------------------ - -2. Ensure that a procedure cannot be called if the appropriate privileges do not -exist. -5. Ensure that a function cannot be executed if the appropriate privileges do -not exist. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp31102; -DROP FUNCTION IF EXISTS fn31105; -create user 'user_1'@'localhost'; -create user 'user_2'@'localhost'; -GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost'; -GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_1@localhost db_storedproc -CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER -BEGIN -SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1; -END// -CREATE FUNCTION fn31105(n INT) RETURNS INT -BEGIN -DECLARE res INT; -SET res = n * n; -RETURN res; -END// - -user_2@localhost db_storedproc -CALL sp31102(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102' -SELECT fn31105( 9 ); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105' -connection default; -USE db_storedproc; - -root@localhost db_storedproc -CALL sp31102(); -f1 f2 f3 f4 f5 f6 -a` a` 1000-01-01 -5000 a` -5000 -SELECT fn31105( 9 ); -fn31105( 9 ) -81 -GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -user_2@localhost db_storedproc -CALL sp31102(); -f1 f2 f3 f4 f5 f6 -a` a` 1000-01-01 -5000 a` -5000 -SELECT fn31105( 9 ); -fn31105( 9 ) -81 -connection default; -USE db_storedproc; - -root@localhost db_storedproc -REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost'; -FLUSH PRIVILEGES; -CALL sp31102(); -f1 f2 f3 f4 f5 f6 -a` a` 1000-01-01 -5000 a` -5000 -SELECT fn31105( 9 ); -fn31105( 9 ) -81 - -user_2@localhost db_storedproc -CALL sp31102(); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102' -SELECT fn31105( 9 ); -ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105' -USE db_storedproc; - -root@localhost db_storedproc -DROP PROCEDURE sp31102; -DROP FUNCTION fn31105; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; - -Testcase 3.1.10.3: ------------------- - -Ensure that a function can never be called. --------------------------------------------------------------------------------- -DROP FUNCTION IF EXISTS fn1; -CREATE FUNCTION fn1(a int) returns int -BEGIN -set @b = 0.9 * a; -return @b; -END// -CALL fn1(); -ERROR 42000: PROCEDURE db_storedproc.fn1 does not exist -DROP FUNCTION fn1; - -Testcase 3.1.10.6: ------------------- - -Ensure that a procedure can never be executed. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp1; -DROP FUNCTION IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN -SELECT * from t10; -END// -SELECT sp1(); -ERROR 42000: FUNCTION db_storedproc.sp1 does not exist -DROP PROCEDURE sp1; - -Testcase 3.1.10.7: ------------------- - -Ensure that the ROW_COUNT() SQL function always returns the correct number of -rows affected by the execution of a stored procedure. --------------------------------------------------------------------------------- -DROP PROCEDURE IF EXISTS sp_ins_1; -DROP PROCEDURE IF EXISTS sp_ins_3; -DROP PROCEDURE IF EXISTS sp_upd; -DROP PROCEDURE IF EXISTS sp_ins_upd; -DROP PROCEDURE IF EXISTS sp_del; -DROP PROCEDURE IF EXISTS sp_with_rowcount; -CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT); -INSERT INTO temp SELECT * FROM t10; -CREATE PROCEDURE sp_ins_1() -BEGIN -INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000); -END// -CREATE PROCEDURE sp_ins_3() -BEGIN -INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('abc', 'xyz', '1989-11-09', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000); -END// -CREATE PROCEDURE sp_upd() -BEGIN -UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc'; -END// -CREATE PROCEDURE sp_ins_upd() -BEGIN -BEGIN -INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000); -INSERT INTO temp VALUES ('qwe', 'abc', '2005-11-07', 100, 'uvw', 1000); -END; -SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1; -UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc'; -END// -CREATE PROCEDURE sp_del() -BEGIN -DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2'; -END// -CREATE PROCEDURE sp_with_rowcount() -BEGIN -BEGIN -INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000), -('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000), -('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000), -('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000); -END; -SELECT row_count() AS 'row_count() after insert'; -SELECT row_count() AS 'row_count() after select row_count()'; -SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; -UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc'; -SELECT row_count() AS 'row_count() after update'; -SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3; -DELETE FROM temp WHERE temp.f1 = 'updated_2'; -SELECT row_count() AS 'row_count() after delete'; -END// -CALL sp_ins_1(); -SELECT row_count(); -row_count() -1 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -abc abc 2005-10-03 100 uvw 1000 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -CALL sp_ins_3(); -SELECT row_count(); -row_count() -1 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -abc abc 2005-10-03 100 uvw 1000 -abc xyz 1949-05-23 100 uvw 1000 -abc xyz 1989-11-09 100 uvw 1000 -abc xyz 2005-10-24 100 uvw 1000 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -CALL sp_upd(); -SELECT row_count(); -row_count() -4 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -updated abc 2005-10-03 100 uvw 1000 -updated xyz 1949-05-23 100 uvw 1000 -updated xyz 1989-11-09 100 uvw 1000 -updated xyz 2005-10-24 100 uvw 1000 -CALL sp_ins_upd(); -COUNT( f1 ) f1 -1 aaa -1 abaa -1 acaaa -1 adaaaa -1 aeaaaaa -1 afaaaaaa -1 agaaaaaaa -1 a^aaaaaaaa -1 a_aaaaaaaaa -1 a` -4 qwe -4 updated -SELECT row_count(); -row_count() -3 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -qwe xyz 1998-03-26 100 uvw 1000 -updated abc 2005-10-03 100 uvw 1000 -updated xyz 1949-05-23 100 uvw 1000 -updated xyz 1989-11-09 100 uvw 1000 -updated xyz 2005-10-24 100 uvw 1000 -updated_2 abc 1989-11-09 100 uvw 1000 -updated_2 abc 2000-11-09 100 uvw 1000 -updated_2 abc 2005-11-07 100 uvw 1000 -CALL sp_del(); -SELECT row_count(); -row_count() -4 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -a` a` 1000-01-01 -5000 a` -5000 -aaa aaa 1000-01-02 -4999 aaa -4999 -abaa abaa 1000-01-03 -4998 abaa -4998 -acaaa acaaa 1000-01-04 -4997 acaaa -4997 -adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996 -aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995 -afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994 -agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993 -updated abc 2005-10-03 100 uvw 1000 -updated xyz 1949-05-23 100 uvw 1000 -updated xyz 1989-11-09 100 uvw 1000 -updated xyz 2005-10-24 100 uvw 1000 -DELETE FROM temp; -CALL sp_with_rowcount(); -row_count() after insert -4 -row_count() after select row_count() --1 -f1 f2 f3 -qwe abc 1989-11-09 -qwe abc 2000-11-09 -qwe xyz 1998-03-26 -qwe xyz 2005-11-07 -row_count() after update -2 -f1 f2 f3 -qwe xyz 1998-03-26 -qwe xyz 2005-11-07 -updated_2 abc 1989-11-09 -updated_2 abc 2000-11-09 -row_count() after delete -2 -SELECT row_count(); -row_count() -0 -SELECT * FROM temp; -f1 f2 f3 f4 f5 f6 -qwe xyz 1998-03-26 100 uvw 1000 -qwe xyz 2005-11-07 100 uvw 1000 -DROP PROCEDURE sp_ins_1; -DROP PROCEDURE sp_ins_3; -DROP PROCEDURE sp_upd; -DROP PROCEDURE sp_ins_upd; -DROP PROCEDURE sp_del; -DROP PROCEDURE sp_with_rowcount; -DROP TABLE temp; - -Testcase 3.1.10.8: ------------------- - -Ensure that the mysql_affected_rows() C API function always returns the correct -number of rows affected by the execution of a stored procedure. --------------------------------------------------------------------------------- - ---source suite/funcs_1/storedproc/cleanup_sp_tb.inc --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_storedproc; -DROP DATABASE IF EXISTS db_storedproc_1; - -. +++ END OF SCRIPT +++ --------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result deleted file mode 100644 index 5ca24acf0bf..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result +++ /dev/null @@ -1,366 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 - -Testcase: 3.5.1.1: ------------------- -use test; -Create trigger trg1_1 BEFORE INSERT -on tb3 for each row set @test_before = 2, new.f142 = @test_before; -Create trigger trg1_2 AFTER INSERT -on tb3 for each row set @test_after = 6; -Create trigger trg1_4 BEFORE UPDATE -on tb3 for each row set @test_before = 27, -new.f142 = @test_before, -new.f122 = 'Before Update Trigger'; -Create trigger trg1_3 AFTER UPDATE -on tb3 for each row set @test_after = '15'; -Create trigger trg1_5 BEFORE DELETE on tb3 for each row -select count(*) into @test_before from tb3 as tr_tb3 -where f121 = 'Test 3.5.1.1'; -Create trigger trg1_6 AFTER DELETE on tb3 for each row -select count(*) into @test_after from tb3 as tr_tb3 -where f121 = 'Test 3.5.1.1'; -set @test_before = 1; -set @test_after = 5; -select @test_before, @test_after; -@test_before @test_after -1 5 -Insert into tb3 (f121, f122, f142, f144, f134) -values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1); -select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; -f121 f122 f142 f144 f134 -Test 3.5.1.1 First Row 2 0000000005 1 -select @test_before, @test_after; -@test_before @test_after -2 6 -set @test_before = 18; -set @test_after = 8; -select @test_before, @test_after; -@test_before @test_after -18 8 -Update tb3 set tb3.f122 = 'Update', -tb3.f142 = @test_before, -tb3.f144 = @test_after -where tb3.f121 = 'Test 3.5.1.1'; -select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; -f121 f122 f142 f144 f134 -Test 3.5.1.1 Before Update Trigger 27 0000000008 1 -select @test_before, @test_after; -@test_before @test_after -27 15 -Insert into tb3 (f121, f122, f142, f144, f134) -values ('Test 3.5.1.1', 'Second Row', 5, 6, 2); -set @test_before = 0; -set @test_after = 0; -select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; -f121 f122 f142 f144 f134 -Test 3.5.1.1 Before Update Trigger 27 0000000008 1 -Test 3.5.1.1 Second Row 2 0000000006 2 -select @test_before, @test_after; -@test_before @test_after -0 0 -Delete from tb3 where f121 = 'Test 3.5.1.1' and f134 = 2; -select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; -f121 f122 f142 f144 f134 -Test 3.5.1.1 Before Update Trigger 27 0000000008 1 -select @test_before, @test_after; -@test_before @test_after -2 1 -drop trigger trg1_1; -drop trigger trg1_2; -drop trigger trg1_3; -drop trigger trg1_4; -drop trigger trg1_5; -drop trigger trg1_6; -delete from tb3 where f121='Test 3.5.1.1'; - -Testcase: 3.5.1.2: ------------------- -Create trigger trg_1 after insert -on tb3 for each statement set @x= 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2 -drop trigger trg_1; - -Testcase 3.5.1.3: ------------------ -CREATE TRIGGER trg3_1 on tb3 BEFORE INSERT for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'on tb3 BEFORE INSERT for each row set new.f120 = 't'' at line 1 -CREATE trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'trg3_2 TRIGGER AFTER INSERT on tb3 for each row set new.f120 = 's'' at line 1 -CREATE TRIGGER trg3_3 Before DELETE on tb3 set @ret1 = 'test' for each row; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set @ret1 = 'test' for each row' at line 1 -CREATE TRIGGER trg3_4 DELETE AFTER on tb3 set @ret1 = 'test' for each row; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELETE AFTER on tb3 set @ret1 = 'test' for each row' at line 1 -CREATE for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'for each row TRIGGER trg3_5 AFTER UPDATE on tb3 set @ret1 = 'test'' at line 1 -drop trigger trg3_1; -drop trigger trg3_2; -drop trigger trg3_3; -drop trigger trg3_4; -drop trigger trg3_5; - -Testcase: 3.5.1.5: ------------------- -CREATE TRIGGER trg4_1 AFTER on tb3 for each row set new.f120 = 'e'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'on tb3 for each row set new.f120 = 'e'' at line 1 -CREATE TRIGGER trg4_2 INSERT on tb3 for each set row new.f120 = 'f'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT on tb3 for each set row new.f120 = 'f'' at line 1 -CREATE TRIGGER trg4_3 BEFORE INSERT tb3 for each row set new.f120 = 'g'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tb3 for each row set new.f120 = 'g'' at line 1 -CREATE TRIGGER trg4_4 AFTER UPDATE on tb3 for each set new.f120 = 'g'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set new.f120 = 'g'' at line 1 -CREATE trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'trg4_5 AFTER DELETE on tb3 for each set new.f120 = 'g'' at line 1 -CREATE TRIGGER trg4_6 BEFORE DELETE for each row set new.f120 = 'g'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'for each row set new.f120 = 'g'' at line 1 -drop trigger trg4_1; -drop trigger trg4_2; -drop trigger trg4_3; -drop trigger trg4_4; -drop trigger trg4_5; -drop trigger trg4_6; - -Testcase 3.5.1.6: - Need to fix -------------------------------- - -Testcase 3.5.1.7: - need to fix -------------------------------- -drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' -create table t1 (f1 int, f2 char(25),f3 int) engine = ; -CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 -for each row set new.f3 = '14'; -CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ -BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; -ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long -CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX -BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; -insert into t1 (f2) values ('insert 3.5.1.7'); -select * from t1; -f1 f2 f3 -NULL insert 3.5.1.7 14 -update t1 set f2='update 3.5.1.7'; -select * from t1; -f1 f2 f3 -NULL update 3.5.1.7 42 -select trigger_name from information_schema.triggers order by trigger_name; -trigger_name -gs_insert -trg5_1 -trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX -ts_insert -drop trigger trg5_1; -drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; -ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long -drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX; -drop table t1; - -Testcase 3.5.1.8: ------------------ -CREATE TRIGGER trg12* before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER trigger before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'trigger before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER 100 before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '100 before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1 -CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3 -for each row set new.f120 ='X'; -ERROR HY000: Trigger in wrong schema -drop database if exists trig_db; -create database trig_db; -use trig_db; -create table t1 (f1 integer) engine = ; -use test; -CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3 -for each row set @ret_trg6_2 = 5; -ERROR 42S02: Table 'trig_db.tb3' doesn't exist -use trig_db; -CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 -for each row set @ret_trg6_3 = 18; -ERROR HY000: Trigger in wrong schema -use test; -drop database trig_db; -drop trigger trg6_1; -drop trigger trg6_3; - -Testcase 3.5.1.9:(cannot be inplemented at this point) ------------------------------------------------------- - -Testcase 3.5.1.10: ------------------- -CREATE TRIGGER trg7_1 BEFORE UPDATE on tb3 for each row set new.f120 ='X'; -CREATE TRIGGER trg7_1 AFTER INSERT on tb3 for each row set @x ='Y'; -ERROR HY000: Trigger already exists -drop trigger trg7_1; - -Testcase 3.5.1.?: ------------------ -drop table if exists t1; -drop table if exists t2; -create table t1 (f1 char(50), f2 integer) engine = ; -create table t2 (f1 char(50), f2 integer) engine = ; -create trigger trig before insert on t1 -for each row set new.f1 ='trig t1'; -create trigger trig before update on t2 -for each row set new.f1 ='trig t2'; -ERROR HY000: Trigger already exists -insert into t1 value ('insert to t1',1); -select * from t1; -f1 f2 -trig t1 1 -update t1 set f1='update to t1'; -select * from t1; -f1 f2 -update to t1 1 -insert into t2 value ('insert to t2',2); -update t2 set f1='update to t1'; -select * from t2; -f1 f2 -update to t1 2 -drop table t1; -drop table t2; -drop trigger trig; - -Testcase 3.5.1.11: ------------------- -drop database if exists trig_db1; -drop database if exists trig_db2; -drop database if exists trig_db3; -create database trig_db1; -create database trig_db2; -create database trig_db3; -use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = ; -create trigger trig before insert on t1 -for each row set new.f1 ='trig1', @test_var1='trig1'; -use trig_db2; -create table t2 (f1 char(50), f2 integer) engine = ; -create trigger trig before insert on t2 -for each row set new.f1 ='trig2', @test_var2='trig2'; -use trig_db3; -create table t1 (f1 char(50), f2 integer) engine = ; -create trigger trig before insert on t1 -for each row set new.f1 ='trig3', @test_var3='trig3'; -set @test_var1= '', @test_var2= '', @test_var3= ''; -use trig_db1; -insert into t1 (f1,f2) values ('insert to db1 t1',1); -insert into trig_db1.t1 (f1,f2) values ('insert to db1 t1 from db1',2); -insert into trig_db2.t2 (f1,f2) values ('insert to db2 t2 from db1',3); -insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4); -select @test_var1, @test_var2, @test_var3; -@test_var1 @test_var2 @test_var3 -trig1 trig2 trig3 -select * from t1 order by f2; -f1 f2 -trig1 1 -trig1 2 -select * from trig_db2.t2; -f1 f2 -trig2 3 -select * from trig_db3.t1; -f1 f2 -trig3 4 -select * from t1 order by f2; -f1 f2 -trig1 1 -trig1 2 -use test; -drop database trig_db1; -drop database trig_db2; -drop database trig_db3; - -Testcase 3.5.2.1/2/3: ---------------------- -drop database if exists trig_db1; -drop database if exists trig_db2; -create database trig_db1; -create database trig_db2; -use trig_db1; -create table t1 (f1 char(50), f2 integer) engine = ; -create table trig_db2.t1 (f1 char(50), f2 integer) engine = ; -create trigger trig1_b before insert on t1 -for each row set @test_var1='trig1_b'; -create trigger trig_db1.trig1_a after insert on t1 -for each row set @test_var2='trig1_a'; -create trigger trig_db2.trig2 before insert on trig_db2.t1 -for each row set @test_var3='trig2'; -select trigger_schema, trigger_name, event_object_table -from information_schema.triggers -where trigger_schema like 'trig_db%' - order by trigger_name; -trigger_schema trigger_name event_object_table -trig_db1 trig1_a t1 -trig_db1 trig1_b t1 -trig_db2 trig2 t1 -set @test_var1= '', @test_var2= '', @test_var3= ''; -insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352); -insert into trig_db2.t1 (f1,f2) values ('insert to db2 t1 from db1',352); -select @test_var1, @test_var2, @test_var3; -@test_var1 @test_var2 @test_var3 -trig1_b trig1_a trig2 -drop database trig_db1; -drop database trig_db2; -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03.result b/mysql-test/suite/funcs_1/r/ndb_trig_03.result deleted file mode 100644 index db92ea56444..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_03.result +++ /dev/null @@ -1,675 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 - -Testcase 3.5.3: ---------------- -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ; -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); - -Testcase 3.5.3.2/6: -------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant ALL on *.* to test_noprivs@localhost; -revoke TRIGGER on *.* from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' - -Testcase 3.5.3.2: ------------------ -select current_user; -current_user -test_noprivs@localhost -use priv_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.2_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1' -use priv_db; -insert into t1 (f1) values ('insert 3.5.3.2-no'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.2_2-yes'; -select current_user; -current_user -root@localhost -use priv_db; -insert into t1 (f1) values ('insert 3.5.3.2-yes'); -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -grant UPDATE on priv_db.t1 to test_yesprivs@localhost; -insert into t1 (f1) values ('insert 3.5.3.2-yes'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -trig 3.5.3.2_2-yes - -Testcase 3.5.3.6: ------------------ -use priv_db; -drop trigger trg1_2; -ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1' -use priv_db; -insert into t1 (f1) values ('insert 3.5.3.6-yes'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -use priv_db; -drop trigger trg1_2; -use priv_db; -insert into t1 (f1) values ('insert 3.5.3.6-no'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -drop trigger trg1_2; - -Testcase 3.5.3.7a: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant ALL on *.* to test_noprivs@localhost; -revoke UPDATE on *.* from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -show grants; -Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -create trigger trg4a_1 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-1a'; -insert into t1 (f1) values ('insert 3.5.3.7-1a'); -ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -drop trigger trg4a_1; -use priv_db; -select current_user; -current_user -test_yesprivs@localhost -show grants; -Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -create trigger trg4a_2 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-2a'; -insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -drop trigger trg4a_2; - -Testcase 3.5.3.7b: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs; -grant ALL on priv_db.* to test_noprivs@localhost; -revoke UPDATE on priv_db.* from test_noprivs@localhost; -show grants for test_noprivs; -Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant UPDATE on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg4b_1 before UPDATE on t1 for each row -set new.f1 = 'trig 3.5.3.7-1b'; -insert into t1 (f1) values ('insert 3.5.3.7-1b'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b'; -ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -drop trigger trg4b_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg4b_2 before UPDATE on t1 for each row -set new.f1 = 'trig 3.5.3.7-2b'; -insert into t1 (f1) values ('insert 3.5.3.7-2b'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -insert 3.5.3.7-2b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b'; -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -drop trigger trg4b_2; - -Testcase 3.5.3.7c ------------------ -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant ALL on priv_db.t1 to test_noprivs@localhost; -revoke UPDATE on priv_db.t1 from test_noprivs@localhost; -show grants for test_noprivs; -Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant UPDATE on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg4c_1 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-1c'; -insert into t1 (f1) values ('insert 3.5.3.7-1c'); -ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -drop trigger trg4c_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg4c_2 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-2c'; -insert into t1 (f1) values ('insert 3.5.3.7-2c'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -trig 3.5.3.7-2c -drop trigger trg4c_2; - -Testcase 3.5.3.7d: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; -show grants for test_noprivs; -Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; -show grants for test_noprivs; -Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg4d_1 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-1d'; -insert into t1 (f1) values ('insert 3.5.3.7-1d'); -ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -trig 3.5.3.7-2c -drop trigger trg4d_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg4d_2 before INSERT on t1 for each row -set new.f1 = 'trig 3.5.3.7-2d'; -insert into t1 (f1) values ('insert 3.5.3.7-2d'); -select f1 from t1 order by f1; -f1 -insert 3.5.3.2-no -insert 3.5.3.6-no -insert 3.5.3.7-1b -trig 3.5.3.2_2-yes -trig 3.5.3.2_2-yes -trig 3.5.3.7-2a -trig 3.5.3.7-2b -trig 3.5.3.7-2c -trig 3.5.3.7-2d -drop trigger trg4d_2; - -Testcase 3.5.3.8a: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant ALL on *.* to test_noprivs@localhost; -revoke SELECT on *.* from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -show grants; -Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -create trigger trg5a_1 before INSERT on t1 for each row -set @test_var = new.f1; -set @test_var = 'before trig 3.5.3.8-1a'; -select @test_var; -@test_var -before trig 3.5.3.8-1a -insert into t1 (f1) values ('insert 3.5.3.8-1a'); -ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select @test_var; -@test_var -before trig 3.5.3.8-1a -drop trigger trg5a_1; -use priv_db; -select current_user; -current_user -test_yesprivs@localhost -show grants; -Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -create trigger trg5a_2 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var= 'before trig 3.5.3.8-2a'; -select @test_var; -@test_var -before trig 3.5.3.8-2a -insert into t1 (f1) values ('insert 3.5.3.8-2a'); -select @test_var; -@test_var -insert 3.5.3.8-2a -drop trigger trg5a_2; - -Testcase: 3.5.3.8b ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant ALL on priv_db.* to test_noprivs@localhost; -revoke SELECT on priv_db.* from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg5b_1 before UPDATE on t1 for each row -set @test_var= new.f1; -set @test_var= 'before trig 3.5.3.8-1b'; -insert into t1 (f1) values ('insert 3.5.3.8-1b'); -select @test_var; -@test_var -before trig 3.5.3.8-1b -update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b'; -ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select @test_var; -@test_var -before trig 3.5.3.8-1b -drop trigger trg5b_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg5b_2 before UPDATE on t1 for each row -set @test_var= new.f1; -set @test_var= 'before trig 3.5.3.8-2b'; -insert into t1 (f1) values ('insert 3.5.3.8-2b'); -select @test_var; -@test_var -before trig 3.5.3.8-2b -update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b'; -select @test_var; -@test_var -update 3.5.3.8-2b -drop trigger trg5b_2; - -Testcase 3.5.3.8c: ------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant ALL on priv_db.t1 to test_noprivs@localhost; -revoke SELECT on priv_db.t1 from test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg5c_1 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var= 'before trig 3.5.3.8-1c'; -insert into t1 (f1) values ('insert 3.5.3.8-1c'); -ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select @test_var; -@test_var -before trig 3.5.3.8-1c -drop trigger trg5c_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg5c_2 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var='before trig 3.5.3.8-2c'; -insert into t1 (f1) values ('insert 3.5.3.8-2c'); -select @test_var; -@test_var -insert 3.5.3.8-2c -drop trigger trg5c_2; - -Testcase: 3.5.3.8d: -------------------- -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant TRIGGER on *.* to test_noprivs@localhost; -grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -show grants; -Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -use priv_db; -create trigger trg5d_1 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var='before trig 3.5.3.8-1d'; -insert into t1 (f1) values ('insert 3.5.3.8-1d'); -ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1' -select @test_var; -@test_var -before trig 3.5.3.8-1d -drop trigger trg5d_1; -show grants; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -use priv_db; -create trigger trg5d_2 before INSERT on t1 for each row -set @test_var= new.f1; -set @test_var='before trig 3.5.3.8-2d'; -insert into t1 (f1) values ('insert 3.5.3.8-2d'); -select @test_var; -@test_var -insert 3.5.3.8-2d -drop trigger trg5d_2; - -Testcase: 3.5.3.x: ------------------- -use priv_db; -drop table if exists t1; -drop table if exists t2; -create table t1 (f1 int) engine= ; -create table t2 (f2 int) engine= ; -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on *.* to test_yesprivs@localhost; -grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; -grant SELECT on priv_db.t2 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1 before insert on t1 for each row -insert into t2 values (new.f1); -use priv_db; -insert into t1 (f1) values (4); -ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2' -revoke SELECT on priv_db.t2 from test_yesprivs@localhost; -grant INSERT on priv_db.t2 to test_yesprivs@localhost; -insert into t1 (f1) values (4); -select f1 from t1 order by f1; -f1 -4 -select f2 from t2 order by f2; -f2 -4 -use priv_db; -drop trigger trg1; -create trigger trg2 before insert on t1 for each row -update t2 set f2=new.f1-1; -use priv_db; -insert into t1 (f1) values (2); -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2' -revoke INSERT on priv_db.t2 from test_yesprivs@localhost; -grant UPDATE on priv_db.t2 to test_yesprivs@localhost; -insert into t1 (f1) values (2); -select f1 from t1 order by f1; -f1 -2 -4 -select f2 from t2 order by f2; -f2 -1 -use priv_db; -drop trigger trg2; -create trigger trg3 before insert on t1 for each row -select f2 into @aaa from t2 where f2=new.f1; -use priv_db; -insert into t1 (f1) values (1); -ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2' -revoke UPDATE on priv_db.t2 from test_yesprivs@localhost; -grant SELECT on priv_db.t2 to test_yesprivs@localhost; -insert into t1 (f1) values (1); -select f1 from t1 order by f1; -f1 -1 -2 -4 -select f2 from t2 order by f2; -f2 -1 -select @aaa; -@aaa -1 -use priv_db; -drop trigger trg3; -create trigger trg4 before insert on t1 for each row -delete from t2; -use priv_db; -insert into t1 (f1) values (1); -ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2' -revoke SELECT on priv_db.t2 from test_yesprivs@localhost; -grant DELETE on priv_db.t2 to test_yesprivs@localhost; -insert into t1 (f1) values (1); -select f1 from t1 order by f1; -f1 -1 -1 -2 -4 -select f2 from t2 order by f2; -f2 -drop database if exists priv_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; -drop user test_noprivs; -use test; -drop table tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result b/mysql-test/suite/funcs_1/r/ndb_trig_03e.result deleted file mode 100644 index 91bd22d3c06..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result +++ /dev/null @@ -1,1620 +0,0 @@ -USE test; - -Testcase for db level: ----------------------- -drop database if exists priv_db; -drop database if exists no_priv_db; -create database priv_db; -create database no_priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant select on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant select,insert on priv_db.* to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost' - -no trigger privilege on db level for create: --------------------------------------------- -use priv_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' - -trigger privilege on db level for create: ------------------------------------------ -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1' -select f1 from t1 order by f1; -f1 -insert-yes -select current_user; -current_user -root@localhost -grant UPDATE on priv_db.* to test_yesprivs@localhost; -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_2-yes -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.* from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' - -no trigger privilege on db level for drop: ------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -drop trigger trg1_2; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -use priv_db; - -no trigger privilege at activation time: ----------------------------------------- -insert into t1 (f1) values ('insert-yes'); -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_2-yes -trig 1_2-yes - -trigger privilege at activation time: -------------------------------------- -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.* to test_yesprivs@localhost; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes - -trigger privilege on db level for drop: ---------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -drop trigger trg1_2; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' - -takes effect after use priv_db: -------------------------------- -use priv_db; -drop trigger trg1_2; -select current_user; -current_user -root@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes - -switch to db without having trigger priv for it: ------------------------------------------------- -use no_priv_db; -create table t1 (f1 char(20)) engine= ndb; -grant SELECT,UPDATE on no_priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `no_priv_db`.* TO 'test_yesprivs'@'localhost' - -use db with trigger privilege on db level and without...: ---------------------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -use no_priv_db; -create trigger trg1_3 before INSERT on t1 for each row -set new.f1 = 'trig 1_3-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -use priv_db; -create trigger trg1_3 before INSERT on t1 for each row -set new.f1 = 'trig 1_3-yes'; -use no_priv_db; -create trigger trg1_4 before UPDATE on t1 for each row -set new.f1 = 'trig 1_4-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -use priv_db; -create trigger trg1_4 before UPDATE on t1 for each row -set new.f1 = 'trig 1_4-yes'; -select current_user; -current_user -test_noprivs@localhost -use no_priv_db; -ERROR 42000: Access denied for user 'test_noprivs'@'localhost' to database 'no_priv_db' -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -trig 1_3-yes -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -trig 1_3-yes -trig 1_3-yes -select current_user; -current_user -test_yesprivs@localhost -use no_priv_db; -drop trigger trg1_3; -ERROR HY000: Trigger does not exist -use priv_db; -drop trigger trg1_3; -use no_priv_db; -drop trigger trg1_4; -ERROR HY000: Trigger does not exist -use priv_db; -drop trigger trg1_4; -select current_user; -current_user -root@localhost -drop table priv_db.t1; -drop table no_priv_db.t1; -drop database if exists priv_db; -drop database if exists no_priv_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; - -######### Testcase for table level: ######## ---------------------------------------------------- -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; - -no trigger privilege on table level for create: ------------------------------------------------ -select current_user; -current_user -root@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -grant select, insert, update on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -grant select, update, insert on priv_db.t1 to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -show tables; -Tables_in_priv_db -t1 -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert1-yes'); -select f1 from t1 order by f1; -f1 -insert1-yes -select current_user; -current_user -root@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -show tables; -Tables_in_priv_db -t1 -insert into t1 (f1) values ('insert2-yes'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' - -trigger privilege on table level for create: --------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert3-no'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -insert into t1 (f1) values ('insert4-no'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -trig 1_2-yes -trig 1_2-yes -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' - -no trigger privilege on table level for drop: ---------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg1_2; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' - -no trigger privilege at activation time: ----------------------------------------- -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert5-no'); -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -trig 1_2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; - -trigger privilege at activation time: -------------------------------------- -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert6-no'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes - -trigger privilege on table level for drop: ------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -drop trigger trg1_2; -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert7-yes'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -insert7-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -insert into t1 (f1) values ('insert8-yes'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -insert7-yes -insert8-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes - -switch to table without having trigger priv for it: ---------------------------------------------------- -create table t2 (f1 char(20)) engine= ndb; -grant SELECT, INSERT, UPDATE on priv_db.t2 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -grant SELECT, INSERT, UPDATE on priv_db.t2 to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_noprivs'@'localhost' - -use table with trigger privilege and without...: ------------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -create trigger trg1_3 before INSERT on t1 for each row -set new.f1 = 'trig 1_3-yes'; -create trigger trg2_2 before UPDATE on t2 for each row -set new.f1 = 'trig 2_2-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -create trigger trg1_4 before UPDATE on t1 for each row -set new.f1 = 'trig 1_4-yes'; -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci -trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci -select current_user; -current_user -test_noprivs@localhost -insert into t2 (f1) values ('insert9-yes'); -select f1 from t2 order by f1; -f1 -insert9-yes -insert into t1 (f1) values ('insert10-no'); -select f1 from t1 order by f1; -f1 -insert1-yes -insert2-yes -insert7-yes -insert8-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -trig 1_3-yes -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg2_1; -ERROR HY000: Trigger does not exist -drop trigger trg1_3; -drop trigger trg2_2; -ERROR HY000: Trigger does not exist -drop trigger trg1_4; -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; - -#### Testcase for mix of user(global) and db level: #### --------------------------------------------------------- -drop database if exists priv_db; -drop database if exists no_priv_db; -create database priv_db; -create database no_priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -use no_priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant ALL on *.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant SELECT,INSERT on *.* to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_yesprivs@localhost - -trigger privilege on user level for create: -------------------------------------------- -use priv_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -use no_priv_db; -create trigger priv_db.trg1_5 before UPDATE on priv_db.t1 -for each row -set new.f1 = 'trig 1_5-yes'; -insert into priv_db.t1 (f1) values ('insert-no'); -select f1 from priv_db.t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -drop trigger priv_db.trg1_5; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -revoke TRIGGER on *.* from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -select * from information_schema.triggers; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION -drop trigger trg1_1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -root@localhost -show grants; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -drop trigger trg1_1; -use priv_db; - -no trigger privilege on db level for create: --------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' - -trigger privilege on db level for create: ------------------------------------------ -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1 -for each row -set new.f1 = 'trig 1_9-yes'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -use no_priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -create trigger priv_db.trg1_9 before UPDATE on priv_db.t1 -for each row -set new.f1 = 'trig 1_9-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -use no_priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -drop trigger priv_db.trg1_9; -ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1' -select current_user; -current_user -root@localhost -drop trigger priv_db.trg1_9; -revoke TRIGGER on priv_db.* from test_yesprivs@localhost; -use priv_db; -insert into t1 (f1) values ('insert-yes'); -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -grant TRIGGER on *.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -select current_user; -current_user -test_yesprivs@localhost -use no_priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -trig 1_2-yes -use no_priv_db; -insert into t1 (f1) values ('insert-yes'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -select current_user; -current_user -test_yesprivs@localhost -use no_priv_db; -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -use no_priv_db; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -insert-yes -insert-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop database if exists no_priv_db; -drop database if exists h1; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; - -####### Testcase for mix of db and table level: ####### -------------------------------------------------------- -drop database if exists priv1_db; -drop database if exists priv2_db; -create database priv1_db; -create database priv2_db; -use priv1_db; -create table t1 (f1 char(20)) engine= ndb; -create table t2 (f1 char(20)) engine= ndb; -use priv2_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant ALL on priv1_db.* to test_yesprivs@localhost; -grant SELECT,UPDATE on priv2_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant SELECT,INSERT,UPDATE on priv1_db.* to test_noprivs@localhost; -grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost' -use priv1_db; -use priv1_db; - -trigger privilege on one db1 db level, not on db2 -------------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -use priv1_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-yes'; -use priv2_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig1_1-yes'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -test_noprivs@localhost -insert into t1 (f1) values ('insert1_no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -insert into t2 (f1) values ('insert1_no'); -select f1 from t2 order by f1; -f1 -trig 2_1-yes -insert into priv2_db.t1 (f1) values ('insert21-yes'); -select f1 from priv2_db.t1 order by f1; -f1 -insert21-yes -use priv2_db; -insert into t1 (f1) values ('insert1_yes'); -select f1 from t1 order by f1; -f1 -insert1_yes -insert21-yes -insert into priv1_db.t1 (f1) values ('insert11-no'); -select f1 from priv1_db.t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -insert into priv1_db.t2 (f1) values ('insert22-no'); -select f1 from priv1_db.t2 order by f1; -f1 -trig 2_1-yes -trig 2_1-yes - -revoke trigger privilege on table level (not existing) ------------------------------------------------------- -select current_user; -current_user -root@localhost -use priv1_db; -revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost; -ERROR 42000: There is no such grant defined for user 'test_yesprivs' on host 'localhost' on table 't1' -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg1_1; -ERROR HY000: Trigger does not exist -drop trigger trg2_1; -ERROR HY000: Trigger does not exist -use priv1_db; -drop trigger trg1_1; -drop trigger trg2_1; -select current_user; -current_user -root@localhost -use priv1_db; -revoke TRIGGER on priv1_db.* from test_yesprivs@localhost; - -no trigger privilege on table level for create: ------------------------------------------------ -select current_user; -current_user -test_yesprivs@localhost -use priv1_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -root@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' - -trigger privilege on table level for create: --------------------------------------------- -select current_user; -current_user -test_yesprivs@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -create trigger trg1_2 before INSERT on t1 for each row -set new.f1 = 'trig 1_2-yes'; -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-no'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -select current_user; -current_user -test_noprivs@localhost -use priv1_db; -insert into t1 (f1) values ('insert2-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -insert into t2 (f1) values ('insert2-yes'); -select f1 from t2 order by f1; -f1 -insert2-yes -trig 2_1-yes -trig 2_1-yes -insert into priv2_db.t1 (f1) values ('insert22-yes'); -select f1 from priv2_db.t1 order by f1; -f1 -insert1_yes -insert21-yes -insert22-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv1_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-yes'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -use priv1_db; -create trigger trg2_1 before INSERT on t2 for each row -set new.f1 = 'trig 2_1-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv1_db; -insert into t1 (f1) values ('insert3-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -trig 1_2-yes -insert into t2 (f1) values ('insert3-no'); -select f1 from t2 order by f1; -f1 -insert2-yes -trig 2_1-yes -trig 2_1-yes -trig 2_1-yes -use priv2_db; -insert into priv1_db.t1 (f1) values ('insert12-no'); -select f1 from priv1_db.t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_2-yes -trig 1_2-yes -trig 1_2-yes -insert into priv1_db.t2 (f1) values ('insert23-no'); -select f1 from priv1_db.t2 order by f1; -f1 -insert2-yes -trig 2_1-yes -trig 2_1-yes -trig 2_1-yes -trig 2_1-yes -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg1_2; -drop trigger trg2_1; -select current_user; -current_user -root@localhost -drop database if exists priv1_db; -drop database if exists priv2_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; - -#### Testcase for trigger privilege on execution time ######## --------------------------------------------------------------- -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -create User test_useprivs@localhost; -set password for test_useprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost; -select current_user; -current_user -root@localhost -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -grant select, insert, update ,trigger -on priv_db.t1 to test_yesprivs@localhost -with grant option; -grant select -on priv_db.t1 to test_useprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -create trigger trg1_1 before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -grant insert on t1 to test_useprivs@localhost; -prepare ins1 from 'insert into t1 (f1) values (''insert1-no'')'; -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')'; -select current_user; -current_user -test_useprivs@localhost -use priv_db; -prepare ins1 from 'insert into t1 (f1) values (''insert3-no'')'; -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -prepare ins1 from 'insert into t1 (f1) values (''insert4-no'')'; -select current_user; -current_user -test_useprivs@localhost -prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')'; -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -prepare ins1 from 'insert into t1 (f1) values (''insert6-no'')'; -select current_user; -current_user -test_useprivs@localhost -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -prepare ins1 from 'insert into t1 (f1) values (''insert7-no'')'; -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -test_useprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -test_useprivs@localhost -execute ins1; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -deallocate prepare ins1; -select current_user; -current_user -test_useprivs@localhost -execute ins1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -deallocate prepare ins1; -select current_user; -current_user -root@localhost -grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -select current_user; -current_user -test_yesprivs@localhost -drop trigger trg1_1; -select current_user; -current_user -root@localhost -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; -drop user test_useprivs@localhost; - -######### Testcase for definer: ######## ------------------------------------------------ -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -select current_user; -current_user -root@localhost -create definer=not_ex_user@localhost trigger trg1_0 -before INSERT on t1 for each row -set new.f1 = 'trig 1_0-yes'; -Warnings: -Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist -drop trigger trg1_0; -create definer=test_yesprivs@localhost trigger trg1_0 -before INSERT on t1 for each row -set new.f1 = 'trig 1_0-yes'; -grant select, insert, update -on priv_db.t1 to test_yesprivs@localhost; -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert-no'); -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f1 from t1 order by f1; -f1 -drop trigger trg1_0; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select current_user; -current_user -root@localhost -grant select, insert, update ,trigger -on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_0-yes -drop trigger trg1_0; -create definer=not_ex_user@localhost trigger trg1_0 -before INSERT on t1 for each row -set new.f1 = 'trig 1_0-yes'; -ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation -create definer=current_user trigger trg1_1 -before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_0-yes -trig 1_1-yes -create definer=test_yesprivs@localhost trigger trg1_2 -before UPDATE on t1 for each row -set new.f1 = 'trig 1_2-yes'; -update t1 set f1 = 'update-yes' where f1 like '%trig%'; -select f1 from t1 order by f1; -f1 -trig 1_2-yes -trig 1_2-yes -select current_user; -current_user -root@localhost -grant trigger on priv_db.* to test_yesprivs@localhost -with grant option; -select current_user; -current_user -test_yesprivs@localhost -show grants; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -create definer=not_ex_user@localhost trigger trg1_3 -after UPDATE on t1 for each row -set @var1 = 'trig 1_3-yes'; -ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation -select current_user; -current_user -root@localhost -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; - -######### Testcase for transactions: ######## ----------------------------------------------------- -drop database if exists priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -select current_user; -current_user -root@localhost -grant select, insert, update ,trigger -on priv_db.t1 to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -set autocommit=0; -create definer=current_user trigger trg1_1 -before INSERT on t1 for each row -set new.f1 = 'trig 1_1-yes'; -rollback work; -insert into t1 (f1) values ('insert-no'); -select f1 from t1 order by f1; -f1 -trig 1_1-yes -create definer=test_yesprivs@localhost trigger trg1_2 -before UPDATE on t1 for each row -set new.f1 = 'trig 1_2-yes'; -commit work; -update t1 set f1 = 'update-yes' where f1 like '%trig%'; -select f1 from t1 order by f1; -f1 -trig 1_2-yes -commit work; -drop trigger trg1_1; -rollback work; -drop trigger trg1_1; -ERROR HY000: Trigger does not exist -drop trigger trg1_2; -commit work; -set autocommit=1; -select current_user; -current_user -root@localhost -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; - -####### Testcase for column privileges of triggers: ####### ------------------------------------------------------------ -drop database if exists priv_db; -drop database if exists no_priv_db; -create database priv_db; -use priv_db; -create table t1 (f1 char(20)) engine= ndb; -create table t2 (f1 char(20)) engine= ndb; -create User test_yesprivs@localhost; -set password for test_yesprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; -grant TRIGGER on priv_db.* to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -create User test_noprivs@localhost; -set password for test_noprivs@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; -grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost; -show grants for test_noprivs@localhost; -Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost' - -update only on column: ----------------------- -select current_user; -current_user -root@localhost -grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t1 -to test_yesprivs@localhost; -grant SELECT(f1),INSERT,UPDATE(f1) on priv_db.t2 -to test_yesprivs@localhost; -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert1-yes'); -insert into t2 (f1) values ('insert1-yes'); -create trigger trg1_1 before UPDATE on t1 for each row -set new.f1 = 'trig 1_1-yes'; -create trigger trg2_1 before UPDATE on t2 for each row -set new.f1 = 'trig 2_1-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -select f1 from t1 order by f1; -f1 -insert1-yes -update t1 set f1 = 'update1_no' - where f1 like '%insert%'; -select f1 from t1 order by f1; -f1 -trig 1_1-yes -select f1 from t2 order by f1; -f1 -insert1-yes -update t2 set f1 = 'update1_no' - where f1 like '%insert%'; -select f1 from t2 order by f1; -f1 -trig 2_1-yes -select current_user; -current_user -root@localhost -revoke UPDATE on priv_db.* -from test_yesprivs@localhost; -revoke UPDATE(f1) on priv_db.t2 -from test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -insert into t1 (f1) values ('insert2-yes'); -insert into t2 (f1) values ('insert2-yes'); -select current_user; -current_user -test_noprivs@localhost -use priv_db; -update t1 set f1 = 'update2_no' - where f1 like '%insert%'; -update t2 set f1 = 'update2_no' - where f1 like '%insert%'; -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2' -update t1 set f1 = 'update3_no' - where f1 like '%insert%'; -update t2 set f1 = 'update3_no' - where f1 like '%insert%'; -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't2' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -select f1 from t2 order by f1; -f1 -insert2-yes -trig 2_1-yes - -check if access only on one of three columns --------------------------------------------- -select current_user; -current_user -root@localhost -alter table priv_db.t1 add f2 char(20), add f3 int; -revoke TRIGGER on priv_db.* from test_yesprivs@localhost; -grant TRIGGER,SELECT on priv_db.t1 to test_yesprivs@localhost; -grant UPDATE on priv_db.t2 to test_yesprivs@localhost; -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -insert into t1 values ('insert2-yes','insert2-yes',1); -insert into t1 values ('insert3-yes','insert3-yes',2); -select * from t1 order by f1; -f1 f2 f3 -insert2-yes insert2-yes 1 -insert3-yes insert3-yes 2 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -select current_user; -current_user -test_noprivs@localhost -use priv_db; -update t1 set f1 = 'update4-no', -f2 = 'update4-yes', -f3 = f3*10 -where f2 like '%yes'; -select * from t1 order by f1,f2,f3; -f1 f2 f3 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -trig 1_1-yes update4-yes 10 -trig 1_1-yes update4-yes 20 -select current_user; -current_user -test_yesprivs@localhost -create trigger trg1_2 after UPDATE on t1 for each row -set @f2 = 'trig 1_2-yes'; -select current_user; -current_user -test_noprivs@localhost -update t1 set f1 = 'update5-yes', -f2 = 'update5-yes' - where f2 like '%yes'; -select * from t1 order by f1,f2,f3; -f1 f2 f3 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -trig 1_1-yes update5-yes 10 -trig 1_1-yes update5-yes 20 -select @f2; -@f2 -trig 1_2-yes -update t1 set f1 = 'update6_no' - where f1 like '%insert%'; -update t2 set f1 = 'update6_no' - where f1 like '%insert%'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -update t1 set f1 = 'update7_no' - where f1 like '%insert%'; -update t2 set f1 = 'update7_no' - where f1 like '%insert%'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2' -select f1 from t1 order by f1; -f1 -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -trig 1_1-yes -select f1 from t2 order by f1; -f1 -insert2-yes -trig 2_1-yes - -check if rejected without trigger privilege: --------------------------------------------- -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -select current_user; -current_user -test_noprivs@localhost -update t1 set f1 = 'update8-no', -f2 = 'update8-no' - where f2 like '%yes'; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select * from t1 order by f1,f2,f3; -f1 f2 f3 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -trig 1_1-yes update5-yes 10 -trig 1_1-yes update5-yes 20 -select @f2; -@f2 -trig 1_2-yes - -check trigger, but not update privilege on column: --------------------------------------------------- -select current_user; -current_user -root@localhost -revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost; -grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1 -to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_yesprivs@localhost -use priv_db; -drop trigger trg1_1; -create trigger trg1_3 before UPDATE on t1 for each row -set new.f1 = 'trig 1_3-yes'; -select current_user; -current_user -test_noprivs@localhost -use priv_db; -update t1 set f1 = 'update9-no', -f2 = 'update9-no' - where f2 like '%yes'; -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1' -select * from t1 order by f1,f2,f3; -f1 f2 f3 -trig 1_1-yes NULL NULL -trig 1_1-yes NULL NULL -trig 1_1-yes update5-yes 10 -trig 1_1-yes update5-yes 20 -update t1 set f3= f3+1; -ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1' -select f3 from t1 order by f3; -f3 -NULL -NULL -10 -20 -select current_user; -current_user -root@localhost -revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; -grant UPDATE(f1),UPDATE(f2),UPDATE(f3) on priv_db.t1 -to test_yesprivs@localhost; -show grants for test_yesprivs@localhost; -Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' -select current_user; -current_user -test_noprivs@localhost -use priv_db; -update t1 set f3= f3+1; -ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' -select f3 from t1 order by f3; -f3 -NULL -NULL -10 -20 - -##### trigger privilege on column level? ####### ------------------------------------------------- -grant TRIGGER(f1) on priv_db.t1 to test_yesprivs@localhost; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(f1) on priv_db.t1 to test_yesprivs@localhost' at line 1 -select current_user; -current_user -root@localhost -drop database if exists priv_db; -drop user test_yesprivs@localhost; -drop user test_noprivs@localhost; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result deleted file mode 100644 index 8597f252e54..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result +++ /dev/null @@ -1,470 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 - -Testcase: 3.5: --------------- -create User test_general@localhost; -set password for test_general@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; -create User test_super@localhost; -set password for test_super@localhost = password('PWD'); -grant ALL on *.* to test_super@localhost with grant OPTION; - -Testcase 3.5.4: ---------------- -use test; - -Testcase 3.5.4.1: ------------------ -create database db_drop; -Use db_drop; -create table t1 (f1 char(30)) engine = ; -grant INSERT, SELECT on db_drop.t1 to test_general; -Use db_drop; -Create trigger trg1 BEFORE INSERT on t1 -for each row set new.f1='Trigger 3.5.4.1'; -Use db_drop; -Insert into t1 values ('Insert error 3.5.4.1'); -Select * from t1 order by f1; -f1 -Trigger 3.5.4.1 -drop trigger trg1; -select trigger_schema, trigger_name, event_object_table -from information_schema.triggers -where trigger_schema = 'db_drop' - order by trigger_name; -trigger_schema trigger_name event_object_table -Insert into t1 values ('Insert no trigger 3.5.4.1'); -Select * from t1 order by f1; -f1 -Insert no trigger 3.5.4.1 -Trigger 3.5.4.1 -drop trigger trg1; -drop database if exists db_drop; -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - -Testcase 3.5.4.2: ------------------ -create database db_drop2; -Use db_drop2; -drop table if exists t1_432 ; -create table t1_432 (f1 char (30)) engine = ; -Drop trigger tr_does_not_exit; -ERROR HY000: Trigger does not exist -drop table if exists t1_432 ; -drop database if exists db_drop2; - -Testcase 3.5.4.3: ------------------ -create database db_drop3; -Use db_drop3; -drop table if exists t1_433 ; -drop table if exists t1_433a ; -create table t1_433 (f1 char (30)) engine = ; -create table t1_433a (f1a char (5)) engine = ; -CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row -set new.f1 = 'Trigger 3.5.4.3'; -Drop trigger t1.433.trg3; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1 -Drop trigger db_drop3.t1.433.trg3; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.433.trg3' at line 1 -Drop trigger mysql.trg3; -ERROR HY000: Trigger does not exist -Drop trigger tbx.trg3; -ERROR HY000: Trigger does not exist -Drop trigger db_drop3.trg3; -drop table if exists t1_433; -drop table if exists t1_433a; -drop database if exists db_drop3; - -Testcase 3.5.4.4: ------------------ -create database db_drop4; -Use db_drop4; -create table t1 (f1 char(30)) engine = ; -grant INSERT, SELECT on db_drop4.t1 to test_general; -Create trigger trg4 BEFORE INSERT on t1 -for each row set new.f1='Trigger 3.5.4.4'; -Use db_drop4; -Insert into t1 values ('Insert 3.5.4.4'); -Select * from t1; -f1 -Trigger 3.5.4.4 -Drop database db_drop4; -Show databases like 'db_drop4'; -Database (db_drop4) -select trigger_schema, trigger_name, event_object_table -from information_schema.triggers -where information_schema.triggers.trigger_name='trg4'; -trigger_schema trigger_name event_object_table -create database db_drop4; -Use db_drop4; -create table t1 (f1 char(30)) engine = ; -grant INSERT, SELECT on db_drop4.t1 to test_general; -Insert into t1 values ('2nd Insert 3.5.4.4'); -Select * from t1; -f1 -2nd Insert 3.5.4.4 -drop trigger trg4; -ERROR HY000: Trigger does not exist -drop database if exists db_drop4; -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - -Testcase 3.5.4.5: ------------------ -create database db_drop5; -Use db_drop5; -create table t1 (f1 char(50)) engine = ; -grant INSERT, SELECT on t1 to test_general; -Create trigger trg5 BEFORE INSERT on t1 -for each row set new.f1='Trigger 3.5.4.5'; -Use db_drop5; -Insert into t1 values ('Insert 3.5.4.5'); -Select * from t1; -f1 -Trigger 3.5.4.5 -Drop table t1; -Show tables; -Tables_in_db_drop5 -select trigger_schema, trigger_name, event_object_table -from information_schema.triggers -where information_schema.triggers.trigger_name='trg5'; -trigger_schema trigger_name event_object_table -create table t1 (f1 char(50)) engine = ; -grant INSERT, SELECT on t1 to test_general; -Insert into t1 values ('2nd Insert 3.5.4.5'); -Select * from t1; -f1 -2nd Insert 3.5.4.5 -drop trigger trg5; -ERROR HY000: Trigger does not exist -drop database if exists db_drop5; -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - -Testcase 3.5.5: ---------------- -use test; - -Testcase 3.5.5.1: ------------------ -Create trigger trg1 before INSERT on t100 for each row set new.f2=1000; -ERROR 42S02: Table 'test.t100' doesn't exist - -Testcase 3.5.5.2: ------------------ -Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned); -Create trigger trg2 before INSERT -on t1_temp for each row set new.f2=9999; -ERROR HY000: Trigger's 't1_temp' is view or temporary table -drop table t1_temp; - -Testcase 3.5.5.3: ------------------ -Create view vw3 as select f118 from tb3; -Create trigger trg3 before INSERT -on vw3 for each row set new.f118='s'; -ERROR HY000: 'test.vw3' is not BASE TABLE -drop view vw3; - -Testcase 3.5.5.4: ------------------ -create database dbtest_one; -create database dbtest_two; -use dbtest_two; -create table t2 (f1 char(15)) engine = ; -use dbtest_one; -create trigger trg4 before INSERT -on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; -ERROR HY000: Trigger in wrong schema -grant INSERT, SELECT on dbtest_two.t2 to test_general; -grant SELECT on dbtest_one.* to test_general; -use dbtest_two; -Insert into t2 values ('1st Insert 3.5.5.4'); -Warnings: -Warning 1265 Data truncated for column 'f1' at row 1 -Select * from t2; -f1 -1st Insert 3.5. -use dbtest_one; -Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4'); -Warnings: -Warning 1265 Data truncated for column 'f1' at row 1 -Select * from dbtest_two.t2 order by f1; -f1 -1st Insert 3.5. -2nd Insert 3.5. -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; -DROP DATABASE if exists dbtest_one; -drop database if EXISTS dbtest_two; - -Testcase 3.5.6: ---------------- -use test; - -Testcase 3.5.6.1 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.6.2 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.6.3: ------------------ -Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DURING UPDATE on tb3 for each row set new.f132=25' at line 1 -Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TIME INSERT on tb3 for each row set new.f132=15' at line 1 -drop trigger tb3.trg3_1; -drop trigger tb3.trg3_2; - -Testcase 3.5.6.4 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.6.5 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.7.1 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.7.2 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.7.3 (see Testcase 3.5.1.1) ---------------------------------------- - -Testcase 3.5.7.4: ------------------ -Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT on tb3 for each row set new.f132=5' at line 1 -Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUE on tb3 for each row set new.f132=1' at line 1 -drop trigger tb3.trg4_1; -drop trigger tb3.trg4_2; - -Testcase 3.5.7.5 / 3.5.7.6: ---------------------------- -Create trigger trg5_1 BEFORE INSERT -on tb3 for each row set new.f122='Trigger1 3.5.7.5/6'; -Create trigger trg5_2 BEFORE INSERT -on tb3 for each row set new.f122='Trigger2 3.5.7.5'; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5'); -Select f121,f122 from tb3 where f121='Test 3.5.7.5/6'; -f121 f122 -Test 3.5.7.5/6 Trigger1 3.5.7.5/6 -update tb3 set f122='Update 3.5.7.6' where f121= 'Test 3.5.7.5/6'; -Select f121,f122 from tb3 where f121='Test 3.5.7.5/6'; -f121 f122 -Test 3.5.7.5/6 Update 3.5.7.6 -drop trigger trg5_1; -drop trigger trg5_2; -delete from tb3 where f121='Test 3.5.7.5/6'; - -Testcase 3.5.7.7 / 3.5.7.8: ---------------------------- -set @test_var='Before trig 3.5.7.7'; -Create trigger trg6_1 AFTER INSERT -on tb3 for each row set @test_var='Trigger1 3.5.7.7/8'; -Create trigger trg6_2 AFTER INSERT -on tb3 for each row set @test_var='Trigger2 3.5.7.7'; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -select @test_var; -@test_var -Before trig 3.5.7.7 -Insert into tb3 (f121,f122) values ('Test 3.5.7.7/8','Insert 3.5.7.7'); -Select f121,f122 from tb3 where f121='Test 3.5.7.7/8'; -f121 f122 -Test 3.5.7.7/8 Insert 3.5.7.7 -select @test_var; -@test_var -Trigger1 3.5.7.7/8 -update tb3 set f122='Update 3.5.7.8' where f121= 'Test 3.5.7.7/8'; -Select f121,f122 from tb3 where f121='Test 3.5.7.7/8'; -f121 f122 -Test 3.5.7.7/8 Update 3.5.7.8 -select @test_var; -@test_var -Trigger1 3.5.7.7/8 -drop trigger trg6_1; -drop trigger trg6_2; -delete from tb3 where f121='Test 3.5.7.7/8'; - -Testcase 3.5.7.9/10: --------------------- -Create trigger trg7_1 BEFORE UPDATE -on tb3 for each row set new.f122='Trigger1 3.5.7.9/10'; -Create trigger trg7_2 BEFORE UPDATE -on tb3 for each row set new.f122='Trigger2 3.5.7.9'; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9'); -Select f121,f122 from tb3 where f121='Test 3.5.7.9/10'; -f121 f122 -Test 3.5.7.9/10 Insert 3.5.7.9 -update tb3 set f122='update 3.5.7.10' where f121='Test 3.5.7.9/10'; -Select f121,f122 from tb3 where f121='Test 3.5.7.9/10'; -f121 f122 -Test 3.5.7.9/10 Trigger1 3.5.7.9/10 -drop trigger trg7_1; -drop trigger trg7_2; -delete from tb3 where f121='Test 3.5.7.9/10'; - -Testcase 3.5.7.11/12: ---------------------- -set @test_var='Before trig 3.5.7.11'; -Create trigger trg8_1 AFTER UPDATE -on tb3 for each row set @test_var='Trigger 3.5.7.11/12'; -Create trigger trg8_2 AFTER UPDATE -on tb3 for each row set @test_var='Trigger2 3.5.7.11'; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -select @test_var; -@test_var -Before trig 3.5.7.11 -Insert into tb3 (f121,f122) values ('Test 3.5.7.11/12','Insert 3.5.7.11/12'); -select @test_var; -@test_var -Before trig 3.5.7.11 -Select f121,f122 from tb3 where f121='Test 3.5.7.11/12'; -f121 f122 -Test 3.5.7.11/12 Insert 3.5.7.11/12 -update tb3 set f122='update 3.5.7.12' where f121='Test 3.5.7.11/12'; -Select f121,f122 from tb3 where f121='Test 3.5.7.11/12'; -f121 f122 -Test 3.5.7.11/12 update 3.5.7.12 -select @test_var; -@test_var -Trigger 3.5.7.11/12 -delete from tb3 where f121='Test 3.5.7.11/12'; -drop trigger trg8_1; -drop trigger trg8_2; -delete from tb3 where f121='Test 3.5.7.11/12'; - -Testcase 3.5.7.13/14: ---------------------- -set @test_var=1; -Create trigger trg9_1 BEFORE DELETE -on tb3 for each row set @test_var=@test_var+1; -Create trigger trg9_2 BEFORE DELETE -on tb3 for each row set @test_var=@test_var+10; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -select @test_var; -@test_var -1 -Insert into tb3 (f121,f122) values ('Test 3.5.7.13/14','Insert 3.5.7.13'); -Select f121,f122 from tb3 where f121='Test 3.5.7.13/14'; -f121 f122 -Test 3.5.7.13/14 Insert 3.5.7.13 -select @test_var; -@test_var -1 -delete from tb3 where f121='Test 3.5.7.13/14'; -Select f121,f122 from tb3 where f121='Test 3.5.7.13/14'; -f121 f122 -select @test_var; -@test_var -2 -delete from tb3 where f121='Test 3.5.7.13/14'; -select @test_var; -@test_var -2 -drop trigger trg9_1; -drop trigger trg9_2; -delete from tb3 where f121='Test 3.5.7.13/14'; - -Testcase 3.5.7.15/16: ---------------------- -set @test_var=1; -Create trigger trg_3_406010_1 AFTER DELETE -on tb3 for each row set @test_var=@test_var+5; -Create trigger trg_3_406010_2 AFTER DELETE -on tb3 for each row set @test_var=@test_var+50; -ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' -Create trigger trg_3_406010_1 AFTER INSERT -on tb3 for each row set @test_var=@test_var+1; -ERROR HY000: Trigger already exists -select @test_var; -@test_var -1 -Insert into tb3 (f121,f122) values ('Test 3.5.7.15/16','Insert 3.5.7.15/16'); -Select f121,f122 from tb3 where f121='Test 3.5.7.15/16'; -f121 f122 -Test 3.5.7.15/16 Insert 3.5.7.15/16 -select @test_var; -@test_var -1 -delete from tb3 where f121='Test 3.5.7.15/16'; -Select f121,f122 from tb3 where f121='Test 3.5.7.15/16'; -f121 f122 -select @test_var; -@test_var -6 -delete from tb3 where f121='Test 3.5.7.15/16'; -select @test_var; -@test_var -6 -drop trigger trg_3_406010_1; -drop trigger trg_3_406010_2; -delete from tb3 where f121='Test 3.5.7.15/16'; - -Testcase 3.5.7.17 (see Testcase 3.5.1.1) ----------------------------------------- -drop user test_general@localhost; -drop user test_general; -drop user test_super@localhost; -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_08.result b/mysql-test/suite/funcs_1/r/ndb_trig_08.result deleted file mode 100644 index b2b38694680..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_08.result +++ /dev/null @@ -1,527 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 - -Testcase: 3.5: --------------- -create User test_general@localhost; -set password for test_general@localhost = password('PWD'); -revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; -create User test_super@localhost; -set password for test_super@localhost = password('PWD'); -grant ALL on *.* to test_super@localhost with grant OPTION; - -Testcase 3.5.8.1: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.8.2: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.8.3/4: -------------------- -create database db_test; -grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general; -grant LOCK TABLES on db_test.* to test_general; -Use db_test; -create table t1_i ( -i120 char ascii not null DEFAULT b'101', -i136 smallint zerofill not null DEFAULT 999, -i144 int zerofill not null DEFAULT 99999, -i163 decimal (63,30)) engine=; -create table t1_u ( -u120 char ascii not null DEFAULT b'101', -u136 smallint zerofill not null DEFAULT 999, -u144 int zerofill not null DEFAULT 99999, -u163 decimal (63,30)) engine=; -create table t1_d ( -d120 char ascii not null DEFAULT b'101', -d136 smallint zerofill not null DEFAULT 999, -d144 int zerofill not null DEFAULT 99999, -d163 decimal (63,30)) engine=; -Insert into t1_u values ('a',111,99999,999.99); -Insert into t1_u values ('b',222,99999,999.99); -Insert into t1_u values ('c',333,99999,999.99); -Insert into t1_u values ('d',222,99999,999.99); -Insert into t1_u values ('e',222,99999,999.99); -Insert into t1_u values ('f',333,99999,999.99); -Insert into t1_d values ('a',111,99999,999.99); -Insert into t1_d values ('b',222,99999,999.99); -Insert into t1_d values ('c',333,99999,999.99); -Insert into t1_d values ('d',444,99999,999.99); -Insert into t1_d values ('e',222,99999,999.99); -Insert into t1_d values ('f',222,99999,999.99); - -3.5.8.4 - multiple SQL ----------------------- -use test; -Create trigger trg1 AFTER INSERT on tb3 for each row -BEGIN -insert into db_test.t1_i -values (new.f120, new.f136, new.f144, new.f163); -update db_test.t1_u -set u144=new.f144, u163=new.f163 -where u136=new.f136; -delete from db_test.t1_d where d136= new.f136; -select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u -where u136= new.f136; -END// -Use test; -set @test_var=0; -Insert into tb3 (f120, f122, f136, f144, f163) -values ('1', 'Test 3.5.8.4', 222, 23456, 1.05); -Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4'; -f120 f122 f136 f144 f163 -1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_i; -i120 i136 i144 i163 -1 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u; -u120 u136 u144 u163 -a 00111 0000099999 999.990000000000000000000000000000 -b 00222 0000023456 1.050000000000000000000000000000 -c 00333 0000099999 999.990000000000000000000000000000 -d 00222 0000023456 1.050000000000000000000000000000 -e 00222 0000023456 1.050000000000000000000000000000 -f 00333 0000099999 999.990000000000000000000000000000 -select * from db_test.t1_d; -d120 d136 d144 d163 -a 00111 0000099999 999.990000000000000000000000000000 -c 00333 0000099999 999.990000000000000000000000000000 -d 00444 0000099999 999.990000000000000000000000000000 -select @test_var; -@test_var -3.150000000000000000000000000000 - -3.5.8.4 - single SQL - insert ------------------------------ -Create trigger trg2 BEFORE UPDATE on tb3 for each row -BEGIN -insert into db_test.t1_i -values (new.f120, new.f136, new.f144, new.f163); -END// -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_i order by i120; -i120 i136 i144 i163 -1 00222 0000023456 1.050000000000000000000000000000 -update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert' - where f122='Test 3.5.8.4'; -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_i order by i120; -i120 i136 i144 i163 -1 00222 0000023456 1.050000000000000000000000000000 -I 00222 0000023456 1.050000000000000000000000000000 - -3.5.8.4 - single SQL - update ------------------------------ -drop trigger trg2; -Create trigger trg3 BEFORE UPDATE on tb3 for each row -update db_test.t1_u -set u120=new.f120 -where u136=new.f136; -update tb3 set f120='U', f122='Test 3.5.8.4-Single Update' - where f122='Test 3.5.8.4-Single Insert'; -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u order by u120; -u120 u136 u144 u163 -a 00111 0000099999 999.990000000000000000000000000000 -c 00333 0000099999 999.990000000000000000000000000000 -f 00333 0000099999 999.990000000000000000000000000000 -U 00222 0000023456 1.050000000000000000000000000000 -U 00222 0000023456 1.050000000000000000000000000000 -U 00222 0000023456 1.050000000000000000000000000000 - -3.5.8.3/4 - single SQL - delete -------------------------------- -drop trigger trg3; -Create trigger trg4 AFTER UPDATE on tb3 for each row -delete from db_test.t1_d where d136= new.f136; -update tb3 set f120='D', f136=444, -f122='Test 3.5.8.4-Single Delete' - where f122='Test 3.5.8.4-Single Update'; -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_d order by d120; -d120 d136 d144 d163 -a 00111 0000099999 999.990000000000000000000000000000 -c 00333 0000099999 999.990000000000000000000000000000 - -3.5.8.3/4 - single SQL - select -------------------------------- -drop trigger trg4; -Create trigger trg5 AFTER UPDATE on tb3 for each row -select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u -where u136= new.f136; -set @test_var=0; -update tb3 set f120='S', f136=111, -f122='Test 3.5.8.4-Single Select' - where f122='Test 3.5.8.4-Single Delete'; -Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; -f120 f122 f136 f144 f163 -S Test 3.5.8.4-Single Select 00111 0000023456 1.050000000000000000000000000000 -select @test_var; -@test_var -999.990000000000000000000000000000 -drop trigger trg1; -drop trigger trg5; -drop database if exists db_test; -delete from tb3 where f122 like 'Test 3.5.8.4%'; -revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost'; - -Testcase 3.5.8.5 (IF): ----------------------- -create trigger trg2 before insert on tb3 for each row -BEGIN -IF new.f120='1' then -set @test_var='one', new.f120='2'; -ELSEIF new.f120='2' then -set @test_var='two', new.f120='3'; -ELSEIF new.f120='3' then -set @test_var='three', new.f120='4'; -END IF; -IF (new.f120='4') and (new.f136=10) then -set @test_var2='2nd if', new.f120='d'; -ELSE -set @test_var2='2nd else', new.f120='D'; -END IF; -END// -set @test_var='Empty', @test_var2=0; -Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101); -select f120, f122, f136, @test_var, @test_var2 -from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; -f120 f122 f136 @test_var @test_var2 -D Test 3.5.8.5-if 00101 one 2nd else -Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102); -select f120, f122, f136, @test_var, @test_var2 -from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; -f120 f122 f136 @test_var @test_var2 -D Test 3.5.8.5-if 00101 two 2nd else -D Test 3.5.8.5-if 00102 two 2nd else -Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10); -select f120, f122, f136, @test_var, @test_var2 -from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; -f120 f122 f136 @test_var @test_var2 -d Test 3.5.8.5-if 00010 three 2nd if -D Test 3.5.8.5-if 00101 three 2nd if -D Test 3.5.8.5-if 00102 three 2nd if -Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103); -select f120, f122, f136, @test_var, @test_var2 -from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; -f120 f122 f136 @test_var @test_var2 -d Test 3.5.8.5-if 00010 three 2nd else -D Test 3.5.8.5-if 00101 three 2nd else -D Test 3.5.8.5-if 00102 three 2nd else -D Test 3.5.8.5-if 00103 three 2nd else -create trigger trg3 before update on tb3 for each row -BEGIN -ELSEIF new.f120='2' then -END IF; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ELSEIF new.f120='2' then -END IF; -END' at line 3 -drop trigger trg3// -create trigger trg4 before update on tb3 for each row -BEGIN -IF (new.f120='4') and (new.f136=10) then -set @test_var2='2nd if', new.f120='d'; -ELSE -set @test_var2='2nd else', new.f120='D'; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7 -drop trigger trg4; -drop trigger trg2; -delete from tb3 where f121='Test 3.5.8.5-if'; - -Testcase 3.5.8.5-case: ----------------------- -create trigger trg3 before insert on tb3 for each row -BEGIN -SET new.f120=char(ascii(new.f120)-32); -CASE -when new.f136<100 then set new.f136=new.f136+120; -when new.f136<10 then set new.f144=777; -when new.f136>100 then set new.f120=new.f136-1; -END case; -CASE -when new.f136=200 then set @test_var=CONCAT(new.f120, '='); -ELSE set @test_var=concat(new.f120, '*'); -END case; -CASE new.f144 -when 1 then set @test_var=concat(@test_var, 'one'); -when 2 then set @test_var=concat(@test_var, 'two'); -when 3 then set @test_var=concat(@test_var, 'three'); -when 4 then set @test_var=concat(@test_var, 'four'); -when 5 then set @test_var=concat(@test_var, 'five'); -when 6 then set @test_var=concat(@test_var, 'six'); -when 7 then set @test_var=concat(@test_var, 'seven'); -when 8 then set @test_var=concat(@test_var, 'eight'); -when 9 then set @test_var=concat(@test_var, 'nine'); -when 10 then set @test_var=concat(@test_var, 'ten'); -when 11 then set @test_var=concat(@test_var, 'eleven'); -when 12 then set @test_var=concat(@test_var, 'twelve'); -when 13 then set @test_var=concat(@test_var, 'thirteen'); -when 14 then set @test_var=concat(@test_var, 'fourteen'); -when 15 then set @test_var=concat(@test_var, 'fifteen'); -ELSE set @test_var=CONCAT(new.f120, '*', new.f144); -END case; -END// -set @test_var='Empty'; -Insert into tb3 (f120, f122, f136, f144) -values ('a', 'Test 3.5.8.5-case', 5, 7); -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -A Test 3.5.8.5-case 00125 0000000007 A*seven -Insert into tb3 (f120, f122, f136, f144) -values ('b', 'Test 3.5.8.5-case', 71,16); -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -A Test 3.5.8.5-case 00125 0000000007 B*0000000016 -B Test 3.5.8.5-case 00191 0000000016 B*0000000016 -Insert into tb3 (f120, f122, f136, f144) -values ('c', 'Test 3.5.8.5-case', 80,1); -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -A Test 3.5.8.5-case 00125 0000000007 C=one -B Test 3.5.8.5-case 00191 0000000016 C=one -C Test 3.5.8.5-case 00200 0000000001 C=one -Insert into tb3 (f120, f122, f136) -values ('d', 'Test 3.5.8.5-case', 152); -Warnings: -Warning 1265 Data truncated for column 'f120' at row 1 -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -1 Test 3.5.8.5-case 00152 0000099999 1*0000099999 -A Test 3.5.8.5-case 00125 0000000007 1*0000099999 -B Test 3.5.8.5-case 00191 0000000016 1*0000099999 -C Test 3.5.8.5-case 00200 0000000001 1*0000099999 -Insert into tb3 (f120, f122, f136, f144) -values ('e', 'Test 3.5.8.5-case', 200, 8); -Warnings: -Warning 1265 Data truncated for column 'f120' at row 1 -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight -A Test 3.5.8.5-case 00125 0000000007 1=eight -B Test 3.5.8.5-case 00191 0000000016 1=eight -C Test 3.5.8.5-case 00200 0000000001 1=eight -Insert into tb3 (f120, f122, f136, f144) -values ('f', 'Test 3.5.8.5-case', 100, 8); -select f120, f122, f136, f144, @test_var -from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; -f120 f122 f136 f144 @test_var -1 Test 3.5.8.5-case 00152 0000099999 1=eight -1 Test 3.5.8.5-case 00200 0000000008 1=eight -A Test 3.5.8.5-case 00125 0000000007 1=eight -B Test 3.5.8.5-case 00191 0000000016 1=eight -C Test 3.5.8.5-case 00200 0000000001 1=eight -create trigger trg3a before update on tb3 for each row -BEGIN -CASE -when new.f136<100 then set new.f120='p'; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5 -drop trigger trg3a; -drop trigger trg3; -delete from tb3 where f121='Test 3.5.8.5-case'; - -Testcase 3.5.8.5-loop/leave: ----------------------------- -Create trigger trg4 after insert on tb3 for each row -BEGIN -set @counter=0, @flag='Initial'; -Label1: loop -if new.f136 new.f136 END REPEAT rp_label; -END// -set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) -values ('Test 3.5.8.5-repeat', 13); -select @counter1, @counter2; -@counter1 @counter2 -15 8 -Create trigger trg6_2 after update on tb3 for each row -BEGIN -REPEAT -SET @counter2 = @counter2 + 1; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5 -drop trigger trg6; -delete from tb3 where f122='Test 3.5.8.5-repeat'; - -Testcase 3.5.8.5-while: ------------------------ -Create trigger trg7 after insert on tb3 for each row -wl_label: WHILE @counter1 < new.f136 DO -SET @counter1 = @counter1 + 1; -IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label; -END IF; -SET @counter2 = @counter2 + 1; -END WHILE wl_label// -set @counter1= 0, @counter2= 0; -Insert into tb3 (f122, f136) -values ('Test 3.5.8.5-while', 7); -select @counter1, @counter2; -@counter1 @counter2 -7 4 -Create trigger trg7_2 after update on tb3 for each row -BEGIN -WHILE @counter1 < new.f136 -SET @counter1 = @counter1 + 1; -END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; -END' at line 4 -delete from tb3 where f122='Test 3.5.8.5-while'; -drop trigger trg7; - -Testcase 3.5.8.6: (requirement void) ------------------------------------- -CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END// -CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW -BEGIN -CALL sp_01 (); -END// -Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101); -update tb3 set f120='S', f136=111, -f122='Test 3.5.8.6-tr8_1' - where f122='Test 3.5.8.6-insert'; -select f120, f122 -from tb3 where f122 like 'Test 3.5.8.6%' order by f120; -f120 f122 -S Test 3.5.8.6-tr8_1 -DROP TRIGGER trg8_1; -DROP PROCEDURE sp_01; - -Testcase 3.5.8.7 ----------------- -Create trigger trg9_1 before update on tb3 for each row -BEGIN -Start transaction; -Set new.f120='U'; -Commit; -END// -ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. -Create trigger trg9_2 before delete on tb3 for each row -BEGIN -Start transaction; -Set @var2=old.f120; -Rollback; -END// -ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. -drop user test_general@localhost; -drop user test_general; -drop user test_super@localhost; -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_09.result b/mysql-test/suite/funcs_1/r/ndb_trig_09.result deleted file mode 100644 index 986506b4e71..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_09.result +++ /dev/null @@ -1,269 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data/funcs_1/memory_tb3.txt' -into table tb3; - -Testcase 3.5.9.1/2: -------------------- -Create trigger trg1 BEFORE UPDATE on tb3 for each row -set new.f142 = 94087, @counter=@counter+1; -TotalRows -10 -Affected -9 -NotAffected -1 -NewValuew -0 -set @counter=0; -Update tb3 Set f142='1' where f130<100; -select count(*) as ExpectedChanged, @counter as TrigCounter -from tb3 where f142=94087; -ExpectedChanged TrigCounter -9 9 -select count(*) as ExpectedNotChange from tb3 -where f130<100 and f142<>94087; -ExpectedNotChange -0 -select count(*) as NonExpectedChanged from tb3 -where f130>=130 and f142=94087; -NonExpectedChanged -0 -drop trigger trg1; - -Testcase 3.5.9.3: ------------------ -Create trigger trg2_a before update on tb3 for each row -set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121, -@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136, -@tr_var_b4_163=old.f163; -Create trigger trg2_b after update on tb3 for each row -set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121, -@tr_var_af_122=old.f122, @tr_var_af_136=old.f136, -@tr_var_af_163=old.f163; -Create trigger trg2_c before delete on tb3 for each row -set @tr_var_b4_118=old.f118, @tr_var_b4_121=old.f121, -@tr_var_b4_122=old.f122, @tr_var_b4_136=old.f136, -@tr_var_b4_163=old.f163; -Create trigger trg2_d after delete on tb3 for each row -set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121, -@tr_var_af_122=old.f122, @tr_var_af_136=old.f136, -@tr_var_af_163=old.f163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 -0 0 0 0 0 -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 -0 0 0 0 0 -Insert into tb3 (f122, f136, f163) -values ('Test 3.5.9.3', 7, 123.17); -Update tb3 Set f136=8 where f122='Test 3.5.9.3'; -select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; -f118 f121 f122 f136 f163 -a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000 -select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, -@tr_var_b4_136, @tr_var_b4_163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 -a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 -select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, -@tr_var_af_136, @tr_var_af_163; -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 -a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 -0 0 0 0 0 -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 -0 0 0 0 0 -delete from tb3 where f122='Test 3.5.9.3'; -select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; -f118 f121 f122 f136 f163 -select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, -@tr_var_b4_136, @tr_var_b4_163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 -a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 -select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, -@tr_var_af_136, @tr_var_af_163; -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 -a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 -drop trigger trg2_a; -drop trigger trg2_b; -drop trigger trg2_c; -drop trigger trg2_d; - -Testcase 3.5.9.4: ------------------ -Create trigger trg3_a before insert on tb3 for each row -set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121, -@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136, -@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163; -Create trigger trg3_b after insert on tb3 for each row -set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121, -@tr_var_af_122=new.f122, @tr_var_af_136=new.f136, -@tr_var_af_151=new.f151, @tr_var_af_163=new.f163; -Create trigger trg3_c before update on tb3 for each row -set @tr_var_b4_118=new.f118, @tr_var_b4_121=new.f121, -@tr_var_b4_122=new.f122, @tr_var_b4_136=new.f136, -@tr_var_b4_151=new.f151, @tr_var_b4_163=new.f163; -Create trigger trg3_d after update on tb3 for each row -set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121, -@tr_var_af_122=new.f122, @tr_var_af_136=new.f136, -@tr_var_af_151=new.f151, @tr_var_af_163=new.f163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 -0 0 0 0 0 0 -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 -0 0 0 0 0 0 -Insert into tb3 (f122, f136, f151, f163) -values ('Test 3.5.9.4', 7, DEFAULT, 995.24); -select f118, f121, f122, f136, f151, f163 from tb3 -where f122 like 'Test 3.5.9.4%' order by f163; -f118 f121 f122 f136 f151 f163 -a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000 -select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, -@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 -a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 -select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, -@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 -a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 -0 0 0 0 0 0 -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 -0 0 0 0 0 0 -Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL -where f122='Test 3.5.9.4'; -Warnings: -Warning 1048 Column 'f136' cannot be null -Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL -where f122='Test 3.5.9.4'; -select f118, f121, f122, f136, f151, f163 from tb3 -where f122 like 'Test 3.5.9.4-trig' order by f163; -f118 f121 f122 f136 f151 f163 -a NULL Test 3.5.9.4-trig 00000 999 NULL -select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, -@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; -@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 -a NULL Test 3.5.9.4-trig 0 999 NULL -select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, -@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; -@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 -a NULL Test 3.5.9.4-trig 0 999 NULL -drop trigger trg3_a; -drop trigger trg3_b; -drop trigger trg3_c; -drop trigger trg3_d; -delete from tb3 where f122='Test 3.5.9.4-trig'; - -Testcase 3.5.9.5: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.9.6: ------------------ -create trigger trg4a before insert on tb3 for each row -set @temp1= old.f120; -ERROR HY000: There is no OLD row in on INSERT trigger -create trigger trg4b after insert on tb3 for each row -set old.f120= 'test'; -ERROR HY000: Updating of OLD row is not allowed in trigger -drop trigger trg4a; -drop trigger trg4b; - -Testcase 3.5.9.7: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.9.8: (implied in previous tests) ---------------------------------------------- - -Testcase 3.5.9.9: ------------------ -create trigger trg5a before DELETE on tb3 for each row -set @temp1=new.f122; -ERROR HY000: There is no NEW row in on DELETE trigger -create trigger trg5b after DELETE on tb3 for each row -set new.f122='test'; -ERROR HY000: There is no NEW row in on DELETE trigger -drop trigger trg5a; -drop trigger trg5b; - -Testcase 3.5.9.10: (implied in previous tests) ----------------------------------------------- - -Testcase 3.5.9.11: covered by 3.5.9.9 -------------------------------------- - -Testcase 3.5.9.12: covered by 3.5.9.6 -------------------------------------- - -Testcase 3.5.9.13: ------------------- -create trigger trg6a before UPDATE on tb3 for each row -set old.f118='C', new.f118='U'; -ERROR HY000: Updating of OLD row is not allowed in trigger -create trigger trg6b after INSERT on tb3 for each row -set old.f136=163, new.f118='U'; -ERROR HY000: Updating of OLD row is not allowed in trigger -create trigger trg6c after UPDATE on tb3 for each row -set old.f136=NULL; -ERROR HY000: Updating of OLD row is not allowed in trigger -drop trigger trg6a; -drop trigger trg6b; -drop trigger trg6c; - -Testcase 3.5.9.14: (implied in previous tests) ----------------------------------------------- -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result deleted file mode 100644 index 198382b409d..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result +++ /dev/null @@ -1,394 +0,0 @@ -USE test; -drop table if exists tb3; -create table tb3 ( -f118 char not null DEFAULT 'a', -f119 char binary not null DEFAULT b'101', -f120 char ascii not null DEFAULT b'101', -f121 char(50), -f122 char(50), -f129 binary not null DEFAULT b'101', -f130 tinyint not null DEFAULT 99, -f131 tinyint unsigned not null DEFAULT 99, -f132 tinyint zerofill not null DEFAULT 99, -f133 tinyint unsigned zerofill not null DEFAULT 99, -f134 smallint not null DEFAULT 999, -f135 smallint unsigned not null DEFAULT 999, -f136 smallint zerofill not null DEFAULT 999, -f137 smallint unsigned zerofill not null DEFAULT 999, -f138 mediumint not null DEFAULT 9999, -f139 mediumint unsigned not null DEFAULT 9999, -f140 mediumint zerofill not null DEFAULT 9999, -f141 mediumint unsigned zerofill not null DEFAULT 9999, -f142 int not null DEFAULT 99999, -f143 int unsigned not null DEFAULT 99999, -f144 int zerofill not null DEFAULT 99999, -f145 int unsigned zerofill not null DEFAULT 99999, -f146 bigint not null DEFAULT 999999, -f147 bigint unsigned not null DEFAULT 999999, -f148 bigint zerofill not null DEFAULT 999999, -f149 bigint unsigned zerofill not null DEFAULT 999999, -f150 decimal not null DEFAULT 999.999, -f151 decimal unsigned not null DEFAULT 999.17, -f152 decimal zerofill not null DEFAULT 999.999, -f153 decimal unsigned zerofill, -f154 decimal (0), -f155 decimal (64), -f156 decimal (0) unsigned, -f157 decimal (64) unsigned, -f158 decimal (0) zerofill, -f159 decimal (64) zerofill, -f160 decimal (0) unsigned zerofill, -f161 decimal (64) unsigned zerofill, -f162 decimal (0,0), -f163 decimal (63,30), -f164 decimal (0,0) unsigned, -f165 decimal (63,30) unsigned, -f166 decimal (0,0) zerofill, -f167 decimal (63,30) zerofill, -f168 decimal (0,0) unsigned zerofill, -f169 decimal (63,30) unsigned zerofill, -f170 numeric, -f171 numeric unsigned, -f172 numeric zerofill, -f173 numeric unsigned zerofill, -f174 numeric (0), -f175 numeric (64) -) engine = ; -Warnings: -Note 1265 Data truncated for column 'f150' at row 1 -Note 1265 Data truncated for column 'f151' at row 1 -Note 1265 Data truncated for column 'f152' at row 1 -load data infile '/std_data/funcs_1/memory_tb3.txt' -into table tb3; - -Testcase 3.5.10.1/2/3: ----------------------- -Create view vw11 as select * from tb3 -where f122 like 'Test 3.5.10.1/2/3%'; -Create trigger trg1a before insert on tb3 -for each row set new.f163=111.11; -Create trigger trg1b after insert on tb3 -for each row set @test_var='After Insert'; -Create trigger trg1c before update on tb3 -for each row set new.f121='Y', new.f122='Test 3.5.10.1/2/3-Update'; -Create trigger trg1d after update on tb3 -for each row set @test_var='After Update'; -Create trigger trg1e before delete on tb3 -for each row set @test_var=5; -Create trigger trg1f after delete on tb3 -for each row set @test_var= 2* @test_var+7; -Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1); -Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2); -Insert into vw11 (f122, f151) values ('Not in View', 3); -select f121, f122, f151, f163 -from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151; -f121 f122 f151 f163 -NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000 -NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000 -select f121, f122, f151, f163 from vw11; -f121 f122 f151 f163 -NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000 -NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000 -select f121, f122, f151, f163 -from tb3 where f122 like 'Not in View'; -f121 f122 f151 f163 -NULL Not in View 3 111.110000000000000000000000000000 -Update vw11 set f163=1; -select f121, f122, f151, f163 from tb3 -where f122 like 'Test 3.5.10.1/2/3%' order by f151; -f121 f122 f151 f163 -Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000 -Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 -select f121, f122, f151, f163 from vw11; -f121 f122 f151 f163 -Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000 -Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 -set @test_var=0; -Select @test_var as 'before delete'; -before delete -0 -delete from vw11 where f151=1; -select f121, f122, f151, f163 from tb3 -where f122 like 'Test 3.5.10.1/2/3%' order by f151; -f121 f122 f151 f163 -Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 -select f121, f122, f151, f163 from vw11; -f121 f122 f151 f163 -Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 -Select @test_var as 'after delete'; -after delete -17 -drop view vw11; -drop trigger trg1a; -drop trigger trg1b; -drop trigger trg1c; -drop trigger trg1d; -drop trigger trg1e; -drop trigger trg1f; -delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; - -Testcase 3.5.10.4: ------------------- -create table tb_load (f1 int, f2 char(25),f3 int) engine = ; -Create trigger trg4 before insert on tb_load -for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; -set @counter= 0; -select @counter as 'Rows Loaded Before'; -Rows Loaded Before -0 -load data infile '/std_data/funcs_1/t9.txt' into table tb_load; -select @counter as 'Rows Loaded After'; -Rows Loaded After -10 -Select * from tb_load order by f1 limit 10; -f1 f2 f3 --5000 a` 1000 --4999 aaa 999 --4998 abaa 999 --4997 acaaa 999 --4996 adaaaa 999 --4995 aeaaaaa 999 --4994 afaaaaaa 998 --4993 agaaaaaaa 998 --4992 a^aaaaaaaa 998 --4991 a_aaaaaaaaa 998 -drop trigger trg4; -drop table tb_load; - -Testcase 3.5.10.5: (implemented in trig_frkey.test) ---------------------------------------------------- - -Testcase 3.5.10.6: (implemented in trig_frkey.test) ---------------------------------------------------- - -Testcase 3.5.10.extra: ----------------------- -create table t1_sp (var136 tinyint, var151 decimal) engine = ; -create trigger trg before insert on t1_sp -for each row set @counter=@counter+1; -create procedure trig_sp() -begin -declare done int default 0; -declare var151 decimal; -declare var136 tinyint; -declare cur1 cursor for select f136, f151 from tb3; -declare continue handler for sqlstate '01000' set done = 1; -open cur1; -fetch cur1 into var136, var151; -wl_loop: WHILE NOT done DO -insert into t1_sp values (var136, var151); -fetch cur1 into var136, var151; -END WHILE wl_loop; -close cur1; -end// -set @counter=0; -select @counter; -@counter -0 -call trig_sp(); -ERROR 02000: No data - zero rows fetched, selected, or processed -select @counter; -@counter -11 -select count(*) from tb3; -count(*) -11 -select count(*) from t1_sp; -count(*) -11 -drop procedure trig_sp; -drop trigger trg; -drop table t1_sp; - -Testcase 3.5.11.1 (implemented in trig_perf.test) -------------------------------------------------- - -Testcase y.y.y.2: Check for triggers starting triggers ------------------------------------------------------- -use test; -drop table if exists t1; -drop table if exists t2_1; -drop table if exists t2_2; -drop table if exists t2_3; -drop table if exists t2_4; -drop table if exists t3; -create table t1 (f1 integer) engine = ; -create table t2_1 (f1 integer) engine = ; -create table t2_2 (f1 integer) engine = ; -create table t2_3 (f1 integer) engine = ; -create table t2_4 (f1 integer) engine = ; -create table t3 (f1 integer) engine = ; -insert into t1 values (1); -create trigger tr1 after insert on t1 for each row -BEGIN -insert into t2_1 (f1) values (new.f1+1); -insert into t2_2 (f1) values (new.f1+1); -insert into t2_3 (f1) values (new.f1+1); -insert into t2_4 (f1) values (new.f1+1); -END// -create trigger tr2_1 after insert on t2_1 for each row -insert into t3 (f1) values (new.f1+10); -create trigger tr2_2 after insert on t2_2 for each row -insert into t3 (f1) values (new.f1+100); -create trigger tr2_3 after insert on t2_3 for each row -insert into t3 (f1) values (new.f1+1000); -create trigger tr2_4 after insert on t2_4 for each row -insert into t3 (f1) values (new.f1+10000); -insert into t1 values (1); -select * from t3 order by f1; -f1 -12 -102 -1002 -10002 -drop trigger tr1; -drop trigger tr2_1; -drop trigger tr2_2; -drop trigger tr2_3; -drop trigger tr2_4; -drop table t1, t2_1, t2_2, t2_3, t2_4, t3; - -Testcase y.y.y.3: Circular trigger reference --------------------------------------------- -use test; -drop table if exists t1; -drop table if exists t2; -drop table if exists t3; -drop table if exists t4; -create table t1 (f1 integer) engine = ; -create table t2 (f2 integer) engine = ; -create table t3 (f3 integer) engine = ; -create table t4 (f4 integer) engine = ; -insert into t1 values (0); -create trigger tr1 after insert on t1 -for each row insert into t2 (f2) values (new.f1+1); -create trigger tr2 after insert on t2 -for each row insert into t3 (f3) values (new.f2+1); -create trigger tr3 after insert on t3 -for each row insert into t4 (f4) values (new.f3+1); -create trigger tr4 after insert on t4 -for each row insert into t1 (f1) values (new.f4+1); -insert into t1 values (1); -ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. -select * from t1 order by f1; -f1 -0 -select * from t2 order by f2; -f2 -select * from t3 order by f3; -f3 -select * from t4 order by f4; -f4 -drop trigger tr1; -drop trigger tr2; -drop trigger tr3; -drop trigger tr4; -drop table t1; -drop table t2; -drop table t3; -drop table t4; - -Testcase y.y.y.4: Recursive trigger/SP references -------------------------------------------------- -set @sql_mode='traditional'; -create table t1_sp ( -count integer, -var136 tinyint, -var151 decimal) engine = ; -create procedure trig_sp() -begin -declare done int default 0; -declare var151 decimal; -declare var136 tinyint; -declare cur1 cursor for select f136, f151 from tb3; -declare continue handler for sqlstate '01000' set done = 1; -set @counter= @counter+1; -open cur1; -fetch cur1 into var136, var151; -wl_loop: WHILE NOT done DO -insert into t1_sp values (@counter, var136, var151); -fetch cur1 into var136, var151; -END WHILE wl_loop; -close cur1; -end// -create trigger trg before insert on t1_sp -for each row call trig_sp(); -set @counter=0; -select @counter; -@counter -0 -call trig_sp(); -ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine trig_sp -select @counter; -@counter -1 -select count(*) from tb3; -count(*) -11 -select count(*) from t1_sp; -count(*) -0 -set @@max_sp_recursion_depth= 10; -set @counter=0; -select @counter; -@counter -0 -call trig_sp(); -ERROR HY000: Can't update table 't1_sp' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. -select @counter; -@counter -2 -select count(*) from tb3; -count(*) -11 -select count(*) from t1_sp; -count(*) -0 -drop procedure trig_sp; -drop trigger trg; -drop table t1_sp; - -Testcase y.y.y.5: Rollback of nested trigger references -------------------------------------------------------- -set @@sql_mode='traditional'; -use test; -drop table if exists t1; -drop table if exists t2; -drop table if exists t3; -drop table if exists t4; -create table t1 (f1 integer) engine = ; -create table t2 (f2 integer) engine = ; -create table t3 (f3 integer) engine = ; -create table t4 (f4 tinyint) engine = ; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL -) ENGINE= DEFAULT CHARSET=latin1 -insert into t1 values (1); -create trigger tr1 after insert on t1 -for each row insert into t2 (f2) values (new.f1+1); -create trigger tr2 after insert on t2 -for each row insert into t3 (f3) values (new.f2+1); -create trigger tr3 after insert on t3 -for each row insert into t4 (f4) values (new.f3+1000); -set autocommit=0; -start transaction; -insert into t1 values (1); -ERROR 22003: Out of range value adjusted for column 'f4' at row 1 -commit; -select * from t1 order by f1; -f1 -1 -select * from t2 order by f2; -f2 -select * from t3 order by f3; -f3 -drop trigger tr1; -drop trigger tr2; -drop trigger tr3; -drop table t1; -drop table t2; -drop table t3; -drop table t4; -DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/ndb_views.result b/mysql-test/suite/funcs_1/r/ndb_views.result deleted file mode 100644 index 6c5a10845a0..00000000000 --- a/mysql-test/suite/funcs_1/r/ndb_views.result +++ /dev/null @@ -1,22914 +0,0 @@ -USE test; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set" -) engine = ndb; -load data infile '/std_data/funcs_1/ndb_tb2.txt' -into table tb2 ; -DROP DATABASE IF EXISTS test1; -CREATE DATABASE test1; -USE test1; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set" -) engine = ndb; -load data infile '/std_data/funcs_1/ndb_tb2.txt' -into table tb2 ; -USE test; - -! Attention: The file with the expected results is not -| thoroughly checked. -! The server return codes are correct, but -| most result sets where the table tb2 is -! involved are not checked. --------------------------------------------------------------------------------- - -There are some statements where the ps-protocol is switched off. -Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- -insert into test.tb2 (f59,f60) values (76710,226546); -insert into test.tb2 (f59,f60) values(2760,985654); -insert into test.tb2 (f59,f60) values(569300,9114376); -insert into test.tb2 (f59,f60) values(660,876546); -insert into test.tb2 (f59,f60) values(250,87895654); -insert into test.tb2 (f59,f60) values(340,9984376); -insert into test.tb2 (f59,f60) values(3410,996546); -insert into test.tb2 (f59,f60) values(2550,775654); -insert into test.tb2 (f59,f60) values(3330,764376); -insert into test.tb2 (f59,f60) values(441,16546); -insert into test.tb2 (f59,f60) values(24,51654); -insert into test.tb2 (f59,f60) values(323,14376); -insert into test.tb2 (f59,f60) values(34,41); -insert into test.tb2 (f59,f60) values(04,74); -insert into test.tb2 (f59,f60) values(15,87); -insert into test.tb2 (f59,f60) values(22,93); -insert into test.tb2 (f59,f60) values(394,41); -insert into test.tb2 (f59,f60) values(094,74); -insert into test.tb2 (f59,f60) values(195,87); -insert into test.tb2 (f59,f60) values(292,93); -insert into test.tb2 (f59,f60) values(0987,41) ; -insert into test.tb2 (f59,f60) values(7876,74) ; -INSERT INTO tb2 (f59,f61) VALUES(321,765 ); -INSERT INTO tb2 (f59,f61) VALUES(9112,8771); -INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; -INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; -INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; -Insert into tb2 (f59,f60,f61) values (107,105,106) ; -Insert into tb2 (f59,f60,f61) values (109,108,104) ; -Insert into tb2 (f59,f60,f61) values (207,205,206) ; -Insert into tb2 (f59,f60,f61) values (209,208,204) ; -Insert into tb2 (f59,f60,f61) values (27,25,26) ; -Insert into tb2 (f59,f60,f61) values (29,28,24) ; -Insert into tb2 (f59,f60,f61) values (17,15,16) ; -Insert into tb2 (f59,f60,f61) values (19,18,14) ; -insert into tb2 (f59,f60,f61) values (107,105,106); -insert into tb2 (f59,f60,f61) values (109,108,104); -INSERT INTO tb2 (f59,f60) VALUES( 299,899 ); -INSERT INTO tb2 (f59,f60) VALUES( 242,79 ); -INSERT INTO tb2 (f59,f60) VALUES( 424,89 ); -SELECT * FROM tb2 ORDER BY f59, f60, f61; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set -7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set -8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set -9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set -10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -Use test; - -Testcase 3.3.1.1 --------------------------------------------------------------------------------- -Drop table if exists t1; -Create table t1 (f59 INT, f60 INT) ; -Insert into t1 values (100,4234); -Insert into t1 values (990,6624); -Insert into t1 values (710,765); -Insert into t1 values (300,433334); -Insert into t1 values (800,9788); -Insert into t1 values (500,9866); -Drop view if exists v1 ; -CREATE VIEW v1 AS select f59,f60,f61 -FROM test.tb2 where f59=250; -select * FROM v1 order by f60,f61 limit 0,10; -f59 f60 f61 -250 87895654 NULL -Drop view if exists v1 ; -CREATE VIEW v1 AS select f59,f60,f61 -FROM test.tb2 limit 100; -select * FROM v1 order by f59,f60,f61 limit 0,10; -f59 f60 f61 -1 1 0000000001 -2 2 0000000002 -3 3 0000000003 -4 4 0000000004 -4 74 NULL -5 5 0000000005 -6 6 0000000006 -7 7 0000000007 -8 8 0000000008 -9 9 0000000009 -CREATE or REPLACE VIEW v1 AS select f59,f60,f61 -FROM test.tb2; -select * FROM v1 order by f59,f60,f61 limit 4,3; -f59 f60 f61 -4 74 NULL -5 5 0000000005 -6 6 0000000006 -CREATE or REPLACE VIEW v1 AS select distinct f59 -FROM test.tb2; -select * FROM v1 order by f59 limit 4,3; -f59 -5 -6 -7 -ALTER VIEW v1 AS select f59 -FROM test.tb2; -select * FROM v1 order by f59 limit 6,2; -f59 -6 -7 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 order by f59; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 order by f59 asc; -select * FROM v1 limit 0,10; -f59 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 order by f59 desc; -select * FROM v1 limit 0,10; -f59 -569300 -76710 -9112 -7876 -3410 -3330 -2760 -2550 -987 -660 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 group by f59; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 group by f59 asc; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 group by f59 desc; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS (select f59 from tb2) -union (select f59 from t1); -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2) -UNION DISTINCT(select f59 FROM t1) ; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2) -UNION ALL(select f59 FROM t1) ; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -CREATE or REPLACE VIEW v1 AS select * -FROM test.tb2 WITH LOCAL CHECK OPTION ; -select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 4 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 4 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -CREATE or REPLACE VIEW v1 AS select * -FROM test.tb2 WITH CASCADED CHECK OPTION ; -select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 4 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 4 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 WITH CASCADED CHECK OPTION; -SELECT * FROM v1 order by f59,f60 limit 0,10; -F59 F60 -1 1 -2 2 -3 3 -4 4 -4 74 -5 5 -6 6 -7 7 -8 8 -9 9 -CREATE or REPLACE VIEW v1 AS select f59, f60 -from test.tb2 where f59=3330 ; -select * FROM v1 order by f60 limit 0,10; -f59 f60 -3330 764376 -DROP VIEW v1 ; -DROP TABLE t1 ; - -Testcase 3.3.1.2 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS v2 ; -CREATE TABLE t1 (f1 BIGINT) ; -SET @x=0; -CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; -ERROR HY000: View's SELECT contains a 'INTO' clause -Select @x; -@x -0 -CREATE or REPLACE VIEW v1 AS Select 1 -FROM (SELECT 1 FROM t1) my_table; -ERROR HY000: View's SELECT contains a subquery in the FROM clause -CREATE VIEW v1 AS SELECT f1 FROM t1; -CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ; -SET @a:=0 ; -SELECT @a ; -@a -0 -INSERT INTO v1 VALUES (1) ; -SELECT @a ; -@a -1 -SELECT * FROM t1; -f1 -1 -DROP TRIGGER tr1 ; -SET @a:=0 ; -CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ; -ERROR HY000: 'test.v1' is not BASE TABLE -RENAME TABLE v1 TO v2; -RENAME VIEW v2 TO v1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v2 TO v1' at line 1 -ALTER TABLE v2 RENAME AS v1; -ERROR HY000: 'test.v2' is not BASE TABLE -ALTER VIEW v1 RENAME AS v2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RENAME AS v2' at line 1 -DROP TABLE IF EXISTS t1, t2 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS v2 ; -CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE ); -CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1; -ALTER TABLE t1 ADD PRIMARY KEY(f1); -ALTER TABLE v1 ADD PRIMARY KEY(f1); -ERROR HY000: 'test.v1' is not BASE TABLE -ALTER VIEW v1 ADD PRIMARY KEY(f1); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD PRIMARY KEY(f1)' at line 1 -CREATE INDEX t1_idx ON t1(f3); -CREATE INDEX v1_idx ON v1(f3); -ERROR HY000: 'test.v1' is not BASE TABLE -DROP TABLE t1; -DROP VIEW v1; - -Testcase 3.3.1.3 + 3.1.1.4 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or REPLACE AS Select * from tb2 my_table' at line 1 -CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select * -from tb2 my_table limit 50; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED CHECK OPTION AS Select * -from tb2 my_table limit 50' at line 1 -CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select * -from tb2 my_table limit 50; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOCAL CHECK OPTION AS Select * -from tb2 my_table limit 50' at line 1 -SELECT * FROM tb2 my_table CREATE VIEW As v1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE VIEW As v1' at line 1 -CREATE or REPLACE VIEW v1 Select f59, f60 -from test.tb2 my_table where f59 = 250 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Select f59, f60 -from test.tb2 my_table where f59 = 250' at line 1 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION; -DROP VIEW v1; -REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1 -CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT AS F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION' at line 1 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table CASCADED WITH CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED WITH CHECK OPTION' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED OPTION CHECK; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION CHECK' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table CHECK OPTION WITH CASCADED; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHECK OPTION WITH CASCADED' at line 2 -CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1 -REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1 -CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT AS F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION' at line 1 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table LOCAL WITH CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOCAL WITH CHECK OPTION' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL OPTION CHECK; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION CHECK' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table CHECK OPTION WITH LOCAL; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHECK OPTION WITH LOCAL' at line 2 -CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1' at line 1 -Drop table if exists t1 ; -CREATE table t1 (f1 int ,f2 int) ; -INSERT INTO t1 values (235, 22); -INSERT INTO t1 values (554, 11); -CREATE or REPLACE view v1 as (Select from f59 tb2) -Union ALL (Select from f1 t1); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from f59 tb2) -Union ALL (Select from f1 t1)' at line 1 -CREATE or REPLACE view v1 as Select f59, f60 -from tb2 by order f59; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by order f59' at line 2 -CREATE or REPLACE view v1 as Select f59, f60 -from tb2 by group f59 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2 - -Testcase 3.3.1.5 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -CREATE VIEW v1 SELECT * FROM tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2' at line 1 -CREATE v1 AS SELECT * FROM tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'v1 AS SELECT * FROM tb2' at line 1 -VIEW v1 AS SELECT * FROM tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v1 AS SELECT * FROM tb2' at line 1 -CREATE VIEW v1 AS SELECT 1; -DROP VIEW v1; -VIEW v1 AS SELECT 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v1 AS SELECT 1' at line 1 -CREATE v1 AS SELECT 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'v1 AS SELECT 1' at line 1 -CREATE VIEW AS SELECT 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT 1' at line 1 -CREATE VIEW v1 SELECT 1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1 -CREATE VIEW v1 AS ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 - -Testcase 3.3.1.6 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -CREATE or REPLACE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = MERGE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE = TEMPTABLE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= TEMPTABLE VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPTABLE VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE ALGORITHM = VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPTABLE = ALGORITHM VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPTABLE - ALGORITHM VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE = TEMPTABLE VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE VIEW v1 -as SELECT * from tb2' at line 1 -Drop view if exists v1 ; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CHECK OPTION; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH LOCAL CHECK OPTION; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH NO CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NO CHECK OPTION' at line 2 -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 CASCADED CHECK OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED CHECK OPTION' at line 2 -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CASCADED OPTION; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION' at line 2 -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 - -Testcase 3.3.1.7 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -Create view test.v1 AS Select * from test.tb2; -Alter view test.v1 AS Select F59 from test. tb2 limit 100 ; -Drop view test.v1 ; -Create view v1 AS Select * from test.tb2 limit 100 ; -Alter view v1 AS Select F59 from test.tb2 limit 100 ; -Drop view v1 ; - -Testcase 3.3.1.A0 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS V1 ; -CREATE TABLE t1 (f1 NUMERIC(4)) ENGINE = ndb; -INSERT INTO t1 VALUES(1111), (2222); -CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111; -CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222; -SELECT * FROM v1; -f1 -1111 -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS V1 ; - -Testcase 3.3.1.8 --------------------------------------------------------------------------------- -Create view select AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select AS Select * from test.tb2 limit 100' at line 1 -Create view as AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as AS Select * from test.tb2 limit 100' at line 1 -Create view where AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where AS Select * from test.tb2 limit 100' at line 1 -Create view from AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from AS Select * from test.tb2 limit 100' at line 1 -Create view while AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'while AS Select * from test.tb2 limit 100' at line 1 -Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*(&*&&^ as Select * from test.tb2 limit 100' at line 1 -Drop view if exists test.procedure ; -Create view test.procedure as Select * from test.tb2 limit 100 ; -Drop view if exists test.procedure ; - -Testcase 3.3.1.9 --------------------------------------------------------------------------------- -Drop TABLE IF EXISTS t1 ; -Drop VIEW IF EXISTS v1; -Drop VIEW IF EXISTS v2; -Drop VIEW IF EXISTS v3; -CREATE TABLE t1 ( f1 char(5)); -INSERT INTO t1 SET f1 = 'abcde'; -CREATE VIEW v1 AS SELECT f1 FROM t1; -CREATE VIEW v2 AS SELECT * FROM v1; -DROP TABLE t1; -SELECT * FROM v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DELETE FROM v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -UPDATE v1 SET f1 = 'aaaaa'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v1 SET f1 = "fffff"; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DELETE FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -UPDATE v2 SET f1 = 'aaaaa'; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v2 SET f1 = "fffff"; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DROP VIEW v1; -SELECT * FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DELETE FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -UPDATE v2 SET f1 = 'aaaaa'; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v2 SET f1 = "fffff"; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DROP VIEW v2; -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 (f1 FLOAT); -CREATE VIEW v1 AS SELECT * FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -CREATE VIEW v1 AS SELECT * FROM t1; -CREATE or REPLACE VIEW v1 AS SELECT * FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -DROP VIEW v1; -DROP TABLE t1; - -Testcase 3.3.1.10 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Create view test.v1 AS Select * from test.tb2 ; -Create view test.v1 AS Select F59 from test.tb2 ; -ERROR 42S01: Table 'v1' already exists -Create view v1 AS Select F59 from test.tb2 ; -ERROR 42S01: Table 'v1' already exists - -Testcase 3.3.1.11 --------------------------------------------------------------------------------- -Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ; -ERROR 42S01: Table 'tb2' already exists -Create view tb2 AS Select f59,f60 from test.tb2 limit 100 ; -ERROR 42S01: Table 'tb2' already exists -Drop view if exists test.v111 ; -Create view test.v111 as select * from tb2 limit 50; -Create table test.v111(f1 int ); -ERROR 42S01: Table 'v111' already exists -Create table v111(f1 int ); -ERROR 42S01: Table 'v111' already exists -DROP VIEW test.v111; - -Testcase 3.3.1.12 --------------------------------------------------------------------------------- -USE test; -Drop database if exists test2 ; -Create database test2 ; -DROP TABLE IF EXISTS test.t0, test.t1, test.t2; -DROP VIEW IF EXISTS test.v1; -DROP VIEW IF EXISTS test.v2; -CREATE TABLE test.t1 ( f1 VARCHAR(20)); -CREATE TABLE test2.t1 ( f1 VARCHAR(20)); -CREATE TABLE test.t2 ( f1 VARCHAR(20)); -CREATE TABLE test2.v1 ( f1 VARCHAR(20)); -CREATE TABLE test.t0 ( f1 VARCHAR(20)); -CREATE TABLE test2.t0 ( f1 VARCHAR(20)); -CREATE VIEW test2.t2 AS SELECT * FROM test2.t0; -CREATE VIEW test.v1 AS SELECT * FROM test.t0; -CREATE VIEW test.v2 AS SELECT * FROM test.t0; -CREATE VIEW test2.v2 AS SELECT * FROM test2.t0; -INSERT INTO test.t1 VALUES('test.t1 - 1'); -INSERT INTO test2.t1 VALUES('test2.t1 - 1'); -INSERT INTO test.t2 VALUES('test.t2 - 1'); -INSERT INTO test2.v1 VALUES('test2.v1 - 1'); -INSERT INTO test.t0 VALUES('test.t0 - 1'); -INSERT INTO test2.t0 VALUES('test2.t0 - 1'); -USE test; -INSERT INTO t1 VALUES('test.t1 - 2'); -INSERT INTO t2 VALUES('test.t2 - 2'); -INSERT INTO t0 VALUES('test.t0 - 2'); -USE test2; -INSERT INTO t1 VALUES('test2.t1 - 2'); -INSERT INTO v1 VALUES('test2.v1 - 2'); -INSERT INTO t0 VALUES('test2.t0 - 2'); -SELECT * FROM t1; -f1 -test2.t1 - 1 -test2.t1 - 2 -SELECT * FROM t2; -f1 -test2.t0 - 1 -test2.t0 - 2 -SELECT * FROM v1; -f1 -test2.v1 - 1 -test2.v1 - 2 -SELECT * FROM v2; -f1 -test2.t0 - 1 -test2.t0 - 2 -USE test; -SELECT * FROM t1; -f1 -test.t1 - 1 -test.t1 - 2 -SELECT * FROM t2; -f1 -test.t2 - 1 -test.t2 - 2 -SELECT * FROM v1; -f1 -test.t0 - 1 -test.t0 - 2 -SELECT * FROM v2; -f1 -test.t0 - 1 -test.t0 - 2 - -Testcase 3.3.1.13 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 (f1 BIGINT); -INSERT INTO t1 VALUES(1); -CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci -SELECT * FROM test.v1; -f1 -1 -CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1 -AS SELECT * FROM t1 limit 2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci -SELECT * FROM test.v1; -f1 -1 -CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109` from `tb2` order by `tb2`.`f59` limit 2 latin1 latin1_swedish_ci -SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci -SELECT * FROM test.v1 order by F59 limit 10,100; -F59 -10 -15 -17 -19 -22 -24 -27 -29 -34 -94 -107 -107 -109 -109 -195 -207 -209 -242 -250 -292 -299 -321 -323 -340 -394 -424 -441 -500 -500 -500 -660 -987 -2550 -2760 -3330 -3410 -7876 -9112 -76710 -569300 -Drop table test.t1 ; -Drop view test.v1 ; - -Testcase 3.3.1.14 --------------------------------------------------------------------------------- -CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2; -ERROR HY000: 'test.tb2' is not VIEW -CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2; -ERROR HY000: 'test.tb2' is not VIEW - -Testcase 3.3.1.15 --------------------------------------------------------------------------------- -Drop table if exists test.v1 ; -CREATE OR REPLACE view test.v1 as select * from tb2; -SELECT * FROM test.v1; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set -660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set -76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set -9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set -9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -Drop view test.v1 ; - -Testcase 3.3.1.16 + 3.3.1.17 --------------------------------------------------------------------------------- -Drop table if exists test.v1 ; -CREATE OR REPLACE VIEW v1 AS SELECT * From tb2; -SELECT * FROM tb2 WHERE 1 = 2; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -SELECT * FROM v1 WHERE 1 = 2; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -Drop view v1; -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 (f1 NUMERIC(15,3)); -INSERT INTO t1 VALUES(8.8); -CREATE VIEW v1 AS SELECT * FROM t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -f1 -8.800 -CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -f1 -8.800 -CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -my_column -8.800 -CREATE OR REPLACE VIEW v1(column1,column2) -AS SELECT f1 As my_column, f1 FROM t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -column1 column2 -8.800 8.800 -CREATE OR REPLACE VIEW test.v1(column1,column2) -AS SELECT f1 As my_column, f1 FROM test.t1; -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -column1 column2 -8.800 8.800 - -Testcase 3.3.1.18 --------------------------------------------------------------------------------- -Drop view if exists v1 ; -Drop view if exists v1_1 ; -Create view v1 -as Select test.tb2.f59 as NewNameF1, test.tb2.f60 -from test.tb2 limit 0,100 ; -Create view v1_1 -as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2 -from tb2 limit 0,100 ; -SELECT NewNameF1,f60 FROM test.v1_1 ; -ERROR 42S22: Unknown column 'f60' in 'field list' -SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ; -ERROR 42S22: Unknown column 'v1_1.f60' in 'field list' -SELECT f59, f60 FROM test.v1 ; -ERROR 42S22: Unknown column 'f59' in 'field list' -Use test ; -SELECT F59 FROM v1 ; -ERROR 42S22: Unknown column 'F59' in 'field list' - -Testcase 3.3.1.19 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1, t2; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2)); -INSERT INTO t1 VALUES(7, 7.7); -CREATE TABLE t2( f1 BIGINT, f2 DECIMAL(5,2)); -INSERT INTO t2 VALUES(6, 6.6); -CREATE VIEW v1 AS SELECT * FROM t1; -SELECT * FROM v1; -f1 f2 -7 7.70 -CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1; -SELECT * FROM v1; -f1 f2 -7 7.70 -CREATE OR REPLACE VIEW v1 AS SELECT f1 AS my_f1, f2 AS my_f2 FROM t1; -SELECT * FROM v1; -my_f1 my_f2 -7 7.70 -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1; -SELECT * FROM v1; -my_f1 my_f2 -7 7.70 -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT t1.f1, t2.f2 FROM t1, t2; -SELECT * FROM v1; -my_f1 my_f2 -7 6.60 -SELECT f1, f2 AS f1 FROM t1; -f1 f1 -7 7.70 -CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1; -ERROR 42S21: Duplicate column name 'f1' -SELECT t1.f1, t2.f1 AS f1 FROM t1, t2; -f1 f1 -7 6 -CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2; -ERROR 42S21: Duplicate column name 'f1' -CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1; -ERROR 42S21: Duplicate column name 'my_col' - -Testcase 3.3.1.20 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2)); -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT * FROM t1; -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1; -CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT * FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts -CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT f1, f2 FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts -CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT * FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts -CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts - -Testcase 3.3.1.21 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2; -SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2; -F59 F60 -1 1 -2 2 -Drop view if exists test.v1 ; - -Testcase 3.3.1.22 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 WHERE f59 < 3; -SELECT * FROM test.v1; -product -1 -4 -CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2; -SELECT * FROM test.v1; -product -2 -CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER(); -SELECT * FROM test.v1; -product -root@localhost -Drop view if exists test.v1 ; - -Testcase 3.3.1.23 + 3.3.1.24 --------------------------------------------------------------------------------- -USE test; -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v2; -CREATE VIEW test.v2 AS SELECT * FROM test.t1; -ERROR 42S02: Table 'test.t1' doesn't exist -CREATE VIEW v2 AS Select * from test.v1; -ERROR 42S02: Table 'test.v1' doesn't exist -DROP VIEW IF EXISTS v2; -Warnings: -Note 1051 Unknown table 'test.v2' - -Testcase 3.3.1.25 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1_temp; -DROP TABLE IF EXISTS t2_temp; -DROP VIEW IF EXISTS v1; -Create table t1_temp(f59 char(10),f60 int) ; -Create temporary table t1_temp(f59 char(10),f60 int) ; -Insert into t1_temp values('FER',90); -Insert into t1_temp values('CAR',27); -Create view v1 as select * from t1_temp ; -ERROR HY000: View's SELECT refers to a temporary table 't1_temp' -Create temporary table t2_temp(f59 char(10),f60 int) ; -Insert into t2_temp values('AAA',11); -Insert into t2_temp values('BBB',22); -Create or replace view v1 -as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ; -ERROR HY000: View's SELECT refers to a temporary table 't1_temp' -DROP temporary table t1_temp; -DROP table t1_temp; -DROP temporary table t2_temp; -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 (f1 char(10)); -CREATE TEMPORARY TABLE t2 (f2 char(10)); -INSERT INTO t1 VALUES('t1'); -INSERT INTO t1 VALUES('A'); -INSERT INTO t2 VALUES('t2'); -INSERT INTO t2 VALUES('B'); -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2, t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1, t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2 UNION SELECT * FROM t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2 -WHERE f2 = ( SELECT f1 FROM t1 ); -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1 -WHERE f1 = ( SELECT f2 FROM t2 ); -ERROR HY000: View's SELECT refers to a temporary table 't2' -DROP TABLE t1; -DROP TEMPORARY TABLE t2; - -Testcase 3.3.1.26 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1; -Create view test.v1 AS Select * from test.tb2; -Select * from test.v1; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set -660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set -76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set -9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set -9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set -Drop view test.v1 ; - -Testcase 3.3.1.27 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS test.v1; -Drop VIEW IF EXISTS test.v1_1 ; -Create view test.v1 AS Select * from test.tb2; -Create view test.v1_1 AS Select F59 from test.v1 ; -Select * from test.v1_1 order by F59 limit 2; -F59 -1 -2 -Drop view test.v1 ; -Drop view test.v1_1 ; - -Testcase 3.3.1.28 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -create database test2 ; -Create view test2.v2 AS Select * from test.tb2 limit 50,50; -use test2 ; -Create view v1 AS Select * from test.tb2 limit 50 ; -Select * from v1 order by f59,f60,f61,f62,f63,f64,f65; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 4 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 4 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -Select * from test2.v2 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -Drop view if exists test2.v1 ; -Drop view if exists test2.v2 ; -Drop database test2 ; - -Testcase 3.3.1.29 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -Drop view if exists test.v1 ; -create database test2 ; -use test2; -Create view test.v1 AS Select * from test.tb2 limit 50 ; -Create view test2.v2 AS Select F59 from test.v1 ; -Drop view if exists test.v1 ; -Drop view if exists test2.v2 ; - -Testcase 3.3.1.31 --------------------------------------------------------------------------------- -Drop table if exists test.t1 ; -CREATE TABLE test.t1 ( f59 int, f60 int ); -INSERT INTO test.t1 VALUES( 34, 654 ); -INSERT INTO test.t1 VALUES( 906, 434 ); -INSERT INTO test.t1 VALUES( 445, 765 ); -Create or replace view test.v1 -AS SELECT test.t1.F59, test.tb2.F60 -FROM test.tb2 JOIN test.t1 ON test.tb2.F59 = test.t1.F59 ; -Select * from test.v1; -F59 F60 -34 41 -Drop view test.v1 ; - -Testcase 3.3.1.32 --------------------------------------------------------------------------------- -Drop table if exists test.t1 ; -Drop database if exists test2 ; -Drop view if exists test.v1 ; -create database test2 ; -use test2 ; -CREATE TABLE t1 ( f59 int, f60 int ); -INSERT INTO t1 VALUES( 34, 654 ); -INSERT INTO t1 VALUES( 906, 434 ); -INSERT INTO t1 VALUES( 445, 765 ); -CREATE VIEW test2.v1 -AS SELECT test.tb2.F59, test.tb2.F60 -FROM test.tb2 INNER JOIN test2.t1 ON tb2.f59 = t1.f59; -Select * from test2.v1; -F59 F60 -34 41 -Use test; - -Testcase 3.3.1.33 --------------------------------------------------------------------------------- -Drop view if exists test.v1_firstview ; -Drop view if exists test.v1_secondview ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2; -CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2; -CREATE VIEW test.v1 -AS SELECT test.v1_firstview.f59, test.v1_firstview.f60 -FROM test.v1_firstview INNER JOIN test.v1_secondview -ON test.v1_firstview.f59 = test.v1_secondview.f59 ; -SELECT * FROM test.v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop view if exists test.v1_firstview ; -Drop view if exists test.v1_secondview ; -Drop view if exists test.v1 ; - -Testcase 3.3.1.34 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -Drop view if exists test.v1_firstview ; -Drop view if exists test.v1_secondview ; -create database test2 ; -use test2 ; -CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2 ; -CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2 ; -CREATE VIEW v1 -AS SELECT test.v1_firstview.F59, test.v1_firstview.F60 -FROM test.v1_firstview INNER JOIN test.v1_secondview -ON test.v1_firstview.f59 = test.v1_secondview.f59 ; -SELECT * FROM v1 order by f59,f60 limit 0,10; -F59 F60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop view v1 ; -Drop view test.v1_firstview ; -Drop view test.v1_secondview ; - -Testcase 3.3.1.35 --------------------------------------------------------------------------------- -use test; -Drop view if exists test.v1; -Drop view if exists test.v1_firstview; -CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2; -CREATE VIEW test.v1 -AS SELECT test.v1_firstview.f59, test.v1_firstview.f60 -FROM test.v1_firstview INNER JOIN test.tb2 -ON test.v1_firstview.f59 = test.tb2.f59; -SELECT * FROM test.v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop view test.v1 ; -Drop view test.v1_firstview; - -Testcase 3.3.1.36 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -create database test2 ; -use test2 ; -CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ; -CREATE VIEW v1 -AS SELECT v1_firstview.f59, v1_firstview.f60 -FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ; -SELECT * FROM v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop database test2 ; - -Testcase 3.3.1.37 --------------------------------------------------------------------------------- -use test; -Drop table if exists t1; -Drop view if exists test.v1 ; -Drop view if exists test.v1_1 ; -Drop view if exists test.v1_1 ; -Drop view if exists test.v1_main ; -Create view test.v1 as Select f59, f60 FROM test.tb2; -Select * from test.v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 74 -5 5 -6 6 -7 7 -8 8 -9 9 -Create table t1(f59 int, f60 int); -Insert into t1 values (90,507) ; -Create view v1_1 as Select f59,f60 from t1 ; -Select * from v1_1 ; -f59 f60 -90 507 -Create view v1_main -as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1 -ON test.tb2.f59 = test.v1.f59; -Select * from v1_main order by f59 limit 0,10; -f59 -1 -2 -3 -4 -4 -4 -4 -5 -6 -7 -Drop table t1; -Drop view test.v1 ; -Drop view test.v1_1 ; -Drop view test.v1_main ; - -Testcase 3.3.1.31 - 3.3.1.37 New Implementation --------------------------------------------------------------------------------- -USE test; -DROP DATABASE IF EXISTS test2; -DROP TABLE IF EXISTS t0,t1; -DROP VIEW IF EXISTS t3,t4; -CREATE DATABASE test2; -CREATE TABLE test1.t0 (f1 VARCHAR(20)); -CREATE TABLE test1.t1 (f1 VARCHAR(20)); -CREATE TABLE test2.t0 (f1 VARCHAR(20)); -CREATE TABLE test2.t1 (f1 VARCHAR(20)); -CREATE VIEW test1.t2 AS SELECT * FROM test1.t0; -CREATE VIEW test1.t3 AS SELECT * FROM test2.t0; -CREATE VIEW test2.t2 AS SELECT * FROM test2.t0; -CREATE VIEW test2.t3 AS SELECT * FROM test1.t0; -INSERT INTO test1.t0 VALUES('test1.t0'); -INSERT INTO test1.t1 VALUES('test1.t1'); -INSERT INTO test2.t0 VALUES('test2.t0'); -INSERT INTO test2.t1 VALUES('test2.t1'); -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test1.t1 - -Testcase 3.3.1.38 --------------------------------------------------------------------------------- -Drop table if exists test1.t1 ; -Drop view if exists test.v1 ; -Drop view if exists test.v1_main; -Drop view if exists test1.v1_1 ; -Drop database if exists test3 ; -Create view test.v1 as Select f59, f60 FROM test.tb2; -Select * from test.v1 order by f59,f60 limit 20; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 74 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -15 87 -17 15 -19 18 -22 93 -24 51654 -27 25 -29 28 -34 41 -94 74 -Create table test1.t1 (f59 int,f60 int) ; -Insert into test1.t1 values (199,507) ; -Create view test1.v1_1 as Select f59,f60 from test1.t1 ; -Select * from test1.v1_1 ; -f59 f60 -199 507 -Create database test3 ; -Create table test3.t1(f59 int,f60 int) ; -Insert into test3.t1 values (1023,7670) ; -Create view test3.v1_2 as Select f59,f60 from test3.t1 ; -Select * from test3.v1_2 ; -f59 f60 -1023 7670 -use test ; -Create view v1_main -as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2, -test3.v1_2.f59 as f3 -FROM (test.tb2,test1.v1_1,test.v1) JOIN test3.v1_2 -ON (test.v1.f59 = test1.v1_1.f59) ; -Select * from v1_main ; -f1 f2 f3 -DROP VIEW test.v1 ; -DROP VIEW test1.v1_1 ; -DROP VIEW test.v1_main ; -DROP DATABASE test3; - -Testcase 3.3.1.39 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 -AS Select f59 from (Select * FROM tb2 limit 20) tx ; -ERROR HY000: View's SELECT contains a subquery in the FROM clause -SELECT * FROM test.v1 order by f59 ; -ERROR 42S02: Table 'test.v1' doesn't exist -Drop view if exists test.v1 ; - -Testcase 3.3.1.40 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Set @var1 = 'ABC' ; -Set @var2 = 'XYZ' ; -CREATE VIEW test.v1 AS SELECT @var1, @var2 ; -ERROR HY000: View's SELECT contains a variable or parameter -CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; -ERROR HY000: View's SELECT contains a variable or parameter -Drop view if exists test.v1 ; - -Testcase 3.3.1.41 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Drop procedure if exists sp1 ; -Create procedure sp1() DETERMINISTIC -Begin -DECLARE x char; -Set x = 200 ; -Create view test.v1 as SELECT * FROM tb2 WHERE f59 = x ; -End // -ERROR HY000: View's SELECT contains a variable or parameter -Call sp1() ; -ERROR 42000: PROCEDURE test.sp1 does not exist -Drop view if exists test.v1 ; -Warnings: -Note 1051 Unknown table 'test.v1' -Drop procedure sp1 ; -ERROR 42000: PROCEDURE test.sp1 does not exist - -Testcase 3.3.1.42 --------------------------------------------------------------------------------- -Drop VIEW if exists test.v1 ; -CREATE TEMPORARY VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2' at line 1 -CREATE OR REPLACE TEMPORARY VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPORARY VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2' at line 1 -Drop view if exists test.v1 ; -Use test; - -Testcase 3.3.1.43 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; -INSERT INTO test.v1 values(122,432); -SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20; -f59 122 -f60 432 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ; -SELECT * FROM test.tb2 where f59 = 3000 limit 0,20; -f59 3000 -f60 432 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -DELETE FROM test.v1 -where test.v1.f59 = 3000 and test.v1.f60 = 432; -SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -drop view test.v1 ; - -Testcase 3.3.1.44 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100; -INSERT INTO test.v1 values(31, 32, 33) ; -ERROR HY000: The target table v1 of the INSERT is not insertable-into -Drop view test.v1 ; - -Testcase 3.3.1.45 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04; -UPDATE test.v1 SET f59 = 30 where F59 = 04 ; -affected rows: 2 -info: Rows matched: 2 Changed: 2 Warnings: 0 -SELECT * FROM test.v1 where f59 = 30 order by f59; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -SELECT * FROM test.tb2 where f59 = 30 ; -f59 30 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 30 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -UPDATE tb2 SET f59 = 100 where f59 = 30 ; -affected rows: 2 -info: Rows matched: 2 Changed: 2 Warnings: 0 -SELECT * FROM tb2 where f59 = 100 ; -f59 100 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 100 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -SELECT * FROM test.v1 order by f59 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -drop view if exists test.v1 ; -Drop TABLE IF EXISTS test.t1 ; -Drop VIEW IF EXISTS test.v1 ; -CREATE TABLE t1 (f1 BIGINT, f2 VARCHAR(20), PRIMARY KEY(f1)) -ENGINE = ndb; -INSERT INTO t1 VALUES(1,'one'); -INSERT INTO t1 VALUES(2,'two'); -INSERT INTO t1 VALUES(3,'three'); -INSERT INTO t1 VALUES(5,'five'); -CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 BETWEEN 2 AND 4; -SELECT COUNT(*) FROM v1 WHERE f1 = 2; -COUNT(*) -1 -SELECT COUNT(*) FROM v1 WHERE f1 = 4; -COUNT(*) -0 -SELECT COUNT(*) FROM v1 WHERE f1 = 5; -COUNT(*) -0 -SELECT COUNT(*) FROM v1 WHERE f1 = 10; -COUNT(*) -0 -INSERT INTO t1 VALUES(4,'four'); -DELETE FROM v1 WHERE f1 = 3; -affected rows: 1 -DELETE FROM v1 WHERE f1 = 5; -affected rows: 0 -SELECT * FROM t1 ORDER BY f1; -f1 f2 -1 one -2 two -4 four -5 five -SELECT * FROM v1 ORDER BY f1; -f1 f2 -2 two -4 four -INSERT INTO v1 VALUES(2,'two'); -ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -INSERT INTO v1 VALUES(3,'three'); -affected rows: 1 -INSERT INTO v1 VALUES(6,'six'); -affected rows: 1 -SELECT * FROM t1 ORDER BY f1; -f1 f2 -1 one -2 two -3 three -4 four -5 five -6 six -SELECT * FROM v1 ORDER BY f1; -f1 f2 -2 two -3 three -4 four -UPDATE v1 SET f1 = 2 WHERE f1 = 3; -ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -UPDATE v1 SET f2 = 'number' WHERE f1 = 3; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -UPDATE v1 SET f1 = 10 WHERE f1 = 3; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -UPDATE v1 SET f2 = 'number' WHERE f1 = 1; -affected rows: 0 - -Testcase 3.3.1.46 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60 -FROM test.tb2 where f59 = 195 WITH CHECK OPTION ; -UPDATE test.v1 SET f59 = 198 where f59=195 ; -ERROR HY000: CHECK OPTION failed 'test.v1' -SELECT * FROM test.v1 order by f59 ; -f59 f60 -195 87 -drop view if exists test.v1 ; - -Testcase 3.3.1.47 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Drop view if exists test.v2 ; -CREATE VIEW test.v1 AS SELECT f59,f60 -FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ; -CREATE VIEW test.v2 as SELECT * FROM test.v1 ; -UPDATE test.v1 SET F59 = 919 where f59 = 0987 ; -ERROR HY000: CHECK OPTION failed 'test.v1' -SELECT * FROM test.v1 order by f59 ; -f59 f60 -987 41 -UPDATE test.v2 SET F59 = 9879 where f59 = 919 ; -SELECT * FROM tb2 where f59 = 9879 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -drop view if exists v1 ; -drop view if exists v2 ; - -Testcase 3.3.1.48 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS test.t1; -DROP VIEW IF EXISTS test.v1; -CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER) -ENGINE = ndb; -INSERT INTO t1 VALUES ('A', 1); -SELECT * FROM t1 order by f1, f2; -f1 f2 -A 1 -CREATE VIEW v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2 -WITH CASCADED CHECK OPTION ; -SELECT * FROM v1 order by f1, f2; -f1 f2 -A 1 -UPDATE v1 SET f2 = 2 WHERE f2 = 1; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -INSERT INTO v1 VALUES('B',2); -affected rows: 1 -SELECT * FROM v1 order by f1, f2; -f1 f2 -A 2 -B 2 -UPDATE v1 SET f2 = 4; -ERROR HY000: CHECK OPTION failed 'test.v1' -INSERT INTO v1 VALUES('B',3); -ERROR HY000: CHECK OPTION failed 'test.v1' -SELECT * FROM v1 order by f1, f2; -f1 f2 -A 2 -B 2 - -Testcase 3.3.1.49 --------------------------------------------------------------------------------- -Drop table if exists test.t1 ; -Drop view if exists test.v1 ; -Drop view if exists test.v2 ; -Drop view if exists test.v3 ; -Create table test.t1 (f59 INT, f60 INT) ; -Insert into test.t1 values (100,4234); -Insert into test.t1 values (290,6624); -Insert into test.t1 values (410,765); -Insert into test.t1 values (300,433334); -Insert into test.t1 values (800,9788); -Insert into test.t1 values (501,9866); -Create view test.v1 as select f59 -FROM test.t1 where f59<500 with check option ; -Create view test.v2 as select * -from test.v1 where f59>0 with local check option ; -Create view test.v3 as select * -from test.v1 where f59>0 with cascaded check option ; -Insert into test.v2 values(23) ; -Insert into test.v3 values(24) ; -drop view if exists test.v1 ; -drop view if exists test.v2 ; -drop view if exists test.v3 ; - -Testcase 3.3.1.49A --------------------------------------------------------------------------------- -USE test; -DROP TABLE IF EXISTS test.t1 ; -DROP TABLE IF EXISTS test.t1_results ; -DROP VIEW IF EXISTS test.v1; -DROP VIEW IF EXISTS test.v2; -DROP VIEW IF EXISTS test.v3; -CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20)); -CREATE TABLE t1_results (v3_to_v1_options VARCHAR(100), statement VARCHAR(10), -v3_to_v1_violation VARCHAR(20), errno CHAR(10)); -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH LOCAL CHECK OPTION ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CASCADED CHECK OPTION ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CHECK OPTION ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -SELECT * FROM t1_results ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno - - - UPDATE _v2_ 0 - - - INSERT _v2_ 0 - - - INSERT _ _v1 0 - - - UPDATE _ _ 0 - - - UPDATE _ _v1 0 - - - UPDATE v3_ _ 0 - - - INSERT _ _ 0 - - - WITH CHECK OPTION UPDATE _v2_ 0 - - - WITH CHECK OPTION INSERT _ _ 0 - - - WITH CHECK OPTION UPDATE _ _v1 0 - - - WITH CHECK OPTION UPDATE _ _ 0 - - - WITH CHECK OPTION UPDATE v3_ _ 0 - - - WITH CHECK OPTION INSERT _v2_ 0 - - - WITH CHECK OPTION INSERT _ _v1 0 - - - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 - - - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - UPDATE _v2_ 0 - - WITH CHECK OPTION - INSERT _v2_ 0 - - WITH CHECK OPTION - UPDATE v3_ _ 0 - - WITH CHECK OPTION - UPDATE _ _v1 0 - - WITH CHECK OPTION - UPDATE _ _ 0 - - WITH CHECK OPTION - INSERT _ _v1 0 - - WITH CHECK OPTION - INSERT _ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 - - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 - - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - INSERT _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - UPDATE _ _v1 0 - - WITH LOCAL CHECK OPTION - UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH CHECK OPTION - - UPDATE v3_ _ 1369 -WITH CHECK OPTION - - INSERT _ _ 0 -WITH CHECK OPTION - - INSERT _v2_ 1369 -WITH CHECK OPTION - - INSERT _ _v1 1369 -WITH CHECK OPTION - - UPDATE _v2_ 1369 -WITH CHECK OPTION - - UPDATE _ _v1 1369 -WITH CHECK OPTION - - UPDATE _ _ 0 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - -Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above). -All following SELECTs must give ROW NOT FOUND --------------------------------------------------------------------------------- -SELECT * FROM t1_results -WHERE v3_to_v1_violation = ' _ _ ' AND errno <> 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE v3_to_v1_options LIKE ' %' AND errno <> 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE v3_to_v1_options LIKE 'WITH %' - AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %' - AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE errno <> 0 AND errno <> 1369 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno - -End of plausibility checks --------------------------------------------------------------------------------- -DROP TABLE t1_results; - -Testcase 3.3.1.50 - 3.3.1.53 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS test.v1; -CREATE VIEW test.v1 AS SELECT * FROM test.tb2; -SELECT * FROM test.v1 order by f59,f60,f61 ; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 100 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 100 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -drop view test.v1 ; -CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2; -SELECT * FROM test.v1 order by F59, F61 limit 50; -F59 F61 -1 0000000001 -2 0000000002 -3 0000000003 -5 0000000005 -6 0000000006 -7 0000000007 -8 0000000008 -9 0000000009 -10 0000000010 -15 NULL -17 0000000016 -19 0000000014 -22 NULL -24 NULL -27 0000000026 -29 0000000024 -34 NULL -94 NULL -100 NULL -100 0000000004 -107 0000000106 -107 0000000106 -109 0000000104 -109 0000000104 -195 NULL -207 0000000206 -209 0000000204 -242 NULL -250 NULL -292 NULL -299 NULL -321 0000000765 -323 NULL -340 NULL -394 NULL -424 NULL -441 NULL -500 0000000900 -500 0000000900 -500 0000000900 -660 NULL -987 NULL -2550 NULL -2760 NULL -3330 NULL -3410 NULL -7876 NULL -9112 0000008771 -76710 NULL -569300 NULL -drop view test.v1 ; -CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61; -SELECT * FROM test.v1 order by f59,f60,f61 ; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 100 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f59 100 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -drop view test.v1 ; -CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2; -SELECT * FROM test.v1 order by f59,f61 desc limit 20; -F59 f61 -1 0000000001 -2 0000000002 -3 0000000003 -5 0000000005 -6 0000000006 -7 0000000007 -8 0000000008 -9 0000000009 -10 0000000010 -15 NULL -17 0000000016 -19 0000000014 -22 NULL -24 NULL -27 0000000026 -29 0000000024 -34 NULL -94 NULL -100 0000000004 -100 NULL -drop view test.v1 ; - -Testcase 3.3.1.54 --------------------------------------------------------------------------------- -USE test; -drop table if exists test.t1 ; -drop table if exists test.t2 ; -drop view if exists test.v1 ; -Create table t1 (f59 int, f60 int) ; -Create table t2 (f59 int, f60 int) ; -Insert into t1 values (1,10) ; -Insert into t1 values (2,20) ; -Insert into t1 values (47,80) ; -Insert into t2 values (1,1000) ; -Insert into t2 values (2,2000) ; -Insert into t2 values (31,97) ; -Create view test.v1 as select t1.f59, t1.f60 -from t1,t2 where t1.f59=t2.f59 ; -Select * from test.v1 order by f59 limit 50 ; -f59 f60 -1 10 -2 20 -drop table test.t1 ; -drop table test.t2 ; -drop view test.v1 ; - -Testcase 3.3.1.50 - 3.3.1.54 additional implementation --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 ( f1 BIGINT, f2 char(10), f3 DECIMAL(10,5) ); -INSERT INTO t1 VALUES(1, 'one', 1.1); -INSERT INTO t1 VALUES(2, 'two', 2.2); -INSERT INTO t1 VALUES(3, 'three', 3.3); -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1; -SELECT * FROM v1; -f1 f2 f3 -1 one 1.10000 -2 two 2.20000 -3 three 3.30000 -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1; -SELECT * FROM v1; -f2 -one -two -three -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE f3 = 2.2; -SELECT * FROM v1; -f1 f2 f3 -2 two 2.20000 -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1 WHERE f3 = 2.2; -SELECT * FROM v1; -f2 -two -SET sql_mode = 'traditional,ansi'; -CREATE OR REPLACE VIEW v1 AS -SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", -3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", -'->' || CAST(f3 AS CHAR) || '<-' - AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" -FROM t1 WHERE f1 = 2; -CREATE OR REPLACE VIEW v1 AS -SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", -3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", -'->' || CAST(f3 AS CHAR) || '<-' - AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " -FROM t1 WHERE f1 = 2; -ERROR 42000: Incorrect column name 'pure column f3: ' -SELECT * FROM v1; -pure column f3: 2.20000 -sum of columns f1 + f3 = 4.20000 -product of constants 3 * (- 0.11111E+1): -3.3333 -expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- -SET sql_mode = ''; - -Testcases 3.3.1.55 - 3.3.1.62 --------------------------------------------------------------------------------- -Drop table if exists t1, t2 ; -Drop view if exists v1 ; -Create table t1 (f59 int, f60 char(10), f61 int, a char(1)) ; -Insert into t1 values (1, 'single', 3, '1') ; -Insert into t1 values (2, 'double', 6, '2') ; -Insert into t1 values (3, 'single-f3', 4, '3') ; -Create table t2 (f59 int, f60 char(10), f61 int, b char(1)) ; -Insert into t2 values (2, 'double', 6, '2') ; -Insert into t2 values (3, 'single-f3', 6, '3') ; -Insert into t2 values (4, 'single', 4, '4') ; -create or replace view test.v1 as -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -from t1 inner join t2 where t1.f59 = t2.f59 ; -select * from test.v1 order by t1_f59 ; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -from t1 inner join t2 where t1.f59 = t2.f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Create or replace view test.v1 as -Select t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2 cross join t1; -Select * from v1 order by t1_f59,t2_f59; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Select t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2 cross join t1; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Create or replace view test.v1 as -Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2,t1; -Select * from v1 order by t1_f59,t2_f59; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2,t1; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Create or replace view test.v1 as -Select f59, f60, f61, a, b -FROM t2 natural join t1; -Select * from v1 order by f59; -f59 f60 f61 a b -2 double 6 2 2 -Select f59, f60, f61, a, b -FROM t2 natural join t1; -f59 f60 f61 a b -2 double 6 2 2 -Create or replace view test.v1 as -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 left outer join t1 on t2.f59=t1.f59; -Select * from v1 order by t1_f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -NULL 4 NULL single NULL 4 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 left outer join t1 on t2.f59=t1.f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -NULL 4 NULL single NULL 4 -Create or replace view test.v1 as -Select f59, f60, f61, t1.a, t2.b -FROM t2 natural left outer join t1; -Select * from v1 order by f59; -f59 f60 f61 a b -2 double 6 2 2 -3 single-f3 6 NULL 3 -4 single 4 NULL 4 -Select f59, f60, f61, t1.a, t2.b -FROM t2 natural left outer join t1; -f59 f60 f61 a b -2 double 6 2 2 -3 single-f3 6 NULL 3 -4 single 4 NULL 4 -Create or replace view test.v1 as -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 right outer join t1 on t2.f59=t1.f59; -Select * from v1 order by t1_f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -1 NULL single NULL 3 NULL -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 right outer join t1 on t2.f59=t1.f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -1 NULL single NULL 3 NULL -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Create or replace view test.v1 as -Select f59, f60, a, b -FROM t2 natural right outer join t1; -Select * from v1 order by f59 desc; -f59 f60 a b -3 single-f3 3 NULL -2 double 2 2 -1 single 1 NULL -Select f59, f60, a, b -FROM t2 natural right outer join t1; -f59 f60 a b -1 single 1 NULL -2 double 2 2 -3 single-f3 3 NULL -drop table t1, t2; -drop view v1 ; -Use test; - -Testcase 3.3.1.A1 - 3.3.1.A3 --------------------------------------------------------------------------------- -Drop table if exists t1 ; -Drop view if exists v1; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (101,201,301) ; -Insert into t1 values (107,501,601) ; -Insert into t1 values (901,801,401) ; -Create or replace view test.v1 as -Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ; -Select * from test.v1 order by f59 limit 0,10; -f59 -1 -2 -3 -5 -6 -7 -8 -9 -10 -15 -Drop view if exists test.v1 ; -Drop table if exists t1 ; -Drop view if exists v1; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (201,201,201) ; -Insert into t1 values (207,201,201) ; -Insert into t1 values (201,201,201) ; -Create or replace view test.v1 -as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ; -Select * from test.v1 order by f59 limit 0,10; -f59 -207 -Drop view if exists test.v1 ; -Drop table if exists t1 ; -Drop view if exists v1; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (21,21,21) ; -Insert into t1 values (27,21,21) ; -Insert into t1 values (21,21,21) ; -Create or replace view test.v1 -as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ; -Select * from test.v1 order by f59 limit 0,10; -f59 -27 -Drop view test.v1 ; - -Testcase 3.3.1.63 --------------------------------------------------------------------------------- -Drop table if exists t1 ; -Drop view if exists test.v1 ; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (11,21,31) ; -Insert into t1 values (17,51,61) ; -Insert into t1 values (91,81,41) ; -Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) -Union ALL (Select f59 from t1 where f59=17 ); -Select * from test.v1 order by f59 limit 0,10; -f59 -17 -17 -Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) -Union (Select f59 from t1 where f59=17 ); -Select * from test.v1 order by f59 limit 0,10; -f59 -17 -Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) -Union Distinct (Select f59 from t1 where f60=17 ); -Select * from test.v1 order by f59 limit 0,10; -f59 -17 -Drop view test.v1 ; -drop table if exists t1; -drop view if exists test.v1; -create table t1 (f59 int, f60 int, f61 int); -insert into t1 values (101,201,301); -insert into t1 values (107,501,601); -insert into t1 values (901,801,401); -create or replace view test.v1 as -select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59; -select * from test.v1 order by f59 limit 0,10; -f59 -107 -107 -create or replace view test.v1 as -(select f59 from tb2 where f59=107 ) -union all -(select f59 from t1 where f59=107 ); -select * from test.v1 order by f59 limit 0,10; -f59 -107 -107 -107 -create or replace view test.v1 as -(select f59 from tb2 where f59=107 ) -union -(select f59 from t1 where f59=107 ); -select * from test.v1 order by f59 limit 0,10; -f59 -107 -create or replace view test.v1 as -(select f59 from tb2 where f59=107 ) -union distinct -(select f59 from t1 where f59=107 ); -select * from test.v1 order by f59 limit 0,10; -f59 -107 -drop view if exists test.v1 ; -drop table t1; - -Testcase 3.3.1.64 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT F59 -FROM test.tb2 where test.tb2.F59 = 109; -SELECT * FROM test.v1 order by f59 limit 0,10; -F59 -109 -109 -ALTER VIEW test.v1 AS SELECT * -FROM test.tb2 WHERE test.tb2.f59 = 242 ; -SELECT * FROM test.v1 order by f59 limit 0,10; -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -Drop view test.v1 ; - -Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS test.v1 ; -CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = ndb ; -CREATE VIEW v1 AS SELECT f1 FROM t1; -DROP VIEW v1; -DROP VIEW v1; -ERROR 42S02: Unknown table 'v1' -CREATE VIEW v1 AS SELECT f1 FROM t1; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v1; -Warnings: -Note 1051 Unknown table 'test.v1' - -Testcase 3.3.1.68 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1_base ; -DROP VIEW IF EXISTS v1_top ; -CREATE TABLE t1 ( f1 DOUBLE); -CREATE VIEW v1_base AS SELECT * FROM t1; -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_top ; -DROP VIEW v1_top; -ERROR 42S02: Unknown table 'v1_top' -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_base ; -DROP VIEW v1_base; -ERROR 42S02: Unknown table 'v1_base' -DROP VIEW v1_top; -CREATE VIEW v1_base AS SELECT * FROM t1; -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_top CASCADE ; -DROP VIEW v1_top; -ERROR 42S02: Unknown table 'v1_top' -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_base CASCADE ; -DROP VIEW v1_base; -ERROR 42S02: Unknown table 'v1_base' -DROP VIEW v1_top; -CREATE VIEW v1_base AS SELECT * FROM t1; -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_top RESTRICT ; -DROP VIEW v1_top; -ERROR 42S02: Unknown table 'v1_top' -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_base RESTRICT ; -DROP VIEW v1_base; -ERROR 42S02: Unknown table 'v1_base' -DROP VIEW v1_top; - -Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ENGINE = ndb; -CREATE VIEW v1 AS SELECT * FROM t1; -DROP VIEW v1 ; -SELECT * FROM v1 ; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW CREATE VIEW v1 ; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW CREATE TABLE v1 ; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW TABLE STATUS like 'v1' ; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -SHOW TABLES LIKE 'v1'; -Tables_in_test (v1) -SHOW COLUMNS FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW FIELDS FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -CHECK TABLE v1; -Table Op Msg_type Msg_text -test.v1 check Error Table 'test.v1' doesn't exist -test.v1 check status Operation failed -DESCRIBE v1; -ERROR 42S02: Table 'test.v1' doesn't exist -EXPLAIN SELECT * FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -Use test; - -Testcase 3.3.1.A6 --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS test3; -CREATE DATABASE test3; -CREATE TABLE test3.t1 (f1 DECIMAL(5,3)) ENGINE = ndb; -INSERT INTO test3.t1 SET f1 = 1.0; -CREATE VIEW test3.v0 AS SELECT * FROM test3.t1; -CREATE VIEW test3.v1 AS SELECT * FROM test3.v0; -CREATE VIEW test3.v2 AS SELECT * FROM test3.v1; -CREATE VIEW test3.v3 AS SELECT * FROM test3.v2; -CREATE VIEW test3.v4 AS SELECT * FROM test3.v3; -CREATE VIEW test3.v5 AS SELECT * FROM test3.v4; -CREATE VIEW test3.v6 AS SELECT * FROM test3.v5; -CREATE VIEW test3.v7 AS SELECT * FROM test3.v6; -CREATE VIEW test3.v8 AS SELECT * FROM test3.v7; -CREATE VIEW test3.v9 AS SELECT * FROM test3.v8; -CREATE VIEW test3.v10 AS SELECT * FROM test3.v9; -CREATE VIEW test3.v11 AS SELECT * FROM test3.v10; -CREATE VIEW test3.v12 AS SELECT * FROM test3.v11; -CREATE VIEW test3.v13 AS SELECT * FROM test3.v12; -CREATE VIEW test3.v14 AS SELECT * FROM test3.v13; -CREATE VIEW test3.v15 AS SELECT * FROM test3.v14; -CREATE VIEW test3.v16 AS SELECT * FROM test3.v15; -CREATE VIEW test3.v17 AS SELECT * FROM test3.v16; -CREATE VIEW test3.v18 AS SELECT * FROM test3.v17; -CREATE VIEW test3.v19 AS SELECT * FROM test3.v18; -CREATE VIEW test3.v20 AS SELECT * FROM test3.v19; -CREATE VIEW test3.v21 AS SELECT * FROM test3.v20; -CREATE VIEW test3.v22 AS SELECT * FROM test3.v21; -CREATE VIEW test3.v23 AS SELECT * FROM test3.v22; -CREATE VIEW test3.v24 AS SELECT * FROM test3.v23; -CREATE VIEW test3.v25 AS SELECT * FROM test3.v24; -CREATE VIEW test3.v26 AS SELECT * FROM test3.v25; -CREATE VIEW test3.v27 AS SELECT * FROM test3.v26; -CREATE VIEW test3.v28 AS SELECT * FROM test3.v27; -CREATE VIEW test3.v29 AS SELECT * FROM test3.v28; -CREATE VIEW test3.v30 AS SELECT * FROM test3.v29; -CREATE VIEW test3.v31 AS SELECT * FROM test3.v30; -CREATE VIEW test3.v32 AS SELECT * FROM test3.v31; -SHOW CREATE VIEW test3.v32; -View Create View character_set_client collation_connection -v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci -SELECT * FROM test3.v32; -f1 -1.000 -EXPLAIN SELECT * FROM test3.v32; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1 -DROP VIEW test3.v0; -SHOW CREATE VIEW test3.v32; -View Create View character_set_client collation_connection -v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci -Warnings: -Warning 1356 View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM test3.v32; -ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -EXPLAIN SELECT * FROM test3.v32; -ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them - -FIXME - Setting join_limit to 28 - hangs for higher values ----------------------------------------------------------- -SET @join_limit = 28; -SET @max_level = @join_limit - 1; -DROP DATABASE IF EXISTS test3; -DROP TABLE IF EXISTS test1.t1; -DROP TABLE IF EXISTS test2.t1; -DROP VIEW IF EXISTS test1.v27; -DROP VIEW IF EXISTS test1.v26; -DROP VIEW IF EXISTS test1.v25; -DROP VIEW IF EXISTS test1.v24; -DROP VIEW IF EXISTS test1.v23; -DROP VIEW IF EXISTS test1.v22; -DROP VIEW IF EXISTS test1.v21; -DROP VIEW IF EXISTS test1.v20; -DROP VIEW IF EXISTS test1.v19; -DROP VIEW IF EXISTS test1.v18; -DROP VIEW IF EXISTS test1.v17; -DROP VIEW IF EXISTS test1.v16; -DROP VIEW IF EXISTS test1.v15; -DROP VIEW IF EXISTS test1.v14; -DROP VIEW IF EXISTS test1.v13; -DROP VIEW IF EXISTS test1.v12; -DROP VIEW IF EXISTS test1.v11; -DROP VIEW IF EXISTS test1.v10; -DROP VIEW IF EXISTS test1.v9; -DROP VIEW IF EXISTS test1.v8; -DROP VIEW IF EXISTS test1.v7; -DROP VIEW IF EXISTS test1.v6; -DROP VIEW IF EXISTS test1.v5; -DROP VIEW IF EXISTS test1.v4; -DROP VIEW IF EXISTS test1.v3; -DROP VIEW IF EXISTS test1.v2; -DROP VIEW IF EXISTS test1.v1; -DROP VIEW IF EXISTS test1.v0; -CREATE DATABASE test3; -USE test1; -CREATE TABLE t1 (f1 BIGINT, f2 CHAR(50)) ENGINE = ndb ; -INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); -INSERT INTO t1 VALUES (0, NULL); -INSERT INTO t1 VALUES (5, 'five'); -INSERT INTO t1 VALUES (1, 'one'); -INSERT INTO t1 VALUES (2, 'two'); -USE test2; -CREATE TABLE t1 (f1 DECIMAL(64,30), f2 VARCHAR(50)) ENGINE = ndb; -INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); -INSERT INTO t1 VALUES (0.000000000000000000000000000000, NULL); -INSERT INTO t1 VALUES (5.000000000000000000000000000000, 'five'); -INSERT INTO t1 VALUES (+1.000000000000000000000000000000, 'one'); -INSERT INTO t1 VALUES (3.000000000000000, 'three'); -USE test3; -CREATE TABLE t1 (f1 DOUBLE, f2 VARBINARY(50)) ENGINE = ndb; -INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); -INSERT INTO t1 VALUES (+0.0E-35, NULL); -INSERT INTO t1 VALUES (+0.5E+1, 'five'); -INSERT INTO t1 VALUES (20.0E-1, 'two'); -INSERT INTO t1 VALUES (0.0300E2, 'three'); -USE test; -CREATE OR REPLACE VIEW test1.v0 AS SELECT * FROM test2.t1; -CREATE OR REPLACE VIEW test1.v1 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v0 tab2; -CREATE OR REPLACE VIEW test1.v2 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v1 tab2; -CREATE OR REPLACE VIEW test1.v3 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v2 tab2; -CREATE OR REPLACE VIEW test1.v4 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v3 tab2; -CREATE OR REPLACE VIEW test1.v5 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v4 tab2; -CREATE OR REPLACE VIEW test1.v6 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v5 tab2; -CREATE OR REPLACE VIEW test1.v7 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v6 tab2; -CREATE OR REPLACE VIEW test1.v8 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v7 tab2; -CREATE OR REPLACE VIEW test1.v9 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v8 tab2; -CREATE OR REPLACE VIEW test1.v10 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v9 tab2; -CREATE OR REPLACE VIEW test1.v11 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v10 tab2; -CREATE OR REPLACE VIEW test1.v12 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v11 tab2; -CREATE OR REPLACE VIEW test1.v13 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v12 tab2; -CREATE OR REPLACE VIEW test1.v14 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v13 tab2; -CREATE OR REPLACE VIEW test1.v15 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v14 tab2; -CREATE OR REPLACE VIEW test1.v16 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v15 tab2; -CREATE OR REPLACE VIEW test1.v17 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v16 tab2; -CREATE OR REPLACE VIEW test1.v18 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v17 tab2; -CREATE OR REPLACE VIEW test1.v19 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v18 tab2; -CREATE OR REPLACE VIEW test1.v20 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v19 tab2; -CREATE OR REPLACE VIEW test1.v21 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v20 tab2; -CREATE OR REPLACE VIEW test1.v22 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v21 tab2; -CREATE OR REPLACE VIEW test1.v23 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v22 tab2; -CREATE OR REPLACE VIEW test1.v24 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v23 tab2; -CREATE OR REPLACE VIEW test1.v25 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v24 tab2; -CREATE OR REPLACE VIEW test1.v26 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v25 tab2; -CREATE OR REPLACE VIEW test1.v27 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v26 tab2; -SHOW CREATE VIEW test1.v27; -View Create View character_set_client collation_connection -v27 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v27` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test1`.`t1` `tab1` join `test1`.`v26` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -f1 f2 -5 five - -The output of following EXPLAIN is deactivated, because the result -differs on some platforms -FIXME Is this a bug ? --------------------------------------------------------------------------------- -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -CREATE VIEW test1.v28 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v27 tab2; -SHOW CREATE VIEW test1.v28; -View Create View character_set_client collation_connection -v28 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v28` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v27` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v28; -f1 f2 -5 five - -The output of following EXPLAIN is deactivated, because the result -differs on some platforms -FIXME Is this a bug ? --------------------------------------------------------------------------------- -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v28; -DROP VIEW IF EXISTS test1.v28; -CREATE OR REPLACE VIEW test1.v0 AS -SELECT f1 as f2, f2 as f1 FROM test2.t1; -CREATE OR REPLACE VIEW test2.v0 AS -SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1; -SHOW CREATE VIEW test1.v27; -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -CREATE OR REPLACE VIEW test3.v0 AS -SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1; -SHOW CREATE VIEW test1.v27; -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -CREATE OR REPLACE VIEW test3.v0 AS -SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1; -SHOW CREATE VIEW test1.v27; -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v27; -DROP VIEW IF EXISTS test1.v27; -DROP VIEW IF EXISTS test1.v26; -DROP VIEW IF EXISTS test1.v25; -DROP VIEW IF EXISTS test1.v24; -DROP VIEW IF EXISTS test1.v23; -DROP VIEW IF EXISTS test1.v22; -DROP VIEW IF EXISTS test1.v21; -DROP VIEW IF EXISTS test1.v20; -DROP VIEW IF EXISTS test1.v19; -DROP VIEW IF EXISTS test1.v18; -DROP VIEW IF EXISTS test1.v17; -DROP VIEW IF EXISTS test1.v16; -DROP VIEW IF EXISTS test1.v15; -DROP VIEW IF EXISTS test1.v14; -DROP VIEW IF EXISTS test1.v13; -DROP VIEW IF EXISTS test1.v12; -DROP VIEW IF EXISTS test1.v11; -DROP VIEW IF EXISTS test1.v10; -DROP VIEW IF EXISTS test1.v9; -DROP VIEW IF EXISTS test1.v8; -DROP VIEW IF EXISTS test1.v7; -DROP VIEW IF EXISTS test1.v6; -DROP VIEW IF EXISTS test1.v5; -DROP VIEW IF EXISTS test1.v4; -DROP VIEW IF EXISTS test1.v3; -DROP VIEW IF EXISTS test1.v2; -DROP VIEW IF EXISTS test1.v1; -DROP VIEW IF EXISTS test1.v0; -DROP DATABASE test3; -DROP TABLE test1.t1; -DROP TABLE test2.t1; -Use test; - -Testcase 3.3.2.1 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Create View test.v1 AS SELECT f59,f60 FROM tb2 where f59 = 1995 ; -INSERT INTO test.v1 (f59,f60) values (879,700) ; -affected rows: 1 -SELECT f59,f60 FROM test.v1 where f59 = 879 and f60 = 700 ; -f59 f60 -DELETE FROM tb2 where f59 = 879 and f60 = 700 ; -Drop view test.v1 ; - -Testcase 3.3.2.2 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ; -INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ; -affected rows: 1 -SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ; -f59 2005 -f60 101 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ; -f59 f60 -2005 101 -DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ; -Drop view test.v1 ; - -Testcase 3.3.2.3 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (780,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; -UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM tb2 where f59 = 8 and f60 = 105; -f59 8 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ; -f59 f60 -8 105 -Drop view test.v1 ; - -Testcase 3.3.2.4 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (781,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; -UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ; -affected rows: 4 -info: Rows matched: 4 Changed: 4 Warnings: 0 -SELECT * FROM tb2 where f59 = 891 and f60 = 105; -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ; -f59 f60 -891 105 -891 105 -891 105 -891 105 -Drop view test.v1 ; - -Testcase 3.3.2.5 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (789,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ; -DELETE FROM test.v1 where f59 = 789 ; -affected rows: 1 -SELECT * FROM tb2 where f59 = 789 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ; -f59 f60 -Drop view test.v1 ; - -Testcase 3.3.2.6 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (711,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 711 ; -DELETE FROM test.v1 where f59 = 711 ; -affected rows: 1 -SELECT * FROM tb2 where f59 = 711 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ; -f59 f60 -Drop view test.v1 ; - -Testcase 3.3.2.1 - 3.3.2.6 alternative implementation --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4), -f4 CHAR, PRIMARY KEY(f1)); -CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1; -INSERT INTO v1 SET f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -1 NULL NULL NULL -DELETE FROM t1; -INSERT INTO v1 SET f2 = 'ABC'; -INSERT INTO v1 SET f2 = 'ABC'; -ERROR 23000: Duplicate entry '0' for key 'PRIMARY' -SELECT * from t1; -f1 f2 f3 f4 -0 ABC NULL NULL -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 NNN -0.0012 X -DELETE FROM t1; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f2, f3 FROM t1; -INSERT INTO v1 SET f2 = 'ABC'; -INSERT INTO v1 SET f2 = 'ABC'; -ERROR 23000: Duplicate entry '0' for key 'PRIMARY' -SELECT * from t1; -f1 f2 f3 f4 -0 ABC NULL NULL -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1; -INSERT INTO v1 SET f1 = 1; -ERROR HY000: The target table v1 of the INSERT is not insertable-into -SELECT * from t1; -f1 f2 f3 f4 -DELETE FROM t1; -INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO'; -ERROR HY000: The target table v1 of the INSERT is not insertable-into -SELECT * from t1; -f1 f2 f3 f4 -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE my_greeting = 'HELLO'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE my_greeting = 'HELLO'; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE my_greeting = 'HELLO'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC'; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO'; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej'; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 NNN -0.0012 X -DELETE FROM t1; -DROP TABLE t1; -SET sql_mode = 'traditional'; -CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4) NOT NULL, -f4 CHAR, PRIMARY KEY(f1)); -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1; -INSERT INTO v1 SET f1 = 1; -ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default value -SELECT * from t1; -f1 f2 f3 f4 -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f1 = 1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f4 = 'Y' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 Y -DELETE FROM t1; -SET sql_mode = ''; - -Testcases 3.3.2.7 - 3.3.2.9, -3.3.2.10 - 3.3.2.11 omitted because of missing -features EXCEPT and INTERSECT --------------------------------------------------------------------------------- -INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ; -INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ; -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ; -INSERT INTO t1 VALUES (19,41,32) ; -INSERT INTO t1 VALUES (59,54,71) ; -INSERT INTO t1 VALUES (21,91,99) ; -SET @variant1 = 'UNION '; -SET @variant2 = 'UNION ALL '; -SET @variant3 = 'UNION DISTINCT '; -SET @variant4 = 'EXCEPT '; -SET @variant5 = 'INTERSECT '; -CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION DISTINCT SELECT f61 FROM t1 WHERE f59=19; -INSERT INTO v1 VALUES (3000); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61 = 100 WHERE f61 = 32; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1 ; -CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION ALL SELECT f61 FROM t1 WHERE f59=19; -INSERT INTO v1 VALUES (3000); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61 = 100 WHERE f61 = 32; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1 ; -CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION SELECT f61 FROM t1 WHERE f59=19; -INSERT INTO v1 VALUES (3000); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61 = 100 WHERE f61 = 32; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1 ; - -Testcases 3.3.2.12 - 3.3.2.20 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1, t2 ; -DROP VIEW IF EXISTS test.v1 ; -Drop view if exists v2 ; -CREATE TABLE t1 (f59 int, f60 int, f61 int) ; -INSERT INTO t1 VALUES (19,41,32) ; -INSERT INTO t1 VALUES (59,54,71) ; -INSERT INTO t1 VALUES (21,91,99) ; -CREATE TABLE t2 (f59 int, f60 int, f61 int) ; -INSERT INTO t2 VALUES (19,41,32) ; -INSERT INTO t2 VALUES (59,54,71) ; -INSERT INTO t2 VALUES (21,91,99) ; -CREATE VIEW v2 AS SELECT f59, f60, f61 FROM t2 LIMIT 5; -SET @variant1= 'CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1'; -SET @variant2= 'CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1'; -SET @variant3= 'CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1'; -SET @variant4= 'CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61'; -SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0'; -SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1'; -SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2'; -SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; -SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; -CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1); -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f61 FROM v2; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -Drop TABLE t1, t2 ; -Drop VIEW v2 ; - -Testcases 3.3.A1 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v2; -CREATE TABLE t1 (f1 BIGINT, f2 DATE DEFAULT NULL, f4 CHAR(5), -report char(10)) ENGINE = ndb; -CREATE VIEW v1 AS SELECT * FROM t1; -INSERT INTO t1 SET f1 = -1, f4 = 'ABC', report = 't1 0'; -INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(5) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(5) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5); -INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1'; -INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a'; -ERROR 42S22: Unknown column 'f4x' in 'field list' -INSERT INTO v1 SET f1 = 0, report = 'v1 1b'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4x char(5) YES NULL -report char(10) YES NULL -DESCRIBE v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM t1 order by f1, report; -f1 f2 f4x report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -SELECT * FROM v1 order by f1, report; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5); -ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10); -INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2'; -INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(10) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(10) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 --> t1 2 -2 NULL <-- 10 --> v1 2 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 --> t1 2 -2 NULL <-- 10 --> v1 2 -ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); -Warnings: -Warning 1265 Data truncated for column 'f4' at row -Warning 1265 Data truncated for column 'f4' at row -INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; -Warnings: -Warning 1265 Data truncated for column 'f4' at row 1 -INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3'; -Warnings: -Warning 1265 Data truncated for column 'f4' at row 1 -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(8) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(8) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20); -INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4'; -INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30); -INSERT INTO t1 SET f1 = '<------------- 30 ----------->', -f4 = '<------ 20 -------->', report = 't1 5'; -INSERT INTO v1 SET f1 = '<------------- 30 ----------->', -f4 = '<------ 20 -------->', report = 'v1 5'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ALTER TABLE t1 DROP COLUMN f2; -INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6'; -INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -DESCRIBE v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM t1 order by f1, report; -f1 f4 report --1 ABC t1 0 --1 ABC v1 0 -0 ABC t1 1 -2 <-- 10 - t1 2 -2 <-- 10 - v1 2 -3 <-- 10 - t1 3 -3 <-- 10 - v1 3 -4 <------ 20 --------> t1 4 -4 <------ 20 --------> v1 4 -<------------- 30 -----------> <------ 20 --------> t1 5 -<------------- 30 -----------> <------ 20 --------> v1 5 -ABC <------ 20 --------> t1 6 -SELECT * FROM v1 order by f1, report; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL; -INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04', -f4 = '<------ 20 -------->', report = 't1 7'; -INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04', -f4 = '<------ 20 -------->', report = 'v1 7'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -f2 date YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f4 report f2 --1 ABC t1 0 NULL --1 ABC v1 0 NULL -0 ABC t1 1 NULL -2 <-- 10 - t1 2 NULL -2 <-- 10 - v1 2 NULL -3 <-- 10 - t1 3 NULL -3 <-- 10 - v1 3 NULL -4 <------ 20 --------> t1 4 NULL -4 <------ 20 --------> v1 4 NULL -<------------- 30 -----------> <------ 20 --------> t1 5 NULL -<------------- 30 -----------> <------ 20 --------> v1 5 NULL -ABC <------ 20 --------> t1 6 NULL -ABC <------ 20 --------> t1 7 1500-12-04 -ABC <------ 20 --------> v1 7 1500-12-04 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ABC NULL <------ 20 --------> t1 6 -ABC 1500-12-04 <------ 20 --------> t1 7 -ABC 1500-12-04 <------ 20 --------> v1 7 -ALTER TABLE t1 DROP COLUMN f2; -ALTER TABLE t1 ADD COLUMN f2 FLOAT; -INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4, -f4 = '<------ 20 -------->', report = 't1 8'; -INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, -f4 = '<------ 20 -------->', report = 'v1 8'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -f2 float YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 float YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f4 report f2 --1 ABC t1 0 NULL --1 ABC v1 0 NULL -0 ABC t1 1 NULL -2 <-- 10 - t1 2 NULL -2 <-- 10 - v1 2 NULL -3 <-- 10 - t1 3 NULL -3 <-- 10 - v1 3 NULL -4 <------ 20 --------> t1 4 NULL -4 <------ 20 --------> v1 4 NULL -<------------- 30 -----------> <------ 20 --------> t1 5 NULL -<------------- 30 -----------> <------ 20 --------> v1 5 NULL -ABC <------ 20 --------> t1 6 NULL -ABC <------ 20 --------> t1 7 NULL -ABC <------ 20 --------> t1 8 -0.00033 -ABC <------ 20 --------> v1 7 NULL -ABC <------ 20 --------> v1 8 -0.00033 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ABC NULL <------ 20 --------> t1 6 -ABC NULL <------ 20 --------> t1 7 -ABC -0.00033 <------ 20 --------> t1 8 -ABC NULL <------ 20 --------> v1 7 -ABC -0.00033 <------ 20 --------> v1 8 -ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2); -INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4, -f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9'; -INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, -f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9'; -ERROR 42S22: Unknown column 'f3' in 'field list' -INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, -f4 = '<------ 20 -------->', report = 'v1 9a'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -f2 float YES NULL -f3 decimal(7,2) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 float YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f4 report f2 f3 --1 ABC t1 0 NULL NULL --1 ABC v1 0 NULL NULL -0 ABC t1 1 NULL NULL -2 <-- 10 - t1 2 NULL NULL -2 <-- 10 - v1 2 NULL NULL -3 <-- 10 - t1 3 NULL NULL -3 <-- 10 - v1 3 NULL NULL -4 <------ 20 --------> t1 4 NULL NULL -4 <------ 20 --------> v1 4 NULL NULL -<------------- 30 -----------> <------ 20 --------> t1 5 NULL NULL -<------------- 30 -----------> <------ 20 --------> v1 5 NULL NULL -ABC <------ 20 --------> t1 6 NULL NULL -ABC <------ 20 --------> t1 7 NULL NULL -ABC <------ 20 --------> t1 8 -0.00033 NULL -ABC <------ 20 --------> t1 9 -0.00033 -2.20 -ABC <------ 20 --------> v1 7 NULL NULL -ABC <------ 20 --------> v1 8 -0.00033 NULL -ABC <------ 20 --------> v1 9a -0.00033 NULL -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ABC NULL <------ 20 --------> t1 6 -ABC NULL <------ 20 --------> t1 7 -ABC -0.00033 <------ 20 --------> t1 8 -ABC -0.00033 <------ 20 --------> t1 9 -ABC NULL <------ 20 --------> v1 7 -ABC -0.00033 <------ 20 --------> v1 8 -ABC -0.00033 <------ 20 --------> v1 9a -DROP TABLE t1; -DROP VIEW v1; -CREATE TABLE t1 (f1 CHAR(10), f2 BIGINT) ENGINE = ndb; -INSERT INTO t1 SET f1 = 'ABC', f2 = 3; -CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -f2 bigint(20) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -my_sqrt double YES NULL -SELECT * FROM t1 order by f1, f2; -f1 f2 -ABC 3 -SELECT * FROM v1 order by 2; -f1 my_sqrt -ABC 1.7320508075688772 -ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30); -INSERT INTO t1 SET f1 = 'ABC', f2 = 'DEF'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -f2 varchar(30) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -my_sqrt double YES NULL -SELECT * FROM t1 order by f1, f2; -f1 f2 -ABC 3 -ABC DEF -SELECT * FROM v1 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.7320508075688772 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -SELECT SQRT('DEF'); -SQRT('DEF') -0 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -CREATE VIEW v2 AS SELECT SQRT('DEF'); -SELECT * FROM v2 order by 1; -SQRT('DEF') -0 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -DESCRIBE v2; -Field Type Null Key Default Extra -f1 char(10) YES NULL -my_sqrt double YES NULL -SELECT * FROM v2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.7320508075688772 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -SELECT * FROM t2 order by 2; -f1 ABC -my_sqrt 0 -f1 ABC -my_sqrt 1.7320508075688772 -DROP TABLE t2; -CREATE TABLE t2 AS SELECT * FROM v1; -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -SELECT * FROM t2 order by 2; -f1 ABC -my_sqrt 0 -f1 ABC -my_sqrt 1.7320508075688772 -DROP TABLE t2; -CREATE TABLE t2 AS SELECT * FROM v2; -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -SELECT * FROM t2 order by 2; -f1 ABC -my_sqrt 0 -f1 ABC -my_sqrt 1.7320508075688772 -DROP TABLE t1; -DROP TABLE t2; -DROP VIEW v1; -DROP VIEW v2; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v1_1; -DROP VIEW IF EXISTS v1_2; -DROP VIEW IF EXISTS v1_firstview; -DROP VIEW IF EXISTS v1_secondview; -DROP VIEW IF EXISTS v2; -DROP DATABASE IF EXISTS test2; -DROP DATABASE IF EXISTS test3; -DROP DATABASE test1; -DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/t/is_cml_ndb.test b/mysql-test/suite/funcs_1/t/is_cml_ndb.test deleted file mode 100644 index 6d46424d14e..00000000000 --- a/mysql-test/suite/funcs_1/t/is_cml_ndb.test +++ /dev/null @@ -1,42 +0,0 @@ -# suite/funcs_1/t/is_cml_ndb.test -# -# Check the content of information_schema.columns about tables using -# UNICODE columns. -# Variant for storage engine NDB -# -# Author: -# 2008-06-04 mleich Create this script based on older scripts and new code. -# - ---source include/have_ucs2.inc - -# This test cannot be used for the embedded server because privileges -# are expected within result sets. ---source include/not_embedded.inc - ---source include/have_ndb.inc -let $engine_type= NDB; -USE test; ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings -eval CREATE TABLE t1 -( - f1 CHAR UNICODE, - f2 CHAR(0) UNICODE, - f3 CHAR(10) UNICODE, - f5 VARCHAR(0) UNICODE, - f6 VARCHAR(255) UNICODE, - f7 VARCHAR(260) UNICODE, - f8 TEXT UNICODE, - f9 TINYTEXT UNICODE, - f10 MEDIUMTEXT UNICODE, - f11 LONGTEXT UNICODE, - PRIMARY KEY(f1) -) ENGINE = $engine_type; - -# We look only for the tables created here. -let $my_where = WHERE table_schema LIKE 'test%'; ---source suite/funcs_1/datadict/columns.inc - -DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/t/is_columns_ndb.test b/mysql-test/suite/funcs_1/t/is_columns_ndb.test deleted file mode 100644 index 3d2a8d7aa5b..00000000000 --- a/mysql-test/suite/funcs_1/t/is_columns_ndb.test +++ /dev/null @@ -1,37 +0,0 @@ -# suite/funcs_1/t/is_columns_ndb.test -# -# Check the content of information_schema.columns about tables within -# the databases created by the user. -# Variant for storage engine ndb -# -# Author: -# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of -# testsuite funcs_1 -# Create this script based on older scripts and new code. -# - -# This test cannot be used for the embedded server because we check here -# privileges. ---source include/not_embedded.inc - ---source include/have_ndb.inc -let $engine_type= ndb; ---source suite/funcs_1/datadict/datadict_load.inc - -# We look only for the tables created by datadict_load.inc. -let $my_where = WHERE table_schema LIKE 'test%'; ---source suite/funcs_1/datadict/columns.inc - -# This test runs with a different set of tables. -# --source suite/funcs_1/include/cleanup.inc -DROP DATABASE test1; -DROP DATABASE test4; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t7; -DROP TABLE test.t8; -DROP TABLE test.t9; -DROP TABLE test.t10; -DROP TABLE test.t11; diff --git a/mysql-test/suite/funcs_1/t/is_engines_ndb.test b/mysql-test/suite/funcs_1/t/is_engines_ndb.test deleted file mode 100644 index bf9af8510a8..00000000000 --- a/mysql-test/suite/funcs_1/t/is_engines_ndb.test +++ /dev/null @@ -1,15 +0,0 @@ -# suite/funcs_1/t/is_engines_ndb.test -# -# Check the content of information_schema.engines -# Variant for storage engine NDB -# -# Author: -# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of -# testsuite funcs_1 -# - -let $engine_type= ndbcluster; ---source include/have_ndb.inc ---vertical_results -eval SELECT * FROM information_schema.engines -WHERE ENGINE = '$engine_type'; diff --git a/mysql-test/suite/funcs_1/t/is_tables_ndb.test b/mysql-test/suite/funcs_1/t/is_tables_ndb.test deleted file mode 100644 index d21831b75c8..00000000000 --- a/mysql-test/suite/funcs_1/t/is_tables_ndb.test +++ /dev/null @@ -1,22 +0,0 @@ -# suite/funcs_1/t/is_tables_ndb.test -# -# Check the content of information_schema.tables about tables within -# the databases created by the user. -# Variant for storage engine NDB -# -# Author: -# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of -# testsuite funcs_1 -# Create this script based on older scripts and new code. -# - -# This test cannot be used for the embedded server because we check here -# privileges. ---source include/not_embedded.inc - ---source include/have_ndb.inc -let $engine_type= NDB; - -# We look only for the tables created by suite/funcs_1/datadict/tables.inc -let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; ---source suite/funcs_1/datadict/tables.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_bitdata.test b/mysql-test/suite/funcs_1/t/ndb_bitdata.test deleted file mode 100644 index f685a4abc6d..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_bitdata.test +++ /dev/null @@ -1,18 +0,0 @@ -#### suite/funcs_1/t/ndb_bitdata.test - -# NDB tables should be used -# -# 1. Check if InnoDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndb; - -let $message= NOT YET IMPLEMENTED: bitdata tests; ---source include/show_msg80.inc -exit; - -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/ndb_tb4.inc - ---source suite/funcs_1/bitdata/bitdata_master.test diff --git a/mysql-test/suite/funcs_1/t/ndb_cursors.test b/mysql-test/suite/funcs_1/t/ndb_cursors.test deleted file mode 100644 index 6aeeb3f298d..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_cursors.test +++ /dev/null @@ -1,19 +0,0 @@ -#### suite/funcs_1/t/ndb_cursors.test - -# NDB tables should be used -# -# 1. Check if ndb is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndb; - -let $message= NOT YET IMPLEMENTED: cursor tests; ---source include/show_msg80.inc -exit; - -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/ndb_tb1.inc - ---source suite/funcs_1/cursors/cursors_master.test - diff --git a/mysql-test/suite/funcs_1/t/ndb_func_view.test b/mysql-test/suite/funcs_1/t/ndb_func_view.test deleted file mode 100644 index 183ebc7053c..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_func_view.test +++ /dev/null @@ -1,16 +0,0 @@ -################################################### -# # -# Functions within VIEWs based on ndb tables # -# # -################################################### - -# -# NOTE: PLEASE SEE THE DETAILED DESCRIPTION IN -# suite/funcs_1/views/func_view.inc -# BEFORE ADDING NEW TEST CASES HERE !!! - -let $type= 'ndb' ; ---source include/have_ndb.inc - ---source suite/funcs_1/views/func_view.inc - diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_02.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_02.test deleted file mode 100644 index 9c701ece72f..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_02.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_02.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_02.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_03.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_03.test deleted file mode 100644 index 53c71932710..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_03.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_03.test -# -# 1. Check if nsd is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_03.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_06.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_06.test deleted file mode 100644 index b8640391b02..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_06.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_06.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_06.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_07.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_07.test deleted file mode 100644 index f0ef9fed313..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_07.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_07.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_07.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_08.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_08.test deleted file mode 100644 index 21db9081822..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_08.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_08.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_08.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc_10.test b/mysql-test/suite/funcs_1/t/ndb_storedproc_10.test deleted file mode 100644 index 6f5888ad2d3..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_storedproc_10.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/ndb_storedproc_10.test -# -# 1. Check if ndb is available ---source include/have_ndb.inc - -# 2. Set $engine_type -let $engine_type= ndb; - ---source suite/funcs_1/storedproc/storedproc_10.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_0102.test b/mysql-test/suite/funcs_1/t/ndb_trig_0102.test deleted file mode 100644 index dd239ff5edb..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_0102.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_0102.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_0102.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_03.test b/mysql-test/suite/funcs_1/t/ndb_trig_03.test deleted file mode 100644 index 1f68bd05a80..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_03.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_03.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_03.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_03e.test b/mysql-test/suite/funcs_1/t/ndb_trig_03e.test deleted file mode 100644 index 2f0e3a7af51..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_03e.test +++ /dev/null @@ -1,25 +0,0 @@ -#### suite/funcs_1/t/ndb_triggers.test - -# This test cannot be used for the embedded server because we check here -# privileges. ---source include/not_embedded.inc - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndb; - -# Create some objects needed in many testcases -USE test; - ---source suite/funcs_1/triggers/triggers_03e_db_level.inc ---source suite/funcs_1/triggers/triggers_03e_table_level.inc ---source suite/funcs_1/triggers/triggers_03e_global_db_mix.inc ---source suite/funcs_1/triggers/triggers_03e_db_table_mix.inc ---source suite/funcs_1/triggers/triggers_03e_prepare.inc ---source suite/funcs_1/triggers/triggers_03e_definer.inc ---source suite/funcs_1/triggers/triggers_03e_transaction.inc ---source suite/funcs_1/triggers/triggers_03e_columns.inc - diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_0407.test b/mysql-test/suite/funcs_1/t/ndb_trig_0407.test deleted file mode 100644 index eccefd12dd9..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_0407.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_0407.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_0407.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_08.test b/mysql-test/suite/funcs_1/t/ndb_trig_08.test deleted file mode 100644 index e07c4fe7ec4..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_08.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_08.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_08.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_09.test b/mysql-test/suite/funcs_1/t/ndb_trig_09.test deleted file mode 100644 index 8def1d9eea1..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_09.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_09.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_09.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test b/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test deleted file mode 100644 index 729d5fee60b..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/ndb_trig_1011ext.test - -# NDB tables should be used -# -# 1. Check if NDB is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndbcluster; - ---source suite/funcs_1/triggers/triggers_1011ext.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_views.test b/mysql-test/suite/funcs_1/t/ndb_views.test deleted file mode 100644 index 910b8adb189..00000000000 --- a/mysql-test/suite/funcs_1/t/ndb_views.test +++ /dev/null @@ -1,24 +0,0 @@ -#### suite/funcs_1/t/ndb_views.test - -# ndb tables should be used -# -# 1. Check if ndb is available ---source include/have_ndb.inc -# 2. Set $engine_type -let $engine_type= ndb; - -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/ndb_tb2.inc ---disable_warnings -DROP DATABASE IF EXISTS test1; ---enable_warnings -CREATE DATABASE test1; -USE test1; ---source suite/funcs_1/include/ndb_tb2.inc -USE test; - ---source suite/funcs_1/views/views_master.inc -DROP DATABASE test1; -DROP TABLE test.tb2; - diff --git a/mysql-test/suite/funcs_2/r/ndb_charset.result b/mysql-test/suite/funcs_2/r/ndb_charset.result deleted file mode 100644 index 0a4dba2e302..00000000000 --- a/mysql-test/suite/funcs_2/r/ndb_charset.result +++ /dev/null @@ -1,119156 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -SET NAMES armscii8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET armscii8 COLLATE armscii8_bin) ENGINE=NDB CHARACTER SET armscii8 COLLATE armscii8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # armscii8_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES armscii8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET armscii8 COLLATE armscii8_general_ci) ENGINE=NDB CHARACTER SET armscii8 COLLATE armscii8_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # armscii8_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES ascii; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET ascii COLLATE ascii_bin) ENGINE=NDB CHARACTER SET ascii COLLATE ascii_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # ascii_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES ascii; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET ascii COLLATE ascii_general_ci) ENGINE=NDB CHARACTER SET ascii COLLATE ascii_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # ascii_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6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in) ENGINE=NDB CHARACTER SET big5 COLLATE big5_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # big5_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES big5; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET big5 COLLATE big5_chinese_ci) ENGINE=NDB CHARACTER SET big5 COLLATE big5_chinese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # big5_chinese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -60 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -7E 1 -5A 1 -7A 1 -5D 1 -5B 1 -5C 1 -5E 1 -5F 1 -7B 1 -7C 1 -7D 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES binary; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET binary) ENGINE=NDB CHARACTER SET binary; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # binary # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -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 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1250; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1250 COLLATE cp1250_bin) ENGINE=NDB CHARACTER SET cp1250 COLLATE cp1250_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1250_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1250; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1250 COLLATE cp1250_croatian_ci) ENGINE=NDB CHARACTER SET cp1250 COLLATE cp1250_croatian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1250_croatian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -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1 -95 1 -96 1 -97 1 -98 1 -99 1 -9B 1 -A0 1 -A1 1 -A2 1 -A4 1 -A6 1 -A7 1 -A8 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B2 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -BB 1 -BD 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1250; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1250 COLLATE cp1250_czech_cs) ENGINE=NDB CHARACTER SET cp1250 COLLATE cp1250_czech_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1250_czech_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -7F 1 -80 1 -81 1 -83 1 -88 1 -90 1 -98 1 -B6 1 -A0 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -A5 1 -B9 1 -42 1 -62 1 -43 1 -63 1 -C6 1 -E6 1 -C7 1 -E7 1 -C8 1 -E8 1 -44 1 -64 1 -CF 1 -EF 1 -D0 1 -F0 1 -45 1 -65 1 -C9 1 -E9 1 -CC 1 -EC 1 -CB 1 -EB 1 -CA 1 -EA 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CD 1 -ED 1 -CE 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -C5 1 -E5 1 -BC 1 -BE 1 -A3 1 -B3 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -D2 1 -F2 1 -4F 1 -6F 1 -D3 1 -F3 1 -D4 1 -F4 1 -D6 1 -F6 1 -D5 1 -F5 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C0 1 -E0 1 -D8 1 -F8 1 -53 1 -73 1 -8C 1 -9C 1 -AA 1 -BA 1 -8A 1 -9A 1 -DF 1 -54 1 -74 1 -8D 1 -9D 1 -DE 1 -55 1 -75 1 -DA 1 -FA 1 -D9 1 -F9 1 -DC 1 -FC 1 -DB 1 -FB 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -AF 1 -BF 1 -8F 1 -9F 1 -8E 1 -9E 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -82 1 -84 1 -85 1 -86 1 -87 1 -89 1 -8B 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -99 1 -9B 1 -A1 1 -A2 1 -A4 1 -A6 1 -A7 1 -A8 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B2 1 -B4 1 -B5 1 -B7 1 -B8 1 -BB 1 -BD 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1250; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1250 COLLATE cp1250_general_ci) ENGINE=NDB CHARACTER SET cp1250 COLLATE cp1250_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1250_general_ci # # # -SELECT HE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5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8B 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9B 1 -A1 1 -A2 1 -A4 1 -A6 1 -A8 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B2 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -BB 1 -BD 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1251; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_bin) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1251; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_bulgarian_ci) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_bulgarian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_bulgarian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -C0 1 -E0 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -C5 1 -E5 1 -A8 1 -B8 1 -C6 1 -E6 1 -C7 1 -E7 1 -C8 1 -E8 1 -C9 1 -E9 1 -CA 1 -EA 1 -CB 1 -EB 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -CF 1 -EF 1 -D0 1 -F0 1 -D1 1 -F1 1 -D2 1 -F2 1 -D3 1 -F3 1 -D4 1 -F4 1 -D5 1 -F5 1 -D6 1 -F6 1 -D7 1 -F7 1 -D8 1 -F8 1 -D9 1 -F9 1 -DA 1 -FA 1 -DB 1 -FB 1 -DC 1 -FC 1 -DD 1 -FD 1 -DE 1 -DF 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1251; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_general_ci) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 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; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_general_cs) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_general_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_general_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -C0 1 -E0 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -A5 1 -B4 1 -C4 1 -E4 1 -80 1 -90 1 -81 1 -83 1 -C5 1 -E5 1 -A8 1 -B8 1 -AA 1 -BA 1 -C6 1 -E6 1 -C7 1 -E7 1 -BD 1 -BE 1 -C8 1 -E8 1 -B2 1 -B3 1 -AF 1 -BF 1 -C9 1 -E9 1 -A3 1 -BC 1 -CA 1 -EA 1 -8D 1 -9D 1 -CB 1 -EB 1 -8A 1 -9A 1 -CC 1 -EC 1 -CD 1 -ED 1 -8C 1 -9C 1 -CE 1 -EE 1 -CF 1 -EF 1 -D0 1 -F0 1 -D1 1 -F1 1 -D2 1 -F2 1 -8E 1 -9E 1 -D3 1 -F3 1 -A1 1 -A2 1 -D4 1 -F4 1 -D5 1 -F5 1 -D6 1 -F6 1 -D7 1 -F7 1 -8F 1 -9F 1 -D8 1 -F8 1 -D9 1 -F9 1 -DA 1 -FA 1 -DB 1 -FB 1 -DC 1 -FC 1 -DD 1 -FD 1 -DE 1 -DF 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -82 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8B 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9B 1 -A0 1 -A4 1 -A6 1 -A7 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B5 1 -B6 1 -B7 1 -B9 1 -BB 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1251; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1251 COLLATE cp1251_ukrainian_ci) ENGINE=NDB CHARACTER SET cp1251 COLLATE cp1251_ukrainian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1251_ukrainian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -60 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 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AD 1 -AE 1 -B0 1 -B1 1 -B5 1 -B6 1 -B7 1 -B9 1 -BB 1 -BC 1 -BD 1 -BE 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1256; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1256 COLLATE cp1256_bin) ENGINE=NDB CHARACTER SET cp1256 COLLATE cp1256_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1256_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1256; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1256 COLLATE cp1256_general_ci) ENGINE=NDB CHARACTER SET cp1256 COLLATE cp1256_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1256_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A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 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BB 1 -BC 1 -BD 1 -BE 1 -C0 1 -D7 1 -F7 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1257; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1257 COLLATE cp1257_bin) ENGINE=NDB CHARACTER SET cp1257 COLLATE cp1257_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1257_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1257; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1257 COLLATE cp1257_general_ci) ENGINE=NDB CHARACTER SET cp1257 COLLATE cp1257_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1257_general_ci # # # -SELECT HEX(ASCII(a)) A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 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A9 1 -AB 1 -AC 1 -AD 1 -AE 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B9 1 -BB 1 -BC 1 -BD 1 -BE 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp1257; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp1257 COLLATE cp1257_lithuanian_ci) ENGINE=NDB CHARACTER SET cp1257 COLLATE cp1257_lithuanian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp1257_lithuanian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -42 1 -62 1 -43 1 -63 1 -C8 1 -E8 1 -44 1 -64 1 -45 1 -65 1 -C6 1 -E6 1 -CB 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -59 1 -79 1 -C1 1 -E1 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -D0 1 -F0 1 -54 1 -74 1 -55 1 -75 1 -DB 1 -FB 1 -D8 1 -F8 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -5A 1 -7A 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C2 1 -C3 1 -C4 1 -C5 1 -C7 1 -C9 1 -CA 1 -CC 1 -CD 1 -CE 1 -CF 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D9 1 -DA 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E2 1 -E3 1 -E4 1 -E5 1 -E7 1 -E9 1 -EA 1 -EC 1 -ED 1 -EE 1 -EF 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F9 1 -FA 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp850; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp850 COLLATE cp850_bin) ENGINE=NDB CHARACTER SET cp850 COLLATE cp850_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp850_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp850; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp850 COLLATE cp850_general_ci) ENGINE=NDB CHARACTER SET cp850 COLLATE cp850_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp850_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -85 1 -B7 1 -A0 1 -B5 1 -83 1 -B6 1 -C6 1 -C7 1 -84 1 -8E 1 -86 1 -8F 1 -91 1 -92 1 -42 1 -62 1 -43 1 -63 1 -80 1 -87 1 -44 1 -64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3) CHARACTER SET cp852 COLLATE cp852_bin) ENGINE=NDB CHARACTER SET cp852 COLLATE cp852_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp852_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp852; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp852 COLLATE cp852_general_ci) ENGINE=NDB CHARACTER SET cp852 COLLATE cp852_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp852_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -83 1 -84 1 -8E 1 -A0 1 -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-F8 1 -F9 1 -FA 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp866; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp866 COLLATE cp866_bin) ENGINE=NDB CHARACTER SET cp866 COLLATE cp866_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp866_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp866; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp866 COLLATE cp866_general_ci) ENGINE=NDB CHARACTER SET cp866 COLLATE cp866_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp866_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36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1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp932; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp932 COLLATE cp932_bin) ENGINE=NDB CHARACTER SET cp932 COLLATE cp932_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp932_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES cp932; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET cp932 COLLATE cp932_japanese_ci) ENGINE=NDB CHARACTER SET cp932 COLLATE cp932_japanese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # cp932_japanese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES dec8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET dec8 COLLATE dec8_bin) ENGINE=NDB CHARACTER SET dec8 COLLATE dec8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # dec8_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1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F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES dec8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET dec8 COLLATE dec8_swedish_ci) ENGINE=NDB CHARACTER SET dec8 COLLATE dec8_swedish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # dec8_swedish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -E0 1 -E1 1 -E2 1 -E3 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DC 1 -DD 1 -FC 1 -FD 1 -5A 1 -7A 1 -5B 1 -C5 1 -E5 1 -5C 1 -C4 1 -C6 1 -E4 1 -E6 1 -5D 1 -D6 1 -F6 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D7 1 -D8 1 -F8 1 -DE 1 -DF 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES eucjpms; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET eucjpms COLLATE eucjpms_bin) ENGINE=NDB CHARACTER SET eucjpms COLLATE eucjpms_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # eucjpms_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES eucjpms; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET eucjpms COLLATE eucjpms_japanese_ci) ENGINE=NDB CHARACTER SET eucjpms COLLATE eucjpms_japanese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # eucjpms_japanese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES euckr; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET euckr COLLATE euckr_bin) ENGINE=NDB CHARACTER SET euckr COLLATE euckr_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # euckr_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES euckr; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET euckr COLLATE euckr_korean_ci) ENGINE=NDB CHARACTER SET euckr COLLATE euckr_korean_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # euckr_korean_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES gb2312; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET gb2312 COLLATE gb2312_bin) ENGINE=NDB CHARACTER SET gb2312 COLLATE gb2312_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # gb2312_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES gb2312; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET gb2312 COLLATE gb2312_chinese_ci) ENGINE=NDB CHARACTER SET gb2312 COLLATE gb2312_chinese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # gb2312_chinese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -7E 1 -5A 1 -7A 1 -5D 1 -5B 1 -5C 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES gbk; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET gbk COLLATE gbk_bin) ENGINE=NDB CHARACTER SET gbk COLLATE gbk_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # gbk_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES gbk; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET gbk COLLATE gbk_chinese_ci) ENGINE=NDB CHARACTER SET gbk COLLATE gbk_chinese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # gbk_chinese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -7E 1 -5A 1 -7A 1 -5D 1 -5B 1 -5C 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES geostd8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET geostd8 COLLATE geostd8_bin) ENGINE=NDB CHARACTER SET geostd8 COLLATE geostd8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # geostd8_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES geostd8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET geostd8 COLLATE geostd8_general_ci) ENGINE=NDB CHARACTER SET geostd8 COLLATE geostd8_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # geostd8_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -60 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES greek; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET greek COLLATE greek_bin) ENGINE=NDB CHARACTER SET greek COLLATE greek_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # greek_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES greek; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET greek COLLATE greek_general_ci) ENGINE=NDB CHARACTER SET greek COLLATE greek_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # greek_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B7 1 -BB 1 -BD 1 -B6 1 -C1 1 -DC 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -B8 1 -C5 1 -DD 1 -E5 1 -C6 1 -E6 1 -B9 1 -C7 1 -DE 1 -E7 1 -C8 1 -E8 1 -BA 1 -C0 1 -C9 1 -DA 1 -DF 1 -E9 1 -FA 1 -CA 1 -EA 1 -CB 1 -EB 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -BC 1 -CF 1 -EF 1 -FC 1 -D0 1 -F0 1 -D1 1 -F1 1 -D2 1 -D3 1 -F2 1 -F3 1 -D4 1 -F4 1 -BE 1 -D5 1 -DB 1 -E0 1 -F5 1 -FB 1 -FD 1 -D6 1 -F6 1 -D7 1 -F7 1 -D8 1 -F8 1 -BF 1 -D9 1 -F9 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES hebrew; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET hebrew COLLATE hebrew_bin) ENGINE=NDB CHARACTER SET hebrew COLLATE hebrew_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # hebrew_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4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LE IF EXISTS test.t1; -SET NAMES hebrew; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET hebrew COLLATE hebrew_general_ci) ENGINE=NDB CHARACTER SET hebrew COLLATE hebrew_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # hebrew_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -D7 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES hp8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET hp8 COLLATE hp8_bin) ENGINE=NDB CHARACTER SET hp8 COLLATE hp8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # hp8_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 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2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES hp8; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET hp8 COLLATE hp8_english_ci) ENGINE=NDB CHARACTER SET hp8 COLLATE hp8_english_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # hp8_english_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5D 1 -5B 1 -5C 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES keybcs2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET keybcs2 COLLATE keybcs2_bin) ENGINE=NDB CHARACTER SET keybcs2 COLLATE keybcs2_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # keybcs2_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 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-E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES keybcs2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET keybcs2 COLLATE keybcs2_general_ci) ENGINE=NDB CHARACTER SET keybcs2 COLLATE keybcs2_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # keybcs2_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -84 1 -8E 1 -8F 1 -A0 1 -42 1 -62 1 -43 1 -63 1 -80 1 -87 1 -44 1 -64 1 -83 1 -85 1 -45 1 -65 1 -82 1 -88 1 -89 1 -90 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -8B 1 -A1 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -8A 1 -8C 1 -8D 1 -9C 1 -4D 1 -6D 1 -4E 1 -6E 1 -A4 1 -A5 1 -4F 1 -6F 1 -93 1 -94 1 -95 1 -99 1 -A2 1 -A7 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -9E 1 -A9 1 -AA 1 -AB 1 -53 1 -73 1 -9B 1 -A8 1 -E1 1 -54 1 -74 1 -86 1 -9F 1 -55 1 -75 1 -81 1 -96 1 -97 1 -9A 1 -A3 1 -A6 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -98 1 -9D 1 -5A 1 -7A 1 -91 1 -92 1 -E0 1 -EB 1 -EE 1 -E2 1 -EA 1 -E8 1 -ED 1 -E3 1 -E4 1 -E5 1 -E7 1 -E9 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E6 1 -EC 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES koi8r; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET koi8r COLLATE koi8r_bin) ENGINE=NDB CHARACTER SET koi8r COLLATE koi8r_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # koi8r_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES koi8r; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET koi8r COLLATE koi8r_general_ci) ENGINE=NDB CHARACTER SET koi8r COLLATE koi8r_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # koi8r_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C1 1 -E1 1 -C2 1 -E2 1 -D7 1 -F7 1 -C7 1 -E7 1 -C4 1 -E4 1 -C5 1 -E5 1 -A3 1 -B3 1 -D6 1 -F6 1 -DA 1 -FA 1 -C9 1 -E9 1 -CA 1 -EA 1 -CB 1 -EB 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -CF 1 -EF 1 -D0 1 -F0 1 -D2 1 -F2 1 -D3 1 -F3 1 -D4 1 -F4 1 -D5 1 -F5 1 -C6 1 -E6 1 -C8 1 -E8 1 -C3 1 -E3 1 -DE 1 -DB 1 -FB 1 -DD 1 -FD 1 -DF 1 -D9 1 -F9 1 -D8 1 -F8 1 -DC 1 -FC 1 -C0 1 -E0 1 -D1 1 -F1 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES koi8u; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET koi8u COLLATE koi8u_bin) ENGINE=NDB CHARACTER SET koi8u COLLATE koi8u_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # koi8u_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES koi8u; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET koi8u COLLATE koi8u_general_ci) ENGINE=NDB CHARACTER SET koi8u COLLATE koi8u_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # koi8u_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -60 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C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HARACTER SET latin1 COLLATE latin1_bin) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_danish_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_danish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_danish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1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-DE 1 -DF 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_general_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -E0 1 -C1 1 -E1 1 -C2 1 -E2 1 -C3 1 -E3 1 -C4 1 -E4 1 -C5 1 -E5 1 -C6 1 -E6 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -E8 1 -C9 1 -E9 1 -CA 1 -EA 1 -CB 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -EC 1 -CD 1 -ED 1 -CE 1 -EE 1 -CF 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -F2 1 -D3 1 -F3 1 -D4 1 -F4 1 -D5 1 -F5 1 -D6 1 -F6 1 -D8 1 -F8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -DF 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -F9 1 -DA 1 -FA 1 -DB 1 -FB 1 -DC 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -DE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -D7 1 -F7 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_general_cs) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_general_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_general_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -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1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_german1_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_german1_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_german1_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D8 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -DF 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D0 1 -F0 1 -D7 1 -DE 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_german2_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_german2_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_german2_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 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0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D7 1 -D8 1 -F8 1 -DE 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_spanish_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_spanish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_spanish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D8 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -DF 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -DE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -D7 1 -F7 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin1; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_swedish_ci) ENGINE=NDB CHARACTER SET latin1 COLLATE latin1_swedish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin1_swedish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -E0 1 -E1 1 -E2 1 -E3 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -44 1 -64 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DC 1 -DD 1 -FC 1 -FD 1 -5A 1 -7A 1 -5B 1 -C5 1 -E5 1 -5C 1 -C4 1 -C6 1 -E4 1 -E6 1 -5D 1 -D6 1 -F6 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D7 1 -D8 1 -F8 1 -DE 1 -DF 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_bin) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_croatian_ci) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_croatian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_croatian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -A1 1 -B1 1 -C1 1 -C2 1 -C3 1 -C4 1 -E1 1 -E2 1 -E3 1 -E4 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -C8 1 -E8 1 -C6 1 -E6 1 -44 1 -64 1 -CF 1 -EF 1 -D0 1 -F0 1 -45 1 -65 1 -C9 1 -CA 1 -CB 1 -CC 1 -E9 1 -EA 1 -EB 1 -EC 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CD 1 -CE 1 -ED 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -A3 1 -A5 1 -B3 1 -B5 1 -C5 1 -E5 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -D2 1 -F1 1 -F2 1 -4F 1 -6F 1 -D3 1 -D4 1 -D5 1 -D6 1 -F3 1 -F4 1 -F5 1 -F6 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C0 1 -D8 1 -E0 1 -F8 1 -53 1 -73 1 -A6 1 -AA 1 -B6 1 -BA 1 -DF 1 -A9 1 -B9 1 -54 1 -74 1 -AB 1 -BB 1 -DE 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -AC 1 -AF 1 -BC 1 -BF 1 -AE 1 -BE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A2 1 -A4 1 -A7 1 -A8 1 -AD 1 -B0 1 -B2 1 -B4 1 -B7 1 -B8 1 -BD 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_czech_cs) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_czech_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_czech_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -2E 1 -2C 1 -3B 1 -3F 1 -21 1 -3A 1 -22 1 -60 1 -27 1 -2F 1 -7C 1 -5C 1 -28 1 -29 1 -5B 1 -5D 1 -3C 1 -3E 1 -7B 1 -7D 1 -40 1 -26 1 -25 1 -23 1 -5E 1 -5F 1 -7E 1 -3D 1 -2B 1 -2A 1 -2D 1 -D7 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1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ISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_general_ci) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -A1 1 -B1 1 -C1 1 -C2 1 -C3 1 -C4 1 -E1 1 -E2 1 -E3 1 -E4 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -C6 1 -E6 1 -C8 1 -E8 1 -44 1 -64 1 -CF 1 -EF 1 -45 1 -65 1 -C9 1 -CB 1 -CC 1 -E9 1 -EB 1 -EC 1 -CA 1 -EA 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -CD 1 -CE 1 -ED 1 -EE 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -A5 1 -B5 1 -C5 1 -E5 1 -A3 1 -B3 1 -4D 1 -6D 1 -4E 1 -6E 1 -D2 1 -F2 1 -D1 1 -F1 1 -4F 1 -6F 1 -D4 1 -D5 1 -D6 1 -F4 1 -F5 1 -F6 1 -D3 1 -F3 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C0 1 -D8 1 -E0 1 -F8 1 -53 1 -73 1 -AA 1 -BA 1 -A6 1 -B6 1 -A9 1 -B9 1 -54 1 -74 1 -AB 1 -BB 1 -DE 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -5A 1 -7A 1 -AC 1 -BC 1 -AF 1 -BF 1 -AE 1 -BE 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A2 1 -A4 1 -A7 1 -A8 1 -AD 1 -B0 1 -B2 1 -B4 1 -B7 1 -B8 1 -BD 1 -D0 1 -D7 1 -DF 1 -F0 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin2; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin2 COLLATE latin2_hungarian_ci) ENGINE=NDB CHARACTER SET latin2 COLLATE latin2_hungarian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin2_hungarian_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -7F 1 -80 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8E 1 -91 1 -92 1 -9B 1 -9C 1 -9D 1 -9E 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1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 1 -AD 1 -B0 1 -B2 1 -B4 1 -B7 1 -B8 1 -BD 1 -D0 1 -D7 1 -DF 1 -F0 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin5; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin5 COLLATE latin5_bin) ENGINE=NDB CHARACTER SET latin5 COLLATE latin5_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin5_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin5; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin5 COLLATE latin5_turkish_ci) ENGINE=NDB CHARACTER SET latin5 COLLATE latin5_turkish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin5_turkish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1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A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -D7 1 -F7 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin7 COLLATE latin7_bin) ENGINE=NDB CHARACTER SET latin7 COLLATE latin7_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin7_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin7 COLLATE latin7_estonian_cs) ENGINE=NDB CHARACTER SET latin7 COLLATE latin7_estonian_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin7_estonian_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, C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 1 -70 1 -51 1 -71 1 -52 1 -72 1 -AA 1 -BA 1 -53 1 -73 1 -DA 1 -FA 1 -DF 1 -D0 1 -F0 1 -5A 1 -7A 1 -CA 1 -EA 1 -DD 1 -FD 1 -DE 1 -54 1 -74 1 -99 1 -55 1 -75 1 -DB 1 -FB 1 -D8 1 -F8 1 -56 1 -76 1 -57 1 -77 1 -D5 1 -F5 1 -C4 1 -E4 1 -D6 1 -F6 1 -DC 1 -FC 1 -58 1 -78 1 -59 1 -79 1 -A1 1 -A5 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin7 COLLATE latin7_general_ci) ENGINE=NDB CHARACTER SET latin7 COLLATE latin7_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin7_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -7F 1 -81 1 -83 1 -88 1 -8A 1 -8C 1 -90 1 -98 1 -9A 1 -9C 1 -9F 1 -27 1 -2D 1 -A8 1 -AD 1 -96 1 -97 1 -A0 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -28 1 -29 1 -2A 1 -2C 1 -2E 1 -2F 1 -3A 1 -3B 1 -3F 1 -40 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -A6 1 -8D 1 -9D 1 -B4 1 -8F 1 -8E 1 -9E 1 -91 1 -92 1 -82 1 -93 1 -94 1 -84 1 -8B 1 -9B 1 -2B 1 -3C 1 -3D 1 -3E 1 -B1 1 -AB 1 -BB 1 -D7 1 -F7 1 -A2 1 -A3 1 -A4 1 -A7 1 -A9 1 -AC 1 -AE 1 -B0 1 -B5 1 -B6 1 -B7 1 -86 1 -87 1 -95 1 -85 1 -89 1 -80 1 -30 1 -BC 1 -BD 1 -BE 1 -31 1 -B9 1 -32 1 -B2 1 -33 1 -B3 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -41 1 -61 1 -C4 1 -E4 1 -C2 1 -E2 1 -C5 1 -E5 1 -C0 1 -E0 1 -AF 1 -BF 1 -42 1 -62 1 -43 1 -63 1 -C3 1 -E3 1 -C8 1 -E8 1 -44 1 -64 1 -45 1 -65 1 -C9 1 -E9 1 -CB 1 -EB 1 -C7 1 -E7 1 -C6 1 -E6 1 -46 1 -66 1 -47 1 -67 1 -CC 1 -EC 1 -48 1 -68 1 -49 1 -69 1 -CE 1 -EE 1 -C1 1 -E1 1 -4A 1 -6A 1 -4B 1 -6B 1 -CD 1 -ED 1 -4C 1 -6C 1 -D9 1 -F9 1 -CF 1 -EF 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -D2 1 -F2 1 -4F 1 -6F 1 -D3 1 -F3 1 -D6 1 -F6 1 -D4 1 -F4 1 -D5 1 -F5 1 -B8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -AA 1 -BA 1 -53 1 -73 1 -DA 1 -FA 1 -DF 1 -D0 1 -F0 1 -74 1 -54 1 -99 1 -55 1 -75 1 -DC 1 -FC 1 -DB 1 -FB 1 -D8 1 -F8 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -CA 1 -EA 1 -DD 1 -FD 1 -DE 1 -A1 1 -A5 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES latin7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET latin7 COLLATE latin7_general_cs) ENGINE=NDB CHARACTER SET latin7 COLLATE latin7_general_cs; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # latin7_general_cs # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -7F 1 -81 1 -83 1 -88 1 -8A 1 -8C 1 -90 1 -98 1 -9A 1 -9C 1 -9F 1 -27 1 -2D 1 -AD 1 -96 1 -97 1 -A0 1 -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -28 1 -29 1 -2A 1 -2C 1 -2E 1 -2F 1 -3A 1 -3B 1 -3F 1 -40 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -A6 1 -8D 1 -9D 1 -B4 1 -8F 1 -8E 1 -9E 1 -91 1 -92 1 -82 1 -93 1 -94 1 -84 1 -8B 1 -9B 1 -2B 1 -3C 1 -3D 1 -3E 1 -B1 1 -AB 1 -BB 1 -D7 1 -F7 1 -A2 1 -A3 1 -A4 1 -A7 1 -A9 1 -AC 1 -AE 1 -B0 1 -B5 1 -B6 1 -B7 1 -86 1 -87 1 -95 1 -85 1 -89 1 -80 1 -30 1 -BC 1 -BD 1 -BE 1 -31 1 -B9 1 -32 1 -B2 1 -33 1 -B3 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -41 1 -61 1 -C4 1 -E4 1 -C2 1 -E2 1 -C5 1 -E5 1 -C0 1 -E0 1 -AF 1 -BF 1 -42 1 -62 1 -43 1 -63 1 -C3 1 -E3 1 -C8 1 -E8 1 -44 1 -64 1 -45 1 -65 1 -C9 1 -E9 1 -CB 1 -EB 1 -C7 1 -E7 1 -C6 1 -E6 1 -46 1 -66 1 -47 1 -67 1 -CC 1 -EC 1 -48 1 -68 1 -49 1 -69 1 -CE 1 -EE 1 -C1 1 -E1 1 -4A 1 -6A 1 -4B 1 -6B 1 -CD 1 -ED 1 -4C 1 -6C 1 -D9 1 -F9 1 -CF 1 -EF 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -D2 1 -F2 1 -4F 1 -6F 1 -D3 1 -F3 1 -D6 1 -F6 1 -D4 1 -F4 1 -D5 1 -F5 1 -B8 1 -A8 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -AA 1 -BA 1 -53 1 -73 1 -DA 1 -FA 1 -DF 1 -D0 1 -F0 1 -54 1 -74 1 -99 1 -55 1 -75 1 -DC 1 -FC 1 -DB 1 -FB 1 -D8 1 -F8 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -CA 1 -EA 1 -DD 1 -FD 1 -DE 1 -A1 1 -A5 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES macce; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET macce COLLATE macce_bin) ENGINE=NDB CHARACTER SET macce COLLATE macce_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # macce_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES macce; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET macce COLLATE macce_general_ci) ENGINE=NDB CHARACTER SET macce COLLATE macce_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # macce_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -80 1 -81 1 -82 1 -84 1 -87 1 -88 1 -8A 1 -E7 1 -42 1 -62 1 -43 1 -63 1 -89 1 -8B 1 -8C 1 -8D 1 -44 1 -64 1 -91 1 -93 1 -45 1 -65 1 -83 1 -8E 1 -94 1 -95 1 -96 1 -98 1 -9D 1 -9E 1 -A2 1 -AB 1 -46 1 -66 1 -47 1 -67 1 -AE 1 -48 1 -68 1 -49 1 -69 1 -92 1 -AF 1 -B0 1 -B1 1 -B4 1 -EA 1 -4A 1 -6A 1 -4B 1 -6B 1 -B5 1 -FA 1 -4C 1 -6C 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -FC 1 -4D 1 -4E 1 -6D 1 -6E 1 -BF 1 -C0 1 -C1 1 -C4 1 -C5 1 -CB 1 -4F 1 -6F 1 -85 1 -97 1 -99 1 -9A 1 -9B 1 -CC 1 -CD 1 -CE 1 -CF 1 -D8 1 -EE 1 -EF 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -D9 1 -DA 1 -DB 1 -DE 1 -DF 1 -E0 1 -53 1 -73 1 -A7 1 -E1 1 -E4 1 -E5 1 -E6 1 -54 1 -74 1 -E8 1 -E9 1 -55 1 -75 1 -86 1 -9C 1 -9F 1 -ED 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -F8 1 -F9 1 -5A 1 -7A 1 -8F 1 -90 1 -EB 1 -EC 1 -FB 1 -FD 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A0 1 -A1 1 -A3 1 -A4 1 -A5 1 -A6 1 -A8 1 -A9 1 -AA 1 -AC 1 -AD 1 -B2 1 -B3 1 -B6 1 -B7 1 -C2 1 -C3 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -DC 1 -DD 1 -E2 1 -E3 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES macroman; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET macroman COLLATE macroman_bin) ENGINE=NDB CHARACTER SET macroman COLLATE macroman_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # macroman_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4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LE IF EXISTS test.t1; -SET NAMES macroman; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET macroman COLLATE macroman_general_ci) ENGINE=NDB CHARACTER SET macroman COLLATE macroman_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # macroman_general_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -80 1 -81 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -CB 1 -CC 1 -E5 1 -E7 1 -AE 1 -BE 1 -42 1 -62 1 -43 1 -63 1 -82 1 -8D 1 -44 1 -64 1 -45 1 -65 1 -83 1 -8E 1 -8F 1 -90 1 -91 1 -E6 1 -E8 1 -E9 1 -46 1 -66 1 -C4 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -92 1 -93 1 -94 1 -95 1 -EA 1 -EB 1 -EC 1 -ED 1 -F5 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -84 1 -96 1 -4F 1 -6F 1 -85 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -AF 1 -BF 1 -CD 1 -EE 1 -EF 1 -F1 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -A7 1 -54 1 -74 1 -55 1 -75 1 -86 1 -9C 1 -9D 1 -9E 1 -9F 1 -F2 1 -F3 1 -F4 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -D8 1 -D9 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -C0 1 -C1 1 -C2 1 -C3 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -F0 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES sjis; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET sjis COLLATE sjis_bin) ENGINE=NDB CHARACTER SET sjis COLLATE sjis_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # sjis_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES sjis; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET sjis COLLATE sjis_japanese_ci) ENGINE=NDB CHARACTER SET sjis COLLATE sjis_japanese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # sjis_japanese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES swe7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET swe7 COLLATE swe7_bin) ENGINE=NDB CHARACTER SET swe7 COLLATE swe7_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # swe7_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES swe7; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET swe7 COLLATE swe7_swedish_ci) ENGINE=NDB CHARACTER SET swe7 COLLATE swe7_swedish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # swe7_swedish_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -40 1 -45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 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES tis620; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET tis620 COLLATE tis620_bin) ENGINE=NDB CHARACTER SET tis620 COLLATE tis620_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # tis620_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES tis620; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET tis620 COLLATE tis620_thai_ci) ENGINE=NDB CHARACTER SET tis620 COLLATE tis620_thai_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # tis620_thai_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 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1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -EC 1 -F9 1 -E7 1 -FA 1 -E8 1 -FB 1 -E9 1 -FC 1 -EA 1 -FD 1 -EB 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES ujis; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET ujis COLLATE ujis_bin) ENGINE=NDB CHARACTER SET ujis COLLATE ujis_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # ujis_bin # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -SET NAMES ujis; -CREATE TABLE test.t1 (a VARCHAR(3) CHARACTER SET ujis COLLATE ujis_japanese_ci) ENGINE=NDB CHARACTER SET ujis COLLATE ujis_japanese_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # ujis_japanese_ci # # # -SELECT HEX(ASCII(a)) AS a_ascii, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ascii a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -42 1 -62 1 -43 1 -63 1 -44 1 -64 1 -45 1 -65 1 -46 1 -66 1 -47 1 -67 1 -48 1 -68 1 -49 1 -69 1 -4A 1 -6A 1 -4B 1 -6B 1 -4C 1 -6C 1 -4D 1 -6D 1 -4E 1 -6E 1 -4F 1 -6F 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -53 1 -73 1 -54 1 -74 1 -55 1 -75 1 -56 1 -76 1 -57 1 -77 1 -58 1 -78 1 -59 1 -79 1 -5A 1 -7A 1 -5B 1 -5C 1 -5D 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_bin; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B5 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -C6 1 -C7 1 -C8 1 -C9 1 -CA 1 -CB 1 -CC 1 -CD 1 -CE 1 -CF 1 -D0 1 -D1 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -D7 1 -D8 1 -D9 1 -DA 1 -DB 1 -DC 1 -DD 1 -DE 1 -DF 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -E6 1 -E7 1 -E8 1 -E9 1 -EA 1 -EB 1 -EC 1 -ED 1 -EE 1 -EF 1 -F0 1 -F1 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -F7 1 -F8 1 -F9 1 -FA 1 -FB 1 -FC 1 -FD 1 -FE 1 -FF 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -10E 1 -10F 1 -110 1 -111 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -124 1 -125 1 -126 1 -127 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -131 1 -132 1 -133 1 -134 1 -135 1 -136 1 -137 1 -138 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -13F 1 -140 1 -141 1 -142 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -149 1 -14A 1 -14B 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -152 1 -153 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -162 1 -163 1 -164 1 -165 1 -166 1 -167 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -174 1 -175 1 -176 1 -177 1 -178 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -17F 1 -180 1 -181 1 -182 1 -183 1 -184 1 -185 1 -186 1 -187 1 -188 1 -189 1 -18A 1 -18B 1 -18C 1 -18D 1 -18E 1 -18F 1 -190 1 -191 1 -192 1 -193 1 -194 1 -195 1 -196 1 -197 1 -198 1 -199 1 -19A 1 -19B 1 -19C 1 -19D 1 -19E 1 -19F 1 -1A0 1 -1A1 1 -1A2 1 -1A3 1 -1A4 1 -1A5 1 -1A6 1 -1A7 1 -1A8 1 -1A9 1 -1AA 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -1AF 1 -1B0 1 -1B1 1 -1B2 1 -1B3 1 -1B4 1 -1B5 1 -1B6 1 -1B7 1 -1B8 1 -1B9 1 -1BA 1 -1BB 1 -1BC 1 -1BD 1 -1BE 1 -1BF 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -1C4 1 -1C5 1 -1C6 1 -1C7 1 -1C8 1 -1C9 1 -1CA 1 -1CB 1 -1CC 1 -1CD 1 -1CE 1 -1CF 1 -1D0 1 -1D1 1 -1D2 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -1DD 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1E2 1 -1E3 1 -1E4 1 -1E5 1 -1E6 1 -1E7 1 -1E8 1 -1E9 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -1EE 1 -1EF 1 -1F0 1 -1F1 1 -1F2 1 -1F3 1 -1F4 1 -1F5 1 -1F6 1 -1F7 1 -1F8 1 -1F9 1 -1FA 1 -1FB 1 -1FC 1 -1FD 1 -1FE 1 -1FF 1 -200 1 -201 1 -202 1 -203 1 -204 1 -205 1 -206 1 -207 1 -208 1 -209 1 -20A 1 -20B 1 -20C 1 -20D 1 -20E 1 -20F 1 -210 1 -211 1 -212 1 -213 1 -214 1 -215 1 -216 1 -217 1 -218 1 -219 1 -21A 1 -21B 1 -21C 1 -21D 1 -21E 1 -21F 1 -220 1 -221 1 -222 1 -223 1 -224 1 -225 1 -226 1 -227 1 -228 1 -229 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -232 1 -233 1 -234 1 -235 1 -236 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -250 1 -251 1 -252 1 -253 1 -254 1 -255 1 -256 1 -257 1 -258 1 -259 1 -25A 1 -25B 1 -25C 1 -25D 1 -25E 1 -25F 1 -260 1 -261 1 -262 1 -263 1 -264 1 -265 1 -266 1 -267 1 -268 1 -269 1 -26A 1 -26B 1 -26C 1 -26D 1 -26E 1 -26F 1 -270 1 -271 1 -272 1 -273 1 -274 1 -275 1 -276 1 -277 1 -278 1 -279 1 -27A 1 -27B 1 -27C 1 -27D 1 -27E 1 -27F 1 -280 1 -281 1 -282 1 -283 1 -284 1 -285 1 -286 1 -287 1 -288 1 -289 1 -28A 1 -28B 1 -28C 1 -28D 1 -28E 1 -28F 1 -290 1 -291 1 -292 1 -293 1 -294 1 -295 1 -296 1 -297 1 -298 1 -299 1 -29A 1 -29B 1 -29C 1 -29D 1 -29E 1 -29F 1 -2A0 1 -2A1 1 -2A2 1 -2A3 1 -2A4 1 -2A5 1 -2A6 1 -2A7 1 -2A8 1 -2A9 1 -2AA 1 -2AB 1 -2AC 1 -2AD 1 -2AE 1 -2AF 1 -2B0 1 -2B1 1 -2B2 1 -2B3 1 -2B4 1 -2B5 1 -2B6 1 -2B7 1 -2B8 1 -2B9 1 -2BA 1 -2BB 1 -2BC 1 -2BD 1 -2BE 1 -2BF 1 -2C0 1 -2C1 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D0 1 -2D1 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2D8 1 -2D9 1 -2DA 1 -2DB 1 -2DC 1 -2DD 1 -2DE 1 -2DF 1 -2E0 1 -2E1 1 -2E2 1 -2E3 1 -2E4 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EE 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -363 1 -364 1 -365 1 -366 1 -367 1 -368 1 -369 1 -36A 1 -36B 1 -36C 1 -36D 1 -36E 1 -36F 1 -370 1 -371 1 -372 1 -373 1 -374 1 -375 1 -376 1 -377 1 -378 1 -379 1 -37A 1 -37B 1 -37C 1 -37D 1 -37E 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -384 1 -385 1 -386 1 -387 1 -388 1 -389 1 -38A 1 -38B 1 -38C 1 -38D 1 -38E 1 -38F 1 -390 1 -391 1 -392 1 -393 1 -394 1 -395 1 -396 1 -397 1 -398 1 -399 1 -39A 1 -39B 1 -39C 1 -39D 1 -39E 1 -39F 1 -3A0 1 -3A1 1 -3A2 1 -3A3 1 -3A4 1 -3A5 1 -3A6 1 -3A7 1 -3A8 1 -3A9 1 -3AA 1 -3AB 1 -3AC 1 -3AD 1 -3AE 1 -3AF 1 -3B0 1 -3B1 1 -3B2 1 -3B3 1 -3B4 1 -3B5 1 -3B6 1 -3B7 1 -3B8 1 -3B9 1 -3BA 1 -3BB 1 -3BC 1 -3BD 1 -3BE 1 -3BF 1 -3C0 1 -3C1 1 -3C2 1 -3C3 1 -3C4 1 -3C5 1 -3C6 1 -3C7 1 -3C8 1 -3C9 1 -3CA 1 -3CB 1 -3CC 1 -3CD 1 -3CE 1 -3CF 1 -3D0 1 -3D1 1 -3D2 1 -3D3 1 -3D4 1 -3D5 1 -3D6 1 -3D7 1 -3D8 1 -3D9 1 -3DA 1 -3DB 1 -3DC 1 -3DD 1 -3DE 1 -3DF 1 -3E0 1 -3E1 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -3F0 1 -3F1 1 -3F2 1 -3F3 1 -3F4 1 -3F5 1 -3F6 1 -3F7 1 -3F8 1 -3F9 1 -3FA 1 -3FB 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -400 1 -401 1 -402 1 -403 1 -404 1 -405 1 -406 1 -407 1 -408 1 -409 1 -40A 1 -40B 1 -40C 1 -40D 1 -40E 1 -40F 1 -410 1 -411 1 -412 1 -413 1 -414 1 -415 1 -416 1 -417 1 -418 1 -419 1 -41A 1 -41B 1 -41C 1 -41D 1 -41E 1 -41F 1 -420 1 -421 1 -422 1 -423 1 -424 1 -425 1 -426 1 -427 1 -428 1 -429 1 -42A 1 -42B 1 -42C 1 -42D 1 -42E 1 -42F 1 -430 1 -431 1 -432 1 -433 1 -434 1 -435 1 -436 1 -437 1 -438 1 -439 1 -43A 1 -43B 1 -43C 1 -43D 1 -43E 1 -43F 1 -440 1 -441 1 -442 1 -443 1 -444 1 -445 1 -446 1 -447 1 -448 1 -449 1 -44A 1 -44B 1 -44C 1 -44D 1 -44E 1 -44F 1 -450 1 -451 1 -452 1 -453 1 -454 1 -455 1 -456 1 -457 1 -458 1 -459 1 -45A 1 -45B 1 -45C 1 -45D 1 -45E 1 -45F 1 -460 1 -461 1 -462 1 -463 1 -464 1 -465 1 -466 1 -467 1 -468 1 -469 1 -46A 1 -46B 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -478 1 -479 1 -47A 1 -47B 1 -47C 1 -47D 1 -47E 1 -47F 1 -480 1 -481 1 -482 1 -483 1 -484 1 -485 1 -486 1 -487 1 -488 1 -489 1 -48A 1 -48B 1 -48C 1 -48D 1 -48E 1 -48F 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -496 1 -497 1 -498 1 -499 1 -49A 1 -49B 1 -49C 1 -49D 1 -49E 1 -49F 1 -4A0 1 -4A1 1 -4A2 1 -4A3 1 -4A4 1 -4A5 1 -4A6 1 -4A7 1 -4A8 1 -4A9 1 -4AA 1 -4AB 1 -4AC 1 -4AD 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -4B2 1 -4B3 1 -4B4 1 -4B5 1 -4B6 1 -4B7 1 -4B8 1 -4B9 1 -4BA 1 -4BB 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -4C0 1 -4C1 1 -4C2 1 -4C3 1 -4C4 1 -4C5 1 -4C6 1 -4C7 1 -4C8 1 -4C9 1 -4CA 1 -4CB 1 -4CC 1 -4CD 1 -4CE 1 -4CF 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D4 1 -4D5 1 -4D6 1 -4D7 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4DC 1 -4DD 1 -4DE 1 -4DF 1 -4E0 1 -4E1 1 -4E2 1 -4E3 1 -4E4 1 -4E5 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -4EC 1 -4ED 1 -4EE 1 -4EF 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4F4 1 -4F5 1 -4F6 1 -4F7 1 -4F8 1 -4F9 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -500 1 -501 1 -502 1 -503 1 -504 1 -505 1 -506 1 -507 1 -508 1 -509 1 -50A 1 -50B 1 -50C 1 -50D 1 -50E 1 -50F 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -531 1 -532 1 -533 1 -534 1 -535 1 -536 1 -537 1 -538 1 -539 1 -53A 1 -53B 1 -53C 1 -53D 1 -53E 1 -53F 1 -540 1 -541 1 -542 1 -543 1 -544 1 -545 1 -546 1 -547 1 -548 1 -549 1 -54A 1 -54B 1 -54C 1 -54D 1 -54E 1 -54F 1 -550 1 -551 1 -552 1 -553 1 -554 1 -555 1 -556 1 -557 1 -558 1 -559 1 -55A 1 -55B 1 -55C 1 -55D 1 -55E 1 -55F 1 -560 1 -561 1 -562 1 -563 1 -564 1 -565 1 -566 1 -567 1 -568 1 -569 1 -56A 1 -56B 1 -56C 1 -56D 1 -56E 1 -56F 1 -570 1 -571 1 -572 1 -573 1 -574 1 -575 1 -576 1 -577 1 -578 1 -579 1 -57A 1 -57B 1 -57C 1 -57D 1 -57E 1 -57F 1 -580 1 -581 1 -582 1 -583 1 -584 1 -585 1 -586 1 -587 1 -588 1 -589 1 -58A 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A2 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BA 1 -5BB 1 -5BC 1 -5BD 1 -5BE 1 -5BF 1 -5C0 1 -5C1 1 -5C2 1 -5C3 1 -5C4 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F0 1 -5F1 1 -5F2 1 -5F3 1 -5F4 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -600 1 -601 1 -602 1 -603 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -60C 1 -60D 1 -60E 1 -60F 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61B 1 -61C 1 -61D 1 -61E 1 -61F 1 -620 1 -621 1 -622 1 -623 1 -624 1 -625 1 -626 1 -627 1 -628 1 -629 1 -62A 1 -62B 1 -62C 1 -62D 1 -62E 1 -62F 1 -630 1 -631 1 -632 1 -633 1 -634 1 -635 1 -636 1 -637 1 -638 1 -639 1 -63A 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -640 1 -641 1 -642 1 -643 1 -644 1 -645 1 -646 1 -647 1 -648 1 -649 1 -64A 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -660 1 -661 1 -662 1 -663 1 -664 1 -665 1 -666 1 -667 1 -668 1 -669 1 -66A 1 -66B 1 -66C 1 -66D 1 -66E 1 -66F 1 -670 1 -671 1 -672 1 -673 1 -674 1 -675 1 -676 1 -677 1 -678 1 -679 1 -67A 1 -67B 1 -67C 1 -67D 1 -67E 1 -67F 1 -680 1 -681 1 -682 1 -683 1 -684 1 -685 1 -686 1 -687 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -69A 1 -69B 1 -69C 1 -69D 1 -69E 1 -69F 1 -6A0 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -6A7 1 -6A8 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -6B9 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6BE 1 -6BF 1 -6C0 1 -6C1 1 -6C2 1 -6C3 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CC 1 -6CD 1 -6CE 1 -6CF 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -6D4 1 -6D5 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E5 1 -6E6 1 -6E7 1 -6E8 1 -6E9 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -6EE 1 -6EF 1 -6F0 1 -6F1 1 -6F2 1 -6F3 1 -6F4 1 -6F5 1 -6F6 1 -6F7 1 -6F8 1 -6F9 1 -6FA 1 -6FB 1 -6FC 1 -6FD 1 -6FE 1 -6FF 1 -700 1 -701 1 -702 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -709 1 -70A 1 -70B 1 -70C 1 -70D 1 -70E 1 -70F 1 -710 1 -711 1 -712 1 -713 1 -714 1 -715 1 -716 1 -717 1 -718 1 -719 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -72D 1 -72E 1 -72F 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -74B 1 -74C 1 -74D 1 -74E 1 -74F 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C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FA2 1 -4FA3 1 -4FA4 1 -4FA5 1 -4FA6 1 -4FA7 1 -4FA8 1 -4FA9 1 -4FAA 1 -4FAB 1 -4FAC 1 -4FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_czech_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1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226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -158 1 -159 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 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-23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_danish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 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 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DC 1 -DD 1 -FC 1 -FD 1 -FF 1 -170 1 -171 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -C4 1 -C6 1 -E4 1 -E6 1 -D6 1 -D8 1 -F6 1 -F8 1 -150 1 -151 1 -C5 1 -E5 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -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-242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_estonian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A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250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -F2 1 -F3 1 -F4 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -5A 1 -7A 1 -17D 1 -17E 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -D5 1 -F5 1 -C4 1 -E4 1 -D6 1 -F6 1 -DC 1 -FC 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1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246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_general_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -42 1 -62 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -44 1 -64 1 -10E 1 -10F 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -46 1 -66 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -131 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -4D 1 -6D 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -4F 1 -6F 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -56 1 -76 1 -57 1 -77 1 -174 1 -175 1 -58 1 -78 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -5B 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -85 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -A1 1 -A2 1 -A3 1 -A4 1 -A5 1 -A6 1 -A7 1 -A8 1 -A9 1 -AA 1 -AB 1 -AC 1 -AD 1 -AE 1 -AF 1 -B0 1 -B1 1 -B2 1 -B3 1 -B4 1 -B6 1 -B7 1 -B8 1 -B9 1 -BA 1 -BB 1 -BC 1 -BD 1 -BE 1 -BF 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -D0 1 -F0 1 -D7 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -DE 1 -FE 1 -DF 1 -F7 1 -110 1 -111 1 -126 1 -127 1 -132 1 -133 1 -138 1 -13F 1 -140 1 -141 1 -142 1 -149 1 -14A 1 -14B 1 -152 1 -153 1 -166 1 -167 1 -180 1 -181 1 -253 1 -182 1 -183 1 -184 1 -185 1 -186 1 -254 1 -187 1 -188 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -18D 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -191 1 -192 1 -193 1 -260 1 -194 1 -263 1 -196 1 -269 1 -197 1 -268 1 -198 1 -199 1 -19A 1 -19B 1 -19C 1 -26F 1 -19D 1 -272 1 -19E 1 -19F 1 -275 1 -1A2 1 -1A3 1 -1A4 1 -1A5 1 -1A6 1 -280 1 -1A7 1 -1A8 1 -1A9 1 -283 1 -1AA 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -1B1 1 -28A 1 -1B2 1 -28B 1 -1B3 1 -1B4 1 -1B5 1 -1B6 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -1BB 1 -1BC 1 -1BD 1 -1BE 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -1C4 1 -1C5 1 -1C6 1 -1C7 1 -1C8 1 -1C9 1 -1CA 1 -1CB 1 -1CC 1 -1E4 1 -1E5 1 -1F1 1 -1F2 1 -1F3 1 -195 1 -1F6 1 -1BF 1 -1F7 1 -21C 1 -21D 1 -220 1 -221 1 -222 1 -223 1 -224 1 -225 1 -234 1 -235 1 -236 1 -237 1 -238 1 -239 1 -23A 1 -23B 1 -23C 1 -23D 1 -23E 1 -23F 1 -240 1 -241 1 -242 1 -243 1 -244 1 -245 1 -246 1 -247 1 -248 1 -249 1 -24A 1 -24B 1 -24C 1 -24D 1 -24E 1 -24F 1 -250 1 -251 1 -252 1 -255 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -25F 1 -261 1 -262 1 -264 1 -265 1 -266 1 -267 1 -26A 1 -26B 1 -26C 1 -26D 1 -26E 1 -270 1 -271 1 -273 1 -274 1 -276 1 -277 1 -278 1 -279 1 -27A 1 -27B 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -282 1 -284 1 -285 1 -286 1 -287 1 -289 1 -28C 1 -28D 1 -28E 1 -28F 1 -290 1 -291 1 -293 1 -294 1 -295 1 -296 1 -297 1 -298 1 -299 1 -29A 1 -29B 1 -29C 1 -29D 1 -29E 1 -29F 1 -2A0 1 -2A1 1 -2A2 1 -2A3 1 -2A4 1 -2A5 1 -2A6 1 -2A7 1 -2A8 1 -2A9 1 -2AA 1 -2AB 1 -2AC 1 -2AD 1 -2AE 1 -2AF 1 -2B0 1 -2B1 1 -2B2 1 -2B3 1 -2B4 1 -2B5 1 -2B6 1 -2B7 1 -2B8 1 -2B9 1 -2BA 1 -2BB 1 -2BC 1 -2BD 1 -2BE 1 -2BF 1 -2C0 1 -2C1 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D0 1 -2D1 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2D8 1 -2D9 1 -2DA 1 -2DB 1 -2DC 1 -2DD 1 -2DE 1 -2DF 1 -2E0 1 -2E1 1 -2E2 1 -2E3 1 -2E4 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EE 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -363 1 -364 1 -365 1 -366 1 -367 1 -368 1 -369 1 -36A 1 -36B 1 -36C 1 -36D 1 -36E 1 -36F 1 -370 1 -371 1 -372 1 -373 1 -374 1 -375 1 -376 1 -377 1 -378 1 -379 1 -37A 1 -37B 1 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411 1 -431 1 -412 1 -432 1 -403 1 -413 1 -433 1 -453 1 -414 1 -434 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -417 1 -437 1 -4DE 1 -4DF 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -4E4 1 -4E5 1 -419 1 -439 1 -40C 1 -41A 1 -43A 1 -45C 1 -41B 1 -43B 1 -41C 1 -43C 1 -41D 1 -43D 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -41F 1 -43F 1 -420 1 -440 1 -421 1 -441 1 -422 1 -442 1 -40E 1 -423 1 -443 1 -45E 1 -4EE 1 -4EF 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -424 1 -444 1 -425 1 -445 1 -426 1 -446 1 -427 1 -447 1 -4F4 1 -4F5 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -460 1 -461 1 -462 1 -463 1 -464 1 -465 1 -466 1 -467 1 -468 1 -469 1 -46A 1 -46B 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -478 1 -479 1 -47A 1 -47B 1 -47C 1 -47D 1 -47E 1 -47F 1 -480 1 -481 1 -482 1 -483 1 -484 1 -485 1 -486 1 -487 1 -488 1 -489 1 -48A 1 -48B 1 -48C 1 -48D 1 -48E 1 -48F 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -496 1 -497 1 -498 1 -499 1 -49A 1 -49B 1 -49C 1 -49D 1 -49E 1 -49F 1 -4A0 1 -4A1 1 -4A2 1 -4A3 1 -4A4 1 -4A5 1 -4A6 1 -4A7 1 -4A8 1 -4A9 1 -4AA 1 -4AB 1 -4AC 1 -4AD 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -4B2 1 -4B3 1 -4B4 1 -4B5 1 -4B6 1 -4B7 1 -4B8 1 -4B9 1 -4BA 1 -4BB 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -4C0 1 -4C3 1 -4C4 1 -4C5 1 -4C6 1 -4C7 1 -4C8 1 -4C9 1 -4CA 1 -4CB 1 -4CC 1 -4CD 1 -4CE 1 -4CF 1 -4D4 1 -4D5 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4E0 1 -4E1 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -500 1 -501 1 -502 1 -503 1 -504 1 -505 1 -506 1 -507 1 -508 1 -509 1 -50A 1 -50B 1 -50C 1 -50D 1 -50E 1 -50F 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -557 1 -558 1 -559 1 -55A 1 -55B 1 -55C 1 -55D 1 -55E 1 -55F 1 -560 1 -587 1 -588 1 -589 1 -58A 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A2 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BA 1 -5BB 1 -5BC 1 -5BD 1 -5BE 1 -5BF 1 -5C0 1 -5C1 1 -5C2 1 -5C3 1 -5C4 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F0 1 -5F1 1 -5F2 1 -5F3 1 -5F4 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -600 1 -601 1 -602 1 -603 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -60C 1 -60D 1 -60E 1 -60F 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61B 1 -61C 1 -61D 1 -61E 1 -61F 1 -620 1 -621 1 -622 1 -623 1 -624 1 -625 1 -626 1 -627 1 -628 1 -629 1 -62A 1 -62B 1 -62C 1 -62D 1 -62E 1 -62F 1 -630 1 -631 1 -632 1 -633 1 -634 1 -635 1 -636 1 -637 1 -638 1 -639 1 -63A 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -640 1 -641 1 -642 1 -643 1 -644 1 -645 1 -646 1 -647 1 -648 1 -649 1 -64A 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -660 1 -661 1 -662 1 -663 1 -664 1 -665 1 -666 1 -667 1 -668 1 -669 1 -66A 1 -66B 1 -66C 1 -66D 1 -66E 1 -66F 1 -670 1 -671 1 -672 1 -673 1 -674 1 -675 1 -676 1 -677 1 -678 1 -679 1 -67A 1 -67B 1 -67C 1 -67D 1 -67E 1 -67F 1 -680 1 -681 1 -682 1 -683 1 -684 1 -685 1 -686 1 -687 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -69A 1 -69B 1 -69C 1 -69D 1 -69E 1 -69F 1 -6A0 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -6A7 1 -6A8 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -6B9 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6BE 1 -6BF 1 -6C0 1 -6C1 1 -6C2 1 -6C3 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CC 1 -6CD 1 -6CE 1 -6CF 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -6D4 1 -6D5 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E5 1 -6E6 1 -6E7 1 -6E8 1 -6E9 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -6EE 1 -6EF 1 -6F0 1 -6F1 1 -6F2 1 -6F3 1 -6F4 1 -6F5 1 -6F6 1 -6F7 1 -6F8 1 -6F9 1 -6FA 1 -6FB 1 -6FC 1 -6FD 1 -6FE 1 -6FF 1 -700 1 -701 1 -702 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -709 1 -70A 1 -70B 1 -70C 1 -70D 1 -70E 1 -70F 1 -710 1 -711 1 -712 1 -713 1 -714 1 -715 1 -716 1 -717 1 -718 1 -719 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -72D 1 -72E 1 -72F 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -74B 1 -74C 1 -74D 1 -74E 1 -74F 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1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FAD 1 -4FAE 1 -4FAF 1 -4FB0 1 -4FB1 1 -4FB2 1 -4FB3 1 -4FB4 1 -4FB5 1 -4FB6 1 -4FB7 1 -4FB8 1 -4FB9 1 -4FBA 1 -4FBB 1 -4FBC 1 -4FBD 1 -4FBE 1 -4FBF 1 -4FC0 1 -4FC1 1 -4FC2 1 -4FC3 1 -4FC4 1 -4FC5 1 -4FC6 1 -4FC7 1 -4FC8 1 -4FC9 1 -4FCA 1 -4FCB 1 -4FCC 1 -4FCD 1 -4FCE 1 -4FCF 1 -4FD0 1 -4FD1 1 -4FD2 1 -4FD3 1 -4FD4 1 -4FD5 1 -4FD6 1 -4FD7 1 -4FD8 1 -4FD9 1 -4FDA 1 -4FDB 1 -4FDC 1 -4FDD 1 -4FDE 1 -4FDF 1 -4FE0 1 -4FE1 1 -4FE2 1 -4FE3 1 -4FE4 1 -4FE5 1 -4FE6 1 -4FE7 1 -4FE8 1 -4FE9 1 -4FEA 1 -4FEB 1 -4FEC 1 -4FED 1 -4FEE 1 -4FEF 1 -4FF0 1 -4FF1 1 -4FF2 1 -4FF3 1 -4FF4 1 -4FF5 1 -4FF6 1 -4FF7 1 -4FF8 1 -4FF9 1 -4FFA 1 -4FFB 1 -4FFC 1 -4FFD 1 -4FFE 1 -4FFF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_hungarian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 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 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D6 1 -F6 1 -150 1 -151 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -DC 1 -FC 1 -170 1 -171 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 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-24E 1 -24F 1 -358 1 -359 1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_icelandic_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -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108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -D0 1 -F0 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -45 1 -65 1 -C8 1 -CA 1 -CB 1 -E8 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -C9 1 -E9 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CE 1 -CF 1 -EC 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -CD 1 -ED 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D4 1 -D5 1 -F2 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D3 1 -F3 1 -276 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DB 1 -DC 1 -F9 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -DA 1 -FA 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -DD 1 -FD 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -DE 1 -FE 1 -C4 1 -C6 1 -E4 1 -E6 1 -D6 1 -D8 1 -F6 1 -F8 1 -C5 1 -E5 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1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1 -35A 1 -35B 1 -35C 1 -370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_latvian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 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7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -122 1 -123 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -59 1 -79 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -1E8 1 -1E9 1 -136 1 -137 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -13B 1 -13C 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -145 1 -146 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -156 1 -157 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1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370 1 -371 1 -372 1 -373 1 -376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_lithuanian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 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-109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -59 1 -69 1 -79 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE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-376 1 -377 1 -378 1 -379 1 -37B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_persian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -653 1 -654 1 -655 1 -670 1 -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -651 1 -652 1 -656 1 -657 1 -658 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -64E 1 -26 1 -650 1 -23 1 -64F 1 -25 1 -66A 1 -64B 1 -64D 1 -64C 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1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 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -674 1 -6FD 1 -672 1 -673 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -689 1 -68A 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A9 1 -643 1 -6A8 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6D5 1 -648 1 -6E5 1 -676 1 -647 1 -6C4 1 -629 1 -6C5 1 -6C0 1 -6C6 1 -6C7 1 -6CC 1 -677 1 -649 1 -6C8 1 -64A 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -6E6 1 -678 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 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B 1 -37C 1 -37D 1 -37F 1 -380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_polish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -104 1 -105 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -106 1 -107 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -118 1 -119 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -141 1 -142 1 -29F 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -143 1 -144 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D4 1 -D5 1 -D6 1 -F2 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D3 1 -F3 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -15A 1 -15B 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -17D 1 -17E 1 -18D 1 -179 1 -17A 1 -17B 1 -17C 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1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-380 1 -381 1 -382 1 -383 1 -38B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_roman_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -4A 1 -69 1 -6A 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -55 1 -56 1 -75 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 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B 1 -38D 1 -3A2 1 -3CF 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_romanian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -102 1 -103 1 -C2 1 -E2 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CF 1 -EC 1 -ED 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -CE 1 -EE 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -160 1 -161 1 -17F 1 -2E2 1 -DF 1 -15E 1 -15F 1 -218 1 -219 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -164 1 -165 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -162 1 -163 1 -21A 1 -21B 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 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 1 -3FC 1 -3FD 1 -3FE 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovak_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C4 1 -E4 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D5 1 -D6 1 -F2 1 -F3 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D4 1 -F4 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C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 1 -3FF 1 -487 1 -4CF 1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_slovenian_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -368 1 -10C 1 -10D 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -160 1 -161 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -18D 1 -17D 1 -17E 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -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1 -4F6 1 -4F7 1 -4FA 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish2_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -D1 1 -F1 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1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 1 -4FB 1 -4FC 1 -4FD 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_spanish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -D1 1 -F1 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1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 1 -4FE 1 -4FF 1 -510 1 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_swedish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -E0 1 -E1 1 -E2 1 -E3 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DC 1 -DD 1 -FC 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -C5 1 -E5 1 -C4 1 -C6 1 -E4 1 -E6 1 -D6 1 -D8 1 -F6 1 -F8 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1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 -511 1 -512 1 -513 1 -514 1 -515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_turkish_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -C7 1 -E7 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -11E 1 -11F 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -49 1 -131 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -F2 1 -F3 1 -F4 1 -F5 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -D6 1 -F6 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -15E 1 -15F 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -F9 1 -FA 1 -FB 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -DC 1 -FC 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 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-515 1 -516 1 -517 1 -518 1 -519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -SET NAMES utf8; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8) ENGINE=NDB CHARACTER SET utf8; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -ALTER TABLE test.t1 CHANGE a a CHAR(4) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -85 1 -7F 1 -80 1 -81 1 -82 1 -83 1 -84 1 -86 1 -87 1 -88 1 -89 1 -8A 1 -8B 1 -8C 1 -8D 1 -8E 1 -8F 1 -90 1 -91 1 -92 1 -93 1 -94 1 -95 1 -96 1 -97 1 -98 1 -99 1 -9A 1 -9B 1 -9C 1 -9D 1 -9E 1 -9F 1 -A0 1 -300 1 -301 1 -302 1 -303 1 -304 1 -305 1 -306 1 -307 1 -308 1 -309 1 -30A 1 -30B 1 -30C 1 -30D 1 -30E 1 -30F 1 -310 1 -311 1 -312 1 -313 1 -314 1 -315 1 -316 1 -317 1 -318 1 -319 1 -31A 1 -31B 1 -31C 1 -31D 1 -31E 1 -31F 1 -320 1 -321 1 -322 1 -323 1 -324 1 -325 1 -326 1 -327 1 -328 1 -329 1 -32A 1 -32B 1 -32C 1 -32D 1 -32E 1 -32F 1 -330 1 -331 1 -332 1 -333 1 -334 1 -335 1 -336 1 -337 1 -338 1 -339 1 -33A 1 -33B 1 -33C 1 -33D 1 -33E 1 -33F 1 -340 1 -341 1 -342 1 -343 1 -344 1 -345 1 -346 1 -347 1 -348 1 -349 1 -34A 1 -34B 1 -34C 1 -34D 1 -34E 1 -34F 1 -350 1 -351 1 -352 1 -353 1 -354 1 -355 1 -356 1 -357 1 -35D 1 -35E 1 -35F 1 -360 1 -361 1 -362 1 -483 1 -484 1 -485 1 -486 1 -488 1 -489 1 -591 1 -592 1 -593 1 -594 1 -595 1 -596 1 -597 1 -598 1 -599 1 -59A 1 -59B 1 -59C 1 -59D 1 -59E 1 -59F 1 -5A0 1 -5A1 1 -5A3 1 -5A4 1 -5A5 1 -5A6 1 -5A7 1 -5A8 1 -5A9 1 -5AA 1 -5AB 1 -5AC 1 -5AD 1 -5AE 1 -5AF 1 -5B0 1 -5B1 1 -5B2 1 -5B3 1 -5B4 1 -5B5 1 -5B6 1 -5B7 1 -5B8 1 -5B9 1 -5BB 1 -5BC 1 -5BD 1 -5BF 1 -5C1 1 -5C2 1 -5C4 1 -600 1 -601 1 -602 1 -603 1 -610 1 -611 1 -612 1 -613 1 -614 1 -615 1 -64B 1 -64C 1 -64D 1 -64E 1 -64F 1 -650 1 -651 1 -652 1 -653 1 -654 1 -655 1 -656 1 -657 1 -658 1 -670 1 -6D6 1 -6D7 1 -6D8 1 -6D9 1 -6DA 1 -6DB 1 -6DC 1 -6DD 1 -6DE 1 -6DF 1 -6E0 1 -6E1 1 -6E2 1 -6E3 1 -6E4 1 -6E7 1 -6E8 1 -6EA 1 -6EB 1 -6EC 1 -6ED 1 -70F 1 -711 1 -730 1 -731 1 -732 1 -733 1 -734 1 -735 1 -736 1 -737 1 -738 1 -739 1 -73A 1 -73B 1 -73C 1 -73D 1 -73E 1 -73F 1 -740 1 -741 1 -742 1 -743 1 -744 1 -745 1 -746 1 -747 1 -748 1 -749 1 -74A 1 -640 1 -60 1 -B4 1 -384 1 -2DC 1 -5E 1 -AF 1 -2D8 1 -2D9 1 -A8 1 -385 1 -2DA 1 -2DD 1 -B8 1 -2DB 1 -5F 1 -AD 1 -2D 1 -58A 1 -2C 1 -55D 1 -60C 1 -60D 1 -66B 1 -66C 1 -3B 1 -37E 1 -61B 1 -3A 1 -589 1 -703 1 -704 1 -705 1 -706 1 -707 1 -708 1 -21 1 -A1 1 -55C 1 -3F 1 -BF 1 -55E 1 -61F 1 -709 1 -2E 1 -6D4 1 -701 1 -702 1 -B7 1 -387 1 -700 1 -27 1 -22 1 -AB 1 -BB 1 -28 1 -29 1 -5B 1 -7B 1 -7D 1 -A7 1 -B6 1 -A9 1 -AE 1 -40 1 -2A 1 -66D 1 -2F 1 -26 1 -23 1 -25 1 -66A 1 -55A 1 -55B 1 -55F 1 -5BE 1 -5C0 1 -5C3 1 -5F3 1 -5F4 1 -70A 1 -70B 1 -70C 1 -70D 1 -2B9 1 -374 1 -375 1 -2BA 1 -2C2 1 -2C3 1 -2C4 1 -2C5 1 -2C6 1 -2C7 1 -2C8 1 -2C9 1 -2CA 1 -2CB 1 -2CC 1 -2CD 1 -2CE 1 -2CF 1 -2D2 1 -2D3 1 -2D4 1 -2D5 1 -2D6 1 -2D7 1 -2DE 1 -2DF 1 -2E5 1 -2E6 1 -2E7 1 -2E8 1 -2E9 1 -2EA 1 -2EB 1 -2EC 1 -2ED 1 -2EF 1 -2F0 1 -2F1 1 -2F2 1 -2F3 1 -2F4 1 -2F5 1 -2F6 1 -2F7 1 -2F8 1 -2F9 1 -2FA 1 -2FB 1 -2FC 1 -2FD 1 -2FE 1 -2FF 1 -B0 1 -482 1 -60E 1 -60F 1 -6E9 1 -3F6 1 -2B 1 -B1 1 -F7 1 -D7 1 -3C 1 -3D 1 -3E 1 -AC 1 -7C 1 -A6 1 -7E 1 -2D0 1 -2D1 1 -A4 1 -A2 1 -24 1 -A3 1 -A5 1 -30 1 -660 1 -6F0 1 -31 1 -B9 1 -661 1 -6F1 1 -BD 1 -BC 1 -32 1 -B2 1 -662 1 -6F2 1 -33 1 -B3 1 -663 1 -6F3 1 -BE 1 -34 1 -664 1 -6F4 1 -35 1 -665 1 -6F5 1 -36 1 -666 1 -6F6 1 -37 1 -667 1 -6F7 1 -38 1 -668 1 -6F8 1 -39 1 -669 1 -6F9 1 -41 1 -61 1 -AA 1 -C0 1 -C1 1 -C2 1 -C3 1 -C4 1 -C5 1 -E0 1 -E1 1 -E2 1 -E3 1 -E4 1 -E5 1 -100 1 -101 1 -102 1 -103 1 -104 1 -105 1 -1CD 1 -1CE 1 -1DE 1 -1DF 1 -1E0 1 -1E1 1 -1FA 1 -1FB 1 -200 1 -201 1 -202 1 -203 1 -226 1 -227 1 -363 1 -C6 1 -E6 1 -1E2 1 -1E3 1 -1FC 1 -1FD 1 -250 1 -251 1 -252 1 -42 1 -62 1 -299 1 -180 1 -181 1 -253 1 -182 1 -183 1 -43 1 -63 1 -C7 1 -E7 1 -106 1 -107 1 -108 1 -109 1 -10A 1 -10B 1 -10C 1 -10D 1 -368 1 -187 1 -188 1 -255 1 -44 1 -64 1 -10E 1 -10F 1 -369 1 -1C4 1 -1C5 1 -1C6 1 -1F1 1 -1F2 1 -1F3 1 -2A3 1 -2A5 1 -2A4 1 -110 1 -111 1 -189 1 -256 1 -18A 1 -257 1 -18B 1 -18C 1 -221 1 -D0 1 -F0 1 -45 1 -65 1 -C8 1 -C9 1 -CA 1 -CB 1 -E8 1 -E9 1 -EA 1 -EB 1 -112 1 -113 1 -114 1 -115 1 -116 1 -117 1 -118 1 -119 1 -11A 1 -11B 1 -204 1 -205 1 -206 1 -207 1 -228 1 -229 1 -364 1 -18E 1 -1DD 1 -18F 1 -259 1 -190 1 -25B 1 -258 1 -25A 1 -25C 1 -25D 1 -25E 1 -29A 1 -264 1 -46 1 -66 1 -2A9 1 -191 1 -192 1 -47 1 -67 1 -11C 1 -11D 1 -11E 1 -11F 1 -120 1 -121 1 -122 1 -123 1 -1E6 1 -1E7 1 -1F4 1 -1F5 1 -261 1 -262 1 -1E4 1 -1E5 1 -193 1 -260 1 -29B 1 -194 1 -263 1 -2E0 1 -1A2 1 -1A3 1 -48 1 -68 1 -124 1 -125 1 -21E 1 -21F 1 -2B0 1 -36A 1 -29C 1 -195 1 -1F6 1 -126 1 -127 1 -266 1 -2B1 1 -267 1 -2BB 1 -2BD 1 -49 1 -69 1 -CC 1 -CD 1 -CE 1 -CF 1 -EC 1 -ED 1 -EE 1 -EF 1 -128 1 -129 1 -12A 1 -12B 1 -12C 1 -12D 1 -12E 1 -12F 1 -130 1 -1CF 1 -1D0 1 -208 1 -209 1 -20A 1 -20B 1 -365 1 -132 1 -133 1 -131 1 -26A 1 -197 1 -268 1 -196 1 -269 1 -4A 1 -6A 1 -134 1 -135 1 -1F0 1 -2B2 1 -29D 1 -25F 1 -284 1 -4B 1 -6B 1 -136 1 -137 1 -1E8 1 -1E9 1 -198 1 -199 1 -29E 1 -4C 1 -6C 1 -139 1 -13A 1 -13B 1 -13C 1 -13D 1 -13E 1 -2E1 1 -13F 1 -140 1 -1C7 1 -1C8 1 -1C9 1 -2AA 1 -2AB 1 -29F 1 -141 1 -142 1 -19A 1 -26B 1 -26C 1 -26D 1 -234 1 -26E 1 -19B 1 -28E 1 -4D 1 -6D 1 -36B 1 -271 1 -4E 1 -6E 1 -D1 1 -F1 1 -143 1 -144 1 -145 1 -146 1 -147 1 -148 1 -1F8 1 -1F9 1 -1CA 1 -1CB 1 -1CC 1 -274 1 -19D 1 -272 1 -19E 1 -220 1 -273 1 -235 1 -14A 1 -14B 1 -4F 1 -6F 1 -BA 1 -D2 1 -D3 1 -D4 1 -D5 1 -D6 1 -F2 1 -F3 1 -F4 1 -F5 1 -F6 1 -14C 1 -14D 1 -14E 1 -14F 1 -150 1 -151 1 -1A0 1 -1A1 1 -1D1 1 -1D2 1 -1EA 1 -1EB 1 -1EC 1 -1ED 1 -20C 1 -20D 1 -20E 1 -20F 1 -22A 1 -22B 1 -22C 1 -22D 1 -22E 1 -22F 1 -230 1 -231 1 -366 1 -152 1 -153 1 -276 1 -D8 1 -F8 1 -1FE 1 -1FF 1 -186 1 -254 1 -19F 1 -275 1 -277 1 -222 1 -223 1 -50 1 -70 1 -1A4 1 -1A5 1 -278 1 -51 1 -71 1 -2A0 1 -138 1 -52 1 -72 1 -154 1 -155 1 -156 1 -157 1 -158 1 -159 1 -210 1 -211 1 -212 1 -213 1 -2B3 1 -36C 1 -1A6 1 -280 1 -279 1 -2B4 1 -27A 1 -27B 1 -2B5 1 -27C 1 -27D 1 -27E 1 -27F 1 -281 1 -2B6 1 -53 1 -73 1 -15A 1 -15B 1 -15C 1 -15D 1 -15E 1 -15F 1 -160 1 -161 1 -17F 1 -218 1 -219 1 -2E2 1 -DF 1 -282 1 -1A9 1 -283 1 -1AA 1 -285 1 -286 1 -54 1 -74 1 -162 1 -163 1 -164 1 -165 1 -21A 1 -21B 1 -36D 1 -2A8 1 -1BE 1 -2A6 1 -2A7 1 -166 1 -167 1 -1AB 1 -1AC 1 -1AD 1 -1AE 1 -288 1 -236 1 -287 1 -55 1 -75 1 -D9 1 -DA 1 -DB 1 -DC 1 -F9 1 -FA 1 -FB 1 -FC 1 -168 1 -169 1 -16A 1 -16B 1 -16C 1 -16D 1 -16E 1 -16F 1 -170 1 -171 1 -172 1 -173 1 -1AF 1 -1B0 1 -1D3 1 -1D4 1 -1D5 1 -1D6 1 -1D7 1 -1D8 1 -1D9 1 -1DA 1 -1DB 1 -1DC 1 -214 1 -215 1 -216 1 -217 1 -367 1 -289 1 -265 1 -2AE 1 -2AF 1 -19C 1 -26F 1 -270 1 -1B1 1 -28A 1 -56 1 -76 1 -36E 1 -1B2 1 -28B 1 -28C 1 -57 1 -77 1 -174 1 -175 1 -2B7 1 -28D 1 -58 1 -78 1 -2E3 1 -36F 1 -59 1 -79 1 -DD 1 -FD 1 -FF 1 -176 1 -177 1 -178 1 -232 1 -233 1 -2B8 1 -28F 1 -1B3 1 -1B4 1 -5A 1 -7A 1 -179 1 -17A 1 -17B 1 -17C 1 -17D 1 -17E 1 -18D 1 -1B5 1 -1B6 1 -224 1 -225 1 -290 1 -291 1 -1B7 1 -1EE 1 -1EF 1 -292 1 -1B8 1 -1B9 1 -1BA 1 -293 1 -21C 1 -21D 1 -DE 1 -FE 1 -1BF 1 -1F7 1 -1BB 1 -1A7 1 -1A8 1 -1BC 1 -1BD 1 -184 1 -185 1 -294 1 -2C0 1 -2BC 1 -149 1 -2EE 1 -2BE 1 -295 1 -2E4 1 -2BF 1 -2C1 1 -2A1 1 -2A2 1 -296 1 -1C0 1 -1C1 1 -1C2 1 -1C3 1 -297 1 -298 1 -2AC 1 -2AD 1 -386 1 -391 1 -3AC 1 -3B1 1 -392 1 -3B2 1 -3D0 1 -393 1 -3B3 1 -394 1 -3B4 1 -388 1 -395 1 -3AD 1 -3B5 1 -3F5 1 -3DC 1 -3DD 1 -3DA 1 -3DB 1 -396 1 -3B6 1 -389 1 -397 1 -3AE 1 -3B7 1 -398 1 -3B8 1 -3D1 1 -3F4 1 -37A 1 -38A 1 -390 1 -399 1 -3AA 1 -3AF 1 -3B9 1 -3CA 1 -3F3 1 -39A 1 -3BA 1 -3F0 1 -3D7 1 -39B 1 -3BB 1 -B5 1 -39C 1 -3BC 1 -39D 1 -3BD 1 -39E 1 -3BE 1 -38C 1 -39F 1 -3BF 1 -3CC 1 -3A0 1 -3C0 1 -3D6 1 -3DE 1 -3DF 1 -3D8 1 -3D9 1 -3A1 1 -3C1 1 -3F1 1 -3A3 1 -3C2 1 -3C3 1 -3F2 1 -3F9 1 -3A4 1 -3C4 1 -38E 1 -3A5 1 -3AB 1 -3B0 1 -3C5 1 -3CB 1 -3CD 1 -3D2 1 -3D3 1 -3D4 1 -3A6 1 -3C6 1 -3D5 1 -3A7 1 -3C7 1 -3A8 1 -3C8 1 -38F 1 -3A9 1 -3C9 1 -3CE 1 -3E0 1 -3E1 1 -3F7 1 -3F8 1 -3FA 1 -3FB 1 -3E2 1 -3E3 1 -3E4 1 -3E5 1 -3E6 1 -3E7 1 -3E8 1 -3E9 1 -3EA 1 -3EB 1 -3EC 1 -3ED 1 -3EE 1 -3EF 1 -410 1 -430 1 -4D0 1 -4D1 1 -4D2 1 -4D3 1 -4D8 1 -4D9 1 -4DA 1 -4DB 1 -4D4 1 -4D5 1 -411 1 -431 1 -412 1 -432 1 -413 1 -433 1 -490 1 -491 1 -492 1 -493 1 -494 1 -495 1 -414 1 -434 1 -500 1 -501 1 -402 1 -452 1 -502 1 -503 1 -403 1 -453 1 -498 1 -499 1 -400 1 -401 1 -415 1 -435 1 -450 1 -451 1 -4D6 1 -4D7 1 -404 1 -454 1 -416 1 -436 1 -4C1 1 -4C2 1 -4DC 1 -4DD 1 -496 1 -497 1 -417 1 -437 1 -504 1 -505 1 -4DE 1 -4DF 1 -405 1 -455 1 -4E0 1 -4E1 1 -506 1 -507 1 -40D 1 -418 1 -438 1 -45D 1 -4E2 1 -4E3 1 -48A 1 -48B 1 -4E4 1 -4E5 1 -406 1 -456 1 -407 1 -457 1 -419 1 -439 1 -408 1 -458 1 -41A 1 -43A 1 -49A 1 -49B 1 -4C3 1 -4C4 1 -4A0 1 -4A1 1 -49E 1 -49F 1 -49C 1 -49D 1 -41B 1 -43B 1 -4C5 1 -4C6 1 -409 1 -459 1 -508 1 -509 1 -41C 1 -43C 1 -4CD 1 -4CE 1 -41D 1 -43D 1 -4C9 1 -4CA 1 -4A2 1 -4A3 1 -4C7 1 -4C8 1 -4A4 1 -4A5 1 -40A 1 -45A 1 -50A 1 -50B 1 -41E 1 -43E 1 -4E6 1 -4E7 1 -4E8 1 -4E9 1 -4EA 1 -4EB 1 -41F 1 -43F 1 -4A6 1 -4A7 1 -480 1 -481 1 -420 1 -440 1 -48E 1 -48F 1 -421 1 -441 1 -50C 1 -50D 1 -4AA 1 -4AB 1 -422 1 -442 1 -50E 1 -50F 1 -4AC 1 -4AD 1 -40B 1 -45B 1 -40C 1 -45C 1 -423 1 -443 1 -4EE 1 -4EF 1 -40E 1 -45E 1 -4F0 1 -4F1 1 -4F2 1 -4F3 1 -4AE 1 -4AF 1 -4B0 1 -4B1 1 -478 1 -479 1 -424 1 -444 1 -425 1 -445 1 -4B2 1 -4B3 1 -4BA 1 -4BB 1 -460 1 -461 1 -47E 1 -47F 1 -47C 1 -47D 1 -47A 1 -47B 1 -426 1 -446 1 -4B4 1 -4B5 1 -427 1 -447 1 -4F4 1 -4F5 1 -4B6 1 -4B7 1 -4CB 1 -4CC 1 -4B8 1 -4B9 1 -4BC 1 -4BD 1 -4BE 1 -4BF 1 -40F 1 -45F 1 -428 1 -448 1 -429 1 -449 1 -42A 1 -44A 1 -42B 1 -44B 1 -4F8 1 -4F9 1 -42C 1 -44C 1 -48C 1 -48D 1 -462 1 -463 1 -42D 1 -44D 1 -4EC 1 -4ED 1 -42E 1 -44E 1 -42F 1 -44F 1 -464 1 -465 1 -466 1 -467 1 -46A 1 -46B 1 -468 1 -469 1 -46C 1 -46D 1 -46E 1 -46F 1 -470 1 -471 1 -472 1 -473 1 -474 1 -475 1 -476 1 -477 1 -4A8 1 -4A9 1 -4C0 1 -531 1 -561 1 -532 1 -562 1 -533 1 -563 1 -534 1 -564 1 -535 1 -565 1 -587 1 -536 1 -566 1 -537 1 -567 1 -538 1 -568 1 -539 1 -569 1 -53A 1 -56A 1 -53B 1 -56B 1 -53C 1 -56C 1 -53D 1 -56D 1 -53E 1 -56E 1 -53F 1 -56F 1 -540 1 -570 1 -541 1 -571 1 -542 1 -572 1 -543 1 -573 1 -544 1 -574 1 -545 1 -575 1 -546 1 -576 1 -547 1 -577 1 -548 1 -578 1 -549 1 -579 1 -54A 1 -57A 1 -54B 1 -57B 1 -54C 1 -57C 1 -54D 1 -57D 1 -54E 1 -57E 1 -54F 1 -57F 1 -550 1 -580 1 -551 1 -581 1 -552 1 -582 1 -553 1 -583 1 -554 1 -584 1 -555 1 -585 1 -556 1 -586 1 -559 1 -5D0 1 -5D1 1 -5D2 1 -5D3 1 -5D4 1 -5D5 1 -5F0 1 -5F1 1 -5D6 1 -5D7 1 -5D8 1 -5D9 1 -5F2 1 -5DA 1 -5DB 1 -5DC 1 -5DD 1 -5DE 1 -5DF 1 -5E0 1 -5E1 1 -5E2 1 -5E3 1 -5E4 1 -5E5 1 -5E6 1 -5E7 1 -5E8 1 -5E9 1 -5EA 1 -621 1 -674 1 -6FD 1 -622 1 -623 1 -672 1 -671 1 -624 1 -625 1 -673 1 -626 1 -627 1 -675 1 -66E 1 -628 1 -67B 1 -67E 1 -680 1 -629 1 -62A 1 -62B 1 -679 1 -67A 1 -67C 1 -67D 1 -67F 1 -62C 1 -683 1 -684 1 -686 1 -6BF 1 -687 1 -62D 1 -62E 1 -681 1 -682 1 -685 1 -62F 1 -630 1 -688 1 -689 1 -68A 1 -68B 1 -68C 1 -68D 1 -68E 1 -68F 1 -690 1 -6EE 1 -631 1 -632 1 -691 1 -692 1 -693 1 -694 1 -695 1 -696 1 -697 1 -698 1 -699 1 -6EF 1 -633 1 -634 1 -69A 1 -69B 1 -69C 1 -6FA 1 -635 1 -636 1 -69D 1 -69E 1 -6FB 1 -637 1 -638 1 -69F 1 -639 1 -63A 1 -6A0 1 -6FC 1 -641 1 -6A1 1 -6A2 1 -6A3 1 -6A4 1 -6A5 1 -6A6 1 -66F 1 -642 1 -6A7 1 -6A8 1 -643 1 -6A9 1 -6AA 1 -6AB 1 -6AC 1 -6AD 1 -6AE 1 -6AF 1 -6B0 1 -6B1 1 -6B2 1 -6B3 1 -6B4 1 -644 1 -6B5 1 -6B6 1 -6B7 1 -6B8 1 -645 1 -6FE 1 -646 1 -6BA 1 -6BB 1 -6BC 1 -6BD 1 -6B9 1 -647 1 -6BE 1 -6C1 1 -6C2 1 -6C3 1 -6FF 1 -6C0 1 -6D5 1 -648 1 -6E5 1 -676 1 -6C4 1 -6C5 1 -6C6 1 -6C7 1 -677 1 -6C8 1 -6C9 1 -6CA 1 -6CB 1 -6CF 1 -649 1 -64A 1 -6E6 1 -678 1 -6CC 1 -6CD 1 -6CE 1 -6D0 1 -6D1 1 -6D2 1 -6D3 1 -710 1 -712 1 -72D 1 -713 1 -714 1 -72E 1 -716 1 -715 1 -72F 1 -717 1 -718 1 -719 1 -74D 1 -71A 1 -71B 1 -71C 1 -71D 1 -71E 1 -71F 1 -74E 1 -720 1 -721 1 -722 1 -723 1 -724 1 -725 1 -726 1 -727 1 -74F 1 -728 1 -729 1 -72A 1 -72B 1 -72C 1 -780 1 -799 1 -79A 1 -781 1 -782 1 -783 1 -79C 1 -784 1 -785 1 -786 1 -787 1 -7A2 1 -7A3 1 -788 1 -7A5 1 -789 1 -78A 1 -78B 1 -79B 1 -78C 1 -798 1 -7A0 1 -7A1 1 -78D 1 -78E 1 -7A4 1 -78F 1 -790 1 -79D 1 -79E 1 -79F 1 -791 1 -792 1 -793 1 -794 1 -795 1 -796 1 -797 1 -7B1 1 -7A6 1 -7A7 1 -7A8 1 -7A9 1 -7AA 1 -7AB 1 -7AC 1 -7AD 1 -7AE 1 -7AF 1 -7B0 1 -4E00 1 -4E01 1 -4E02 1 -4E03 1 -4E04 1 -4E05 1 -4E06 1 -4E07 1 -4E08 1 -4E09 1 -4E0A 1 -4E0B 1 -4E0C 1 -4E0D 1 -4E0E 1 -4E0F 1 -4E10 1 -4E11 1 -4E12 1 -4E13 1 -4E14 1 -4E15 1 -4E16 1 -4E17 1 -4E18 1 -4E19 1 -4E1A 1 -4E1B 1 -4E1C 1 -4E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519 1 -51A 1 -51B 1 -51C 1 -51D 1 -51E 1 -51F 1 -520 1 -521 1 -522 1 -523 1 -524 1 -525 1 -526 1 -527 1 -528 1 -529 1 -52A 1 -52B 1 -52C 1 -52D 1 -52E 1 -52F 1 -530 1 -557 1 -558 1 -560 1 -588 1 -58B 1 -58C 1 -58D 1 -58E 1 -58F 1 -590 1 -5A2 1 -5BA 1 -5C5 1 -5C6 1 -5C7 1 -5C8 1 -5C9 1 -5CA 1 -5CB 1 -5CC 1 -5CD 1 -5CE 1 -5CF 1 -5EB 1 -5EC 1 -5ED 1 -5EE 1 -5EF 1 -5F5 1 -5F6 1 -5F7 1 -5F8 1 -5F9 1 -5FA 1 -5FB 1 -5FC 1 -5FD 1 -5FE 1 -5FF 1 -604 1 -605 1 -606 1 -607 1 -608 1 -609 1 -60A 1 -60B 1 -616 1 -617 1 -618 1 -619 1 -61A 1 -61C 1 -61D 1 -61E 1 -620 1 -63B 1 -63C 1 -63D 1 -63E 1 -63F 1 -659 1 -65A 1 -65B 1 -65C 1 -65D 1 -65E 1 -65F 1 -70E 1 -74B 1 -74C 1 -750 1 -751 1 -752 1 -753 1 -754 1 -755 1 -756 1 -757 1 -758 1 -759 1 -75A 1 -75B 1 -75C 1 -75D 1 -75E 1 -75F 1 -760 1 -761 1 -762 1 -763 1 -764 1 -765 1 -766 1 -767 1 -768 1 -769 1 -76A 1 -76B 1 -76C 1 -76D 1 -76E 1 -76F 1 -770 1 -771 1 -772 1 -773 1 -774 1 -775 1 -776 1 -777 1 -778 1 -779 1 -77A 1 -77B 1 -77C 1 -77D 1 -77E 1 -77F 1 -7B2 1 -7B3 1 -7B4 1 -7B5 1 -7B6 1 -7B7 1 -7B8 1 -7B9 1 -7BA 1 -7BB 1 -7BC 1 -7BD 1 -7BE 1 -7BF 1 -7C0 1 -7C1 1 -7C2 1 -7C3 1 -7C4 1 -7C5 1 -7C6 1 -7C7 1 -7C8 1 -7C9 1 -7CA 1 -7CB 1 -7CC 1 -7CD 1 -7CE 1 -7CF 1 -7D0 1 -7D1 1 -7D2 1 -7D3 1 -7D4 1 -7D5 1 -7D6 1 -7D7 1 -7D8 1 -7D9 1 -7DA 1 -7DB 1 -7DC 1 -7DD 1 -7DE 1 -7DF 1 -7E0 1 -7E1 1 -7E2 1 -7E3 1 -7E4 1 -7E5 1 -7E6 1 -7E7 1 -7E8 1 -7E9 1 -7EA 1 -7EB 1 -7EC 1 -7ED 1 -7EE 1 -7EF 1 -7F0 1 -7F1 1 -7F2 1 -7F3 1 -7F4 1 -7F5 1 -7F6 1 -7F7 1 -7F8 1 -7F9 1 -7FA 1 -7FB 1 -7FC 1 -7FD 1 -7FE 1 -7FF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_bin) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_bin; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_bin # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -42 1 -43 1 -44 1 -45 1 -46 1 -47 1 -48 1 -49 1 -4A 1 -4B 1 -4C 1 -4D 1 -4E 1 -4F 1 -50 1 -51 1 -52 1 -53 1 -54 1 -55 1 -56 1 -57 1 -58 1 -59 1 -5A 1 -5B 1 -5E 1 -5F 1 -60 1 -61 1 -62 1 -63 1 -64 1 -65 1 -66 1 -67 1 -68 1 -69 1 -6A 1 -6B 1 -6C 1 -6D 1 -6E 1 -6F 1 -70 1 -71 1 -72 1 -73 1 -74 1 -75 1 -76 1 -77 1 -78 1 -79 1 -7A 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C285 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -C2A1 1 -C2A2 1 -C2A3 1 -C2A4 1 -C2A5 1 -C2A6 1 -C2A7 1 -C2A8 1 -C2A9 1 -C2AA 1 -C2AB 1 -C2AC 1 -C2AD 1 -C2AE 1 -C2AF 1 -C2B0 1 -C2B1 1 -C2B2 1 -C2B3 1 -C2B4 1 -C2B5 1 -C2B6 1 -C2B7 1 -C2B8 1 -C2B9 1 -C2BA 1 -C2BB 1 -C2BC 1 -C2BD 1 -C2BE 1 -C2BF 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C386 1 -C387 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C390 1 -C391 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C397 1 -C398 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C39D 1 -C39E 1 -C39F 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C3A6 1 -C3A7 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C3B0 1 -C3B1 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C3B7 1 -C3B8 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C3BD 1 -C3BE 1 -C3BF 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -C48E 1 -C48F 1 -C490 1 -C491 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C4A4 1 -C4A5 1 -C4A6 1 -C4A7 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C4B1 1 -C4B2 1 -C4B3 1 -C4B4 1 -C4B5 1 -C4B6 1 -C4B7 1 -C4B8 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -C4BF 1 -C580 1 -C581 1 -C582 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C589 1 -C58A 1 -C58B 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C592 1 -C593 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C5A6 1 -C5A7 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C5B4 1 -C5B5 1 -C5B6 1 -C5B7 1 -C5B8 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -C5BF 1 -C680 1 -C681 1 -C682 1 -C683 1 -C684 1 -C685 1 -C686 1 -C687 1 -C688 1 -C689 1 -C68A 1 -C68B 1 -C68C 1 -C68D 1 -C68E 1 -C68F 1 -C690 1 -C691 1 -C692 1 -C693 1 -C694 1 -C695 1 -C696 1 -C697 1 -C698 1 -C699 1 -C69A 1 -C69B 1 -C69C 1 -C69D 1 -C69E 1 -C69F 1 -C6A0 1 -C6A1 1 -C6A2 1 -C6A3 1 -C6A4 1 -C6A5 1 -C6A6 1 -C6A7 1 -C6A8 1 -C6A9 1 -C6AA 1 -C6AB 1 -C6AC 1 -C6AD 1 -C6AE 1 -C6AF 1 -C6B0 1 -C6B1 1 -C6B2 1 -C6B3 1 -C6B4 1 -C6B5 1 -C6B6 1 -C6B7 1 -C6B8 1 -C6B9 1 -C6BA 1 -C6BB 1 -C6BC 1 -C6BD 1 -C6BE 1 -C6BF 1 -C780 1 -C781 1 -C782 1 -C783 1 -C784 1 -C785 1 -C786 1 -C787 1 -C788 1 -C789 1 -C78A 1 -C78B 1 -C78C 1 -C78D 1 -C78E 1 -C78F 1 -C790 1 -C791 1 -C792 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C79D 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7A2 1 -C7A3 1 -C7A4 1 -C7A5 1 -C7A6 1 -C7A7 1 -C7A8 1 -C7A9 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C7AE 1 -C7AF 1 -C7B0 1 -C7B1 1 -C7B2 1 -C7B3 1 -C7B4 1 -C7B5 1 -C7B6 1 -C7B7 1 -C7B8 1 -C7B9 1 -C7BA 1 -C7BB 1 -C7BC 1 -C7BD 1 -C7BE 1 -C7BF 1 -C880 1 -C881 1 -C882 1 -C883 1 -C884 1 -C885 1 -C886 1 -C887 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C890 1 -C891 1 -C892 1 -C893 1 -C894 1 -C895 1 -C896 1 -C897 1 -C898 1 -C899 1 -C89A 1 -C89B 1 -C89C 1 -C89D 1 -C89E 1 -C89F 1 -C8A0 1 -C8A1 1 -C8A2 1 -C8A3 1 -C8A4 1 -C8A5 1 -C8A6 1 -C8A7 1 -C8A8 1 -C8A9 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -C8B2 1 -C8B3 1 -C8B4 1 -C8B5 1 -C8B6 1 -C8B7 1 -C8B8 1 -C8B9 1 -C8BA 1 -C8BB 1 -C8BC 1 -C8BD 1 -C8BE 1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -C990 1 -C991 1 -C992 1 -C993 1 -C994 1 -C995 1 -C996 1 -C997 1 -C998 1 -C999 1 -C99A 1 -C99B 1 -C99C 1 -C99D 1 -C99E 1 -C99F 1 -C9A0 1 -C9A1 1 -C9A2 1 -C9A3 1 -C9A4 1 -C9A5 1 -C9A6 1 -C9A7 1 -C9A8 1 -C9A9 1 -C9AA 1 -C9AB 1 -C9AC 1 -C9AD 1 -C9AE 1 -C9AF 1 -C9B0 1 -C9B1 1 -C9B2 1 -C9B3 1 -C9B4 1 -C9B5 1 -C9B6 1 -C9B7 1 -C9B8 1 -C9B9 1 -C9BA 1 -C9BB 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA80 1 -CA81 1 -CA82 1 -CA83 1 -CA84 1 -CA85 1 -CA86 1 -CA87 1 -CA88 1 -CA89 1 -CA8A 1 -CA8B 1 -CA8C 1 -CA8D 1 -CA8E 1 -CA8F 1 -CA90 1 -CA91 1 -CA92 1 -C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 -D0A8 1 -D0A9 1 -D0AA 1 -D0AB 1 -D0AC 1 -D0AD 1 -D0AE 1 -D0AF 1 -D0B0 1 -D0B1 1 -D0B2 1 -D0B3 1 -D0B4 1 -D0B5 1 -D0B6 1 -D0B7 1 -D0B8 1 -D0B9 1 -D0BA 1 -D0BB 1 -D0BC 1 -D0BD 1 -D0BE 1 -D0BF 1 -D180 1 -D181 1 -D182 1 -D183 1 -D184 1 -D185 1 -D186 1 -D187 1 -D188 1 -D189 1 -D18A 1 -D18B 1 -D18C 1 -D18D 1 -D18E 1 -D18F 1 -D190 1 -D191 1 -D192 1 -D193 1 -D194 1 -D195 1 -D196 1 -D197 1 -D198 1 -D199 1 -D19A 1 -D19B 1 -D19C 1 -D19D 1 -D19E 1 -D19F 1 -D1A0 1 -D1A1 1 -D1A2 1 -D1A3 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1A8 1 -D1A9 1 -D1AA 1 -D1AB 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D1B8 1 -D1B9 1 -D1BA 1 -D1BB 1 -D1BC 1 -D1BD 1 -D1BE 1 -D1BF 1 -D280 1 -D281 1 -D282 1 -D283 1 -D284 1 -D285 1 -D286 1 -D287 1 -D288 1 -D289 1 -D28A 1 -D28B 1 -D28C 1 -D28D 1 -D28E 1 -D28F 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D296 1 -D297 1 -D298 1 -D299 1 -D29A 1 -D29B 1 -D29C 1 -D29D 1 -D29E 1 -D29F 1 -D2A0 1 -D2A1 1 -D2A2 1 -D2A3 1 -D2A4 1 -D2A5 1 -D2A6 1 -D2A7 1 -D2A8 1 -D2A9 1 -D2AA 1 -D2AB 1 -D2AC 1 -D2AD 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D2B2 1 -D2B3 1 -D2B4 1 -D2B5 1 -D2B6 1 -D2B7 1 -D2B8 1 -D2B9 1 -D2BA 1 -D2BB 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D380 1 -D381 1 -D382 1 -D383 1 -D384 1 -D385 1 -D386 1 -D387 1 -D388 1 -D389 1 -D38A 1 -D38B 1 -D38C 1 -D38D 1 -D38E 1 -D38F 1 -D390 1 -D391 1 -D392 1 -D393 1 -D394 1 -D395 1 -D396 1 -D397 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D39C 1 -D39D 1 -D39E 1 -D39F 1 -D3A0 1 -D3A1 1 -D3A2 1 -D3A3 1 -D3A4 1 -D3A5 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D3AC 1 -D3AD 1 -D3AE 1 -D3AF 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D3B4 1 -D3B5 1 -D3B6 1 -D3B7 1 -D3B8 1 -D3B9 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D480 1 -D481 1 -D482 1 -D483 1 -D484 1 -D485 1 -D486 1 -D487 1 -D488 1 -D489 1 -D48A 1 -D48B 1 -D48C 1 -D48D 1 -D48E 1 -D48F 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D4B1 1 -D4B2 1 -D4B3 1 -D4B4 1 -D4B5 1 -D4B6 1 -D4B7 1 -D4B8 1 -D4B9 1 -D4BA 1 -D4BB 1 -D4BC 1 -D4BD 1 -D4BE 1 -D4BF 1 -D580 1 -D581 1 -D582 1 -D583 1 -D584 1 -D585 1 -D586 1 -D587 1 -D588 1 -D589 1 -D58A 1 -D58B 1 -D58C 1 -D58D 1 -D58E 1 -D58F 1 -D590 1 -D591 1 -D592 1 -D593 1 -D594 1 -D595 1 -D596 1 -D597 1 -D598 1 -D599 1 -D59A 1 -D59B 1 -D59C 1 -D59D 1 -D59E 1 -D59F 1 -D5A0 1 -D5A1 1 -D5A2 1 -D5A3 1 -D5A4 1 -D5A5 1 -D5A6 1 -D5A7 1 -D5A8 1 -D5A9 1 -D5AA 1 -D5AB 1 -D5AC 1 -D5AD 1 -D5AE 1 -D5AF 1 -D5B0 1 -D5B1 1 -D5B2 1 -D5B3 1 -D5B4 1 -D5B5 1 -D5B6 1 -D5B7 1 -D5B8 1 -D5B9 1 -D5BA 1 -D5BB 1 -D5BC 1 -D5BD 1 -D5BE 1 -D5BF 1 -D680 1 -D681 1 -D682 1 -D683 1 -D684 1 -D685 1 -D686 1 -D687 1 -D688 1 -D689 1 -D68A 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A2 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BA 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BE 1 -D6BF 1 -D780 1 -D781 1 -D782 1 -D783 1 -D784 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D796 1 -D797 1 -D798 1 -D799 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B0 1 -D7B1 1 -D7B2 1 -D7B3 1 -D7B4 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D880 1 -D881 1 -D882 1 -D883 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D88C 1 -D88D 1 -D88E 1 -D88F 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89B 1 -D89C 1 -D89D 1 -D89E 1 -D89F 1 -D8A0 1 -D8A1 1 -D8A2 1 -D8A3 1 -D8A4 1 -D8A5 1 -D8A6 1 -D8A7 1 -D8A8 1 -D8A9 1 -D8AA 1 -D8AB 1 -D8AC 1 -D8AD 1 -D8AE 1 -D8AF 1 -D8B0 1 -D8B1 1 -D8B2 1 -D8B3 1 -D8B4 1 -D8B5 1 -D8B6 1 -D8B7 1 -D8B8 1 -D8B9 1 -D8BA 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D980 1 -D981 1 -D982 1 -D983 1 -D984 1 -D985 1 -D986 1 -D987 1 -D988 1 -D989 1 -D98A 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -D9A0 1 -D9A1 1 -D9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DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5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utf8_czech_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_czech_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_czech_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -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 1 -CBB3 1 -CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1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1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4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 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_danish_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_danish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_danish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 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6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -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 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D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 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -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TS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_estonian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_estonian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_estonian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DB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488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 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82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1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DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_general_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_general_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_general_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -21 1 -22 1 -23 1 -24 1 -25 1 -26 1 -27 1 -28 1 -29 1 -2A 1 -2B 1 -2C 1 -2D 1 -2E 1 -2F 1 -30 1 -31 1 -32 1 -33 1 -34 1 -35 1 -36 1 -37 1 -38 1 -39 1 -3A 1 -3B 1 -3C 1 -3D 1 -3E 1 -3F 1 -40 1 -41 1 -61 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -42 1 -62 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -44 1 -64 1 -C48E 1 -C48F 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -46 1 -66 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C4B1 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -4D 1 -6D 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -4F 1 -6F 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -50 1 -70 1 -51 1 -71 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -55 1 -75 1 -C399 1 -C39A 1 -C39B 1 -C39C 1 -C3B9 1 -C3BA 1 -C3BB 1 -C3BC 1 -C5A8 1 -C5A9 1 -C5AA 1 -C5AB 1 -C5AC 1 -C5AD 1 -C5AE 1 -C5AF 1 -C5B0 1 -C5B1 1 -C5B2 1 -C5B3 1 -C6AF 1 -C6B0 1 -C793 1 -C794 1 -C795 1 -C796 1 -C797 1 -C798 1 -C799 1 -C79A 1 -C79B 1 -C79C 1 -C894 1 -C895 1 -C896 1 -C897 1 -56 1 -76 1 -57 1 -77 1 -C5B4 1 -C5B5 1 -58 1 -78 1 -59 1 -79 1 -C39D 1 -C3BD 1 -C3BF 1 -C5B6 1 -C5B7 1 -C5B8 1 -C8B2 1 -C8B3 1 -5A 1 -7A 1 -C5B9 1 -C5BA 1 -C5BB 1 -C5BC 1 -C5BD 1 -C5BE 1 -5B 1 -5E 1 -5F 1 -60 1 -7B 1 -7C 1 -7D 1 -7E 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C285 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -C2A1 1 -C2A2 1 -C2A3 1 -C2A4 1 -C2A5 1 -C2A6 1 -C2A7 1 -C2A8 1 -C2A9 1 -C2AA 1 -C2AB 1 -C2AC 1 -C2AD 1 -C2AE 1 -C2AF 1 -C2B0 1 -C2B1 1 -C2B2 1 -C2B3 1 -C2B4 1 -C2B6 1 -C2B7 1 -C2B8 1 -C2B9 1 -C2BA 1 -C2BB 1 -C2BC 1 -C2BD 1 -C2BE 1 -C2BF 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C390 1 -C3B0 1 -C397 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C39E 1 -C3BE 1 -C39F 1 -C3B7 1 -C490 1 -C491 1 -C4A6 1 -C4A7 1 -C4B2 1 -C4B3 1 -C4B8 1 -C4BF 1 -C580 1 -C581 1 -C582 1 -C589 1 -C58A 1 -C58B 1 -C592 1 -C593 1 -C5A6 1 -C5A7 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -C684 1 -C685 1 -C686 1 -C994 1 -C687 1 -C688 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C68D 1 -C68E 1 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D197 1 -D088 1 -D198 1 -D089 1 -D199 1 -D08A 1 -D19A 1 -D08B 1 -D19B 1 -D08F 1 -D19F 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D083 1 -D093 1 -D0B3 1 -D193 1 -D094 1 -D0B4 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D097 1 -D0B7 1 -D39E 1 -D39F 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D3A4 1 -D3A5 1 -D099 1 -D0B9 1 -D08C 1 -D09A 1 -D0BA 1 -D19C 1 -D09B 1 -D0BB 1 -D09C 1 -D0BC 1 -D09D 1 -D0BD 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D09F 1 -D0BF 1 -D0A0 1 -D180 1 -D0A1 1 -D181 1 -D0A2 1 -D182 1 -D08E 1 -D0A3 1 -D183 1 -D19E 1 -D3AE 1 -D3AF 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D0A6 1 -D186 1 -D0A7 1 -D187 1 -D3B4 1 -D3B5 1 -D0A8 1 -D188 1 -D0A9 1 -D189 1 -D0AA 1 -D18A 1 -D0AB 1 -D18B 1 -D3B8 1 -D3B9 1 -D0AC 1 -D18C 1 -D0AD 1 -D18D 1 -D3AC 1 -D3AD 1 -D0AE 1 -D18E 1 -D0AF 1 -D18F 1 -D1A0 1 -D1A1 1 -D1A2 1 -D1A3 1 -D1A4 1 -D1A5 1 -D1A6 1 -D1A7 1 -D1A8 1 -D1A9 1 -D1AA 1 -D1AB 1 -D1AC 1 -D1AD 1 -D1AE 1 -D1AF 1 -D1B0 1 -D1B1 1 -D1B2 1 -D1B3 1 -D1B4 1 -D1B5 1 -D1B6 1 -D1B7 1 -D1B8 1 -D1B9 1 -D1BA 1 -D1BB 1 -D1BC 1 -D1BD 1 -D1BE 1 -D1BF 1 -D280 1 -D281 1 -D282 1 -D283 1 -D284 1 -D285 1 -D286 1 -D287 1 -D288 1 -D289 1 -D28A 1 -D28B 1 -D28C 1 -D28D 1 -D28E 1 -D28F 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D296 1 -D297 1 -D298 1 -D299 1 -D29A 1 -D29B 1 -D29C 1 -D29D 1 -D29E 1 -D29F 1 -D2A0 1 -D2A1 1 -D2A2 1 -D2A3 1 -D2A4 1 -D2A5 1 -D2A6 1 -D2A7 1 -D2A8 1 -D2A9 1 -D2AA 1 -D2AB 1 -D2AC 1 -D2AD 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D2B2 1 -D2B3 1 -D2B4 1 -D2B5 1 -D2B6 1 -D2B7 1 -D2B8 1 -D2B9 1 -D2BA 1 -D2BB 1 -D2BC 1 -D2BD 1 -D2BE 1 -D2BF 1 -D380 1 -D383 1 -D384 1 -D385 1 -D386 1 -D387 1 -D388 1 -D389 1 -D38A 1 -D38B 1 -D38C 1 -D38D 1 -D38E 1 -D38F 1 -D394 1 -D395 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D3A0 1 -D3A1 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D480 1 -D481 1 -D482 1 -D483 1 -D484 1 -D485 1 -D486 1 -D487 1 -D488 1 -D489 1 -D48A 1 -D48B 1 -D48C 1 -D48D 1 -D48E 1 -D48F 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D4B1 1 -D5A1 1 -D4B2 1 -D5A2 1 -D4B3 1 -D5A3 1 -D4B4 1 -D5A4 1 -D4B5 1 -D5A5 1 -D4B6 1 -D5A6 1 -D4B7 1 -D5A7 1 -D4B8 1 -D5A8 1 -D4B9 1 -D5A9 1 -D4BA 1 -D5AA 1 -D4BB 1 -D5AB 1 -D4BC 1 -D5AC 1 -D4BD 1 -D5AD 1 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D597 1 -D598 1 -D599 1 -D59A 1 -D59B 1 -D59C 1 -D59D 1 -D59E 1 -D59F 1 -D5A0 1 -D687 1 -D688 1 -D689 1 -D68A 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A2 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BA 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BE 1 -D6BF 1 -D780 1 -D781 1 -D782 1 -D783 1 -D784 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D796 1 -D797 1 -D798 1 -D799 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B0 1 -D7B1 1 -D7B2 1 -D7B3 1 -D7B4 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D880 1 -D881 1 -D882 1 -D883 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D88C 1 -D88D 1 -D88E 1 -D88F 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89B 1 -D89C 1 -D89D 1 -D89E 1 -D89F 1 -D8A0 1 -D8A1 1 -D8A2 1 -D8A3 1 -D8A4 1 -D8A5 1 -D8A6 1 -D8A7 1 -D8A8 1 -D8A9 1 -D8AA 1 -D8AB 1 -D8AC 1 -D8AD 1 -D8AE 1 -D8AF 1 -D8B0 1 -D8B1 1 -D8B2 1 -D8B3 1 -D8B4 1 -D8B5 1 -D8B6 1 -D8B7 1 -D8B8 1 -D8B9 1 -D8BA 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D980 1 -D981 1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 1 -E4BFB7 1 -E4BFB8 1 -E4BFB9 1 -E4BFBA 1 -E4BFBB 1 -E4BFBC 1 -E4BFBD 1 -E4BFBE 1 -E4BFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_hungarian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_hungarian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_hungarian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98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3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3A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CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -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8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_icelandic_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_icelandic_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_icelandic_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -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91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C382 1 -C383 1 -C3A0 1 -C3A2 1 -C3A3 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C381 1 -C3A1 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C390 1 -C3B0 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -45 1 -65 1 -C388 1 -C38A 1 -C38B 1 -C3A8 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887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 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E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 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_latvian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_latvian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_latvian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 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1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C4A2 1 -C4A3 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA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 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B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DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_lithuanian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_lithuanian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_lithuanian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86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282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1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CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 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96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_persian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_persian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_persian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -D993 1 -D994 1 -D995 1 -D9B0 1 -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1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-C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -D8A2 1 -D8A7 1 -D9B1 1 -D8A1 1 -D8A3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -D8A5 1 -D8A4 1 -D8A6 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A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-D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1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B 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 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ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_polish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_polish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB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-CBB4 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C484 1 -C485 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C486 1 -C487 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C498 1 -C499 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -C581 1 -C582 1 -CA9F 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C583 1 -C584 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C393 1 -C3B3 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -C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EA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 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DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_roman_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_roman_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_roman_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293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 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -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298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB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-DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 -E4B9A0 1 -E4B9A1 1 -E4B9A2 1 -E4B9A3 1 -E4B9A4 1 -E4B9A5 1 -E4B9A6 1 -E4B9A7 1 -E4B9A8 1 -E4B9A9 1 -E4B9AA 1 -E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TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_romanian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_romanian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_romanian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 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 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88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-CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 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9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovak_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_slovak_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_slovak_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 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A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C384 1 -C3A4 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 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C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C394 1 -C3B4 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -C5A0 1 -C5A1 1 -CA82 1 -C6A9 1 -CA83 1 -C6AA 1 -CA85 1 -CA86 1 -54 1 -74 1 -C5A2 1 -C5A3 1 -C5A4 1 -C5A5 1 -C89A 1 -C89B 1 -CDAD 1 -CAA8 1 -C6BE 1 -CAA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093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -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DE9D 1 -DE9E 1 -DE9F 1 -DE91 1 -DE92 1 -DE93 1 -DE94 1 -DE95 1 -DE96 1 -DE97 1 -DEB1 1 -DEA6 1 -DEA7 1 -DEA8 1 -DEA9 1 -DEAA 1 -DEAB 1 -DEAC 1 -DEAD 1 -DEAE 1 -DEAF 1 -DEB0 1 -E4B880 1 -E4B881 1 -E4B882 1 -E4B883 1 -E4B884 1 -E4B885 1 -E4B886 1 -E4B887 1 -E4B888 1 -E4B889 1 -E4B88A 1 -E4B88B 1 -E4B88C 1 -E4B88D 1 -E4B88E 1 -E4B88F 1 -E4B890 1 -E4B891 1 -E4B892 1 -E4B893 1 -E4B894 1 -E4B895 1 -E4B896 1 -E4B897 1 -E4B898 1 -E4B899 1 -E4B89A 1 -E4B89B 1 -E4B89C 1 -E4B89D 1 -E4B89E 1 -E4B89F 1 -E4B8A0 1 -E4B8A1 1 -E4B8A2 1 -E4B8A3 1 -E4B8A4 1 -E4B8A5 1 -E4B8A6 1 -E4B8A7 1 -E4B8A8 1 -E4B8A9 1 -E4B8AA 1 -E4B8AB 1 -E4B8AC 1 -E4B8AD 1 -E4B8AE 1 -E4B8AF 1 -E4B8B0 1 -E4B8B1 1 -E4B8B2 1 -E4B8B3 1 -E4B8B4 1 -E4B8B5 1 -E4B8B6 1 -E4B8B7 1 -E4B8B8 1 -E4B8B9 1 -E4B8BA 1 -E4B8BB 1 -E4B8BC 1 -E4B8BD 1 -E4B8BE 1 -E4B8BF 1 -E4B980 1 -E4B981 1 -E4B982 1 -E4B983 1 -E4B984 1 -E4B985 1 -E4B986 1 -E4B987 1 -E4B988 1 -E4B989 1 -E4B98A 1 -E4B98B 1 -E4B98C 1 -E4B98D 1 -E4B98E 1 -E4B98F 1 -E4B990 1 -E4B991 1 -E4B992 1 -E4B993 1 -E4B994 1 -E4B995 1 -E4B996 1 -E4B997 1 -E4B998 1 -E4B999 1 -E4B99A 1 -E4B99B 1 -E4B99C 1 -E4B99D 1 -E4B99E 1 -E4B99F 1 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1 -C8BF 1 -C980 1 -C981 1 -C982 1 -C983 1 -C984 1 -C985 1 -C986 1 -C987 1 -C988 1 -C989 1 -C98A 1 -C98B 1 -C98C 1 -C98D 1 -C98E 1 -C98F 1 -CD98 1 -CD99 1 -CD9A 1 -CD9B 1 -CD9C 1 -CDB0 1 -CDB1 1 -CDB2 1 -CDB3 1 -CDB6 1 -CDB7 1 -CDB8 1 -CDB9 1 -CDBB 1 -CDBC 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 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-DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_slovenian_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_slovenian_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_slovenian_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -D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C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -CDA8 1 -C48C 1 -C48D 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -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1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 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DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish2_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_spanish2_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_spanish2_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -DD88 1 -DD89 1 -DD8A 1 -D980 1 -60 1 -C2B4 1 -CE84 1 -CB9C 1 -5E 1 -C2AF 1 -CB98 1 -CB99 1 -C2A8 1 -CE85 1 -CB9A 1 -CB9D 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C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C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 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C391 1 -C3B1 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5BF 1 -C898 1 -C899 1 -CBA2 1 -C39F 1 -CA82 1 -C6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E 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D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 -D4BE 1 -D5AE 1 -D4BF 1 -D5AF 1 -D580 1 -D5B0 1 -D581 1 -D5B1 1 -D582 1 -D5B2 1 -D583 1 -D5B3 1 -D584 1 -D5B4 1 -D585 1 -D5B5 1 -D586 1 -D5B6 1 -D587 1 -D5B7 1 -D588 1 -D5B8 1 -D589 1 -D5B9 1 -D58A 1 -D5BA 1 -D58B 1 -D5BB 1 -D58C 1 -D5BC 1 -D58D 1 -D5BD 1 -D58E 1 -D5BE 1 -D58F 1 -D5BF 1 -D590 1 -D680 1 -D591 1 -D681 1 -D592 1 -D682 1 -D593 1 -D683 1 -D594 1 -D684 1 -D595 1 -D685 1 -D596 1 -D686 1 -D599 1 -D790 1 -D791 1 -D792 1 -D793 1 -D794 1 -D795 1 -D7B0 1 -D7B1 1 -D796 1 -D797 1 -D798 1 -D799 1 -D7B2 1 -D79A 1 -D79B 1 -D79C 1 -D79D 1 -D79E 1 -D79F 1 -D7A0 1 -D7A1 1 -D7A2 1 -D7A3 1 -D7A4 1 -D7A5 1 -D7A6 1 -D7A7 1 -D7A8 1 -D7A9 1 -D7AA 1 -D8A1 1 -D9B4 1 -DBBD 1 -D8A2 1 -D8A3 1 -D9B2 1 -D9B1 1 -D8A4 1 -D8A5 1 -D9B3 1 -D8A6 1 -D8A7 1 -D9B5 1 -D9AE 1 -D8A8 1 -D9BB 1 -D9BE 1 -DA80 1 -D8A9 1 -D8AA 1 -D8AB 1 -D9B9 1 -D9BA 1 -D9BC 1 -D9BD 1 -D9BF 1 -D8AC 1 -DA83 1 -DA84 1 -DA86 1 -DABF 1 -DA87 1 -D8AD 1 -D8AE 1 -DA81 1 -DA82 1 -DA85 1 -D8AF 1 -D8B0 1 -DA88 1 -DA89 1 -DA8A 1 -DA8B 1 -DA8C 1 -DA8D 1 -DA8E 1 -DA8F 1 -DA90 1 -DBAE 1 -D8B1 1 -D8B2 1 -DA91 1 -DA92 1 -DA93 1 -DA94 1 -DA95 1 -DA96 1 -DA97 1 -DA98 1 -DA99 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FA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_spanish_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_spanish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_spanish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 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F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 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E9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -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1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_swedish_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_swedish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_swedish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -DCB9 1 -DCBA 1 -DCBB 1 -DCBC 1 -DCBD 1 -DCBE 1 -DCBF 1 -DD80 1 -DD81 1 -DD82 1 -DD83 1 -DD84 1 -DD85 1 -DD86 1 -DD87 1 -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-D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -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 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1 -CDAC 1 -C6A6 1 -CA80 1 -C9B9 1 -CAB4 1 -C9BA 1 -C9BB 1 -CAB5 1 -C9BC 1 -C9BD 1 -C9BE 1 -C9BF 1 -CA81 1 -CAB6 1 -53 1 -73 1 -C59A 1 -C59B 1 -C59C 1 -C59D 1 -C59E 1 -C59F 1 -C5A0 1 -C5A1 1 -C5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A 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2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-DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_turkish_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_turkish_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_turkish_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83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385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C387 1 -C3A7 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C49E 1 -C49F 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 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1 -CEB7 1 -CE98 1 -CEB8 1 -CF91 1 -CFB4 1 -CDBA 1 -CE8A 1 -CE90 1 -CE99 1 -CEAA 1 -CEAF 1 -CEB9 1 -CF8A 1 -CFB3 1 -CE9A 1 -CEBA 1 -CFB0 1 -CF97 1 -CE9B 1 -CEBB 1 -C2B5 1 -CE9C 1 -CEBC 1 -CE9D 1 -CEBD 1 -CE9E 1 -CEBE 1 -CE8C 1 -CE9F 1 -CEBF 1 -CF8C 1 -CEA0 1 -CF80 1 -CF96 1 -CF9E 1 -CF9F 1 -CF98 1 -CF99 1 -CEA1 1 -CF81 1 -CFB1 1 -CEA3 1 -CF82 1 -CF83 1 -CFB2 1 -CFB9 1 -CEA4 1 -CF84 1 -CE8E 1 -CEA5 1 -CEAB 1 -CEB0 1 -CF85 1 -CF8B 1 -CF8D 1 -CF92 1 -CF93 1 -CF94 1 -CEA6 1 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 1 -D19A 1 -D48A 1 -D48B 1 -D09E 1 -D0BE 1 -D3A6 1 -D3A7 1 -D3A8 1 -D3A9 1 -D3AA 1 -D3AB 1 -D09F 1 -D0BF 1 -D2A6 1 -D2A7 1 -D280 1 -D281 1 -D0A0 1 -D180 1 -D28E 1 -D28F 1 -D0A1 1 -D181 1 -D48C 1 -D48D 1 -D2AA 1 -D2AB 1 -D0A2 1 -D182 1 -D48E 1 -D48F 1 -D2AC 1 -D2AD 1 -D08B 1 -D19B 1 -D08C 1 -D19C 1 -D0A3 1 -D183 1 -D3AE 1 -D3AF 1 -D08E 1 -D19E 1 -D3B0 1 -D3B1 1 -D3B2 1 -D3B3 1 -D2AE 1 -D2AF 1 -D2B0 1 -D2B1 1 -D1B8 1 -D1B9 1 -D0A4 1 -D184 1 -D0A5 1 -D185 1 -D2B2 1 -D2B3 1 -D2BA 1 -D2BB 1 -D1A0 1 -D1A1 1 -D1BE 1 -D1BF 1 -D1BC 1 -D1BD 1 -D1BA 1 -D1BB 1 -D0A6 1 -D186 1 -D2B4 1 -D2B5 1 -D0A7 1 -D187 1 -D3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C 1 -CDBD 1 -CDBF 1 -CE80 1 -CE81 1 -CE82 1 -CE83 1 -CE8B 1 -CE8D 1 -CEA2 1 -CF8F 1 -CFBC 1 -CFBD 1 -CFBE 1 -CFBF 1 -D287 1 -D38F 1 -D3B6 1 -D3B7 1 -D3BA 1 -D3BB 1 -D3BC 1 -D3BD 1 -D3BE 1 -D3BF 1 -D490 1 -D491 1 -D492 1 -D493 1 -D494 1 -D495 1 -D496 1 -D497 1 -D498 1 -D499 1 -D49A 1 -D49B 1 -D49C 1 -D49D 1 -D49E 1 -D49F 1 -D4A0 1 -D4A1 1 -D4A2 1 -D4A3 1 -D4A4 1 -D4A5 1 -D4A6 1 -D4A7 1 -D4A8 1 -D4A9 1 -D4AA 1 -D4AB 1 -D4AC 1 -D4AD 1 -D4AE 1 -D4AF 1 -D4B0 1 -D597 1 -D598 1 -D5A0 1 -D688 1 -D68B 1 -D68C 1 -D68D 1 -D68E 1 -D68F 1 -D690 1 -D6A2 1 -D6BA 1 -D785 1 -D786 1 -D787 1 -D788 1 -D789 1 -D78A 1 -D78B 1 -D78C 1 -D78D 1 -D78E 1 -D78F 1 -D7AB 1 -D7AC 1 -D7AD 1 -D7AE 1 -D7AF 1 -D7B5 1 -D7B6 1 -D7B7 1 -D7B8 1 -D7B9 1 -D7BA 1 -D7BB 1 -D7BC 1 -D7BD 1 -D7BE 1 -D7BF 1 -D884 1 -D885 1 -D886 1 -D887 1 -D888 1 -D889 1 -D88A 1 -D88B 1 -D896 1 -D897 1 -D898 1 -D899 1 -D89A 1 -D89C 1 -D89D 1 -D89E 1 -D8A0 1 -D8BB 1 -D8BC 1 -D8BD 1 -D8BE 1 -D8BF 1 -D999 1 -D99A 1 -D99B 1 -D99C 1 -D99D 1 -D99E 1 -D99F 1 -DC8E 1 -DD8B 1 -DD8C 1 -DD90 1 -DD91 1 -DD92 1 -DD93 1 -DD94 1 -DD95 1 -DD96 1 -DD97 1 -DD98 1 -DD99 1 -DD9A 1 -DD9B 1 -DD9C 1 -DD9D 1 -DD9E 1 -DD9F 1 -DDA0 1 -DDA1 1 -DDA2 1 -DDA3 1 -DDA4 1 -DDA5 1 -DDA6 1 -DDA7 1 -DDA8 1 -DDA9 1 -DDAA 1 -DDAB 1 -DDAC 1 -DDAD 1 -DDAE 1 -DDAF 1 -DDB0 1 -DDB1 1 -DDB2 1 -DDB3 1 -DDB4 1 -DDB5 1 -DDB6 1 -DDB7 1 -DDB8 1 -DDB9 1 -DDBA 1 -DDBB 1 -DDBC 1 -DDBD 1 -DDBE 1 -DDBF 1 -DEB2 1 -DEB3 1 -DEB4 1 -DEB5 1 -DEB6 1 -DEB7 1 -DEB8 1 -DEB9 1 -DEBA 1 -DEBB 1 -DEBC 1 -DEBD 1 -DEBE 1 -DEBF 1 -DF80 1 -DF81 1 -DF82 1 -DF83 1 -DF84 1 -DF85 1 -DF86 1 -DF87 1 -DF88 1 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t1; -DROP DATABASE test; -CREATE DATABASE test CHARACTER SET utf8; -USE test; -CREATE TABLE test.t1 (a CHAR(4) CHARACTER SET utf8 COLLATE utf8_unicode_ci) ENGINE=NDB CHARACTER SET utf8 COLLATE utf8_unicode_ci; -SHOW TABLE STATUS LIKE 't1'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster # # # # # # # # # # # # utf8_unicode_ci # # # -LOAD DATA INFILE -'MYSQL_TEST_DIR/suite/funcs_2/data/charset_utf8.txt' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; -SELECT HEX(ORD(a)) AS a_ord, CHAR_LENGTH(a) AS a_len FROM test.t1 ORDER BY a, ORD(a); -a_ord a_len -C285 1 -7F 1 -C280 1 -C281 1 -C282 1 -C283 1 -C284 1 -C286 1 -C287 1 -C288 1 -C289 1 -C28A 1 -C28B 1 -C28C 1 -C28D 1 -C28E 1 -C28F 1 -C290 1 -C291 1 -C292 1 -C293 1 -C294 1 -C295 1 -C296 1 -C297 1 -C298 1 -C299 1 -C29A 1 -C29B 1 -C29C 1 -C29D 1 -C29E 1 -C29F 1 -C2A0 1 -CC80 1 -CC81 1 -CC82 1 -CC83 1 -CC84 1 -CC85 1 -CC86 1 -CC87 1 -CC88 1 -CC89 1 -CC8A 1 -CC8B 1 -CC8C 1 -CC8D 1 -CC8E 1 -CC8F 1 -CC90 1 -CC91 1 -CC92 1 -CC93 1 -CC94 1 -CC95 1 -CC96 1 -CC97 1 -CC98 1 -CC99 1 -CC9A 1 -CC9B 1 -CC9C 1 -CC9D 1 -CC9E 1 -CC9F 1 -CCA0 1 -CCA1 1 -CCA2 1 -CCA3 1 -CCA4 1 -CCA5 1 -CCA6 1 -CCA7 1 -CCA8 1 -CCA9 1 -CCAA 1 -CCAB 1 -CCAC 1 -CCAD 1 -CCAE 1 -CCAF 1 -CCB0 1 -CCB1 1 -CCB2 1 -CCB3 1 -CCB4 1 -CCB5 1 -CCB6 1 -CCB7 1 -CCB8 1 -CCB9 1 -CCBA 1 -CCBB 1 -CCBC 1 -CCBD 1 -CCBE 1 -CCBF 1 -CD80 1 -CD81 1 -CD82 1 -CD83 1 -CD84 1 -CD85 1 -CD86 1 -CD87 1 -CD88 1 -CD89 1 -CD8A 1 -CD8B 1 -CD8C 1 -CD8D 1 -CD8E 1 -CD8F 1 -CD90 1 -CD91 1 -CD92 1 -CD93 1 -CD94 1 -CD95 1 -CD96 1 -CD97 1 -CD9D 1 -CD9E 1 -CD9F 1 -CDA0 1 -CDA1 1 -CDA2 1 -D283 1 -D284 1 -D285 1 -D286 1 -D288 1 -D289 1 -D691 1 -D692 1 -D693 1 -D694 1 -D695 1 -D696 1 -D697 1 -D698 1 -D699 1 -D69A 1 -D69B 1 -D69C 1 -D69D 1 -D69E 1 -D69F 1 -D6A0 1 -D6A1 1 -D6A3 1 -D6A4 1 -D6A5 1 -D6A6 1 -D6A7 1 -D6A8 1 -D6A9 1 -D6AA 1 -D6AB 1 -D6AC 1 -D6AD 1 -D6AE 1 -D6AF 1 -D6B0 1 -D6B1 1 -D6B2 1 -D6B3 1 -D6B4 1 -D6B5 1 -D6B6 1 -D6B7 1 -D6B8 1 -D6B9 1 -D6BB 1 -D6BC 1 -D6BD 1 -D6BF 1 -D781 1 -D782 1 -D784 1 -D880 1 -D881 1 -D882 1 -D883 1 -D890 1 -D891 1 -D892 1 -D893 1 -D894 1 -D895 1 -D98B 1 -D98C 1 -D98D 1 -D98E 1 -D98F 1 -D990 1 -D991 1 -D992 1 -D993 1 -D994 1 -D995 1 -D996 1 -D997 1 -D998 1 -D9B0 1 -DB96 1 -DB97 1 -DB98 1 -DB99 1 -DB9A 1 -DB9B 1 -DB9C 1 -DB9D 1 -DB9E 1 -DB9F 1 -DBA0 1 -DBA1 1 -DBA2 1 -DBA3 1 -DBA4 1 -DBA7 1 -DBA8 1 -DBAA 1 -DBAB 1 -DBAC 1 -DBAD 1 -DC8F 1 -DC91 1 -DCB0 1 -DCB1 1 -DCB2 1 -DCB3 1 -DCB4 1 -DCB5 1 -DCB6 1 -DCB7 1 -DCB8 1 -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 1 -CBB5 1 -CBB6 1 -CBB7 1 -CBB8 1 -CBB9 1 -CBBA 1 -CBBB 1 -CBBC 1 -CBBD 1 -CBBE 1 -CBBF 1 -C2B0 1 -D282 1 -D88E 1 -D88F 1 -DBA9 1 -CFB6 1 -2B 1 -C2B1 1 -C3B7 1 -C397 1 -3C 1 -3D 1 -3E 1 -C2AC 1 -7C 1 -C2A6 1 -7E 1 -CB90 1 -CB91 1 -C2A4 1 -C2A2 1 -24 1 -C2A3 1 -C2A5 1 -30 1 -D9A0 1 -DBB0 1 -31 1 -C2B9 1 -D9A1 1 -DBB1 1 -C2BD 1 -C2BC 1 -32 1 -C2B2 1 -D9A2 1 -DBB2 1 -33 1 -C2B3 1 -D9A3 1 -DBB3 1 -C2BE 1 -34 1 -D9A4 1 -DBB4 1 -35 1 -D9A5 1 -DBB5 1 -36 1 -D9A6 1 -DBB6 1 -37 1 -D9A7 1 -DBB7 1 -38 1 -D9A8 1 -DBB8 1 -39 1 -D9A9 1 -DBB9 1 -41 1 -61 1 -C2AA 1 -C380 1 -C381 1 -C382 1 -C383 1 -C384 1 -C385 1 -C3A0 1 -C3A1 1 -C3A2 1 -C3A3 1 -C3A4 1 -C3A5 1 -C480 1 -C481 1 -C482 1 -C483 1 -C484 1 -C485 1 -C78D 1 -C78E 1 -C79E 1 -C79F 1 -C7A0 1 -C7A1 1 -C7BA 1 -C7BB 1 -C880 1 -C881 1 -C882 1 -C883 1 -C8A6 1 -C8A7 1 -CDA3 1 -C386 1 -C3A6 1 -C7A2 1 -C7A3 1 -C7BC 1 -C7BD 1 -C990 1 -C991 1 -C992 1 -42 1 -62 1 -CA99 1 -C680 1 -C681 1 -C993 1 -C682 1 -C683 1 -43 1 -63 1 -C387 1 -C3A7 1 -C486 1 -C487 1 -C488 1 -C489 1 -C48A 1 -C48B 1 -C48C 1 -C48D 1 -CDA8 1 -C687 1 -C688 1 -C995 1 -44 1 -64 1 -C48E 1 -C48F 1 -CDA9 1 -C784 1 -C785 1 -C786 1 -C7B1 1 -C7B2 1 -C7B3 1 -CAA3 1 -CAA5 1 -CAA4 1 -C490 1 -C491 1 -C689 1 -C996 1 -C68A 1 -C997 1 -C68B 1 -C68C 1 -C8A1 1 -C390 1 -C3B0 1 -45 1 -65 1 -C388 1 -C389 1 -C38A 1 -C38B 1 -C3A8 1 -C3A9 1 -C3AA 1 -C3AB 1 -C492 1 -C493 1 -C494 1 -C495 1 -C496 1 -C497 1 -C498 1 -C499 1 -C49A 1 -C49B 1 -C884 1 -C885 1 -C886 1 -C887 1 -C8A8 1 -C8A9 1 -CDA4 1 -C68E 1 -C79D 1 -C68F 1 -C999 1 -C690 1 -C99B 1 -C998 1 -C99A 1 -C99C 1 -C99D 1 -C99E 1 -CA9A 1 -C9A4 1 -46 1 -66 1 -CAA9 1 -C691 1 -C692 1 -47 1 -67 1 -C49C 1 -C49D 1 -C49E 1 -C49F 1 -C4A0 1 -C4A1 1 -C4A2 1 -C4A3 1 -C7A6 1 -C7A7 1 -C7B4 1 -C7B5 1 -C9A1 1 -C9A2 1 -C7A4 1 -C7A5 1 -C693 1 -C9A0 1 -CA9B 1 -C694 1 -C9A3 1 -CBA0 1 -C6A2 1 -C6A3 1 -48 1 -68 1 -C4A4 1 -C4A5 1 -C89E 1 -C89F 1 -CAB0 1 -CDAA 1 -CA9C 1 -C695 1 -C7B6 1 -C4A6 1 -C4A7 1 -C9A6 1 -CAB1 1 -C9A7 1 -CABB 1 -CABD 1 -49 1 -69 1 -C38C 1 -C38D 1 -C38E 1 -C38F 1 -C3AC 1 -C3AD 1 -C3AE 1 -C3AF 1 -C4A8 1 -C4A9 1 -C4AA 1 -C4AB 1 -C4AC 1 -C4AD 1 -C4AE 1 -C4AF 1 -C4B0 1 -C78F 1 -C790 1 -C888 1 -C889 1 -C88A 1 -C88B 1 -CDA5 1 -C4B2 1 -C4B3 1 -C4B1 1 -C9AA 1 -C697 1 -C9A8 1 -C696 1 -C9A9 1 -4A 1 -6A 1 -C4B4 1 -C4B5 1 -C7B0 1 -CAB2 1 -CA9D 1 -C99F 1 -CA84 1 -4B 1 -6B 1 -C4B6 1 -C4B7 1 -C7A8 1 -C7A9 1 -C698 1 -C699 1 -CA9E 1 -4C 1 -6C 1 -C4B9 1 -C4BA 1 -C4BB 1 -C4BC 1 -C4BD 1 -C4BE 1 -CBA1 1 -C4BF 1 -C580 1 -C787 1 -C788 1 -C789 1 -CAAA 1 -CAAB 1 -CA9F 1 -C581 1 -C582 1 -C69A 1 -C9AB 1 -C9AC 1 -C9AD 1 -C8B4 1 -C9AE 1 -C69B 1 -CA8E 1 -4D 1 -6D 1 -CDAB 1 -C9B1 1 -4E 1 -6E 1 -C391 1 -C3B1 1 -C583 1 -C584 1 -C585 1 -C586 1 -C587 1 -C588 1 -C7B8 1 -C7B9 1 -C78A 1 -C78B 1 -C78C 1 -C9B4 1 -C69D 1 -C9B2 1 -C69E 1 -C8A0 1 -C9B3 1 -C8B5 1 -C58A 1 -C58B 1 -4F 1 -6F 1 -C2BA 1 -C392 1 -C393 1 -C394 1 -C395 1 -C396 1 -C3B2 1 -C3B3 1 -C3B4 1 -C3B5 1 -C3B6 1 -C58C 1 -C58D 1 -C58E 1 -C58F 1 -C590 1 -C591 1 -C6A0 1 -C6A1 1 -C791 1 -C792 1 -C7AA 1 -C7AB 1 -C7AC 1 -C7AD 1 -C88C 1 -C88D 1 -C88E 1 -C88F 1 -C8AA 1 -C8AB 1 -C8AC 1 -C8AD 1 -C8AE 1 -C8AF 1 -C8B0 1 -C8B1 1 -CDA6 1 -C592 1 -C593 1 -C9B6 1 -C398 1 -C3B8 1 -C7BE 1 -C7BF 1 -C686 1 -C994 1 -C69F 1 -C9B5 1 -C9B7 1 -C8A2 1 -C8A3 1 -50 1 -70 1 -C6A4 1 -C6A5 1 -C9B8 1 -51 1 -71 1 -CAA0 1 -C4B8 1 -52 1 -72 1 -C594 1 -C595 1 -C596 1 -C597 1 -C598 1 -C599 1 -C890 1 -C891 1 -C892 1 -C893 1 -CAB3 1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 -CF86 1 -CF95 1 -CEA7 1 -CF87 1 -CEA8 1 -CF88 1 -CE8F 1 -CEA9 1 -CF89 1 -CF8E 1 -CFA0 1 -CFA1 1 -CFB7 1 -CFB8 1 -CFBA 1 -CFBB 1 -CFA2 1 -CFA3 1 -CFA4 1 -CFA5 1 -CFA6 1 -CFA7 1 -CFA8 1 -CFA9 1 -CFAA 1 -CFAB 1 -CFAC 1 -CFAD 1 -CFAE 1 -CFAF 1 -D090 1 -D0B0 1 -D390 1 -D391 1 -D392 1 -D393 1 -D398 1 -D399 1 -D39A 1 -D39B 1 -D394 1 -D395 1 -D091 1 -D0B1 1 -D092 1 -D0B2 1 -D093 1 -D0B3 1 -D290 1 -D291 1 -D292 1 -D293 1 -D294 1 -D295 1 -D094 1 -D0B4 1 -D480 1 -D481 1 -D082 1 -D192 1 -D482 1 -D483 1 -D083 1 -D193 1 -D298 1 -D299 1 -D080 1 -D081 1 -D095 1 -D0B5 1 -D190 1 -D191 1 -D396 1 -D397 1 -D084 1 -D194 1 -D096 1 -D0B6 1 -D381 1 -D382 1 -D39C 1 -D39D 1 -D296 1 -D297 1 -D097 1 -D0B7 1 -D484 1 -D485 1 -D39E 1 -D39F 1 -D085 1 -D195 1 -D3A0 1 -D3A1 1 -D486 1 -D487 1 -D08D 1 -D098 1 -D0B8 1 -D19D 1 -D3A2 1 -D3A3 1 -D28A 1 -D28B 1 -D3A4 1 -D3A5 1 -D086 1 -D196 1 -D087 1 -D197 1 -D099 1 -D0B9 1 -D088 1 -D198 1 -D09A 1 -D0BA 1 -D29A 1 -D29B 1 -D383 1 -D384 1 -D2A0 1 -D2A1 1 -D29E 1 -D29F 1 -D29C 1 -D29D 1 -D09B 1 -D0BB 1 -D385 1 -D386 1 -D089 1 -D199 1 -D488 1 -D489 1 -D09C 1 -D0BC 1 -D38D 1 -D38E 1 -D09D 1 -D0BD 1 -D389 1 -D38A 1 -D2A2 1 -D2A3 1 -D387 1 -D388 1 -D2A4 1 -D2A5 1 -D08A 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 -DF89 1 -DF8A 1 -DF8B 1 -DF8C 1 -DF8D 1 -DF8E 1 -DF8F 1 -DF90 1 -DF91 1 -DF92 1 -DF93 1 -DF94 1 -DF95 1 -DF96 1 -DF97 1 -DF98 1 -DF99 1 -DF9A 1 -DF9B 1 -DF9C 1 -DF9D 1 -DF9E 1 -DF9F 1 -DFA0 1 -DFA1 1 -DFA2 1 -DFA3 1 -DFA4 1 -DFA5 1 -DFA6 1 -DFA7 1 -DFA8 1 -DFA9 1 -DFAA 1 -DFAB 1 -DFAC 1 -DFAD 1 -DFAE 1 -DFAF 1 -DFB0 1 -DFB1 1 -DFB2 1 -DFB3 1 -DFB4 1 -DFB5 1 -DFB6 1 -DFB7 1 -DFB8 1 -DFB9 1 -DFBA 1 -DFBB 1 -DFBC 1 -DFBD 1 -DFBE 1 -DFBF 1 -DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/funcs_2/t/ndb_charset.test b/mysql-test/suite/funcs_2/t/ndb_charset.test deleted file mode 100644 index 68665cc1ae5..00000000000 --- a/mysql-test/suite/funcs_2/t/ndb_charset.test +++ /dev/null @@ -1,14 +0,0 @@ -################################################################################ -# Author: Serge Kozlov # -# Date: 09/21/2005 # -# Purpose: Testing the charsets for NDB engine # -# # -# Checking of other prerequisites is in charset_master.test # -################################################################################ - ---source include/have_ndb.inc ---source include/not_embedded.inc - -let $engine_type= NDB; ---source suite/funcs_2/charset/charset_master.test - diff --git a/mysql-test/suite/ndb/my.cnf b/mysql-test/suite/ndb/my.cnf deleted file mode 100644 index 37dfc3945ce..00000000000 --- a/mysql-test/suite/ndb/my.cnf +++ /dev/null @@ -1,22 +0,0 @@ -!include include/default_mysqld.cnf -!include include/default_ndbd.cnf -!include include/default_client.cnf - -[cluster_config.1] -NoOfReplicas= 2 -ndbd=, -ndb_mgmd= -mysqld=, - -[mysqld] -# Make all mysqlds use cluster -ndbcluster - -[ENV] -NDB_CONNECTSTRING= @mysql_cluster.1.ndb_connectstring -MASTER_MYSOCK= @mysqld.1.1.socket -MASTER_MYPORT= @mysqld.1.1.port -MASTER_MYPORT1= @mysqld.2.1.port - -NDB_BACKUP_DIR= @cluster_config.ndbd.1.1.BackupDataDir - diff --git a/mysql-test/suite/ndb/r/loaddata_autocom_ndb.result b/mysql-test/suite/ndb/r/loaddata_autocom_ndb.result deleted file mode 100644 index b4d0b0b81a7..00000000000 --- a/mysql-test/suite/ndb/r/loaddata_autocom_ndb.result +++ /dev/null @@ -1,23 +0,0 @@ -SET SESSION STORAGE_ENGINE = ndbcluster; -drop table if exists t1; -create table t1 (id int unsigned not null auto_increment primary key, a text, b text); -start transaction; -load data infile 'LOAD_FILE' into table t1 fields terminated by ',' enclosed by '''' (a, b); -Warnings: -Warning 1261 Row 3 doesn't contain data for all columns -commit; -select count(*) from t1; -count(*) -4 -truncate table t1; -start transaction; -load data infile 'LOAD_FILE' into table t1 fields terminated by ',' enclosed by '''' (a, b); -Warnings: -Warning 1261 Row 3 doesn't contain data for all columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -4 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_alter_table.result b/mysql-test/suite/ndb/r/ndb_alter_table.result deleted file mode 100644 index 35b983e1901..00000000000 --- a/mysql-test/suite/ndb/r/ndb_alter_table.result +++ /dev/null @@ -1,437 +0,0 @@ -DROP TABLE IF EXISTS t1, t2; -drop database if exists mysqltest; -CREATE TABLE t1 ( -a INT NOT NULL, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412); -ALTER TABLE t1 ADD COLUMN c int not null; -SELECT * FROM t1; -a b c -9410 9412 0 -DROP TABLE t1; -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1 ( -a INT NOT NULL, -b INT NOT NULL -) ENGINE=ndbcluster; -RENAME TABLE t1 TO test.t1; -SHOW TABLES; -Tables_in_mysqltest -DROP DATABASE mysqltest; -USE test; -SHOW TABLES; -Tables_in_test -t1 -DROP TABLE t1; -create table t1 ( -col1 int not null auto_increment primary key, -col2 varchar(30) not null, -col3 varchar (20) not null, -col4 varchar(4) not null, -col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, -col6 int not null, to_be_deleted int) ENGINE=ndbcluster; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 10 Dynamic 0 # # # 0 # 1 # # # latin1_swedish_ci NULL # -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -insert into t1 values -(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 10 Dynamic 9 # # # 0 # 102 # # # latin1_swedish_ci NULL # -select * from t1 order by col1; -col1 col2 col3 col4 col5 col6 to_be_deleted -0 4 3 5 PENDING 1 7 -1 4 3 5 PENDING 1 7 -7 4 3 5 PENDING 1 7 -8 4 3 5 PENDING 1 7 -31 4 3 5 PENDING 1 7 -32 4 3 5 PENDING 1 7 -99 4 3 5 PENDING 1 7 -100 4 3 5 PENDING 1 7 -101 4 3 5 PENDING 1 7 -alter table t1 -add column col4_5 varchar(20) not null after col4, -add column col7 varchar(30) not null after col5, -add column col8 datetime not null, drop column to_be_deleted, -change column col2 fourth varchar(30) not null after col3, -modify column col6 int not null first; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 10 Dynamic 9 # # # 0 # 102 # # # latin1_swedish_ci NULL # -select * from t1 order by col1; -col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -1 0 3 4 5 PENDING 0000-00-00 00:00:00 -1 1 3 4 5 PENDING 0000-00-00 00:00:00 -1 7 3 4 5 PENDING 0000-00-00 00:00:00 -1 8 3 4 5 PENDING 0000-00-00 00:00:00 -1 31 3 4 5 PENDING 0000-00-00 00:00:00 -1 32 3 4 5 PENDING 0000-00-00 00:00:00 -1 99 3 4 5 PENDING 0000-00-00 00:00:00 -1 100 3 4 5 PENDING 0000-00-00 00:00:00 -1 101 3 4 5 PENDING 0000-00-00 00:00:00 -insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 10 Dynamic 10 # # # 0 # 103 # # # latin1_swedish_ci NULL # -select * from t1 order by col1; -col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -1 0 3 4 5 PENDING 0000-00-00 00:00:00 -1 1 3 4 5 PENDING 0000-00-00 00:00:00 -1 7 3 4 5 PENDING 0000-00-00 00:00:00 -1 8 3 4 5 PENDING 0000-00-00 00:00:00 -1 31 3 4 5 PENDING 0000-00-00 00:00:00 -1 32 3 4 5 PENDING 0000-00-00 00:00:00 -1 99 3 4 5 PENDING 0000-00-00 00:00:00 -1 100 3 4 5 PENDING 0000-00-00 00:00:00 -1 101 3 4 5 PENDING 0000-00-00 00:00:00 -2 102 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 -delete from t1; -insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -SET SQL_MODE=''; -insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -0 0 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 -1 103 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 -alter table t1 drop column col4_5; -insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -col6 col1 col3 fourth col4 col5 col7 col8 -0 0 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 -1 103 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 -2 104 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 -drop table t1; -CREATE TABLE t1 ( -a INT NOT NULL, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412); -ALTER TABLE t1 ADD COLUMN c int not null; -select * from t1 order by a; -a b c -9410 9412 0 -select * from t1 order by a; -a b c -9410 9412 0 -alter table t1 drop c; -select * from t1 order by a; -a b -9410 9412 -drop table t1; -select * from t1 order by a; -ERROR 42S02: Table 'test.t1' doesn't exist -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -a b -0 1 -17 18 -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -alter table t1 modify column a int not null auto_increment; -SET SQL_MODE=''; -select * from t1 order by a; -a b -0 1 -17 18 -INSERT INTO t1 VALUES (0,19),(20,21); -select * from t1 order by a; -a b -0 1 -17 18 -18 19 -20 21 -drop table t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -a b -0 1 -17 18 -alter table t1 add c int not null unique auto_increment; -select c from t1 order by c; -c -1 -2 -INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); -select c from t1 order by c; -c -1 -2 -3 -4 -5 -drop table t1; -create table t1 ( -ai bigint auto_increment, -c001 int(11) not null, -c002 int(11) not null, -c003 int(11) not null, -c004 int(11) not null, -c005 int(11) not null, -c006 int(11) not null, -c007 int(11) not null, -c008 int(11) not null, -c009 int(11) not null, -c010 int(11) not null, -c011 int(11) not null, -c012 int(11) not null, -c013 int(11) not null, -c014 int(11) not null, -c015 int(11) not null, -c016 int(11) not null, -c017 int(11) not null, -c018 int(11) not null, -c019 int(11) not null, -c020 int(11) not null, -c021 int(11) not null, -c022 int(11) not null, -c023 int(11) not null, -c024 int(11) not null, -c025 int(11) not null, -c026 int(11) not null, -c027 int(11) not null, -c028 int(11) not null, -c029 int(11) not null, -c030 int(11) not null, -c031 int(11) not null, -c032 int(11) not null, -c033 int(11) not null, -c034 int(11) not null, -c035 int(11) not null, -c036 int(11) not null, -c037 int(11) not null, -c038 int(11) not null, -c039 int(11) not null, -c040 int(11) not null, -c041 int(11) not null, -c042 int(11) not null, -c043 int(11) not null, -c044 int(11) not null, -c045 int(11) not null, -c046 int(11) not null, -c047 int(11) not null, -c048 int(11) not null, -c049 int(11) not null, -c050 int(11) not null, -c051 int(11) not null, -c052 int(11) not null, -c053 int(11) not null, -c054 int(11) not null, -c055 int(11) not null, -c056 int(11) not null, -c057 int(11) not null, -c058 int(11) not null, -c059 int(11) not null, -c060 int(11) not null, -c061 int(11) not null, -c062 int(11) not null, -c063 int(11) not null, -c064 int(11) not null, -c065 int(11) not null, -c066 int(11) not null, -c067 int(11) not null, -c068 int(11) not null, -c069 int(11) not null, -c070 int(11) not null, -c071 int(11) not null, -c072 int(11) not null, -c073 int(11) not null, -c074 int(11) not null, -c075 int(11) not null, -c076 int(11) not null, -c077 int(11) not null, -c078 int(11) not null, -c079 int(11) not null, -c080 int(11) not null, -c081 int(11) not null, -c082 int(11) not null, -c083 int(11) not null, -c084 int(11) not null, -c085 int(11) not null, -c086 int(11) not null, -c087 int(11) not null, -c088 int(11) not null, -c089 int(11) not null, -c090 int(11) not null, -c091 int(11) not null, -c092 int(11) not null, -c093 int(11) not null, -c094 int(11) not null, -c095 int(11) not null, -c096 int(11) not null, -c097 int(11) not null, -c098 int(11) not null, -c099 int(11) not null, -c100 int(11) not null, -c101 int(11) not null, -c102 int(11) not null, -c103 int(11) not null, -c104 int(11) not null, -c105 int(11) not null, -c106 int(11) not null, -c107 int(11) not null, -c108 int(11) not null, -c109 int(11) not null, -primary key (ai), -unique key tx1 (c002, c003, c004, c005)) engine=ndb; -create index tx2 -on t1 (c010, c011, c012, c013); -drop table t1; -CREATE TABLE t1 ( -auto int(5) unsigned NOT NULL auto_increment, -string char(10), -vstring varchar(10), -bin binary(2), -vbin varbinary(7), -tiny tinyint(4) DEFAULT '0' NOT NULL , -short smallint(6) DEFAULT '1' NOT NULL , -medium mediumint(8) DEFAULT '0' NOT NULL, -long_int int(11) DEFAULT '0' NOT NULL, -longlong bigint(13) DEFAULT '0' NOT NULL, -real_float float(13,1) DEFAULT 0.0 NOT NULL, -real_double double(16,4), -real_decimal decimal(16,4), -utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, -ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, -umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, -ulong int(11) unsigned DEFAULT '0' NOT NULL, -ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, -bits bit(3), -options enum('zero','one','two','three','four') not null, -flags set('zero','one','two','three','four') not null, -date_field date, -year_field year, -time_field time, -date_time datetime, -time_stamp timestamp, -PRIMARY KEY (auto) -) engine=ndb; -CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255)); -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; -alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; -no_copy -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; -create index i1 on t1(medium); -alter table t1 add index i2(new_tiny); -drop index i1 on t1; -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; -no_copy -no_copy -DROP TABLE t1, ndb_show_tables; -create table t1 (a int primary key auto_increment, b int) engine=ndb; -insert into t1 (b) values (101),(102),(103); -select * from t1 where a = 3; -a b -3 103 -alter table t1 rename t2; -insert into t2 (b) values (201),(202),(203); -select * from t2 where a = 6; -a b -6 203 -alter table t2 add c int; -insert into t2 (b) values (301),(302),(303); -select * from t2 where a = 9; -a b c -9 303 NULL -alter table t2 rename t1; -insert into t1 (b) values (401),(402),(403); -select * from t1 where a = 12; -a b c -12 403 NULL -drop table t1; -create table t1(a int not null) engine=ndb; -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY($PK) - UniqueHashIndex -insert into t1 values (1),(2),(3); -alter table t1 add primary key (a); -a Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY(a) - UniqueHashIndex -PRIMARY(a) - OrderedIndex -update t1 set a = 17 where a = 1; -select * from t1 order by a; -a -2 -3 -17 -alter table t1 drop primary key; -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY($PK) - UniqueHashIndex -update t1 set a = 1 where a = 17; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1(a int not null) engine=ndb; -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY($PK) - UniqueHashIndex -insert into t1 values (1),(2),(3); -create unique index pk on t1(a); -a Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY(a) - UniqueHashIndex -update t1 set a = 17 where a = 1; -select * from t1 order by a; -a -2 -3 -17 -alter table t1 drop index pk; -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -PRIMARY KEY($PK) - UniqueHashIndex -update t1 set a = 1 where a = 17; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) NOT NULL DEFAULT '0', - `c` varchar(254) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -alter table t1 alter b set default 1; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) NOT NULL DEFAULT '1', - `c` varchar(254) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -drop table t1; -create table t1 (a int not null, b int not null) engine=ndb; -insert into t1 values (1, 300), (2, 200), (3, 100); -select * from t1 order by a; -a b -1 300 -2 200 -3 100 -alter table t1 order by b; -select * from t1 order by b; -a b -3 100 -2 200 -1 300 -drop table t1; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_alter_table2.result b/mysql-test/suite/ndb/r/ndb_alter_table2.result deleted file mode 100644 index 3783c76447c..00000000000 --- a/mysql-test/suite/ndb/r/ndb_alter_table2.result +++ /dev/null @@ -1,41 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL -) ENGINE=ndbcluster; -BEGIN; -INSERT INTO t1 VALUES (9410,9412); -BEGIN; -INSERT INTO t1 VALUES (9411,9412); -BEGIN; -INSERT INTO t1 VALUES (9412,9412); -BEGIN; -INSERT INTO t1 VALUES (9413,9412); -BEGIN; -INSERT INTO t1 VALUES (9414,9412); -BEGIN; -INSERT INTO t1 VALUES (9415,9412); -ROLLBACK; -ROLLBACK; -ROLLBACK; -ROLLBACK; -ROLLBACK; -ROLLBACK; -drop table t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL, -c INT NOT NULL -) ENGINE=ndbcluster; -select * from t1; -select * from t1; -a b c -select * from t1; -a b c -select * from t1; -a b c -select * from t1; -a b c -select * from t1; -a b c -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_alter_table3.result b/mysql-test/suite/ndb/r/ndb_alter_table3.result deleted file mode 100644 index bf80d95bf82..00000000000 --- a/mysql-test/suite/ndb/r/ndb_alter_table3.result +++ /dev/null @@ -1,35 +0,0 @@ -DROP TABLE IF EXISTS t1; -create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -engine=ndb; -insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -create index c on t1(c); -show indexes from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 0 PRIMARY 1 a A 3 NULL NULL BTREE -t1 1 b 1 b A 3 NULL NULL YES BTREE -t1 1 c 1 c A 3 NULL NULL YES BTREE -select * from t1 where c = 'two'; -a b c -2 two two -alter table t1 drop index c; -show indexes from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 0 PRIMARY 1 a A 3 NULL NULL BTREE -t1 1 b 1 b A 3 NULL NULL YES BTREE -select * from t1 where c = 'two'; -a b c -2 two two -drop table t1; -create table t3 (a int primary key) engine=ndbcluster; -begin; -insert into t3 values (1); -alter table t3 rename t4; -commit; -select * from t3; -ERROR 42S02: Table 'test.t3' doesn't exist -select * from t4; -a -1 -drop table t4; -show tables; -Tables_in_test diff --git a/mysql-test/suite/ndb/r/ndb_auto_increment.result b/mysql-test/suite/ndb/r/ndb_auto_increment.result deleted file mode 100644 index 78612b35113..00000000000 --- a/mysql-test/suite/ndb/r/ndb_auto_increment.result +++ /dev/null @@ -1,445 +0,0 @@ -DROP TABLE IF EXISTS t1,t2; -DROP TABLE IF EXISTS t1; -set @old_auto_increment_offset = @@session.auto_increment_offset; -set @old_auto_increment_increment = @@session.auto_increment_increment; -set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz; -flush status; -create table t1 (a int not null auto_increment primary key) engine ndb; -insert into t1 values (NULL); -select * from t1 order by a; -a -1 -update t1 set a = 5 where a = 1; -insert into t1 values (NULL); -select * from t1 order by a; -a -5 -6 -insert into t1 values (7); -insert into t1 values (NULL); -select * from t1 order by a; -a -5 -6 -7 -8 -insert into t1 values (2); -insert into t1 values (NULL); -select * from t1 order by a; -a -2 -5 -6 -7 -8 -9 -update t1 set a = 4 where a = 2; -insert into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -10 -delete from t1 where a = 10; -insert into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -replace t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -replace t1 values (15); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -replace into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -16 -replace t1 values (15); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -16 -insert ignore into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -16 -17 -insert ignore into t1 values (15), (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -15 -16 -17 -18 -insert into t1 values (15) -on duplicate key update a = 20; -insert into t1 values (NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -16 -17 -18 -20 -21 -insert into t1 values (NULL) on duplicate key update a = 30; -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -16 -17 -18 -20 -21 -22 -insert into t1 values (30) on duplicate key update a = 40; -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -16 -17 -18 -20 -21 -22 -30 -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); -select * from t1 order by a; -a -4 -5 -6 -7 -8 -9 -11 -12 -16 -17 -18 -20 -21 -22 -30 -600 -601 -602 -610 -611 -drop table t1; -create table t1 (a int not null primary key, -b int not null unique auto_increment) engine ndb; -insert into t1 values (1, NULL); -insert into t1 values (3, NULL); -update t1 set b = 3 where a = 3; -insert into t1 values (4, NULL); -select * from t1 order by a; -a b -1 1 -3 3 -4 4 -drop table t1; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -1 1 0 -11 2 1 -21 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_offset=5; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -SELECT * FROM t1 ORDER BY pk; -pk b c -5 1 0 -15 2 1 -25 3 2 -27 4 3 -35 5 4 -99 6 5 -105 7 6 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -7 -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_increment=2; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -1 1 0 -3 2 1 -5 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -7 1 0 -8 2 1 -9 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 3; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -5 1 0 -15 2 1 -25 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -15 1 0 -25 2 1 -35 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 5; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -5 1 0 -15 2 1 -25 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 100; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -105 1 0 -115 2 1 -125 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -set ndb_autoincrement_prefetch_sz = 32; -drop table if exists t1; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -set ndb_autoincrement_prefetch_sz = 32; -create table t1 (a int not null auto_increment primary key) engine ndb; -insert into t1 values (NULL); -insert into t1 values (NULL); -select * from t1 order by a; -a -1 -33 -insert into t1 values (20); -insert into t1 values (NULL); -select * from t1 order by a; -a -1 -20 -33 -34 -insert into t1 values (35); -insert into t1 values (NULL); -insert into t1 values (NULL); -ERROR 23000: Duplicate entry '35' for key 'PRIMARY' -select * from t1 order by a; -a -1 -20 -33 -34 -35 -65 -insert into t1 values (100); -insert into t1 values (NULL); -insert into t1 values (NULL); -select * from t1 order by a; -a -1 -20 -33 -34 -35 -65 -66 -100 -101 -set auto_increment_offset = @old_auto_increment_offset; -set auto_increment_increment = @old_auto_increment_increment; -set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_autoinc.result b/mysql-test/suite/ndb/r/ndb_autoinc.result deleted file mode 100644 index fe9d36393ad..00000000000 --- a/mysql-test/suite/ndb/r/ndb_autoinc.result +++ /dev/null @@ -1,37 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3; -USE test; -CREATE TABLE t1 ( -id INT AUTO_INCREMENT, -PRIMARY KEY(id) -) ENGINE=NDBCLUSTER; -CREATE TABLE t2 ( -id INT AUTO_INCREMENT, -KEY(id) -) ENGINE=NDBCLUSTER; -ERROR HY000: Can't create table 'test.t2' (errno: 4335) -SHOW TABLES; -Tables_in_test -t1 -CREATE TABLE t3 ( -id INT AUTO_INCREMENT, -KEY(id) -) ENGINE=MYISAM; -ALTER TABLE t3 -ENGINE NDBCLUSTER; -SHOW CREATE TABLE t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -ALTER TABLE t3 -ADD PRIMARY KEY (id); -SHOW CREATE TABLE t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE t1, t3; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_basic.result b/mysql-test/suite/ndb/r/ndb_basic.result deleted file mode 100644 index 8cb86fb4c2b..00000000000 --- a/mysql-test/suite/ndb/r/ndb_basic.result +++ /dev/null @@ -1,930 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10) -) ENGINE=ndbcluster; -drop table t1; -SHOW GLOBAL STATUS LIKE 'ndb%'; -Variable_name Value -Ndb_cluster_node_id # -Ndb_config_from_host # -Ndb_config_from_port # -Ndb_number_of_data_nodes # -SHOW GLOBAL VARIABLES LIKE 'ndb%'; -Variable_name Value -ndb_autoincrement_prefetch_sz # -ndb_cache_check_time # -ndb_connectstring # -ndb_distribution # -ndb_extra_logging # -ndb_force_send # -ndb_index_stat_cache_entries # -ndb_index_stat_enable # -ndb_index_stat_update_freq # -ndb_mgmd_host # -ndb_nodeid # -ndb_optimized_node_selection # -ndb_report_thresh_binlog_epoch_slip # -ndb_report_thresh_binlog_mem_usage # -ndb_use_copying_alter_table # -ndb_use_exact_count # -ndb_use_transactions # -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10) -) ENGINE=ndbcluster; -SHOW INDEX FROM t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 0 PRIMARY 1 pk1 A 0 NULL NULL BTREE -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -SHOW INDEX FROM t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 0 PRIMARY 1 pk1 A 2 NULL NULL BTREE -SELECT pk1 FROM t1 ORDER BY pk1; -pk1 -9410 -9411 -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -9410 9412 NULL 9412 -9411 9413 17 9413 -SELECT t1.* FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -9410 9412 NULL 9412 -9411 9413 17 9413 -UPDATE t1 SET attr1=1 WHERE pk1=9410; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -9410 1 NULL 9412 -9411 9413 17 9413 -UPDATE t1 SET pk1=2 WHERE attr1=1; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -2 1 NULL 9412 -9411 9413 17 9413 -UPDATE t1 SET pk1=pk1 + 1; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -3 1 NULL 9412 -9412 9413 17 9413 -UPDATE t1 SET pk1=4 WHERE pk1 = 3; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -4 1 NULL 9412 -9412 9413 17 9413 -DELETE FROM t1; -SELECT * FROM t1; -pk1 attr1 attr2 attr3 -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), -(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); -UPDATE t1 SET attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9999 NULL NULL -8 9999 NULL NULL -9 9999 NULL NULL -10 9999 NULL NULL -11 9999 NULL NULL -12 9999 NULL NULL -13 9999 NULL NULL -9408 9999 NULL 8765 -9410 9999 NULL 9412 -UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9998 NULL NULL -8 9998 NULL NULL -9 9998 NULL NULL -10 9998 NULL NULL -11 9998 NULL NULL -12 9998 NULL NULL -13 9998 NULL NULL -9408 9999 NULL 8765 -9410 9999 NULL 9412 -UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9998 NULL NULL -8 9998 NULL NULL -9 9998 NULL NULL -10 9998 NULL NULL -11 9998 NULL NULL -12 9998 NULL NULL -13 9998 NULL NULL -9408 9997 NULL 8765 -9410 9997 NULL 9412 -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9998 NULL NULL -8 9998 NULL NULL -9 9998 NULL NULL -10 9998 NULL NULL -11 9998 NULL NULL -12 9998 NULL NULL -13 9998 NULL NULL -9408 9997 NULL 8765 -DELETE FROM t1; -SELECT * FROM t1; -pk1 attr1 attr2 attr3 -INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); -DELETE FROM t1 WHERE attr1=4; -SELECT * FROM t1 order by pk1; -pk1 attr1 attr2 attr3 -3 5 NULL NULL -5 5 NULL NULL -DELETE FROM t1; -INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1; -pk1 attr1 attr2 attr3 -9411 9413 NULL NULL -DROP TABLE t1; -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -INSERT INTO t1 values(3456, 7890); -SELECT * FROM t1; -id id2 -3456 7890 -UPDATE t1 SET id=2 WHERE id2=12; -SELECT * FROM t1; -id id2 -3456 7890 -UPDATE t1 SET id=1234 WHERE id2=7890; -SELECT * FROM t1; -id id2 -1234 7890 -DELETE FROM t1; -INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); -SELECT * FROM t1 ORDER BY id; -id id2 -3454 7890 -3456 7890 -3456 7890 -3456 7890 -DELETE FROM t1 WHERE id = 3456; -SELECT * FROM t1 ORDER BY id; -id id2 -3454 7890 -DROP TABLE t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=NDBCLUSTER; -INSERT INTO t1 values(1, 9999); -DROP TABLE t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=NDB; -INSERT INTO t1 values(1, 9999); -DROP TABLE t1; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -CREATE TABLE t3 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned, -PRIMARY KEY(a) -) engine=ndbcluster; -CREATE TABLE t4 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned NOT NULL, -d int unsigned, -PRIMARY KEY(a, b, c) -) engine=ndbcluster; -select * from t2 where a = 7 order by b; -a b c -7 16 5 -select * from t2 where a = 7 order by a; -a b c -7 16 5 -select * from t2 where a = 7 order by 2; -a b c -7 16 5 -select * from t2 where a = 7 order by c; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 order by b; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 order by a; -a b c -7 16 5 -select * from t2 where a = 7 and b = 17 order by a; -a b c -select * from t2 where a = 7 and b != 16 order by b; -a b c -select * from t2 where a = 7 and b = 16 and c = 5 order by b; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 and c = 5 order by a; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 and c = 6 order by a; -a b c -select * from t2 where a = 7 and b != 16 and c = 5 order by b; -a b c -select * from t3 where a = 7 order by b; -a b c -7 16 5 -select * from t3 where a = 7 order by a; -a b c -7 16 5 -select * from t3 where a = 7 order by 2; -a b c -7 16 5 -select * from t3 where a = 7 order by c; -a b c -7 16 5 -select * from t3 where a = 7 and b = 16 order by b; -a b c -7 16 5 -select * from t3 where a = 7 and b = 16 order by a; -a b c -7 16 5 -select * from t3 where a = 7 and b = 17 order by a; -a b c -select * from t3 where a = 7 and b != 16 order by b; -a b c -select * from t4 where a = 7 order by b; -a b c d -7 16 5 26007 -select * from t4 where a = 7 order by a; -a b c d -7 16 5 26007 -select * from t4 where a = 7 order by 2; -a b c d -7 16 5 26007 -select * from t4 where a = 7 order by c; -a b c d -7 16 5 26007 -select * from t4 where a = 7 and b = 16 order by b; -a b c d -7 16 5 26007 -select * from t4 where a = 7 and b = 16 order by a; -a b c d -7 16 5 26007 -select * from t4 where a = 7 and b = 17 order by a; -a b c d -select * from t4 where a = 7 and b != 16 order by b; -a b c d -delete from t2 where a > 5; -select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; -a b -1 10 -3 12 -5 14 -select a, b FROM t2 outer_table where -a = (select a from t2 where b = outer_table.b ) order by a; -a b -1 10 -3 12 -5 14 -delete from t2; -delete from t3; -delete from t4; -drop table t2; -drop table t3; -drop table t4; -CREATE TABLE t5 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned NOT NULL, -d int unsigned, -PRIMARY KEY(a, b, c) -) engine=ndbcluster; -insert into t5 values(10, 19, 5, 26010); -delete from t5 where a=10 and b=19 and c=5; -select * from t5; -a b c d -insert into t5 values(10, 19, 5, 26010); -update t5 set d=21997 where a=10 and b=19 and c=5; -select * from t5; -a b c d -10 19 5 21997 -delete from t5; -drop table t5; -CREATE TABLE t6 ( -adress char(255), -a int NOT NULL PRIMARY KEY, -b int -) engine = NDB; -insert into t6 values -("Nice road 3456", 1, 23), -("Street Road 78", 3, 92), -("Road street 89C", 5, 71), -(NULL, 7, NULL); -select * from t6 order by a; -adress a b -Nice road 3456 1 23 -Street Road 78 3 92 -Road street 89C 5 71 -NULL 7 NULL -select a, b from t6 order by a; -a b -1 23 -3 92 -5 71 -7 NULL -update t6 set adress="End of road 09" where a=3; -update t6 set b=181, adress="Street 76" where a=7; -select * from t6 order by a; -adress a b -Nice road 3456 1 23 -End of road 09 3 92 -Road street 89C 5 71 -Street 76 7 181 -select * from t6 where a=1; -adress a b -Nice road 3456 1 23 -delete from t6 where a=1; -select * from t6 order by a; -adress a b -End of road 09 3 92 -Road street 89C 5 71 -Street 76 7 181 -delete from t6 where b=71; -select * from t6 order by a; -adress a b -End of road 09 3 92 -Street 76 7 181 -drop table t6; -CREATE TABLE t7 ( -adress char(255), -a int NOT NULL, -b int, -c int NOT NULL, -PRIMARY KEY(a, c) -) engine = NDB; -insert into t7 values -("Highway 3456", 1, 23, 2), -("Street Road 78", 3, 92, 3), -("Main street 89C", 5, 71, 4), -(NULL, 8, NULL, 12); -select * from t7 order by a; -adress a b c -Highway 3456 1 23 2 -Street Road 78 3 92 3 -Main street 89C 5 71 4 -NULL 8 NULL 12 -select a, b from t7 order by a; -a b -1 23 -3 92 -5 71 -8 NULL -update t7 set adress="End of road 09" where a=3; -update t7 set adress="Gatuvägen 90C" where a=5 and c=4; -update t7 set adress="No adress" where adress is NULL; -select * from t7 order by a; -adress a b c -Highway 3456 1 23 2 -End of road 09 3 92 3 -Gatuvägen 90C 5 71 4 -No adress 8 NULL 12 -select * from t7 where a=1 and c=2; -adress a b c -Highway 3456 1 23 2 -delete from t7 where a=1; -delete from t7 where a=3 and c=3; -delete from t7 where a=5 and c=4; -select * from t7; -adress a b c -No adress 8 NULL 12 -delete from t7 where b=23; -select * from t7; -adress a b c -No adress 8 NULL 12 -drop table t7; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -create database mysqltest; -use mysqltest; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -insert into t2 select pk1,attr1,attr2 from test.t1; -select * from t2 order by a; -a b c -9410 9412 NULL -9411 9413 17 -select b from test.t1, t2 where c = test.t1.attr2; -b -9413 -select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; -b attr1 -9413 9412 -drop table test.t1, t2; -drop database mysqltest; -drop database if exists ndbtest1; -create database ndbtest1; -use ndbtest1; -create table t1(id int) engine=ndbcluster; -drop database ndbtest1; -drop database ndbtest1; -ERROR HY000: Can't drop database 'ndbtest1'; database doesn't exist -use test; -create table t1 (a int primary key, b char(0)); -insert into t1 values (1,""); -insert into t1 values (2,NULL); -select * from t1 order by a; -a b -1 -2 NULL -select * from t1 order by b; -a b -2 NULL -1 -select * from t1 where b IS NULL; -a b -2 NULL -select * from t1 where b IS NOT NULL; -a b -1 -drop table t1; -create table t1 ( -c1 int, -c2 int, -c3 int, -c4 int, -c5 int, -c6 int, -c7 int, -c8 int, -c9 int, -c10 int, -c11 int, -c12 int, -c13 int, -c14 int, -c15 int, -c16 int, -c17 int, -c18 int, -c19 int, -c20 int, -c21 int, -c22 int, -c23 int, -c24 int, -c25 int, -c26 int, -c27 int, -c28 int, -c29 int, -c30 int, -c31 int, -c32 int, -c33 int, -c34 int, -c35 int, -c36 int, -c37 int, -c38 int, -c39 int, -c40 int, -c41 int, -c42 int, -c43 int, -c44 int, -c45 int, -c46 int, -c47 int, -c48 int, -c49 int, -c50 int, -c51 int, -c52 int, -c53 int, -c54 int, -c55 int, -c56 int, -c57 int, -c58 int, -c59 int, -c60 int, -c61 int, -c62 int, -c63 int, -c64 int, -c65 int, -c66 int, -c67 int, -c68 int, -c69 int, -c70 int, -c71 int, -c72 int, -c73 int, -c74 int, -c75 int, -c76 int, -c77 int, -c78 int, -c79 int, -c80 int, -c81 int, -c82 int, -c83 int, -c84 int, -c85 int, -c86 int, -c87 int, -c88 int, -c89 int, -c90 int, -c91 int, -c92 int, -c93 int, -c94 int, -c95 int, -c96 int, -c97 int, -c98 int, -c99 int, -c100 int, -c101 int, -c102 int, -c103 int, -c104 int, -c105 int, -c106 int, -c107 int, -c108 int, -c109 int, -c110 int, -c111 int, -c112 int, -c113 int, -c114 int, -c115 int, -c116 int, -c117 int, -c118 int, -c119 int, -c120 int, -c121 int, -c122 int, -c123 int, -c124 int, -c125 int, -c126 int, -c127 int, -c128 int, -primary key using hash(c1)) engine=ndb partition by key(c1); -drop table t1; -create table t1 ( -a1234567890123456789012345678901234567890 int primary key, -a12345678901234567890123456789a1234567890 int, -index(a12345678901234567890123456789a1234567890) -) engine=ndb; -show tables; -Tables_in_test -t1 -insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); -explain select * from t1 where a12345678901234567890123456789a1234567890=2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a12345678901234567890123456789a1234567890 a12345678901234567890123456789a1234567890 5 const # Using where with pushed condition -select * from t1 where a12345678901234567890123456789a1234567890=2; -a1234567890123456789012345678901234567890 a12345678901234567890123456789a1234567890 -5 2 -drop table t1; -create table t1 -(a bigint, b bigint, c bigint, d bigint, -primary key (a,b,c,d)) -engine=ndb -max_rows=800000000; -Warnings: -Warning 1105 Ndb might have problems storing the max amount of rows specified -insert into t1 values -(1,2,3,4),(2,3,4,5),(3,4,5,6), -(3,2,3,4),(1,3,4,5),(2,4,5,6), -(1,2,3,5),(2,3,4,8),(3,4,5,9), -(3,2,3,5),(1,3,4,8),(2,4,5,9), -(1,2,3,6),(2,3,4,6),(3,4,5,7), -(3,2,3,6),(1,3,4,6),(2,4,5,7), -(1,2,3,7),(2,3,4,7),(3,4,5,8), -(3,2,3,7),(1,3,4,7),(2,4,5,8), -(1,3,3,4),(2,4,4,5),(3,5,5,6), -(3,3,3,4),(1,4,4,5),(2,5,5,6), -(1,3,3,5),(2,4,4,8),(3,5,5,9), -(3,3,3,5),(1,4,4,8),(2,5,5,9), -(1,3,3,6),(2,4,4,6),(3,5,5,7), -(3,3,3,6),(1,4,4,6),(2,5,5,7), -(1,3,3,7),(2,4,4,7),(3,5,5,8), -(3,3,3,7),(1,4,4,7),(2,5,5,8); -select count(*) from t1; -count(*) -48 -drop table t1; -create table t1 -(a bigint, b bigint, c bigint, d bigint, -primary key (a)) -engine=ndb -max_rows=1; -drop table t1; -create table t1 -(counter int(64) NOT NULL auto_increment, -datavalue char(40) default 'XXXX', -primary key (counter) -) ENGINE=ndbcluster; -insert into t1 (datavalue) values ('newval'); -insert into t1 (datavalue) values ('newval'); -select * from t1 order by counter; -counter datavalue -1 newval -2 newval -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -counter datavalue -1 newval -2 newval -3 newval -4 newval -5 newval -6 newval -7 newval -8 newval -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -counter datavalue -1 newval -2 newval -3 newval -4 newval -5 newval -6 newval -7 newval -8 newval -9 newval -10 newval -11 newval -12 newval -13 newval -14 newval -15 newval -16 newval -17 newval -18 newval -19 newval -20 newval -21 newval -22 newval -23 newval -24 newval -25 newval -26 newval -27 newval -28 newval -29 newval -30 newval -31 newval -32 newval -drop table t1; -create table t1 (a int primary key auto_increment) engine = ndb; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -insert into t1(a) values (20),(28); -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -insert into t1() values (21), (22); -drop table t1; -CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; -select * from t1; -b -drop table t1; -create table t1 (a int) engine=ndb; -create table t2 (a int) engine=ndb; -insert into t1 values (1); -insert into t2 values (1); -delete t1.* from t1, t2 where t1.a = t2.a; -select * from t1; -a -select * from t2; -a -1 -drop table t1; -drop table t2; -CREATE TABLE t1 ( -i INT, -j INT, -x INT, -y INT, -z INT -) engine=ndb; -CREATE TABLE t2 ( -i INT, -k INT, -x INT, -y INT, -z INT -) engine=ndb; -CREATE TABLE t3 ( -j INT, -k INT, -x INT, -y INT, -z INT -) engine=ndb; -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); -UPDATE t1 AS a -INNER JOIN t2 AS b -ON a.i = b.i -INNER JOIN t3 AS c -ON a.j = c.j AND b.k = c.k -SET a.x = b.x, -a.y = b.y, -a.z = ( -SELECT sum(z) -FROM t3 -WHERE y = 34 -) -WHERE b.x = 23; -select * from t1; -i j x y z -1 2 23 24 71 -drop table t1; -drop table t2; -drop table t3; -create table atablewithareallylongandirritatingname (a int); -insert into atablewithareallylongandirritatingname values (2); -select * from atablewithareallylongandirritatingname; -a -2 -drop table atablewithareallylongandirritatingname; -create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; -insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from t1 order by f1; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -select * from t1 order by f2; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -select * from t1 order by f3; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -drop table t1; -Illegal ndb error code: 1186 -MySQL error code 1186 (ER_FLUSH_MASTER_BINLOG_CLOSED): Binlog closed, cannot RESET MASTER -CREATE TABLE t1 ( -a VARBINARY(40) NOT NULL, -b VARCHAR (256) CHARACTER SET UTF8 NOT NULL, -c VARCHAR(256) CHARACTER SET UTF8 NOT NULL, -PRIMARY KEY (b,c)) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc"); -SELECT * FROM t1 ORDER BY a; -a b c -a ab abc -b abc abcd -c abc ab -d ab ab -e abc abc -DROP TABLE t1; -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t2 values (1,10), (2,20), (3,30); -select * from t1 order by a; -a b -1 10 -2 20 -3 30 -delete from t1 where a > 0 order by a desc limit 1; -select * from t1 order by a; -a b -1 10 -2 20 -delete from t1,t2 using t1,t2 where t1.a = t2.a; -select * from t2 order by a; -a b -3 30 -drop table t1,t2; -create table t1 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t1 set a=1, b=100; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -insert ignore into t1 set a=1, b=100; -select * from t1 order by a; -a b -1 10 -2 20 -3 30 -insert into t1 set a=1, b=1000 on duplicate key update b=b+1; -select * from t1 order by a; -a b -1 11 -2 20 -3 30 -drop table t1; -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,10), (2,10), (3,30), (4, 30); -insert into t2 values (1,10), (2,10), (3,30), (4, 30); -update t1 set a = 1 where a = 3; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 30 -update t1 set b = 1 where a > 1 order by a desc limit 1; -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 1 -update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 1 -update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 1 -drop table t1,t2; -create table t1 (a varchar(100) primary key, b varchar(100)) engine = NDB; -insert into t1 values -('a', 'a'),('b','b'),('c', 'c'),('aa', 'aa'),('bb', 'bb'),('cc', 'cc'); -replace into t1 values ('a', '-a'); -replace into t1 values ('b', '-b'); -replace into t1 values ('c', '-c'); -replace into t1 values ('aa', '-aa'); -replace into t1 values ('bb', '-bb'); -replace into t1 values ('cc', '-cc'); -replace into t1 values ('aaa', '-aaa'); -replace into t1 values ('bbb', '-bbb'); -replace into t1 values ('ccc', '-ccc'); -select * from t1 order by 1,2; -a b -a -a -aa -aa -aaa -aaa -b -b -bb -bb -bbb -bbb -c -c -cc -cc -ccc -ccc -drop table t1; -End of 5.0 tests -CREATE TABLE t1 (a VARCHAR(255) NOT NULL, -CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; -CREATE TABLE t2(a VARCHAR(255) NOT NULL, -b VARCHAR(255) NOT NULL, -c VARCHAR(255) NOT NULL, -CONSTRAINT pk_b_c_id PRIMARY KEY (b,c), -CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb; -drop table t1, t2; -create table t1 (a int not null primary key, b int) engine=ndb; -insert into t1 values(1,1),(2,2),(3,3); -create table t2 like t1; -insert into t2 select * from t1; -select * from t1 order by a; -a b -1 1 -2 2 -3 3 -select * from t2 order by a; -a b -1 1 -2 2 -3 3 -drop table t1, t2; -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table t2 like t1; -rename table t1 to t10, t2 to t20; -drop table t10,t20; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_binlog_basic.result b/mysql-test/suite/ndb/r/ndb_binlog_basic.result deleted file mode 100644 index 09edd78bdb3..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_basic.result +++ /dev/null @@ -1,48 +0,0 @@ -drop table if exists t1, t2; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -drop database mysqltest; -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; -@max_epoch:=max(epoch)-1 -# -delete from t1; -alter table t1 add (b int); -insert into t1 values (3,3),(4,4); -alter table t1 rename t2; -begin; -insert into t2 values (1,1),(2,2); -update t2 set b=1 where a=3; -delete from t2 where a=4; -commit; -drop table t2; -select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5; -inserts -10 -select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5; -deletes -10 -select inserts,updates,deletes from -mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0; -inserts updates deletes -2 1 1 -flush logs; -purge master logs before now(); -create table t1 (a int primary key, b int) engine=ndb; -create database mysqltest; -use mysqltest; -create table t1 (c int, d int primary key) engine=ndb; -use test; -insert into mysqltest.t1 values (2,1),(2,2); -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; -@max_epoch:=max(epoch)-1 -# -drop table t1; -drop database mysqltest; -select inserts,updates,deletes from -mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0; -inserts updates deletes -2 0 0 diff --git a/mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result b/mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result deleted file mode 100644 index e3792f8272d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result +++ /dev/null @@ -1,196 +0,0 @@ -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -reset master; -reset master; -create database mysqltest; -use mysqltest; -create table t1 (a int primary key) engine=ndb; -create table t2 (a int primary key) engine=ndb; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # create database mysqltest -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t1 (a int primary key) engine=ndb -mysqld-bin.000001 # Query 2 # use `test`; create table t2 (a int primary key) engine=ndb -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # create database mysqltest -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t1 (a int primary key) engine=ndb -mysqld-bin.000001 # Query 2 # use `test`; create table t2 (a int primary key) engine=ndb -reset master; -reset master; -alter table t2 add column (b int); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; alter table t2 add column (b int) -reset master; -reset master; -ALTER DATABASE mysqltest CHARACTER SET latin1; -drop table mysqltest.t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # ALTER DATABASE mysqltest CHARACTER SET latin1 -mysqld-bin.000001 # Query 2 # use `mysqltest`; drop table `t1` -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # ALTER DATABASE mysqltest CHARACTER SET latin1 -mysqld-bin.000001 # Query 2 # use `mysqltest`; drop table `t1` -reset master; -reset master; -use test; -insert into t2 values (1,2); -drop database mysqltest; -create table t1 (a int primary key) engine=ndb; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 1 # drop database mysqltest -mysqld-bin.000001 # Query 1 # use `test`; create table t1 (a int primary key) engine=ndb -drop table t2; -reset master; -reset master; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 -ENGINE = NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB -mysqld-bin.000001 # Query 1 # DROP TABLESPACE ts1 -ENGINE = NDB -mysqld-bin.000001 # Query 1 # DROP LOGFILE GROUP lg1 -ENGINE =NDB -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB -mysqld-bin.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB -mysqld-bin.000001 # Query 1 # DROP TABLESPACE ts1 -ENGINE = NDB -mysqld-bin.000001 # Query 1 # DROP LOGFILE GROUP lg1 -ENGINE =NDB -drop table t1; -reset master; -show tables; -Tables_in_test -reset master; -show tables; -Tables_in_test -create table t1 (a int key) engine=ndb; -create table t2 (a int key) engine=ndb; -create table t3 (a int key) engine=ndb; -rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # use `test`; create table t1 (a int key) engine=ndb -mysqld-bin.000001 # Query 1 # use `test`; create table t2 (a int key) engine=ndb -mysqld-bin.000001 # Query 1 # use `test`; create table t3 (a int key) engine=ndb -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t3` to `test.t4` -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t2` to `test.t3` -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t1` to `test.t2` -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t4` to `test.t1` -drop table t1; -drop table t2; -drop table t3; -reset master; -show tables; -Tables_in_test -reset master; -show tables; -Tables_in_test -create table t1 (a int key) engine=ndb; -insert into t1 values(1); -rename table t1 to t2; -insert into t2 values(2); -drop table t2; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # use `test`; create table t1 (a int key) engine=ndb -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 1 # use `test`; rename table `test.t1` to `test.t2` -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 2 # use `test`; DROP TABLE `t2` /* generated by server */ diff --git a/mysql-test/suite/ndb/r/ndb_binlog_discover.result b/mysql-test/suite/ndb/r/ndb_binlog_discover.result deleted file mode 100644 index f8704971878..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_discover.result +++ /dev/null @@ -1,17 +0,0 @@ -drop table if exists t1; -create table t1 (a int key) engine=ndb; -reset master; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Incident 1 # #1 (LOST_EVENTS) -mysqld-bin.000001 # Rotate 1 # mysqld-bin.000002;pos=4 -PURGE MASTER LOGS TO 'mysqld-bin.000002'; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000002 # Query 1 # BEGIN -mysqld-bin.000002 # Table_map 1 # table_id: # (test.t1) -mysqld-bin.000002 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000002 # Write_rows 1 # table_id: # -mysqld-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000002 # Query 1 # COMMIT -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_format.result b/mysql-test/suite/ndb/r/ndb_binlog_format.result deleted file mode 100644 index b6022b61746..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_format.result +++ /dev/null @@ -1,41 +0,0 @@ -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -drop table if exists t1, t2, t3; -CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM; -CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE; -CREATE TABLE t3 (e INT, f INT) ENGINE=NDB; -RESET MASTER; -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c; -START TRANSACTION; -INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them. -UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c; -COMMIT; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2) -mysqld-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f -mysqld-bin.000001 # Query # # COMMIT -mysqld-bin.000001 # Query # # BEGIN -mysqld-bin.000001 # Table_map # # table_id: # (test.t3) -mysqld-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query # # COMMIT -DROP TABLE t1, t2, t3; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result b/mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result deleted file mode 100644 index 423b9f71ac6..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result +++ /dev/null @@ -1,11 +0,0 @@ -reset master; -drop table if exists t1; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -create table t1 (a int primary key, b int) engine=ndb; -insert into t1 values (1, 1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ -drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_log_bin.result b/mysql-test/suite/ndb/r/ndb_binlog_log_bin.result deleted file mode 100644 index ab952430d2d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_log_bin.result +++ /dev/null @@ -1,80 +0,0 @@ -drop table if exists t1,t2,t3; -reset master; -drop table if exists t1,t2,t3; -reset master; -set SQL_LOG_BIN=0; -create database mysqltest; -use mysqltest; -create table t1 (a int key, b int) engine=ndb; -create table t2 (a int key, b int) engine=ndb; -insert into t1 values (1,1); -alter table t1 add c int; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # BEGIN -mysqld-bin.000001 # Table_map 1 # table_id: # (mysqltest.t1) -mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 1 # COMMIT -reset master; -use mysqltest; -insert into t2 values (1,1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (mysqltest.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (mysqltest.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -reset master; -use mysqltest; -drop table t1; -drop table t2; -create table t1 (d int key, e int) engine=ndb; -create table t2 (d int key, e int) engine=ndb; -insert into t1 values (1,1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # BEGIN -mysqld-bin.000001 # Table_map 1 # table_id: # (mysqltest.t2) -mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 1 # table_id: # -mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 1 # COMMIT -mysqld-bin.000001 # Query 1 # use `mysqltest`; DROP TABLE `t1` /* generated by server */ -mysqld-bin.000001 # Query 1 # use `mysqltest`; DROP TABLE `t2` /* generated by server */ -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t1 (d int key, e int) engine=ndb -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t2 (d int key, e int) engine=ndb -mysqld-bin.000001 # Query 1 # BEGIN -mysqld-bin.000001 # Table_map 1 # table_id: # (mysqltest.t1) -mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 1 # table_id: # -mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 1 # COMMIT -use mysqltest; -insert into t2 values (1,1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 1 # use `mysqltest`; drop table `t1` -mysqld-bin.000001 # Query 1 # use `mysqltest`; drop table `t2` -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t1 (d int key, e int) engine=ndb -mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t2 (d int key, e int) engine=ndb -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (mysqltest.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (mysqltest.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_multi.result b/mysql-test/suite/ndb/r/ndb_binlog_multi.result deleted file mode 100644 index 3fbb2660eb6..00000000000 --- a/mysql-test/suite/ndb/r/ndb_binlog_multi.result +++ /dev/null @@ -1,80 +0,0 @@ -drop table if exists t1,t2,t3; -drop table if exists t1,t2,t3; -CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; -DROP TABLE t3; -reset master; -reset master; -CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; -INSERT INTO t2 VALUES (1,1),(2,2); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t2) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -select * from t2 order by a; -a b -1 1 -2 2 -SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -@the_epoch:=epoch inserts updates deletes schemaops - 2 0 0 0 -SELECT * FROM t2 ORDER BY a; -a b -1 1 -2 2 -DROP TABLE t2; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB -mysqld-bin.000001 # Query 1 # BEGIN -mysqld-bin.000001 # Table_map 1 # table_id: # (test.t2) -mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 1 # table_id: # -mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 1 # COMMIT -mysqld-bin.000001 # Query 1 # use `test`; DROP TABLE `t2` /* generated by server */ -SELECT inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index WHERE epoch=; -inserts updates deletes schemaops -2 0 0 0 -reset master; -reset master; -CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; -INSERT INTO t1 VALUES (1),(2); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -@the_epoch2:=epoch inserts updates deletes schemaops - 2 0 0 0 -SELECT inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index WHERE epoch > AND epoch <= ; -inserts updates deletes schemaops -2 0 0 0 -drop table t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB -mysqld-bin.000001 # Query 2 # BEGIN -mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1) -mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -mysqld-bin.000001 # Write_rows 2 # table_id: # -mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F -mysqld-bin.000001 # Query 2 # COMMIT -mysqld-bin.000001 # Query 2 # use `test`; DROP TABLE `t1` /* generated by server */ -SELECT inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index WHERE epoch > AND epoch <= ; -inserts updates deletes schemaops -2 0 0 0 diff --git a/mysql-test/suite/ndb/r/ndb_bitfield.result b/mysql-test/suite/ndb/r/ndb_bitfield.result deleted file mode 100644 index 826f3a98348..00000000000 --- a/mysql-test/suite/ndb/r/ndb_bitfield.result +++ /dev/null @@ -1,224 +0,0 @@ -drop table if exists t1; -create table t1 ( -pk1 int not null primary key, -b bit(64) -) engine=ndbcluster; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` bit(64) DEFAULT NULL, - PRIMARY KEY (`pk1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -insert into t1 values -(0,b'1111111111111111111111111111111111111111111111111111111111111111'), -(1,b'1000000000000000000000000000000000000000000000000000000000000000'), -(2,b'0000000000000000000000000000000000000000000000000000000000000001'), -(3,b'1010101010101010101010101010101010101010101010101010101010101010'), -(4,b'0101010101010101010101010101010101010101010101010101010101010101'); -select hex(b) from t1 order by pk1; -hex(b) -FFFFFFFFFFFFFFFF -8000000000000000 -1 -AAAAAAAAAAAAAAAA -5555555555555555 -drop table t1; -create table t1 ( -pk1 int not null primary key, -b bit(9) -) engine=ndbcluster; -insert into t1 values -(0,b'000000000'), -(1,b'000000001'), -(2,b'000000010'), -(3,b'000000011'), -(4,b'000000100'); -select hex(b) from t1 order by pk1; -hex(b) -0 -1 -2 -3 -4 -update t1 set b = b + b'101010101'; -select hex(b) from t1 order by pk1; -hex(b) -155 -156 -157 -158 -159 -drop table t1; -create table t1 (a bit(7), b bit(9)) engine = ndbcluster; -insert into t1 values -(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), -(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), -(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), -(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), -(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), -(44, 307), (68, 454), (57, 135); -select a+0 from t1 order by a; -a+0 -0 -4 -5 -9 -23 -24 -28 -29 -30 -31 -34 -44 -49 -56 -57 -59 -60 -61 -68 -68 -75 -77 -78 -79 -87 -88 -94 -94 -104 -106 -108 -111 -116 -118 -119 -122 -123 -127 -select b+0 from t1 order by b; -b+0 -36 -42 -46 -67 -83 -118 -123 -133 -135 -152 -177 -178 -188 -202 -206 -245 -280 -307 -343 -345 -349 -351 -363 -368 -368 -379 -380 -390 -398 -399 -403 -411 -411 -438 -446 -454 -468 -499 -drop table t1; -create table t1 ( -dummyKey INTEGER NOT NULL, -a001 TINYINT, -a010 TINYINT, -a012 TINYINT, -a015 TINYINT, -a016 TINYINT, -a017 TINYINT, -a019 TINYINT, -a029 TINYINT, -a030 TINYINT, -a031 TINYINT, -a032 TINYINT, -a042 TINYINT, -a043 TINYINT, -a044 TINYINT, -a3001 TINYINT, -a3002 TINYINT, -a3003 TINYINT, -a3004 TINYINT, -a3005 TINYINT, -a3021 TINYINT, -a3022 TINYINT, -a BIT(6), -b BIT(6), -c BIT(6), -d TINYINT, -e TINYINT, -f TINYINT, -g TINYINT, -h TINYINT, -i TINYINT, -j TINYINT, -k TINYINT, -l TINYINT, -m TINYINT, -n TINYINT, -o TINYINT, -a034 TINYINT, -PRIMARY KEY USING HASH (dummyKey) ) engine=ndb; -INSERT INTO `t1` VALUES -(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1), -(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1), -(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1), -(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x01,0x3F,0x3E,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x02,0x00,0x3D,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x04,0x0F,0x3B,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x08,0x30,0x37,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x10,0x21,0x2F,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x20,0x12,0x1F,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x00,0x0C,0x3F,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x3F,0x00,0x00,4,5,5,5,5,5,5,5,5,5,3,2,1); -drop table t1; -create table t1 ( -pk1 bit(9) not null primary key, -b int -) engine=ndbcluster; -ERROR HY000: Can't create table 'test.t1' (errno: 906) -show warnings; -Level Code Message -Warning 1296 Got error 906 'Unsupported attribute type in index' from NDB -Error 1005 Can't create table 'test.t1' (errno: 906) -create table t1 ( -pk1 int not null primary key, -b bit(9), -key(b) -) engine=ndbcluster; -ERROR HY000: Can't create table 'test.t1' (errno: 906) -show warnings; -Level Code Message -Warning 1296 Got error 906 'Unsupported attribute type in index' from NDB -Error 1005 Can't create table 'test.t1' (errno: 906) -create table t1 ( -pk1 int primary key, -b bit(32) not null -) engine=ndbcluster; -insert into t1 values (1,1); -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_blob.result b/mysql-test/suite/ndb/r/ndb_blob.result deleted file mode 100644 index 31ce36864af..00000000000 --- a/mysql-test/suite/ndb/r/ndb_blob.result +++ /dev/null @@ -1,591 +0,0 @@ -drop table if exists t1; -drop database if exists test2; -set autocommit=0; -create table t1 ( -a int not null primary key, -b text not null, -c int not null, -d longblob, -key (c) -) engine=ndbcluster; -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -select length(@x0),length(@b1),length(@d1) from dual; -length(@x0) length(@b1) length(@d1) -256 2256 3000 -select length(@x0),length(@b2),length(@d2) from dual; -length(@x0) length(@b2) length(@d2) -256 20000 30000 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1 where a = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY PRIMARY 4 const # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -2 20000 b2 30000 dd2 -update t1 set b=@b2,d=@d2 where a=1; -update t1 set b=@b1,d=@d1 where a=2; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -1 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 2256 b1 3000 dd1 -update t1 set b=concat(b,b),d=concat(d,d) where a=1; -update t1 set b=concat(b,b),d=concat(d,d) where a=2; -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 40000 b2 60000 dd2 -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; -a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3) -2 4512 b1 6000 dd1 -update t1 set d=null where a=1; -commit; -select a from t1 where d is null; -a -1 -delete from t1 where a=45567; -commit; -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; -count(*) -0 -replace t1 set a=1,b=@b1,c=111,d=@d1; -replace t1 set a=2,b=@b2,c=222,d=@d2; -commit; -explain select * from t1 where a = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY PRIMARY 4 const # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -2 20000 b2 30000 dd2 -replace t1 set a=1,b=@b2,c=111,d=@d2; -replace t1 set a=2,b=@b1,c=222,d=@d1; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -1 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 2256 b1 3000 dd1 -replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2); -replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 40000 b2 60000 dd2 -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; -a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3) -2 4512 b1 6000 dd1 -replace t1 set a=1,b='xyz',c=111,d=null; -commit; -select a,b from t1 where d is null; -a b -1 xyz -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1 where c = 111; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref c c 4 const # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=111; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=222; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -2 20000 b2 30000 dd2 -update t1 set b=@b2,d=@d2 where c=111; -update t1 set b=@b1,d=@d1 where c=222; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=111; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -1 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=222; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 2256 b1 3000 dd1 -update t1 set d=null where c=111; -commit; -select a from t1 where d is null; -a -1 -delete from t1 where c=111; -delete from t1 where c=222; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; -explain select * from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -update t1 set b=concat(a,'x',b),d=concat(a,'x',d); -commit; -select * from t1 order by a; -a b c d -1 1xb1 111 1xdd1 -2 2xb2 222 2xdd2 -3 3xb3 333 3xdd3 -4 4xb4 444 4xdd4 -5 5xb5 555 5xdd5 -6 6xb6 666 6xdd6 -7 7xb7 777 7xdd7 -8 8xb8 888 8xdd8 -9 9xb9 999 9xdd9 -delete from t1; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -2 20000 b2 30000 dd2 -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 order by a; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 4512 6000 -2 40000 b2 60000 dd2 -delete from t1; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; -explain select * from t1 where c >= 100 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort -select * from t1 where c >= 100 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -update t1 set b=concat(a,'x',b),d=concat(a,'x',d) -where c >= 100; -commit; -select * from t1 where c >= 100 order by a; -a b c d -1 1xb1 111 1xdd1 -2 2xb2 222 2xdd2 -3 3xb3 333 3xdd3 -4 4xb4 444 4xdd4 -5 5xb5 555 5xdd5 -6 6xb6 666 6xdd6 -7 7xb7 777 7xdd7 -8 8xb8 888 8xdd8 -9 9xb9 999 9xdd9 -delete from t1 where c >= 100; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1 where c >= 100 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c >= 100 order by a; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -2 20000 b2 30000 dd2 -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where c >= 100 order by a; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 4512 6000 -2 40000 b2 60000 dd2 -delete from t1 where c >= 100; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 0; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 1; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 2; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -2 20000 b2 30000 dd2 -rollback; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -alter table t1 add x int; -select * from t1 order by a; -a b c d x -1 b1 111 dd1 NULL -2 b2 222 dd2 NULL -3 b3 333 dd3 NULL -4 b4 444 dd4 NULL -5 b5 555 dd5 NULL -6 b6 666 dd6 NULL -7 b7 777 dd7 NULL -8 b8 888 dd8 NULL -9 b9 999 dd9 NULL -alter table t1 drop x; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -create database test2; -use test2; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -insert into t2 values (1,1,1),(2,2,2); -select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; -a b c d a b c -1 b1 111 dd1 1 1 1 -2 b2 222 dd2 2 2 2 -drop table t2; -use test; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -alter table t1 add x int; -select * from t1 order by a; -a b c d x -1 b1 111 dd1 NULL -2 b2 222 dd2 NULL -3 b3 333 dd3 NULL -4 b4 444 dd4 NULL -5 b5 555 dd5 NULL -6 b6 666 dd6 NULL -7 b7 777 dd7 NULL -8 b8 888 dd8 NULL -9 b9 999 dd9 NULL -alter table t1 drop x; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -drop table t1; -drop database test2; -set autocommit=0; -create table t1 ( -a int not null primary key, -b tinytext -) engine=ndbcluster; -insert into t1 values(1, 'x'); -update t1 set b = 'y'; -select * from t1; -a b -1 y -delete from t1; -select * from t1; -a b -commit; -replace t1 set a=2, b='y'; -select * from t1; -a b -2 y -delete from t1; -select * from t1; -a b -drop table t1; -set autocommit=0; -create table t1 ( -a int not null primary key, -b text not null -) engine=ndbcluster; -insert into t1 values(1, ''); -select * from t1; -a b -1 -commit; -drop table t1; -set autocommit=1; -use test; -CREATE TABLE t1 ( -a int, -b text, -PRIMARY KEY (a) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES -(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); -INSERT INTO t1 VALUES -(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB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BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB -drop table t1; -create table t1 ( -id int(11) unsigned primary key NOT NULL auto_increment, -msg text NOT NULL -) engine=ndbcluster default charset=utf8; -insert into t1 (msg) values( -'Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel.'); -select * from t1; -id msg -1 Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel. -drop table t1; -create table t1 ( -a int primary key not null auto_increment, -b text -) engine=ndbcluster; -select count(*) from t1; -count(*) -500 -truncate t1; -select count(*) from t1; -count(*) -0 -drop table t1; -create table t1 ( -a varchar(40) not null, -b mediumint not null, -t text, -c varchar(2) not null, -d bigint not null, -primary key (a,b,c), -key (c,a), -unique key (d) -) engine=ndb; -insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1); -insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2); -insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3); -insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4); -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 NULL -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a'; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b'; -a b c d sha1(t) -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -update t1 set t=@v4 where a='b' and b=1110 and c='a'; -update t1 set t=@v2 where a='b' and b=1110 and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 NULL -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 b238654911689bfb626a3ef9dba4a1ca074e6a5e -update t1 set t=@v2 where d=2; -update t1 set t=@v4 where d=4; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 NULL -update t1 set t=@v4 where a='b' and c='a'; -update t1 set t=@v2 where a='b' and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 NULL -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 b238654911689bfb626a3ef9dba4a1ca074e6a5e -update t1 set t=@v2 where b+d=1112; -update t1 set t=@v4 where b+d=1114; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 NULL -delete from t1 where a='a' and b=1110 and c='a'; -delete from t1 where a='b' and c='a'; -delete from t1 where d=3; -delete from t1 where b+d=1114; -select count(*) from t1; -count(*) -0 -drop table t1; -create table t1( -a int, -blob_nn blob not null, -text_nn text not null, -blob_nl blob, -text_nl text, -primary key(a) -) engine=ndb; -insert into t1(a) values (1); -Warnings: -Warning 1364 Field 'blob_nn' doesn't have a default value -Warning 1364 Field 'text_nn' doesn't have a default value -insert into t1(a, text_nl) values (2, 'MySQL Cluster NDB'); -Warnings: -Warning 1364 Field 'blob_nn' doesn't have a default value -Warning 1364 Field 'text_nn' doesn't have a default value -select a, length(blob_nn), length(text_nn), blob_nl, text_nl from t1 order by a; -a length(blob_nn) length(text_nn) blob_nl text_nl -1 0 0 NULL NULL -2 0 0 NULL MySQL Cluster NDB -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_blob_partition.result b/mysql-test/suite/ndb/r/ndb_blob_partition.result deleted file mode 100644 index b08a91f0cdd..00000000000 --- a/mysql-test/suite/ndb/r/ndb_blob_partition.result +++ /dev/null @@ -1,104 +0,0 @@ -drop table if exists t1; -create table t1 ( -a mediumint not null, -b text not null, -c int not null, -d longblob, -primary key using hash (a,c), -unique key (c) -) -engine=ndb -partition by range (c) -partitions 3 -( partition p1 values less than (200), -partition p2 values less than (300), -partition p3 values less than (400)); -insert into t1 values (1, @v1, 101, @v2); -insert into t1 values (1, @v2, 102, @v3); -insert into t1 values (1, @v3, 103, @v4); -insert into t1 values (2, @v4, 201, @v5); -insert into t1 values (2, @v5, 202, @v6); -insert into t1 values (2, @v6, 203, @v7); -insert into t1 values (3, @v7, 301, @v8); -insert into t1 values (3, @v8, 302, @v9); -insert into t1 values (3, @v9, 303, @v1); -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 10d3c783026b310218d10b7188da96a2401648c6 102 a33549d9844092289a58ac348dd59f09fc28406a -1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e -2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 acbaba01bc2e682f015f40e79d9cbe475db3002e 302 9ee30d99162574f79c66ae95cdf132dcf9cbc259 -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 -select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; -a sha1(b) c sha1(d) -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; -a sha1(b) c sha1(d) -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -update t1 set b = @v3, d = @v4 where a = 1 and c = 102; -update t1 set b = @v6, d = @v7 where a = 2 and c = 202; -update t1 set b = @v9, d = @v1 where a = 3 and c = 302; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 -2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 -update t1 set b = @v4, d = @v5 where c = 103; -update t1 set b = @v7, d = @v8 where c = 203; -update t1 set b = @v1, d = @v2 where c = 303; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -1 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 103 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 -2 1e0070bec426871a46291de27b9bd6e4255ab4e5 203 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 -3 1d42dd9090cf78314a06665d4ea938c35cc760f4 303 10d3c783026b310218d10b7188da96a2401648c6 -update t1 set b = @v5, d = @v6; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 101 090565c580809efed3d369481a4bbb168b20713e -1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 102 090565c580809efed3d369481a4bbb168b20713e -1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 103 090565c580809efed3d369481a4bbb168b20713e -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 201 090565c580809efed3d369481a4bbb168b20713e -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 203 090565c580809efed3d369481a4bbb168b20713e -3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 301 090565c580809efed3d369481a4bbb168b20713e -3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 302 090565c580809efed3d369481a4bbb168b20713e -3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 303 090565c580809efed3d369481a4bbb168b20713e -update t1 set b = @v1, d = @v2 where 100 < c and c < 200; -update t1 set b = @v4, d = @v5 where 200 < c and c < 300; -update t1 set b = @v7, d = @v8 where 300 < c and c < 400; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 102 10d3c783026b310218d10b7188da96a2401648c6 -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 103 10d3c783026b310218d10b7188da96a2401648c6 -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 202 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 203 70fc9a7d08beebc522258bfb02000a30c77a8f1d -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 302 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 303 acbaba01bc2e682f015f40e79d9cbe475db3002e -delete from t1 where a = 1 and c = 101; -delete from t1 where c = 102; -delete from t1; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_bug26793.result b/mysql-test/suite/ndb/r/ndb_bug26793.result deleted file mode 100644 index a9a8a798546..00000000000 --- a/mysql-test/suite/ndb/r/ndb_bug26793.result +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE `test` ( -`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , -`t` VARCHAR( 10 ) NOT NULL -) ENGINE = ndbcluster; -GRANT USAGE ON *.* TO user1@localhost IDENTIFIED BY 'pass'; -DROP TABLE `test`.`test`; -drop user user1@localhost; diff --git a/mysql-test/suite/ndb/r/ndb_bug31477.result b/mysql-test/suite/ndb/r/ndb_bug31477.result deleted file mode 100644 index 002a928b485..00000000000 --- a/mysql-test/suite/ndb/r/ndb_bug31477.result +++ /dev/null @@ -1,98 +0,0 @@ -drop table if exists t1; -create table t1(a int primary key, b int, c int, unique(b)) engine = ndb; -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); -begin; -insert into t1 values (1,1,1); -begin; -update t1 set c = 2 where b = 1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -rollback; -drop table t1; -create table t1(a int primary key, b int, c int, key(b)) engine = ndb; -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); -begin; -insert into t1 values (1,1,1); -begin; -update t1 set c = 2 where b = 1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -rollback; -drop table t1; ---con1 -create table t1(a int primary key, b int, c int, key(b)) engine = ndb; -insert into t1 values (1,1,1); -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); -begin; -update t1 set c = 10 where a = 1; -update t1 set c = 20 where a = 1; -update t1 set c = 30 where a = 1; ---con1 c=30 -select * from t1 where b >= 1 order by b; -a b c -1 1 30 -2 2 2 -3 3 3 -4 4 4 ---con2 c=1 -select * from t1 where b >= 1 order by b; -a b c -1 1 1 -2 2 2 -3 3 3 -4 4 4 ---con1 -delete from t1 where a = 1; ---con1 c=none -select * from t1 where b >= 1 order by b; -a b c -2 2 2 -3 3 3 -4 4 4 ---con2 c=1 -select * from t1 where b >= 1 order by b; -a b c -1 1 1 -2 2 2 -3 3 3 -4 4 4 ---con1 -commit; ---con1 c=none -select * from t1 where b >= 1 order by b; -a b c -2 2 2 -3 3 3 -4 4 4 ---con2 c=none -select * from t1 where b >= 1 order by b; -a b c -2 2 2 -3 3 3 -4 4 4 ---con1 -begin; -insert into t1 values (1,1,1); -update t1 set c = 10 where a = 1; -update t1 set c = 20 where a = 1; -update t1 set c = 30 where a = 1; ---con1 c=30 -select * from t1 where b >= 1 order by b; -a b c -1 1 30 -2 2 2 -3 3 3 -4 4 4 ---con2 c=none -select * from t1 where b >= 1 order by b; -a b c -2 2 2 -3 3 3 -4 4 4 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_cache.result b/mysql-test/suite/ndb/r/ndb_cache.result deleted file mode 100644 index 478663b1aa1..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cache.result +++ /dev/null @@ -1,191 +0,0 @@ -drop table if exists t1; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; -CREATE TABLE t1 ( pk int not null primary key, -a int, b int not null, c varchar(20)) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -select * from t1; -pk a b c -1 2 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -pk a b c -1 2 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -update t1 set a=3 where pk=1; -select * from t1; -pk a b c -1 3 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk; -pk a b c -1 3 3 First row -2 7 8 Second row -4 5 6 Fourth row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk; -pk a b c -1 3 3 First row -2 7 8 Second row -4 5 6 Fourth row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -delete from t1 where c='Fourth row'; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -use test; -select * from t1 order by pk; -pk a b c -1 3 3 First row -2 7 8 Second row -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 -update t1 set a=4 where b=3; -use test; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -begin; -update t1 set a=5 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 8 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -commit; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 8 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 5 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 9 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 5 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 9 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 8 -drop table t1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -SET GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/ndb/r/ndb_cache2.result b/mysql-test/suite/ndb/r/ndb_cache2.result deleted file mode 100644 index 2876002f864..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cache2.result +++ /dev/null @@ -1,623 +0,0 @@ -drop table if exists t1, t2, t3, t4, t5; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=100; -reset query cache; -flush status; -CREATE TABLE t1 ( -pk int not null primary key, -a1 int, -b1 int not null, -c1 varchar(20) -) ENGINE=ndb; -CREATE TABLE t2 ( -pk int not null primary key, -a2 int, -b2 int not null -) ENGINE=ndb; -CREATE TABLE t3 ( -pk int not null primary key, -a3 int, -b3 int not null, -c3 int not null, -d3 varchar(20) -) ENGINE=ndb; -CREATE TABLE t4 ( -a4 int, -b4 int not null, -c4 char(20) -) ENGINE=ndbcluster; -CREATE TABLE t5 ( -pk int not null primary key, -a5 int, -b5 int not null, -c5 varchar(255) -) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -insert into t2 value (1, 2, 3); -insert into t3 value (1, 2, 3, 4, '3 - First row'); -insert into t4 value (2, 3, '4 - First row'); -insert into t5 value (1, 2, 3, '5 - First row'); -select * from t1; -pk a1 b1 c1 -1 2 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -pk a1 b1 c1 -1 2 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -update t1 set a1=3 where pk=1; -select * from t1; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk desc; -pk a1 b1 c1 -4 5 6 Fourth row -2 7 8 Second row -1 3 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -4 5 6 Fourth row -2 7 8 Second row -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -delete from t1 where c1='Fourth row'; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -use test; -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 3 3 First row -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 -update t1 set a1=4 where b1=3; -use test; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t2; -pk a2 b2 -1 2 3 -select * from t3; -pk a3 b3 c3 d3 -1 2 3 4 3 - First row -select * from t4; -a4 b4 c4 -2 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 2 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -flush status; -begin; -update t1 set a1=5 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -flush status; -begin; -update t1 set a1=6 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -commit; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -flush status; -begin; -insert into t1 set pk=5, a1=6, b1=3, c1="New row"; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=5; -pk a1 b1 c1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=5; -pk a1 b1 c1 -5 6 3 New row -select * from t1 where pk=5; -pk a1 b1 c1 -5 6 3 New row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -flush status; -begin; -delete from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=2; -pk a1 b1 c1 -2 7 8 Second row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=2; -pk a1 b1 c1 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t1 where pk=2; -pk a1 b1 c1 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t1 where pk=2; -pk a1 b1 c1 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 4 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -flush status; -begin; -update t1 set a1=9 where pk=1; -update t2 set a2=9 where pk=1; -update t3 set a3=9 where pk=1; -update t4 set a4=9 where a4=2; -update t5 set a5=9 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t2; -pk a2 b2 -1 2 3 -select * from t3; -pk a3 b3 c3 d3 -1 2 3 4 3 - First row -select * from t4; -a4 b4 c4 -2 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 2 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 10 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 15 -drop table t1, t2, t3, t4, t5; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -SET GLOBAL query_cache_size=0; -SET GLOBAL ndb_cache_check_time=0; diff --git a/mysql-test/suite/ndb/r/ndb_cache_multi.result b/mysql-test/suite/ndb/r/ndb_cache_multi.result deleted file mode 100644 index 388131ec30a..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cache_multi.result +++ /dev/null @@ -1,74 +0,0 @@ -drop table if exists t1, t2; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select * from t2; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -a -2 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -update t1 set a=3 where a=2; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -drop table t1, t2; -set GLOBAL query_cache_size=0; -set GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/ndb/r/ndb_cache_multi2.result b/mysql-test/suite/ndb/r/ndb_cache_multi2.result deleted file mode 100644 index 53767bb6d3c..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cache_multi2.result +++ /dev/null @@ -1,75 +0,0 @@ -drop table if exists t1, t2; -== Connected to server1 == -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; -== Connected to server2 == -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; -== Connected to server1 == -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select a != 3 from t1; -a != 3 -1 -select * from t2; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -== Connected to server2 == -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -a -2 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -update t1 set a=3 where a=2; -== Connected to server1 == -select * from t1; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -drop table t1, t2; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; diff --git a/mysql-test/suite/ndb/r/ndb_charset.result b/mysql-test/suite/ndb/r/ndb_charset.result deleted file mode 100644 index e84c906dd7e..00000000000 --- a/mysql-test/suite/ndb/r/ndb_charset.result +++ /dev/null @@ -1,320 +0,0 @@ -drop table if exists t1; -create table t1 ( -a char(3) character set latin1 collate latin1_bin primary key -) engine=ndb; -insert into t1 values('aAa'); -insert into t1 values('aaa'); -insert into t1 values('AAA'); -select * from t1 order by a; -a -AAA -aAa -aaa -select * from t1 where a = 'aAa'; -a -aAa -select * from t1 where a = 'aaa'; -a -aaa -select * from t1 where a = 'AaA'; -a -select * from t1 where a = 'AAA'; -a -AAA -drop table t1; -create table t1 ( -a char(3) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -insert into t1 values('aAa'); -insert into t1 values('aaa'); -ERROR 23000: Duplicate entry 'aaa' for key 'PRIMARY' -insert into t1 values('AAA'); -ERROR 23000: Duplicate entry 'AAA' for key 'PRIMARY' -select * from t1 order by a; -a -aAa -select * from t1 where a = 'aAa'; -a -aAa -select * from t1 where a = 'aaa'; -a -aAa -select * from t1 where a = 'AaA'; -a -aAa -select * from t1 where a = 'AAA'; -a -aAa -drop table t1; -create table t1 ( -a varchar(20) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); -insert into t1 values('b'); -ERROR 23000: Duplicate entry 'b' for key 'PRIMARY' -insert into t1 values('a '); -ERROR 23000: Duplicate entry 'a ' for key 'PRIMARY' -select a,length(a) from t1 order by a; -a length(a) -A 1 -b 2 -C 3 -d 7 -E 1 -f 1 -select a,length(a) from t1 order by a desc; -a length(a) -f 1 -E 1 -d 7 -C 3 -b 2 -A 1 -select * from t1 where a = 'a'; -a -A -select * from t1 where a = 'a '; -a -A -select * from t1 where a = 'd'; -a -d -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_bin not null, -unique key(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -select * from t1 order by p; -p a -1 aAa -2 aaa -3 AAA -select * from t1 where a = 'aAa'; -p a -1 aAa -select * from t1 where a = 'aaa'; -p a -2 aaa -select * from t1 where a = 'AaA'; -p a -select * from t1 where a = 'AAA'; -p a -3 AAA -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_swedish_ci not null, -unique key(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -ERROR 23000: Duplicate entry 'aaa' for key 'a' -insert into t1 values(3, 'AAA'); -ERROR 23000: Duplicate entry 'AAA' for key 'a' -select * from t1 order by p; -p a -1 aAa -select * from t1 where a = 'aAa'; -p a -1 aAa -select * from t1 where a = 'aaa'; -p a -1 aAa -select * from t1 where a = 'AaA'; -p a -1 aAa -select * from t1 where a = 'AAA'; -p a -1 aAa -drop table t1; -create table t1 ( -p int primary key, -a varchar(20) character set latin1 collate latin1_swedish_ci not null, -unique key(a) -) engine=ndb; -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values(99,'b'); -ERROR 23000: Duplicate entry 'b' for key 'a' -insert into t1 values(99,'a '); -ERROR 23000: Duplicate entry 'a ' for key 'a' -select a,length(a) from t1 order by a; -a length(a) -A 1 -b 2 -C 3 -d 7 -E 1 -f 1 -select a,length(a) from t1 order by a desc; -a length(a) -f 1 -E 1 -d 7 -C 3 -b 2 -A 1 -select * from t1 where a = 'a'; -p a -1 A -select * from t1 where a = 'a '; -p a -1 A -select * from t1 where a = 'd'; -p a -4 d -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_bin not null, -index(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -select * from t1 order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'aAa' order by p; -p a -1 aAa -4 aAa -select * from t1 where a = 'aaa' order by p; -p a -2 aaa -5 aaa -select * from t1 where a = 'AaA' order by p; -p a -select * from t1 where a = 'AAA' order by p; -p a -3 AAA -6 AAA -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_swedish_ci not null, -index(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -select * from t1 order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'aAa' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'aaa' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'AaA' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'AAA' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -drop table t1; -create table t1 ( -p int primary key, -a varchar(20) character set latin1 collate latin1_swedish_ci not null, -index(a, p) -) engine=ndb; -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); -select p,a,length(a) from t1 order by a, p; -p a length(a) -1 A 1 -7 a 1 -2 b 2 -8 B 2 -3 C 3 -9 c 3 -4 d 7 -10 D 1 -5 E 1 -11 e 1 -6 f 1 -12 F 3 -select * from t1 where a = 'a ' order by a desc, p desc; -p a -7 a -1 A -select * from t1 where a >= 'D' order by a, p; -p a -4 d -10 D -5 E -11 e -6 f -12 F -select * from t1 where a < 'D' order by a, p; -p a -1 A -7 a -2 b -8 B -3 C -9 c -select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; -count(*) -48 -drop table t1; -create table t1 ( -a char(10) primary key -) engine=ndbcluster default charset=latin1; -insert into t1 values ('aaabb'); -select * from t1; -a -aaabb -replace into t1 set a = 'AAABB'; -select * from t1; -a -AAABB -replace into t1 set a = 'aAaBb'; -select * from t1; -a -aAaBb -replace into t1 set a = 'aaabb'; -select * from t1; -a -aaabb -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_condition_pushdown.result b/mysql-test/suite/ndb/r/ndb_condition_pushdown.result deleted file mode 100644 index f2b5b882f10..00000000000 --- a/mysql-test/suite/ndb/r/ndb_condition_pushdown.result +++ /dev/null @@ -1,1920 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4; -CREATE TABLE t1 ( -auto int(5) unsigned NOT NULL auto_increment, -string char(10), -vstring varchar(10), -bin binary(2), -vbin varbinary(7), -tiny tinyint(4) DEFAULT '0' NOT NULL , -short smallint(6) DEFAULT '1' NOT NULL , -medium mediumint(8) DEFAULT '0' NOT NULL, -long_int int(11) DEFAULT '0' NOT NULL, -longlong bigint(13) DEFAULT '0' NOT NULL, -real_float float(13,1) DEFAULT 0.0 NOT NULL, -real_double double(16,4), -real_decimal decimal(16,4), -utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, -ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, -umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, -ulong int(11) unsigned DEFAULT '0' NOT NULL, -ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, -bits bit(3), -options enum('zero','one','two','three','four') not null, -flags set('zero','one','two','three','four') not null, -date_field date, -year_field year, -time_field time, -date_time datetime, -time_stamp timestamp, -PRIMARY KEY (auto) -) engine=ndb; -insert into t1 values -(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, -b'001','one','one', -'1901-01-01','1901', -'01:01:01','1901-01-01 01:01:01',NULL), -(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, -b'010','two','one,two', -'1902-02-02','1902', -'02:02:02','1902-02-02 02:02:02',NULL), -(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, -b'011','three','one,two,three', -'1903-03-03','1903', -'03:03:03','1903-03-03 03:03:03',NULL), -(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, -b'100','four','one,two,three,four', -'1904-04-04','1904', -'04:04:04','1904-04-04 04:04:04',NULL); -CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; -insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); -CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; -insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); -CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; -insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); -set @old_optimizer_switch = @@session.optimizer_switch; -set optimizer_switch = "engine_condition_pushdown=off"; -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -bits = b'001' and -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -auto -1 -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -bits != b'001' and -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -bits > b'001' and -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -bits >= b'001' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -auto -1 -2 -3 -4 -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -bits < b'100' and -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 and -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -bits <= b'100' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -4 -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; -auto -2 -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; -auto -1 -3 -4 -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -(bits between b'001' and b'011') and -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -1 -3 -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -(b'001' between bits and bits) and -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; -auto -1 -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -(bits not between b'001' and b'011') and -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -4 -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -(b'001' not between bits and bits) and -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; -auto -2 -3 -4 -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -bits in(b'001',b'011') and -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -1 -3 -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in(short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -b'001' in(bits) and -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; -auto -1 -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -bits not in(b'001',b'011') and -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -2 -4 -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -b'001' not in(bits) and -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; -auto -2 -3 -4 -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -pk1 attr1 attr2 attr3 -2 2 NULL NULL -3 3 3 d -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -pk1 attr1 attr2 attr3 -3 3 3 d -4 4 4 e -5 5 5 f -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -5 5 9223372036854775807 5 f -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 -0 0 0 a 0 0 0 0 a -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c -3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d -4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e -set optimizer_switch = "engine_condition_pushdown=on"; -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -auto -1 -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -auto -1 -2 -3 -4 -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -4 -create index medium_index on t1(medium); -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref medium_index medium_index 3 const # Using where with pushed condition; Using filesort -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -auto -1 -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -auto -1 -2 -3 -4 -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -4 -explain -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; -auto -2 -explain -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; -auto -1 -3 -4 -explain -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -1 -3 -explain -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; -auto -1 -explain -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -4 -explain -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -1 -3 -explain -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref medium_index medium_index 3 const # Using where with pushed condition; Using filesort -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; -auto -1 -explain -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -2 -4 -explain -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; -auto -2 -3 -4 -update t1 -set medium = 17 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; -delete from t1 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = 17 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; -select count(*) from t1; -count(*) -3 -explain -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL PRIMARY NULL NULL NULL # Using where with pushed condition; Using filesort -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -pk1 attr1 attr2 attr3 -2 2 NULL NULL -3 3 3 d -explain -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -pk1 attr1 attr2 attr3 -3 3 3 d -4 4 4 e -5 5 5 f -explain -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -5 5 9223372036854775807 5 f -explain -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using join buffer -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 -0 0 0 a 0 0 0 0 a -explain -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using filesort -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -explain -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where; Using join buffer -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c -3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d -4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e -explain -select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where; Using filesort -explain -select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where; Using filesort -explain -select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using temporary; Using filesort -1 SIMPLE t4 ALL NULL NULL NULL NULL # Using where -create table t5 (a int primary key auto_increment, b tinytext not null) -engine = ndb; -insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t5 where b like '%jo%' order by a; -a b -1 jonas -3 johan -set optimizer_switch = "engine_condition_pushdown=on"; -explain select * from t5 where b like '%jo%'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t5 ALL NULL NULL NULL NULL # Using where -select * from t5 where b like '%jo%' order by a; -a b -1 jonas -3 johan -set optimizer_switch = "engine_condition_pushdown=off"; -select auto from t1 where date_time like '1902-02-02 %' order by auto; -auto -2 -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -auto -3 -4 -set optimizer_switch = "engine_condition_pushdown=on"; -explain select auto from t1 where date_time like '1902-02-02 %'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where -select auto from t1 where date_time like '1902-02-02 %' order by auto; -auto -2 -explain select auto from t1 where date_time not like '1902-02-02 %'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -auto -3 -4 -drop table t1; -create table t1 (a int, b varchar(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -set optimizer_switch = "engine_condition_pushdown=on"; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -drop table t1; -create table t1 (a int, b char(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -set optimizer_switch = "engine_condition_pushdown=on"; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -drop table t1; -create table t1 ( fname varchar(255), lname varchar(255) ) -engine=ndbcluster; -insert into t1 values ("Young","Foo"); -set optimizer_switch = "engine_condition_pushdown=off"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -set optimizer_switch = "engine_condition_pushdown=on"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -insert into t1 values ("aaa", "aaa"); -insert into t1 values ("bbb", "bbb"); -insert into t1 values ("ccc", "ccc"); -insert into t1 values ("ddd", "ddd"); -set optimizer_switch = "engine_condition_pushdown=off"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -set optimizer_switch = "engine_condition_pushdown=on"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -drop table t1; -create table t1 (a int, b int, c int, d int, primary key using hash(a)) -engine=ndbcluster; -insert into t1 values (10,1,100,0+0x1111); -insert into t1 values (20,2,200,0+0x2222); -insert into t1 values (30,3,300,0+0x3333); -insert into t1 values (40,4,400,0+0x4444); -insert into t1 values (50,5,500,0+0x5555); -set optimizer_switch = "engine_condition_pushdown=on"; -select a,b,d from t1 -where b in (0,1,2,5) -order by b; -a b d -10 1 4369 -20 2 8738 -50 5 21845 --- big filter just below limit -a b d -10 1 4369 -20 2 8738 -50 5 21845 --- big filter just above limit -a b d -10 1 4369 -20 2 8738 -50 5 21845 -Warnings: -Warning 4294 Scan filter is too large, discarded -set optimizer_switch = @old_optimizer_switch; -DROP TABLE t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/ndb/r/ndb_config.result b/mysql-test/suite/ndb/r/ndb_config.result deleted file mode 100644 index e12741212d6..00000000000 --- a/mysql-test/suite/ndb/r/ndb_config.result +++ /dev/null @@ -1,14 +0,0 @@ -ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4,localhost mysqld,5,localhost mysqld,6,localhost -1,localhost,20971520,1048576 2,localhost,20971520,1048576 -1 localhost 20971520 1048576 -2 localhost 20971520 1048576 -1 2 -ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11, -ndbd,1,localhost,52428800,26214400 ndbd,2,localhost,52428800,36700160 ndbd,3,localhost,52428800,52428800 ndbd,4,localhost,52428800,52428800 ndb_mgmd,5,localhost,, mysqld,6,localhost,, -ndbd,1,localhost ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndb_mgmd,5,localhost mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, -ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndb_mgmd,6,localhost mysqld,1, mysqld,7, mysqld,8, mysqld,9, mysqld,10, -ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndbd,6,localhost ndb_mgmd,1,localhost ndb_mgmd,2,localhost mysqld,11, mysqld,12, mysqld,13, mysqld,14, mysqld,15, -shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 -1 2 3 - -1 2 3 diff --git a/mysql-test/suite/ndb/r/ndb_config2.result b/mysql-test/suite/ndb/r/ndb_config2.result deleted file mode 100644 index cfd012933c4..00000000000 --- a/mysql-test/suite/ndb/r/ndb_config2.result +++ /dev/null @@ -1 +0,0 @@ -shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 diff --git a/mysql-test/suite/ndb/r/ndb_cursor.result b/mysql-test/suite/ndb/r/ndb_cursor.result deleted file mode 100644 index 3e6f207e153..00000000000 --- a/mysql-test/suite/ndb/r/ndb_cursor.result +++ /dev/null @@ -1,42 +0,0 @@ -drop table if exists t1; -drop table if exists t2; -create table t1 ( -a int not null primary key, -b int not null -) engine=ndb; -create table t2 ( -a int not null primary key, -b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30), (4, 40); -create procedure test_cursor () -begin -declare done int default 0; -declare temp_a int; -declare temp_b int; -declare cur1 cursor for select a,b from t1; -declare continue handler for sqlstate '02000' set done = 1; -open cur1; -repeat -fetch cur1 into temp_a, temp_b; -if not done then -insert into t2 values (temp_a, temp_b); -end if; -until done end repeat; -close cur1; -end; -// -select * from t2 order by a; -a b -call test_cursor(); -Warnings: -Error 1329 No data - zero rows fetched, selected, or processed -select * from t2 order by a; -a b -1 10 -2 20 -3 30 -4 40 -drop procedure test_cursor; -drop table t1,t2; -end of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_database.result b/mysql-test/suite/ndb/r/ndb_database.result deleted file mode 100644 index e3da4af0265..00000000000 --- a/mysql-test/suite/ndb/r/ndb_database.result +++ /dev/null @@ -1,13 +0,0 @@ -drop database if exists mysqltest; -create database mysqltest; -create table mysqltest.t1 (a int primary key, b int) engine=ndb; -use mysqltest; -show tables; -Tables_in_mysqltest -t1 -drop database mysqltest; -create database mysqltest; -use mysqltest; -show tables; -Tables_in_mysqltest -drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_dd_alter.result b/mysql-test/suite/ndb/r/ndb_dd_alter.result deleted file mode 100644 index 7ebbb24c84f..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_alter.result +++ /dev/null @@ -1,560 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -**** Test Setup Section **** -CREATE LOGFILE GROUP lg -ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts -ADD DATAFILE './table_space/datafile.dat' - USE LOGFILE GROUP lg -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 ( -a1 smallint NOT NULL, -a2 int NOT NULL, -a3 bigint NOT NULL, -a4 char(10), -a5 decimal(5,1), -a6 time, -a7 date, -a8 datetime, -a9 VARCHAR(255), -a10 blob, -PRIMARY KEY(a1) -) ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Int NOT NULL AT=FIXED ST=DISK -a3 Bigint NOT NULL AT=FIXED ST=DISK -a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a5 Decimal(5,1) NULL AT=FIXED ST=DISK -a6 Time NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Datetime NULL AT=FIXED ST=DISK -a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -DROP TABLE test.t1; -CREATE TABLE test.t1 ( -a1 smallint NOT NULL, -a2 int NOT NULL, -a3 bigint NOT NULL, -a4 char(10), -a5 decimal(5,1), -a6 time, -a7 date, -a8 datetime, -a9 VARCHAR(255), -a10 blob, -PRIMARY KEY(a1) -) ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Int NOT NULL AT=FIXED ST=DISK -a3 Bigint NOT NULL AT=FIXED ST=DISK -a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a5 Decimal(5,1) NULL AT=FIXED ST=DISK -a6 Time NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Datetime NULL AT=FIXED ST=DISK -a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Int NOT NULL AT=FIXED ST=DISK -a3 Bigint NOT NULL AT=FIXED ST=DISK -a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a5 Decimal(5,1) NULL AT=FIXED ST=DISK -a6 Time NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Datetime NULL AT=FIXED ST=DISK -a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -ALTER TABLE test.t1 ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE test.t1; -CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; -SELECT * FROM test.t1 ORDER BY a1; -a1 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -def test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts -ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE; -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -def test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 2.2345 20000001 -2 3.2345 20000002 -3 4.2345 20000003 -4 5.2345 20000004 -5 6.2345 20000005 -6 7.2345 20000006 -7 8.2345 20000007 -8 9.2345 20000008 -9 10.2345 20000009 -10 11.2345 20000010 -11 12.2345 20000011 -12 13.2345 20000012 -13 14.2345 20000013 -14 15.2345 20000014 -15 16.2345 20000015 -16 17.2345 20000016 -17 18.2345 20000017 -18 19.2345 20000018 -19 20.2345 20000019 -20 21.2345 20000020 -ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME; -SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1; -a1 a2 a3 hex(a4) a5 a6 a7 a8 -1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00 -2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00 -3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00 -4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00 -5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00 -6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00 -7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00 -8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00 -9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00 -10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00 -11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00 -12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00 -13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00 -14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00 -15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00 -16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00 -17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00 -18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00 -19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00 -20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00 -ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=DISK -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1; -a1 a2 a3 hex(a4) a5 a6 a7 a8 a9 a10 a11 a12 a13 -1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`), - KEY `a2_i` (`a2`), - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=MEMORY -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -ALTER TABLE test.t1 DROP INDEX a2_i; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`), - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -TRUNCATE TABLE test.t1; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`), - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -ALTER TABLE test.t1 DROP a14; -ALTER TABLE test.t1 DROP a13; -ALTER TABLE test.t1 DROP a12; -ALTER TABLE test.t1 DROP a11; -ALTER TABLE test.t1 DROP a10; -ALTER TABLE test.t1 DROP a9; -ALTER TABLE test.t1 DROP a8; -ALTER TABLE test.t1 DROP a7; -ALTER TABLE test.t1 DROP a6; -ALTER TABLE test.t1 DROP PRIMARY KEY; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int NOT NULL AT=FIXED ST=DISK -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -DROP TABLE test.t1; -ALTER TABLESPACE ts -DROP DATAFILE './table_space/datafile.dat' - ENGINE NDB; -DROP TABLESPACE ts ENGINE NDB; -DROP LOGFILE GROUP lg ENGINE=NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_basic.result b/mysql-test/suite/ndb/r/ndb_dd_basic.result deleted file mode 100644 index e56c18c5d95..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_basic.result +++ /dev/null @@ -1,535 +0,0 @@ -select count(*) from information_schema.columns; -count(*) -# -DROP TABLE IF EXISTS t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=MYISAM; -Warnings: -Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=XYZ; -Warnings: -Warning 1286 Unknown storage engine 'XYZ' -Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M; -Warnings: -Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' -set storage_engine=ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -set storage_engine=myisam; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`pk1`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; -pk1 b c -0 0 0 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); -SELECT COUNT(*) FROM t1; -COUNT(*) -501 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10y -ENGINE = NDB; -ERROR HY000: A size parameter was incorrectly specified, either number or on the form 10M -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10MB -ENGINE = NDB; -ERROR HY000: A size parameter was incorrectly specified, either number or on the form 10M -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 MB -ENGINE = NDB; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MB -ENGINE = NDB' at line 3 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 M -ENGINE = NDB; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'M -ENGINE = NDB' at line 3 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 1000000000000K -ENGINE = NDB; -ERROR HY000: The size number was correct but we don't allow the digit part to be more than 2 billion -DROP TABLE t1; -create tablespace ts2 -add datafile 'datafile2_1.dat' -use logfile group lg1 -initial_size 12M -engine ndb; -CREATE TABLE City ( -ID int(11) NOT NULL AUTO_INCREMENT, -Name char(35) NOT NULL, -CountryCode char(3) NOT NULL, -District char(20) NOT NULL, -Population int(11) NOT NULL, -PRIMARY KEY (ID) -) ENGINE=ndbcluster -tablespace ts2 -storage disk; -alter tablespace ts2 -drop datafile 'datafile2_1.dat' -engine ndb; -insert -into City (Name,CountryCode,District,Population) -values ('BeiJing','CN','Beijing',2000); -ERROR HY000: Got error 1602 'No datafile in tablespace' from NDBCLUSTER -drop tablespace ts2 -engine ndb; -ERROR HY000: Failed to drop TABLESPACE -drop table City; -drop tablespace ts2 -engine ndb; -CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; -INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 1 -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 2 -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 2 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 3 2 -2 2 2 -3 3 3 -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 3 -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 3 -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 4 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 4 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 5 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 6 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '7'WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 4 -2 2 2 -3 3 3 -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 5 -2 2 2 -3 3 3 -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 6 -2 2 2 -3 3 3 -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 7 -2 2 2 -3 3 3 -DROP TABLE t1; -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB; -INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 1 -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 2 -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 2 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 3 2 -2 2 2 -3 3 3 -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 3 -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 3 -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 4 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 4 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 5 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 6 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '7' WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 4 -2 2 2 -3 3 3 -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 5 -2 2 2 -3 3 3 -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 6 -2 2 2 -3 3 3 -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 7 -2 2 2 -3 3 3 -DELETE FROM t1; -INSERT INTO t1 VALUES (3,'1','1'); -BEGIN; -UPDATE t1 SET b = b + 2 WHERE A = 3; -DELETE FROM t1 WHERE A = 3; -INSERT INTO t1 VALUES (3,'0','0'); -COMMIT; -SELECT * from t1 ORDER BY 1; -a b c -3 0 0 -DROP TABLE t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b TEXT NOT NULL -) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -INSERT INTO t1 VALUES(1,@b1); -INSERT INTO t1 VALUES(2,@b2); -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1; -a length(b) substr(b,1+2*900,2) -1 2256 b1 -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2; -a length(b) substr(b,1+2*9000,2) -2 20000 b2 -UPDATE t1 SET b=@b2 WHERE a=1; -UPDATE t1 SET b=@b1 WHERE a=2; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1; -a length(b) substr(b,1+2*9000,2) -1 20000 b2 -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2; -a length(b) substr(b,1+2*900,2) -2 2256 b1 -UPDATE t1 SET b=concat(b,b) WHERE a=1; -UPDATE t1 SET b=concat(b,b) WHERE a=2; -SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1; -a length(b) substr(b,1+4*9000,2) -1 40000 b2 -SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2; -a length(b) substr(b,1+4*900,2) -2 4512 b1 -DELETE FROM t1 WHERE a=1; -DELETE FROM t1 WHERE a=2; -SELECT COUNT(*) FROM t1; -COUNT(*) -0 -DROP TABLE t1; -CREATE TABLE t1 ( -a int NOT NULL, -b varchar(4000), -- must use 2 pages undo -PRIMARY KEY using hash (a) -) -TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; -set autocommit = 0; -insert into t1 values(0,'x'); -insert into t1 values(1,'x'); -insert into t1 values(2,'x'); -insert into t1 values(3,'x'); -insert into t1 values(4,'x'); -insert into t1 values(5,'x'); -insert into t1 values(6,'x'); -insert into t1 values(7,'x'); -insert into t1 values(8,'x'); -delete from t1 where a = 0; -commit; -delete from t1; -begin; -insert into t1 values (1, 'x'); -select * from t1; -a b -1 x -rollback; -set autocommit = 1; -drop table t1; -create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) -TABLESPACE ts1 STORAGE DISK engine=NDB; -insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from test.t1 order by f1; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -select f1,f2 from test.t1 order by f2; -f1 f2 -111111 aaaaaa -222222 bbbbbb -select f2 from test.t1 order by f2; -f2 -aaaaaa -bbbbbb -select f1,f2 from test.t1 order by f1; -f1 f2 -111111 aaaaaa -222222 bbbbbb -drop table test.t1; -CREATE TABLE t1 ( -id int unsigned NOT NULL, -c1 int unsigned NOT NULL, -c2 int DEFAULT NULL, -PRIMARY KEY using hash (id), -UNIQUE KEY c1 using hash (c1)) -TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster; -insert into t1 values(1, 1, 3); -insert into t1 values(2, 2, 3); -update t1 set c1 = 1 where id = 2; -ERROR 23000: Duplicate entry '1' for key 'c1' -drop table t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 -ENGINE = NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_ddl.result b/mysql-test/suite/ndb/r/ndb_dd_ddl.result deleted file mode 100644 index 35516efb48c..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_ddl.result +++ /dev/null @@ -1,315 +0,0 @@ -DROP TABLE IF EXISTS t1; -DROP DATABASE IF EXISTS mysqltest; -CREATE DATABASE mysqltest; -**** Begin Duplicate Statement Testing **** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'undofile2.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -ERROR HY000: Failed to create LOGFILE GROUP -SHOW WARNINGS; -Level Code Message -Warning 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB -Error 1528 Failed to create LOGFILE GROUP -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ERROR HY000: Failed to create LOGFILE GROUP -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE=NDB; -ERROR HY000: Failed to alter: CREATE UNDOFILE -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -ERROR HY000: Failed to create TABLESPACE -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; -ERROR HY000: Failed to alter: CREATE DATAFILE -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -ERROR 42S01: Table 't1' already exists -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -ENGINE=NDB; -ERROR 42S01: Table 't1' already exists -DROP TABLE mysqltest.t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -DROP TABLESPACE ts1 -ENGINE=NDB; -DROP TABLESPACE ts1 -ENGINE=NDB; -ERROR HY000: Failed to drop TABLESPACE -DROP LOGFILE GROUP lg1 -ENGINE=NDB; -DROP LOGFILE GROUP lg1 -ENGINE=NDB; -ERROR HY000: Failed to drop LOGFILE GROUP -DROP DATABASE IF EXISTS mysqltest; -**** End Duplicate Statement Testing **** - -**** Begin Statment CaSe Testing **** -creaTE LOgfilE GrOuP lg1 -adD undoFILE 'undofile.dat' -initiAL_siZE 1M -UnDo_BuFfEr_SiZe = 1M -ENGInE=NDb; -altER LOgFiLE GrOUp lg1 -AdD UnDOfILe 'uNdOfiLe02.daT' -INItIAl_SIzE 1M ENgINE nDB; -CrEAtE TABLEspaCE ts1 -ADD DATAfilE 'datafile.dat' -UsE LoGFiLE GRoUP lg1 -INITiaL_SizE 1M -ENGiNe NDb; -AlTeR tAbLeSpAcE ts1 -AdD DaTaFiLe 'dAtAfiLe2.daT' -InItIaL_SiZe 1M -EnGiNe=NDB; -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -TABLEspace ts1 storAGE dISk -ENGine nDb; -DROP TABLE t1; -AlteR TAblespaCE ts1 -droP DATAfile 'dAtAfiLe2.daT' -ENGINE=NDB; -ALter tablesPACE ts1 -dROp dAtAfIlE 'datafile.dat' -ENGine=Ndb; -DrOp TaBleSpAcE ts1 -engINE=ndB; -DrOp lOgFiLe GrOuP lg1 -EnGiNe=nDb; -**** End Statment CaSe Testing **** - -**** Begin = And No = Testing **** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE=1M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE=1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE=1M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE=1M -ENGINE=NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -DROP TABLE t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 -ENGINE=NDB; -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - -**** End of = **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE MEMORY -ENGINE NDB; -ERROR HY000: Can't create table 'test.t1' (errno: 138) -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE NDB; -CREATE INDEX b_i on t1(b); -CREATE INDEX bc_i on t1(b, c); -DROP TABLE t1; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile3.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -DROP TABLESPACE ts1 -ENGINE NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; -DROP TABLESPACE ts2 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE NDB; -**** End = And No = **** -create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/tmp/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;; -ERROR HY000: Failed to create UNDOFILE -create logfile group lg1 -add undofile 'undofile.dat' -initial_size 1M -undo_buffer_size = 1M -engine=ndb; -create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/tmp/t1.frm' use logfile group lg1 initial_size 1M engine ndb;; -ERROR HY000: Failed to create DATAFILE -drop tablespace ts1 -engine ndb; -ERROR HY000: Failed to drop TABLESPACE -drop logfile group lg1 -engine ndb; - -# ----------------------------------------------------------------- -# End 5.1 test -# ----------------------------------------------------------------- - -# -- -# -- WL#4300: Define privileges for tablespaces. -# -- -GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost; - -DROP DATABASE IF EXISTS mysqltest2; -CREATE DATABASE mysqltest2; -GRANT ALL PRIVILEGES ON mysqltest2.* TO mysqltest_u2@localhost; - -# -- Connection: mysqltest_u1@localhost - -# -- Grants for mysqltest_u1@localhost: -SHOW GRANTS; -Grants for mysqltest_u1@localhost -GRANT CREATE TABLESPACE ON *.* TO 'mysqltest_u1'@'localhost' - -# -- Check CREATE LOGFILE GROUP... -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE = NDB; - -# -- Check ALTER LOGFILE GROUP... -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE = NDB; - -# -- Check CREATE TABLESPACE... -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE = NDB; - -# -- Check ALTER TABLESPACE... -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -INITIAL_SIZE 1M -ENGINE = NDB; - -# -- Connection: mysqltest_u2@localhost - -# -- Grants for mysqltest_u2@localhost: -SHOW GRANTS; -Grants for mysqltest_u2@localhost -GRANT USAGE ON *.* TO 'mysqltest_u2'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest2`.* TO 'mysqltest_u2'@'localhost' -CREATE TABLE t1(c INT) TABLESPACE ts1; -DROP TABLE t1; - -# -- Connection: mysqltest_u1@localhost - - -# -- Check DROP TABLESPACE... -DROP TABLESPACE ts1 -ENGINE = NDB; - -# -- Check DROP LOGFILE GROUP... -DROP LOGFILE GROUP lg1 -ENGINE = NDB; - -# -- Connection: root@localhost - -DROP USER mysqltest_u1@localhost; -DROP USER mysqltest_u2@localhost; -DROP DATABASE mysqltest2; - -# ----------------------------------------------------------------- -# End 6.0 test -# ----------------------------------------------------------------- diff --git a/mysql-test/suite/ndb/r/ndb_dd_disk2memory.result b/mysql-test/suite/ndb/r/ndb_dd_disk2memory.result deleted file mode 100644 index 46661f36d1b..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_disk2memory.result +++ /dev/null @@ -1,505 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -**** Test Setup Section **** -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE test.t2 -(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL) -ENGINE=NDB; - -**** Data load for first test **** -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); -INSERT INTO test.t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - -*** Test 1 Section Begins *** -SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -COUNT(*) -1 -SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -pk2 b2 c2 pk1 b c -4 4 4 4 4 4 -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4); -COUNT(*) -1 -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75); -COUNT(*) -1 -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -b c -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -11 11 -12 12 -13 13 -14 14 -15 15 -16 16 -17 17 -18 18 -19 19 -20 20 -21 21 -22 22 -23 23 -24 24 -25 25 -26 26 -27 27 -28 28 -29 29 -30 30 -31 31 -32 32 -33 33 -34 34 -35 35 -36 36 -37 37 -38 38 -39 39 -40 40 -41 41 -42 42 -43 43 -44 44 -45 45 -46 46 -47 47 -48 48 -49 49 -50 50 -51 51 -52 52 -53 53 -54 54 -55 55 -56 56 -57 57 -58 58 -59 59 -60 60 -61 61 -62 62 -63 63 -64 64 -65 65 -66 66 -67 67 -68 68 -69 69 -70 70 -71 71 -72 72 -73 73 -74 74 -75 75 - -*** Setup for test 2 **** -DELETE FROM test.t1; -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45); - -**** Test Section 2 **** -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -b c -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -11 11 -12 12 -13 13 -14 14 -15 15 -16 16 -17 17 -18 18 -19 19 -20 20 -21 21 -22 22 -23 23 -24 24 -25 25 -26 26 -27 27 -28 28 -29 29 -30 30 -31 31 -32 32 -33 33 -34 34 -35 35 -36 36 -37 37 -38 38 -39 39 -40 40 -41 41 -42 42 -43 43 -44 44 -45 45 -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2; -COUNT(*) -45 -SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2; -COUNT(*) -75 -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk2` int(11) NOT NULL, - `b2` int(11) NOT NULL, - `c2` int(11) NOT NULL, - PRIMARY KEY (`pk2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`pk1`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk2` int(11) NOT NULL, - `b2` int(11) NOT NULL, - `c2` int(11) NOT NULL, - PRIMARY KEY (`pk2`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`pk1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -DROP TABLE test.t1; -DROP TABLE test.t2; -*** Setup for Test Section 3 *** -CREATE TABLE test.t1 ( -usr_id INT unsigned NOT NULL, -uniq_id INT unsigned NOT NULL AUTO_INCREMENT, -start_num INT unsigned NOT NULL DEFAULT 1, -increment INT unsigned NOT NULL DEFAULT 1, -PRIMARY KEY (uniq_id), -INDEX usr_uniq_idx (usr_id, uniq_id), -INDEX uniq_usr_idx (uniq_id, usr_id)) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE test.t2 ( -id INT unsigned NOT NULL DEFAULT 0, -usr2_id INT unsigned NOT NULL DEFAULT 0, -max INT unsigned NOT NULL DEFAULT 0, -c_amount INT unsigned NOT NULL DEFAULT 0, -d_max INT unsigned NOT NULL DEFAULT 0, -d_num INT unsigned NOT NULL DEFAULT 0, -orig_time INT unsigned NOT NULL DEFAULT 0, -c_time INT unsigned NOT NULL DEFAULT 0, -active ENUM ("no","yes") NOT NULL, -PRIMARY KEY (id,usr2_id), -INDEX id_idx (id), -INDEX usr2_idx (usr2_id)) -ENGINE=NDB; -INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198); - -**** Test Section 3 **** -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; -usr_id uniq_id increment usr2_id c_amount max -3 4 84676 NULL NULL NULL -INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; -usr_id uniq_id increment usr2_id c_amount max -3 4 84676 3 6000 3000 - -DROP TABLE test.t1; -DROP TABLE test.t2; -CREATE TABLE test.t1 ( -a1 smallint NOT NULL, -a2 int NOT NULL, -a3 bigint NOT NULL, -a4 char(10), -a5 decimal(5,1), -a6 time, -a7 date, -a8 datetime, -a9 VARCHAR(255), -a10 blob, -PRIMARY KEY(a1) -) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 ( -b1 smallint NOT NULL, -b2 int NOT NULL, -b3 bigint NOT NULL, -b4 char(10), -b5 decimal(5,1), -b6 time, -b7 date, -b8 datetime, -b9 VARCHAR(255), -b10 blob, -PRIMARY KEY(b1) -) ENGINE=NDB; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`), - KEY `a2` (`a2`), - KEY `a3` (`a3`), - KEY `a8` (`a8`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -Table Create Table -t2 CREATE TABLE `t2` ( - `b1` smallint(6) NOT NULL, - `b2` int(11) NOT NULL, - `b3` bigint(20) NOT NULL, - `b4` char(10) DEFAULT NULL, - `b5` decimal(5,1) DEFAULT NULL, - `b6` time DEFAULT NULL, - `b7` date DEFAULT NULL, - `b8` datetime DEFAULT NULL, - `b9` varchar(255) DEFAULT NULL, - `b10` blob, - PRIMARY KEY (`b1`), - KEY `b2` (`b2`), - KEY `b3` (`b3`), - KEY `b8` (`b8`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 -3 4 3000000001 aaa1 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -4 5 3000000002 aaa2 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -5 6 3000000003 aaa3 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -6 7 3000000004 aaa4 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -7 8 3000000005 aaa5 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -8 9 3000000006 aaa6 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -9 10 3000000007 aaa7 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -10 11 3000000008 aaa8 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -11 12 3000000009 aaa9 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -12 13 3000000010 aaa10 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -13 14 3000000011 aaa11 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -14 15 3000000012 aaa12 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -15 16 3000000013 aaa13 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -16 17 3000000014 aaa14 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -17 18 3000000015 aaa15 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -18 19 3000000016 aaa16 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -19 20 3000000017 aaa17 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -20 21 3000000018 aaa18 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -21 22 3000000019 aaa19 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -22 23 3000000020 aaa20 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -COUNT(a1) a1 COUNT(a1)*a1 -1 1 1 -1 2 2 -1 3 3 -1 4 4 -1 5 5 -1 6 6 -1 7 7 -1 8 8 -1 9 9 -1 10 10 -1 11 11 -1 12 12 -1 13 13 -1 14 14 -1 15 15 -1 16 16 -1 17 17 -1 18 18 -1 19 19 -1 20 20 -COUNT(a2) (a2+1) COUNT(a2)*(a2+0) -1 3 2 -1 4 3 -1 5 4 -1 6 5 -1 7 6 -1 8 7 -1 9 8 -1 10 9 -1 11 10 -1 12 11 -1 13 12 -1 14 13 -1 15 14 -1 16 15 -1 17 16 -1 18 17 -1 19 18 -1 20 19 -1 21 20 -1 22 21 -a -8 -7 -6 -5 -a c -8 Clavin -7 Serge -6 Jeb -5 Stewart -4 Martin -3 Pekka -a -2 -3 -4 -5 -6 -7 -8 -a c -4 Martin -5 Stewart -6 Jeb -7 Serge -8 Clavin -a -1 -1 -1 -2 -2 -3 -3 -a -3 -2 -1 -a -3 -2 -1 -a -1 -2 -3 -email shipcode -test1@testdomain.com Z001 -test2@testdomain.com R002 -test2@testdomain.com Z001 -test3@testdomain.com Z001 -email -test1@testdomain.com -test2@testdomain.com -test3@testdomain.com -email shipcode -test1@testdomain.com Z001 -test2@testdomain.com Z001 -test2@testdomain.com R002 -test3@testdomain.com Z001 diff --git a/mysql-test/suite/ndb/r/ndb_dd_dump.result b/mysql-test/suite/ndb/r/ndb_dd_dump.result deleted file mode 100644 index b48073df1fd..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_dump.result +++ /dev/null @@ -1,452 +0,0 @@ -DROP TABLE IF EXISTS t1, t2, t3; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_01.dat' -INITIAL_SIZE 2M -UNDO_BUFFER_SIZE = 1M -ENGINE NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_02.dat' -INITIAL_SIZE = 4M -ENGINE NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_01.dat' -USE LOGFILE GROUP lg1 -EXTENT_SIZE 1M -INITIAL_SIZE 2M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_02.dat' -INITIAL_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile_ts2_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 2M -ENGINE NDB; -CREATE TABLESPACE ts3 -ADD DATAFILE 'datafile_ts3_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 4M -ENGINE NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE t2 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDB; -CREATE TABLE t3 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts3 STORAGE DISK -ENGINE=NDB; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); -INSERT INTO t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); -INSERT INTO t3 VALUES -(1,1,1); -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; -DROP LOGFILE GROUP lg1 ENGINE = NDB; -SELECT DISTINCT -LOGFILE_GROUP_NAME, -FILE_NAME, -TOTAL_EXTENTS, -INITIAL_SIZE, -ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; -LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE -lg1 NULL NULL NULL ndbcluster -lg1 undofile_lg1_01.dat 524288 2097152 ndbcluster -lg1 undofile_lg1_02.dat 1048576 4194304 ndbcluster -SELECT DISTINCT -TABLESPACE_NAME, -LOGFILE_GROUP_NAME, -FILE_NAME, -EXTENT_SIZE, -INITIAL_SIZE, -ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME; -TABLESPACE_NAME LOGFILE_GROUP_NAME FILE_NAME EXTENT_SIZE INITIAL_SIZE ENGINE -ts1 lg1 datafile_ts1_01.dat 1048576 2097152 ndbcluster -ts1 lg1 datafile_ts1_02.dat 1048576 1048576 ndbcluster -ts2 lg1 datafile_ts2_01.dat 1048576 2097152 ndbcluster -ts3 lg1 datafile_ts3_01.dat 1048576 4194304 ndbcluster -SELECT COUNT(*) FROM t1; -COUNT(*) -500 -SELECT COUNT(*) FROM t2; -COUNT(*) -5 -SELECT COUNT(*) FROM t3; -COUNT(*) -1 -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -CREATE TABLE test.t ( -a smallint NOT NULL, -b int NOT NULL, -c bigint NOT NULL, -d char(10), -e TEXT, -f VARCHAR(255), -PRIMARY KEY(a) -) TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f); -SHOW CREATE TABLE test.t; -Table Create Table -t CREATE TABLE `t` ( - `a` smallint(6) NOT NULL, - `b` int(11) NOT NULL, - `c` bigint(20) NOT NULL, - `d` char(10) DEFAULT NULL, - `e` text, - `f` varchar(255) DEFAULT NULL, - PRIMARY KEY (`a`), - KEY `d` (`d`), - KEY `f` (`f`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM test.t order by a; -a b c d e f -1 2 3 aaa1 bbb1 ccccc1 -2 3 4 aaa2 bbb2 ccccc2 -3 4 5 aaa3 bbb3 ccccc3 -4 5 6 aaa4 bbb4 ccccc4 -5 6 7 aaa5 bbb5 ccccc5 -6 7 8 aaa6 bbb6 ccccc6 -7 8 9 aaa7 bbb7 ccccc7 -8 9 10 aaa8 bbb8 ccccc8 -9 10 11 aaa9 bbb9 ccccc9 -10 11 12 aaa10 bbb10 ccccc10 -11 12 13 aaa11 bbb11 ccccc11 -12 13 14 aaa12 bbb12 ccccc12 -13 14 15 aaa13 bbb13 ccccc13 -14 15 16 aaa14 bbb14 ccccc14 -15 16 17 aaa15 bbb15 ccccc15 -16 17 18 aaa16 bbb16 ccccc16 -17 18 19 aaa17 bbb17 ccccc17 -18 19 20 aaa18 bbb18 ccccc18 -19 20 21 aaa19 bbb19 ccccc19 -20 21 22 aaa20 bbb20 ccccc20 -21 22 23 aaa21 bbb21 ccccc21 -22 23 24 aaa22 bbb22 ccccc22 -23 24 25 aaa23 bbb23 ccccc23 -24 25 26 aaa24 bbb24 ccccc24 -25 26 27 aaa25 bbb25 ccccc25 -26 27 28 aaa26 bbb26 ccccc26 -27 28 29 aaa27 bbb27 ccccc27 -28 29 30 aaa28 bbb28 ccccc28 -29 30 31 aaa29 bbb29 ccccc29 -30 31 32 aaa30 bbb30 ccccc30 -31 32 33 aaa31 bbb31 ccccc31 -32 33 34 aaa32 bbb32 ccccc32 -33 34 35 aaa33 bbb33 ccccc33 -34 35 36 aaa34 bbb34 ccccc34 -35 36 37 aaa35 bbb35 ccccc35 -36 37 38 aaa36 bbb36 ccccc36 -37 38 39 aaa37 bbb37 ccccc37 -38 39 40 aaa38 bbb38 ccccc38 -39 40 41 aaa39 bbb39 ccccc39 -40 41 42 aaa40 bbb40 ccccc40 -41 42 43 aaa41 bbb41 ccccc41 -42 43 44 aaa42 bbb42 ccccc42 -43 44 45 aaa43 bbb43 ccccc43 -44 45 46 aaa44 bbb44 ccccc44 -45 46 47 aaa45 bbb45 ccccc45 -46 47 48 aaa46 bbb46 ccccc46 -47 48 49 aaa47 bbb47 ccccc47 -48 49 50 aaa48 bbb48 ccccc48 -49 50 51 aaa49 bbb49 ccccc49 -50 51 52 aaa50 bbb50 ccccc50 -51 52 53 aaa51 bbb51 ccccc51 -52 53 54 aaa52 bbb52 ccccc52 -53 54 55 aaa53 bbb53 ccccc53 -54 55 56 aaa54 bbb54 ccccc54 -55 56 57 aaa55 bbb55 ccccc55 -56 57 58 aaa56 bbb56 ccccc56 -57 58 59 aaa57 bbb57 ccccc57 -58 59 60 aaa58 bbb58 ccccc58 -59 60 61 aaa59 bbb59 ccccc59 -60 61 62 aaa60 bbb60 ccccc60 -61 62 63 aaa61 bbb61 ccccc61 -62 63 64 aaa62 bbb62 ccccc62 -63 64 65 aaa63 bbb63 ccccc63 -64 65 66 aaa64 bbb64 ccccc64 -65 66 67 aaa65 bbb65 ccccc65 -66 67 68 aaa66 bbb66 ccccc66 -67 68 69 aaa67 bbb67 ccccc67 -68 69 70 aaa68 bbb68 ccccc68 -69 70 71 aaa69 bbb69 ccccc69 -70 71 72 aaa70 bbb70 ccccc70 -71 72 73 aaa71 bbb71 ccccc71 -72 73 74 aaa72 bbb72 ccccc72 -73 74 75 aaa73 bbb73 ccccc73 -74 75 76 aaa74 bbb74 ccccc74 -75 76 77 aaa75 bbb75 ccccc75 -76 77 78 aaa76 bbb76 ccccc76 -77 78 79 aaa77 bbb77 ccccc77 -78 79 80 aaa78 bbb78 ccccc78 -79 80 81 aaa79 bbb79 ccccc79 -80 81 82 aaa80 bbb80 ccccc80 -81 82 83 aaa81 bbb81 ccccc81 -82 83 84 aaa82 bbb82 ccccc82 -83 84 85 aaa83 bbb83 ccccc83 -84 85 86 aaa84 bbb84 ccccc84 -85 86 87 aaa85 bbb85 ccccc85 -86 87 88 aaa86 bbb86 ccccc86 -87 88 89 aaa87 bbb87 ccccc87 -88 89 90 aaa88 bbb88 ccccc88 -89 90 91 aaa89 bbb89 ccccc89 -90 91 92 aaa90 bbb90 ccccc90 -91 92 93 aaa91 bbb91 ccccc91 -92 93 94 aaa92 bbb92 ccccc92 -93 94 95 aaa93 bbb93 ccccc93 -94 95 96 aaa94 bbb94 ccccc94 -95 96 97 aaa95 bbb95 ccccc95 -96 97 98 aaa96 bbb96 ccccc96 -97 98 99 aaa97 bbb97 ccccc97 -98 99 100 aaa98 bbb98 ccccc98 -99 100 101 aaa99 bbb99 ccccc99 -100 101 102 aaa100 bbb100 ccccc100 -SELECT * INTO OUTFILE 't_backup' FROM test.t; -TRUNCATE test.t; -SELECT count(*) FROM test.t; -count(*) -0 -LOAD DATA INFILE 't_backup' INTO TABLE test.t; -SELECT * FROM test.t order by a; -a b c d e f -1 2 3 aaa1 bbb1 ccccc1 -2 3 4 aaa2 bbb2 ccccc2 -3 4 5 aaa3 bbb3 ccccc3 -4 5 6 aaa4 bbb4 ccccc4 -5 6 7 aaa5 bbb5 ccccc5 -6 7 8 aaa6 bbb6 ccccc6 -7 8 9 aaa7 bbb7 ccccc7 -8 9 10 aaa8 bbb8 ccccc8 -9 10 11 aaa9 bbb9 ccccc9 -10 11 12 aaa10 bbb10 ccccc10 -11 12 13 aaa11 bbb11 ccccc11 -12 13 14 aaa12 bbb12 ccccc12 -13 14 15 aaa13 bbb13 ccccc13 -14 15 16 aaa14 bbb14 ccccc14 -15 16 17 aaa15 bbb15 ccccc15 -16 17 18 aaa16 bbb16 ccccc16 -17 18 19 aaa17 bbb17 ccccc17 -18 19 20 aaa18 bbb18 ccccc18 -19 20 21 aaa19 bbb19 ccccc19 -20 21 22 aaa20 bbb20 ccccc20 -21 22 23 aaa21 bbb21 ccccc21 -22 23 24 aaa22 bbb22 ccccc22 -23 24 25 aaa23 bbb23 ccccc23 -24 25 26 aaa24 bbb24 ccccc24 -25 26 27 aaa25 bbb25 ccccc25 -26 27 28 aaa26 bbb26 ccccc26 -27 28 29 aaa27 bbb27 ccccc27 -28 29 30 aaa28 bbb28 ccccc28 -29 30 31 aaa29 bbb29 ccccc29 -30 31 32 aaa30 bbb30 ccccc30 -31 32 33 aaa31 bbb31 ccccc31 -32 33 34 aaa32 bbb32 ccccc32 -33 34 35 aaa33 bbb33 ccccc33 -34 35 36 aaa34 bbb34 ccccc34 -35 36 37 aaa35 bbb35 ccccc35 -36 37 38 aaa36 bbb36 ccccc36 -37 38 39 aaa37 bbb37 ccccc37 -38 39 40 aaa38 bbb38 ccccc38 -39 40 41 aaa39 bbb39 ccccc39 -40 41 42 aaa40 bbb40 ccccc40 -41 42 43 aaa41 bbb41 ccccc41 -42 43 44 aaa42 bbb42 ccccc42 -43 44 45 aaa43 bbb43 ccccc43 -44 45 46 aaa44 bbb44 ccccc44 -45 46 47 aaa45 bbb45 ccccc45 -46 47 48 aaa46 bbb46 ccccc46 -47 48 49 aaa47 bbb47 ccccc47 -48 49 50 aaa48 bbb48 ccccc48 -49 50 51 aaa49 bbb49 ccccc49 -50 51 52 aaa50 bbb50 ccccc50 -51 52 53 aaa51 bbb51 ccccc51 -52 53 54 aaa52 bbb52 ccccc52 -53 54 55 aaa53 bbb53 ccccc53 -54 55 56 aaa54 bbb54 ccccc54 -55 56 57 aaa55 bbb55 ccccc55 -56 57 58 aaa56 bbb56 ccccc56 -57 58 59 aaa57 bbb57 ccccc57 -58 59 60 aaa58 bbb58 ccccc58 -59 60 61 aaa59 bbb59 ccccc59 -60 61 62 aaa60 bbb60 ccccc60 -61 62 63 aaa61 bbb61 ccccc61 -62 63 64 aaa62 bbb62 ccccc62 -63 64 65 aaa63 bbb63 ccccc63 -64 65 66 aaa64 bbb64 ccccc64 -65 66 67 aaa65 bbb65 ccccc65 -66 67 68 aaa66 bbb66 ccccc66 -67 68 69 aaa67 bbb67 ccccc67 -68 69 70 aaa68 bbb68 ccccc68 -69 70 71 aaa69 bbb69 ccccc69 -70 71 72 aaa70 bbb70 ccccc70 -71 72 73 aaa71 bbb71 ccccc71 -72 73 74 aaa72 bbb72 ccccc72 -73 74 75 aaa73 bbb73 ccccc73 -74 75 76 aaa74 bbb74 ccccc74 -75 76 77 aaa75 bbb75 ccccc75 -76 77 78 aaa76 bbb76 ccccc76 -77 78 79 aaa77 bbb77 ccccc77 -78 79 80 aaa78 bbb78 ccccc78 -79 80 81 aaa79 bbb79 ccccc79 -80 81 82 aaa80 bbb80 ccccc80 -81 82 83 aaa81 bbb81 ccccc81 -82 83 84 aaa82 bbb82 ccccc82 -83 84 85 aaa83 bbb83 ccccc83 -84 85 86 aaa84 bbb84 ccccc84 -85 86 87 aaa85 bbb85 ccccc85 -86 87 88 aaa86 bbb86 ccccc86 -87 88 89 aaa87 bbb87 ccccc87 -88 89 90 aaa88 bbb88 ccccc88 -89 90 91 aaa89 bbb89 ccccc89 -90 91 92 aaa90 bbb90 ccccc90 -91 92 93 aaa91 bbb91 ccccc91 -92 93 94 aaa92 bbb92 ccccc92 -93 94 95 aaa93 bbb93 ccccc93 -94 95 96 aaa94 bbb94 ccccc94 -95 96 97 aaa95 bbb95 ccccc95 -96 97 98 aaa96 bbb96 ccccc96 -97 98 99 aaa97 bbb97 ccccc97 -98 99 100 aaa98 bbb98 ccccc98 -99 100 101 aaa99 bbb99 ccccc99 -100 101 102 aaa100 bbb100 ccccc100 -DROP TABLE test.t; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; -DROP LOGFILE GROUP lg1 ENGINE = NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_sql_features.result b/mysql-test/suite/ndb/r/ndb_dd_sql_features.result deleted file mode 100644 index 135250fe7e8..00000000000 --- a/mysql-test/suite/ndb/r/ndb_dd_sql_features.result +++ /dev/null @@ -1,599 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -***** -**** Copy data from table in one table space to table -**** in different table space -***** -CREATE LOGFILE GROUP lg -ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE './table_space1/datafile.dat' - USE LOGFILE GROUP lg -INITIAL_SIZE 25M -ENGINE NDB; -CREATE TABLESPACE ts2 -ADD DATAFILE './table_space2/datafile.dat' - USE LOGFILE GROUP lg -INITIAL_SIZE 20M -ENGINE NDB; -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts2 STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` varchar(256) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a1` int(11) NOT NULL, - `a2` varchar(256) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa'); -INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb'); -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 111111 aaaaaaaa -2 222222 bbbbbbbb -INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; -SELECT * FROM test.t2 ORDER BY a1; -a1 a2 a3 -1 111111 aaaaaaaa -2 222222 bbbbbbbb -DROP TABLE test.t1, test.t2; -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -select length(@x0),length(@b1),length(@d1) from dual; -length(@x0) length(@b1) length(@d1) -256 2256 3000 -select length(@x0),length(@b2),length(@d2) from dual; -length(@x0) length(@b2) length(@d2) -256 20000 30000 -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) -TABLESPACE ts2 STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` varchar(5000) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a1` int(11) NOT NULL, - `a2` varchar(5000) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO test.t1 VALUES (1,@vc1,@d1); -INSERT INTO test.t1 VALUES (2,@vc2,@b1); -INSERT INTO test.t1 VALUES (3,@vc3,@d2); -INSERT INTO test.t1 VALUES (4,@vc4,@b2); -SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) -FROM test.t1 WHERE a1=1; -a1 length(a2) substr(a2,180,2) length(a3) substr(a3,1+3*900,3) -1 200 aa 3000 dd1 -SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) -FROM test.t1 where a1=2; -a1 length(a2) substr(a2,480,2) length(a3) substr(a3,1+2*900,3) -2 500 bb 2256 b1b -INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; -SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) -FROM test.t2 WHERE a1=1; -a1 length(a2) substr(a2,180,2) length(a3) substr(a3,1+3*900,3) -1 200 aa 3000 dd1 -SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) -FROM test.t2 where a1=2; -a1 length(a2) substr(a2,480,2) length(a3) substr(a3,1+2*900,3) -2 500 bb 2256 b1b -DROP TABLE test.t1, test.t2; -***** -**** Insert, Update, Delete from NDB table with BLOB fields -***** -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @vc5 = repeat('d', 5000); -set @bb1 = repeat('1', 2000); -set @bb2 = repeat('2', 5000); -set @bb3 = repeat('3', 10000); -set @bb4 = repeat('4', 40000); -set @bb5 = repeat('5', 50000); -select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5) -from dual; -length(@vc1) length(@vc2) length(@vc3) length(@vc4) length(@vc5) -200 500 1000 4000 5000 -select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5) -from dual; -length(@bb1) length(@bb2) length(@bb3) length(@bb4) length(@bb5) -2000 5000 10000 40000 50000 -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -INSERT INTO test.t1 VALUES (1,@vc1,@bb1); -INSERT INTO test.t1 VALUES (2,@vc2,@bb2); -INSERT INTO test.t1 VALUES (3,@vc3,@bb3); -INSERT INTO test.t1 VALUES (4,@vc4,@bb4); -INSERT INTO test.t1 VALUES (5,@vc5,@bb5); -UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1; -SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3) -FROM test.t1 WHERE a1=1; -a1 length(a2) substr(a2,4998,2) length(a3) substr(a3,49997,3) -1 5000 dd 50000 555 -UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2; -SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3) -FROM test.t1 WHERE a1=2; -a1 length(a2) substr(a2,3998,2) length(a3) substr(a3,39997,3) -2 4000 dd 40000 444 -UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3; -SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3) -FROM test.t1 WHERE a1=3; -a1 length(a2) substr(a2,498,2) length(a3) substr(a3,3997,3) -3 500 bb 5000 222 -UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4; -SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3) -FROM test.t1 WHERE a1=4; -a1 length(a2) substr(a2,998,2) length(a3) substr(a3,9997,3) -4 1000 cc 10000 333 -UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5; -SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3) -FROM test.t1 WHERE a1=5; -a1 length(a2) substr(a2,198,2) length(a3) substr(a3,1997,3) -5 200 aa 2000 111 -DELETE FROM test.t1 where a1=5; -SELECT count(*) from test.t1; -count(*) -4 -DELETE FROM test.t1 where a1=4; -SELECT count(*) from test.t1; -count(*) -3 -DELETE FROM test.t1 where a1=3; -SELECT count(*) from test.t1; -count(*) -2 -DELETE FROM test.t1 where a1=2; -SELECT count(*) from test.t1; -count(*) -1 -DELETE FROM test.t1 where a1=1; -SELECT count(*) from test.t1; -count(*) -0 -DROP TABLE test.t1; -***** -**** Create Stored procedures that use disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB// -CREATE PROCEDURE test.sp1() -BEGIN -INSERT INTO test.t1 values (1,'111111','aaaaaaaa'); -END// -CALL test.sp1(); -SELECT * FROM test.t1; -a1 a2 a3 -1 111111 aaaaaaaa -CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB) -BEGIN -UPDATE test.t1 SET a2=vc, a3=blb where a1=n; -END// -CALL test.sp2(1,'222222','bbbbbbbb'); -SELECT * FROM test.t1; -a1 a2 a3 -1 222222 bbbbbbbb -DELETE FROM test.t1; -DROP PROCEDURE test.sp1; -DROP PROCEDURE test.sp2; -DROP TABLE test.t1; -***** -***** Create function that operate on disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE FUNCTION test.fn1(n INT) RETURNS INT -BEGIN -DECLARE v INT; -SELECT a1 INTO v FROM test.t1 WHERE a1=n; -RETURN v; -END// -CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB -BEGIN -DECLARE vv BLOB; -UPDATE test.t1 SET a3=blb where a1=n; -SELECT a3 INTO vv FROM test.t1 WHERE a1=n; -RETURN vv; -END// -SELECT test.fn1(10) FROM DUAL; -test.fn1(10) -10 -SELECT test.fn2(50, 'new BLOB content') FROM DUAL; -test.fn2(50, 'new BLOB content') -new BLOB content -DELETE FROM test.t1; -DROP FUNCTION test.fn1; -DROP FUNCTION test.fn2; -DROP TABLE test.t1; -***** -***** Create triggers that operate on disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW -BEGIN -if isnull(new.a2) then -set new.a2:= 'trg1 works on a2 field'; -end if; -if isnull(new.a3) then -set new.a3:= 'trg1 works on a3 field'; -end if; -end// -insert into test.t1 (a1) values (1)// -insert into test.t1 (a1,a2) values (2, 'ccccccc')// -select * from test.t1 order by a1// -a1 a2 a3 -1 trg1 works on a2 field trg1 works on a3 field -2 ccccccc trg1 works on a3 field -DELETE FROM test.t1; -DROP TRIGGER test.trg1; -DROP TABLE test.t1; -***** -***** Create, update views that operate on disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE VIEW test.v1 AS SELECT * FROM test.t1; -SELECT * FROM test.v1 order by a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -3 aaaaa3 bbbbb3 -4 aaaaa4 bbbbb4 -5 aaaaa5 bbbbb5 -6 aaaaa6 bbbbb6 -7 aaaaa7 bbbbb7 -8 aaaaa8 bbbbb8 -9 aaaaa9 bbbbb9 -10 aaaaa10 bbbbb10 -CHECK TABLE test.v1, test.t1; -Table Op Msg_type Msg_text -test.v1 check status OK -test.t1 check note The storage engine for the table doesn't support check -UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5; -SELECT * FROM test.v1 order by a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -3 aaaaa3 bbbbb3 -4 aaaaa4 bbbbb4 -5 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz bbbbb5 -6 aaaaa6 bbbbb6 -7 aaaaa7 bbbbb7 -8 aaaaa8 bbbbb8 -9 aaaaa9 bbbbb9 -10 aaaaa10 bbbbb10 -DROP VIEW test.v1; -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create and use disk based table that use auto inc -***** -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa10 bbbbb10 -2 aaaaa9 bbbbb9 -3 aaaaa8 bbbbb8 -4 aaaaa7 bbbbb7 -5 aaaaa6 bbbbb6 -6 aaaaa5 bbbbb5 -7 aaaaa4 bbbbb4 -8 aaaaa3 bbbbb3 -9 aaaaa2 bbbbb2 -10 aaaaa1 bbbbb1 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create test that use transaction (commit, rollback) -***** -SET AUTOCOMMIT=0; -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); -COMMIT; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); -ROLLBACK; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -DELETE FROM test.t1; -DROP TABLE test.t1; -SET AUTOCOMMIT=1; -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -START TRANSACTION; -INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); -COMMIT; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -START TRANSACTION; -INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); -ROLLBACK; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create test that uses locks -***** -drop table if exists test.t1; -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -LOCK TABLES test.t1 write; -INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); -INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); -UNLOCK TABLES; -INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -3 aaaaa3 bbbbb3 -4 aaaaa3 bbbbb3 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create large disk base table, do random queries, check cache hits -***** -set @vc1 = repeat('a', 200); -SELECT @vc1 FROM DUAL; -@vc1 -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -set @vc2 = repeat('b', 500); -set @vc3 = repeat('b', 998); -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -select length(@x0),length(@b1),length(@d1) from dual; -length(@x0) length(@b1) length(@d1) -256 2256 3000 -select length(@x0),length(@b2),length(@d2) from dual; -length(@x0) length(@b2) length(@d2) -256 20000 30000 -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -INSERT INTO test.t1 values(1,@vc1,@d1); -INSERT INTO test.t1 values(2,@vc2,@d2); -explain SELECT * from test.t1 WHERE a1 = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY PRIMARY 4 const # -SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) -FROM test.t1 WHERE a1=1 ORDER BY a1; -a1 length(a2) substr(a2,1+2*900,2) length(a3) substr(a3,1+3*900,3) -1 200 3000 dd1 -SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) -FROM test.t1 where a1=2 ORDER BY a1; -a1 length(a2) substr(a2,1+2*9000,2) length(a3) substr(a3,1+3*9000,3) -2 500 30000 dd2 -UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1; -UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2; -SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) -FROM test.t1 where a1=1; -a1 length(a2) substr(a2,1+2*9000,2) length(a3) substr(a3,1+3*9000,3) -1 500 30000 dd2 -SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) -FROM test.t1 where a1=2; -a1 length(a2) substr(a2,1+2*900,2) length(a3) substr(a3,1+3*900,3) -2 200 3000 dd1 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(), -***** USER(), TRUNCATE -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), -a3 BLOB, a4 DATE, a5 CHAR(250)) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -SELECT COUNT(*) from test.t1; -COUNT(*) -100 -SELECT SUM(a1) from test.t1; -SUM(a1) -5050 -SELECT MIN(a1) from test.t1; -MIN(a1) -1 -SELECT MAX(a1) from test.t1; -MAX(a1) -100 -SELECT a5 from test.t1 where a1=50; -a5 -root@localhost -SELECT * from test.t1 order by a1; -a1 a2 a3 a4 a5 -1 aaaaaaaaaaaaaaaa1 bbbbbbbbbbbbbbbbbb1 2006-06-20 root@localhost -2 aaaaaaaaaaaaaaaa2 bbbbbbbbbbbbbbbbbb2 2006-06-20 root@localhost -3 aaaaaaaaaaaaaaaa3 bbbbbbbbbbbbbbbbbb3 2006-06-20 root@localhost -4 aaaaaaaaaaaaaaaa4 bbbbbbbbbbbbbbbbbb4 2006-06-20 root@localhost -5 aaaaaaaaaaaaaaaa5 bbbbbbbbbbbbbbbbbb5 2006-06-20 root@localhost -6 aaaaaaaaaaaaaaaa6 bbbbbbbbbbbbbbbbbb6 2006-06-20 root@localhost -7 aaaaaaaaaaaaaaaa7 bbbbbbbbbbbbbbbbbb7 2006-06-20 root@localhost -8 aaaaaaaaaaaaaaaa8 bbbbbbbbbbbbbbbbbb8 2006-06-20 root@localhost -9 aaaaaaaaaaaaaaaa9 bbbbbbbbbbbbbbbbbb9 2006-06-20 root@localhost -10 aaaaaaaaaaaaaaaa10 bbbbbbbbbbbbbbbbbb10 2006-06-20 root@localhost -11 aaaaaaaaaaaaaaaa11 bbbbbbbbbbbbbbbbbb11 2006-06-20 root@localhost -12 aaaaaaaaaaaaaaaa12 bbbbbbbbbbbbbbbbbb12 2006-06-20 root@localhost -13 aaaaaaaaaaaaaaaa13 bbbbbbbbbbbbbbbbbb13 2006-06-20 root@localhost -14 aaaaaaaaaaaaaaaa14 bbbbbbbbbbbbbbbbbb14 2006-06-20 root@localhost -15 aaaaaaaaaaaaaaaa15 bbbbbbbbbbbbbbbbbb15 2006-06-20 root@localhost -16 aaaaaaaaaaaaaaaa16 bbbbbbbbbbbbbbbbbb16 2006-06-20 root@localhost -17 aaaaaaaaaaaaaaaa17 bbbbbbbbbbbbbbbbbb17 2006-06-20 root@localhost -18 aaaaaaaaaaaaaaaa18 bbbbbbbbbbbbbbbbbb18 2006-06-20 root@localhost -19 aaaaaaaaaaaaaaaa19 bbbbbbbbbbbbbbbbbb19 2006-06-20 root@localhost -20 aaaaaaaaaaaaaaaa20 bbbbbbbbbbbbbbbbbb20 2006-06-20 root@localhost -21 aaaaaaaaaaaaaaaa21 bbbbbbbbbbbbbbbbbb21 2006-06-20 root@localhost -22 aaaaaaaaaaaaaaaa22 bbbbbbbbbbbbbbbbbb22 2006-06-20 root@localhost -23 aaaaaaaaaaaaaaaa23 bbbbbbbbbbbbbbbbbb23 2006-06-20 root@localhost -24 aaaaaaaaaaaaaaaa24 bbbbbbbbbbbbbbbbbb24 2006-06-20 root@localhost -25 aaaaaaaaaaaaaaaa25 bbbbbbbbbbbbbbbbbb25 2006-06-20 root@localhost -26 aaaaaaaaaaaaaaaa26 bbbbbbbbbbbbbbbbbb26 2006-06-20 root@localhost -27 aaaaaaaaaaaaaaaa27 bbbbbbbbbbbbbbbbbb27 2006-06-20 root@localhost -28 aaaaaaaaaaaaaaaa28 bbbbbbbbbbbbbbbbbb28 2006-06-20 root@localhost -29 aaaaaaaaaaaaaaaa29 bbbbbbbbbbbbbbbbbb29 2006-06-20 root@localhost -30 aaaaaaaaaaaaaaaa30 bbbbbbbbbbbbbbbbbb30 2006-06-20 root@localhost -31 aaaaaaaaaaaaaaaa31 bbbbbbbbbbbbbbbbbb31 2006-06-20 root@localhost -32 aaaaaaaaaaaaaaaa32 bbbbbbbbbbbbbbbbbb32 2006-06-20 root@localhost -33 aaaaaaaaaaaaaaaa33 bbbbbbbbbbbbbbbbbb33 2006-06-20 root@localhost -34 aaaaaaaaaaaaaaaa34 bbbbbbbbbbbbbbbbbb34 2006-06-20 root@localhost -35 aaaaaaaaaaaaaaaa35 bbbbbbbbbbbbbbbbbb35 2006-06-20 root@localhost -36 aaaaaaaaaaaaaaaa36 bbbbbbbbbbbbbbbbbb36 2006-06-20 root@localhost -37 aaaaaaaaaaaaaaaa37 bbbbbbbbbbbbbbbbbb37 2006-06-20 root@localhost -38 aaaaaaaaaaaaaaaa38 bbbbbbbbbbbbbbbbbb38 2006-06-20 root@localhost -39 aaaaaaaaaaaaaaaa39 bbbbbbbbbbbbbbbbbb39 2006-06-20 root@localhost -40 aaaaaaaaaaaaaaaa40 bbbbbbbbbbbbbbbbbb40 2006-06-20 root@localhost -41 aaaaaaaaaaaaaaaa41 bbbbbbbbbbbbbbbbbb41 2006-06-20 root@localhost -42 aaaaaaaaaaaaaaaa42 bbbbbbbbbbbbbbbbbb42 2006-06-20 root@localhost -43 aaaaaaaaaaaaaaaa43 bbbbbbbbbbbbbbbbbb43 2006-06-20 root@localhost -44 aaaaaaaaaaaaaaaa44 bbbbbbbbbbbbbbbbbb44 2006-06-20 root@localhost -45 aaaaaaaaaaaaaaaa45 bbbbbbbbbbbbbbbbbb45 2006-06-20 root@localhost -46 aaaaaaaaaaaaaaaa46 bbbbbbbbbbbbbbbbbb46 2006-06-20 root@localhost -47 aaaaaaaaaaaaaaaa47 bbbbbbbbbbbbbbbbbb47 2006-06-20 root@localhost -48 aaaaaaaaaaaaaaaa48 bbbbbbbbbbbbbbbbbb48 2006-06-20 root@localhost -49 aaaaaaaaaaaaaaaa49 bbbbbbbbbbbbbbbbbb49 2006-06-20 root@localhost -50 aaaaaaaaaaaaaaaa50 bbbbbbbbbbbbbbbbbb50 2006-06-20 root@localhost -51 aaaaaaaaaaaaaaaa51 bbbbbbbbbbbbbbbbbb51 2006-06-20 root@localhost -52 aaaaaaaaaaaaaaaa52 bbbbbbbbbbbbbbbbbb52 2006-06-20 root@localhost -53 aaaaaaaaaaaaaaaa53 bbbbbbbbbbbbbbbbbb53 2006-06-20 root@localhost -54 aaaaaaaaaaaaaaaa54 bbbbbbbbbbbbbbbbbb54 2006-06-20 root@localhost -55 aaaaaaaaaaaaaaaa55 bbbbbbbbbbbbbbbbbb55 2006-06-20 root@localhost -56 aaaaaaaaaaaaaaaa56 bbbbbbbbbbbbbbbbbb56 2006-06-20 root@localhost -57 aaaaaaaaaaaaaaaa57 bbbbbbbbbbbbbbbbbb57 2006-06-20 root@localhost -58 aaaaaaaaaaaaaaaa58 bbbbbbbbbbbbbbbbbb58 2006-06-20 root@localhost -59 aaaaaaaaaaaaaaaa59 bbbbbbbbbbbbbbbbbb59 2006-06-20 root@localhost -60 aaaaaaaaaaaaaaaa60 bbbbbbbbbbbbbbbbbb60 2006-06-20 root@localhost -61 aaaaaaaaaaaaaaaa61 bbbbbbbbbbbbbbbbbb61 2006-06-20 root@localhost -62 aaaaaaaaaaaaaaaa62 bbbbbbbbbbbbbbbbbb62 2006-06-20 root@localhost -63 aaaaaaaaaaaaaaaa63 bbbbbbbbbbbbbbbbbb63 2006-06-20 root@localhost -64 aaaaaaaaaaaaaaaa64 bbbbbbbbbbbbbbbbbb64 2006-06-20 root@localhost -65 aaaaaaaaaaaaaaaa65 bbbbbbbbbbbbbbbbbb65 2006-06-20 root@localhost -66 aaaaaaaaaaaaaaaa66 bbbbbbbbbbbbbbbbbb66 2006-06-20 root@localhost -67 aaaaaaaaaaaaaaaa67 bbbbbbbbbbbbbbbbbb67 2006-06-20 root@localhost -68 aaaaaaaaaaaaaaaa68 bbbbbbbbbbbbbbbbbb68 2006-06-20 root@localhost -69 aaaaaaaaaaaaaaaa69 bbbbbbbbbbbbbbbbbb69 2006-06-20 root@localhost -70 aaaaaaaaaaaaaaaa70 bbbbbbbbbbbbbbbbbb70 2006-06-20 root@localhost -71 aaaaaaaaaaaaaaaa71 bbbbbbbbbbbbbbbbbb71 2006-06-20 root@localhost -72 aaaaaaaaaaaaaaaa72 bbbbbbbbbbbbbbbbbb72 2006-06-20 root@localhost -73 aaaaaaaaaaaaaaaa73 bbbbbbbbbbbbbbbbbb73 2006-06-20 root@localhost -74 aaaaaaaaaaaaaaaa74 bbbbbbbbbbbbbbbbbb74 2006-06-20 root@localhost -75 aaaaaaaaaaaaaaaa75 bbbbbbbbbbbbbbbbbb75 2006-06-20 root@localhost -76 aaaaaaaaaaaaaaaa76 bbbbbbbbbbbbbbbbbb76 2006-06-20 root@localhost -77 aaaaaaaaaaaaaaaa77 bbbbbbbbbbbbbbbbbb77 2006-06-20 root@localhost -78 aaaaaaaaaaaaaaaa78 bbbbbbbbbbbbbbbbbb78 2006-06-20 root@localhost -79 aaaaaaaaaaaaaaaa79 bbbbbbbbbbbbbbbbbb79 2006-06-20 root@localhost -80 aaaaaaaaaaaaaaaa80 bbbbbbbbbbbbbbbbbb80 2006-06-20 root@localhost -81 aaaaaaaaaaaaaaaa81 bbbbbbbbbbbbbbbbbb81 2006-06-20 root@localhost -82 aaaaaaaaaaaaaaaa82 bbbbbbbbbbbbbbbbbb82 2006-06-20 root@localhost -83 aaaaaaaaaaaaaaaa83 bbbbbbbbbbbbbbbbbb83 2006-06-20 root@localhost -84 aaaaaaaaaaaaaaaa84 bbbbbbbbbbbbbbbbbb84 2006-06-20 root@localhost -85 aaaaaaaaaaaaaaaa85 bbbbbbbbbbbbbbbbbb85 2006-06-20 root@localhost -86 aaaaaaaaaaaaaaaa86 bbbbbbbbbbbbbbbbbb86 2006-06-20 root@localhost -87 aaaaaaaaaaaaaaaa87 bbbbbbbbbbbbbbbbbb87 2006-06-20 root@localhost -88 aaaaaaaaaaaaaaaa88 bbbbbbbbbbbbbbbbbb88 2006-06-20 root@localhost -89 aaaaaaaaaaaaaaaa89 bbbbbbbbbbbbbbbbbb89 2006-06-20 root@localhost -90 aaaaaaaaaaaaaaaa90 bbbbbbbbbbbbbbbbbb90 2006-06-20 root@localhost -91 aaaaaaaaaaaaaaaa91 bbbbbbbbbbbbbbbbbb91 2006-06-20 root@localhost -92 aaaaaaaaaaaaaaaa92 bbbbbbbbbbbbbbbbbb92 2006-06-20 root@localhost -93 aaaaaaaaaaaaaaaa93 bbbbbbbbbbbbbbbbbb93 2006-06-20 root@localhost -94 aaaaaaaaaaaaaaaa94 bbbbbbbbbbbbbbbbbb94 2006-06-20 root@localhost -95 aaaaaaaaaaaaaaaa95 bbbbbbbbbbbbbbbbbb95 2006-06-20 root@localhost -96 aaaaaaaaaaaaaaaa96 bbbbbbbbbbbbbbbbbb96 2006-06-20 root@localhost -97 aaaaaaaaaaaaaaaa97 bbbbbbbbbbbbbbbbbb97 2006-06-20 root@localhost -98 aaaaaaaaaaaaaaaa98 bbbbbbbbbbbbbbbbbb98 2006-06-20 root@localhost -99 aaaaaaaaaaaaaaaa99 bbbbbbbbbbbbbbbbbb99 2006-06-20 root@localhost -100 aaaaaaaaaaaaaaaa100 bbbbbbbbbbbbbbbbbb100 2006-06-20 root@localhost -DROP TABLE test.t1; -ALTER TABLESPACE ts1 -DROP DATAFILE './table_space1/datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE './table_space2/datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg -ENGINE=NDB; diff --git a/mysql-test/suite/ndb/r/ndb_gis.result b/mysql-test/suite/ndb/r/ndb_gis.result deleted file mode 100644 index 76a53804d8f..00000000000 --- a/mysql-test/suite/ndb/r/ndb_gis.result +++ /dev/null @@ -1,1100 +0,0 @@ -SET storage_engine=ndbcluster; -DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); -CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); -SHOW CREATE TABLE gis_point; -Table Create Table -gis_point CREATE TABLE `gis_point` ( - `fid` int(11) NOT NULL AUTO_INCREMENT, - `g` point DEFAULT NULL, - PRIMARY KEY (`fid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW FIELDS FROM gis_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g point YES NULL -SHOW FIELDS FROM gis_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g linestring YES NULL -SHOW FIELDS FROM gis_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g polygon YES NULL -SHOW FIELDS FROM gis_multi_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipoint YES NULL -SHOW FIELDS FROM gis_multi_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multilinestring YES NULL -SHOW FIELDS FROM gis_multi_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipolygon YES NULL -SHOW FIELDS FROM gis_geometrycollection; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometrycollection YES NULL -SHOW FIELDS FROM gis_geometry; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometry YES NULL -INSERT INTO gis_point VALUES -(101, PointFromText('POINT(10 10)')), -(102, PointFromText('POINT(20 10)')), -(103, PointFromText('POINT(20 20)')), -(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)')))); -INSERT INTO gis_line VALUES -(105, LineFromText('LINESTRING(0 0,0 10,10 0)')), -(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')), -(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10)))); -INSERT INTO gis_polygon VALUES -(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')), -(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')), -(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))); -INSERT INTO gis_multi_point VALUES -(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')), -(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')), -(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10)))); -INSERT INTO gis_multi_line VALUES -(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')), -(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')), -(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))); -INSERT INTO gis_multi_polygon VALUES -(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))); -INSERT INTO gis_geometrycollection VALUES -(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')), -(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))); -INSERT into gis_geometry SELECT * FROM gis_point; -INSERT into gis_geometry SELECT * FROM gis_line; -INSERT into gis_geometry SELECT * FROM gis_polygon; -INSERT into gis_geometry SELECT * FROM gis_multi_point; -INSERT into gis_geometry SELECT * FROM gis_multi_line; -INSERT into gis_geometry SELECT * FROM gis_multi_polygon; -INSERT into gis_geometry SELECT * FROM gis_geometrycollection; -SELECT fid, AsText(g) FROM gis_point ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -SELECT fid, AsText(g) FROM gis_line ORDER by fid; -fid AsText(g) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -SELECT fid, AsText(g) FROM gis_polygon ORDER by fid; -fid AsText(g) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid; -fid AsText(g) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid; -fid AsText(g) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid; -fid AsText(g) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid; -fid AsText(g) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, AsText(g) FROM gis_geometry ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid; -fid Dimension(g) -101 0 -102 0 -103 0 -104 0 -105 1 -106 1 -107 1 -108 2 -109 2 -110 2 -111 0 -112 0 -113 0 -114 1 -115 1 -116 1 -117 2 -118 2 -119 2 -120 1 -121 1 -SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid; -fid GeometryType(g) -101 POINT -102 POINT -103 POINT -104 POINT -105 LINESTRING -106 LINESTRING -107 LINESTRING -108 POLYGON -109 POLYGON -110 POLYGON -111 MULTIPOINT -112 MULTIPOINT -113 MULTIPOINT -114 MULTILINESTRING -115 MULTILINESTRING -116 MULTILINESTRING -117 MULTIPOLYGON -118 MULTIPOLYGON -119 MULTIPOLYGON -120 GEOMETRYCOLLECTION -121 GEOMETRYCOLLECTION -SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid; -fid IsEmpty(g) -101 0 -102 0 -103 0 -104 0 -105 0 -106 0 -107 0 -108 0 -109 0 -110 0 -111 0 -112 0 -113 0 -114 0 -115 0 -116 0 -117 0 -118 0 -119 0 -120 0 -121 0 -SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid; -fid AsText(Envelope(g)) -101 POLYGON((10 10,10 10,10 10,10 10,10 10)) -102 POLYGON((20 10,20 10,20 10,20 10,20 10)) -103 POLYGON((20 20,20 20,20 20,20 20,20 20)) -104 POLYGON((10 20,10 20,10 20,10 20,10 20)) -105 POLYGON((0 0,10 0,10 10,0 10,0 0)) -106 POLYGON((10 10,20 10,20 20,10 20,10 10)) -107 POLYGON((10 10,40 10,40 10,10 10,10 10)) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0)) -110 POLYGON((0 0,30 0,30 30,0 30,0 0)) -111 POLYGON((0 0,20 0,20 20,0 20,0 0)) -112 POLYGON((1 1,21 1,21 21,1 21,1 1)) -113 POLYGON((3 6,4 6,4 10,3 10,3 6)) -114 POLYGON((10 0,16 0,16 48,10 48,10 0)) -115 POLYGON((10 0,10 0,10 48,10 48,10 0)) -116 POLYGON((1 2,21 2,21 8,1 8,1 2)) -117 POLYGON((28 0,84 0,84 42,28 42,28 0)) -118 POLYGON((28 0,84 0,84 42,28 42,28 0)) -119 POLYGON((0 0,3 0,3 3,0 3,0 0)) -120 POLYGON((0 0,10 0,10 10,0 10,0 0)) -121 POLYGON((3 6,44 6,44 9,3 9,3 6)) -explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 -Warnings: -Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` -SELECT fid, X(g) FROM gis_point ORDER by fid; -fid X(g) -101 10 -102 20 -103 20 -104 10 -SELECT fid, Y(g) FROM gis_point ORDER by fid; -fid Y(g) -101 10 -102 10 -103 20 -104 20 -explain extended select X(g),Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 -Warnings: -Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` -SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; -fid AsText(StartPoint(g)) -105 POINT(0 0) -106 POINT(10 10) -107 POINT(10 10) -SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid; -fid AsText(EndPoint(g)) -105 POINT(10 0) -106 POINT(10 10) -107 POINT(40 10) -SELECT fid, GLength(g) FROM gis_line ORDER by fid; -fid GLength(g) -105 24.14213562373095 -106 40 -107 30 -SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; -fid NumPoints(g) -105 3 -106 5 -107 2 -SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid; -fid AsText(PointN(g, 2)) -105 POINT(0 10) -106 POINT(20 10) -107 POINT(40 10) -SELECT fid, IsClosed(g) FROM gis_line ORDER by fid; -fid IsClosed(g) -105 0 -106 1 -107 0 -explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` -SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; -fid AsText(Centroid(g)) -108 POINT(15 15) -109 POINT(25.416666666666668 25.416666666666668) -110 POINT(20 10) -SELECT fid, Area(g) FROM gis_polygon ORDER by fid; -fid Area(g) -108 100 -109 2400 -110 450 -SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid; -fid AsText(ExteriorRing(g)) -108 LINESTRING(10 10,20 10,20 20,10 20,10 10) -109 LINESTRING(0 0,50 0,50 50,0 50,0 0) -110 LINESTRING(0 0,30 0,30 30,0 0) -SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid; -fid NumInteriorRings(g) -108 0 -109 1 -110 0 -SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid; -fid AsText(InteriorRingN(g, 1)) -108 NULL -109 LINESTRING(10 10,20 10,20 20,10 20,10 10) -110 NULL -explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` -SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; -fid IsClosed(g) -114 0 -115 0 -116 0 -SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; -fid AsText(Centroid(g)) -117 POINT(55.58852775304245 17.426536064113982) -118 POINT(55.58852775304245 17.426536064113982) -119 POINT(2 2) -SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; -fid Area(g) -117 1684.5 -118 1684.5 -119 4.5 -SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid; -fid NumGeometries(g) -111 4 -112 4 -113 2 -SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid; -fid NumGeometries(g) -114 2 -115 1 -116 2 -SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid; -fid NumGeometries(g) -117 2 -118 2 -119 1 -SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid; -fid NumGeometries(g) -120 2 -121 2 -explain extended SELECT fid, NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; -fid AsText(GeometryN(g, 2)) -111 POINT(10 10) -112 POINT(11 11) -113 POINT(4 10) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid; -fid AsText(GeometryN(g, 2)) -114 LINESTRING(16 0,16 23,16 48) -115 NULL -116 LINESTRING(2 5,5 8,21 7) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid; -fid AsText(GeometryN(g, 2)) -117 POLYGON((59 18,67 18,67 13,59 13,59 18)) -118 POLYGON((59 18,67 18,67 13,59 13,59 18)) -119 NULL -SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 2)) -120 LINESTRING(0 0,10 10) -121 LINESTRING(3 6,7 9) -SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 1)) -120 POINT(0 0) -121 POINT(44 6) -explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` -SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -first second w c o e d t i r -120 120 1 1 0 1 0 0 1 0 -120 121 0 0 1 0 0 0 1 0 -121 120 0 0 1 0 0 0 1 0 -121 121 1 1 0 1 0 0 1 0 -explain extended SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer -Warnings: -Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` -DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE t1 ( -a INTEGER PRIMARY KEY AUTO_INCREMENT, -gp point, -ln linestring, -pg polygon, -mp multipoint, -mln multilinestring, -mpg multipolygon, -gc geometrycollection, -gm geometry -); -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -ALTER TABLE t1 ADD fid INT; -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -fid int(11) YES NULL -DROP TABLE t1; -create table t1 (pk integer primary key auto_increment, a geometry not null); -insert into t1 (a) values (GeomFromText('Point(1 2)')); -insert into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -drop table t1; -create table t1 (pk integer primary key auto_increment, fl geometry not null); -insert into t1 (fl) values (1); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (1.11); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values ("qwerty"); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (pointfromtext('point(1,1)')); -ERROR 23000: Column 'fl' cannot be null -drop table t1; -End of 4.1 tests -CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrcontains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrdisjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrequal -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrintersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbroverlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrtouches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrwithin -big,center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -contains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -disjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -equals -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -intersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -overlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -touches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -within -big,center -SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); -SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); -SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); -SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); -SET @point1 = GeomFromText('POLYGON ((0 0))'); -SET @point2 = GeomFromText('POLYGON ((-2 0))'); -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; -overlaps -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; -overlaps -SELECT Overlaps(@horiz1, @vert1) FROM DUAL; -Overlaps(@horiz1, @vert1) -0 -SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; -Overlaps(@horiz1, @horiz2) -1 -SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; -Overlaps(@horiz1, @horiz3) -0 -SELECT Overlaps(@horiz1, @point1) FROM DUAL; -Overlaps(@horiz1, @point1) -0 -SELECT Overlaps(@horiz1, @point2) FROM DUAL; -Overlaps(@horiz1, @point2) -0 -DROP TABLE t1; -End of 5.0 tests -set optimizer_switch = "engine_condition_pushdown=on"; -DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); -CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); -SHOW CREATE TABLE gis_point; -Table Create Table -gis_point CREATE TABLE `gis_point` ( - `fid` int(11) NOT NULL AUTO_INCREMENT, - `g` point DEFAULT NULL, - PRIMARY KEY (`fid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW FIELDS FROM gis_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g point YES NULL -SHOW FIELDS FROM gis_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g linestring YES NULL -SHOW FIELDS FROM gis_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g polygon YES NULL -SHOW FIELDS FROM gis_multi_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipoint YES NULL -SHOW FIELDS FROM gis_multi_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multilinestring YES NULL -SHOW FIELDS FROM gis_multi_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipolygon YES NULL -SHOW FIELDS FROM gis_geometrycollection; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometrycollection YES NULL -SHOW FIELDS FROM gis_geometry; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometry YES NULL -INSERT INTO gis_point VALUES -(101, PointFromText('POINT(10 10)')), -(102, PointFromText('POINT(20 10)')), -(103, PointFromText('POINT(20 20)')), -(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)')))); -INSERT INTO gis_line VALUES -(105, LineFromText('LINESTRING(0 0,0 10,10 0)')), -(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')), -(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10)))); -INSERT INTO gis_polygon VALUES -(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')), -(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')), -(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))); -INSERT INTO gis_multi_point VALUES -(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')), -(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')), -(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10)))); -INSERT INTO gis_multi_line VALUES -(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')), -(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')), -(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))); -INSERT INTO gis_multi_polygon VALUES -(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))); -INSERT INTO gis_geometrycollection VALUES -(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')), -(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))); -INSERT into gis_geometry SELECT * FROM gis_point; -INSERT into gis_geometry SELECT * FROM gis_line; -INSERT into gis_geometry SELECT * FROM gis_polygon; -INSERT into gis_geometry SELECT * FROM gis_multi_point; -INSERT into gis_geometry SELECT * FROM gis_multi_line; -INSERT into gis_geometry SELECT * FROM gis_multi_polygon; -INSERT into gis_geometry SELECT * FROM gis_geometrycollection; -SELECT fid, AsText(g) FROM gis_point ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -SELECT fid, AsText(g) FROM gis_line ORDER by fid; -fid AsText(g) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -SELECT fid, AsText(g) FROM gis_polygon ORDER by fid; -fid AsText(g) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid; -fid AsText(g) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid; -fid AsText(g) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid; -fid AsText(g) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid; -fid AsText(g) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, AsText(g) FROM gis_geometry ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid; -fid Dimension(g) -101 0 -102 0 -103 0 -104 0 -105 1 -106 1 -107 1 -108 2 -109 2 -110 2 -111 0 -112 0 -113 0 -114 1 -115 1 -116 1 -117 2 -118 2 -119 2 -120 1 -121 1 -SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid; -fid GeometryType(g) -101 POINT -102 POINT -103 POINT -104 POINT -105 LINESTRING -106 LINESTRING -107 LINESTRING -108 POLYGON -109 POLYGON -110 POLYGON -111 MULTIPOINT -112 MULTIPOINT -113 MULTIPOINT -114 MULTILINESTRING -115 MULTILINESTRING -116 MULTILINESTRING -117 MULTIPOLYGON -118 MULTIPOLYGON -119 MULTIPOLYGON -120 GEOMETRYCOLLECTION -121 GEOMETRYCOLLECTION -SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid; -fid IsEmpty(g) -101 0 -102 0 -103 0 -104 0 -105 0 -106 0 -107 0 -108 0 -109 0 -110 0 -111 0 -112 0 -113 0 -114 0 -115 0 -116 0 -117 0 -118 0 -119 0 -120 0 -121 0 -SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid; -fid AsText(Envelope(g)) -101 POLYGON((10 10,10 10,10 10,10 10,10 10)) -102 POLYGON((20 10,20 10,20 10,20 10,20 10)) -103 POLYGON((20 20,20 20,20 20,20 20,20 20)) -104 POLYGON((10 20,10 20,10 20,10 20,10 20)) -105 POLYGON((0 0,10 0,10 10,0 10,0 0)) -106 POLYGON((10 10,20 10,20 20,10 20,10 10)) -107 POLYGON((10 10,40 10,40 10,10 10,10 10)) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0)) -110 POLYGON((0 0,30 0,30 30,0 30,0 0)) -111 POLYGON((0 0,20 0,20 20,0 20,0 0)) -112 POLYGON((1 1,21 1,21 21,1 21,1 1)) -113 POLYGON((3 6,4 6,4 10,3 10,3 6)) -114 POLYGON((10 0,16 0,16 48,10 48,10 0)) -115 POLYGON((10 0,10 0,10 48,10 48,10 0)) -116 POLYGON((1 2,21 2,21 8,1 8,1 2)) -117 POLYGON((28 0,84 0,84 42,28 42,28 0)) -118 POLYGON((28 0,84 0,84 42,28 42,28 0)) -119 POLYGON((0 0,3 0,3 3,0 3,0 0)) -120 POLYGON((0 0,10 0,10 10,0 10,0 0)) -121 POLYGON((3 6,44 6,44 9,3 9,3 6)) -explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 -Warnings: -Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` -SELECT fid, X(g) FROM gis_point ORDER by fid; -fid X(g) -101 10 -102 20 -103 20 -104 10 -SELECT fid, Y(g) FROM gis_point ORDER by fid; -fid Y(g) -101 10 -102 10 -103 20 -104 20 -explain extended select X(g),Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 -Warnings: -Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` -SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; -fid AsText(StartPoint(g)) -105 POINT(0 0) -106 POINT(10 10) -107 POINT(10 10) -SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid; -fid AsText(EndPoint(g)) -105 POINT(10 0) -106 POINT(10 10) -107 POINT(40 10) -SELECT fid, GLength(g) FROM gis_line ORDER by fid; -fid GLength(g) -105 24.14213562373095 -106 40 -107 30 -SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; -fid NumPoints(g) -105 3 -106 5 -107 2 -SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid; -fid AsText(PointN(g, 2)) -105 POINT(0 10) -106 POINT(20 10) -107 POINT(40 10) -SELECT fid, IsClosed(g) FROM gis_line ORDER by fid; -fid IsClosed(g) -105 0 -106 1 -107 0 -explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` -SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; -fid AsText(Centroid(g)) -108 POINT(15 15) -109 POINT(25.416666666666668 25.416666666666668) -110 POINT(20 10) -SELECT fid, Area(g) FROM gis_polygon ORDER by fid; -fid Area(g) -108 100 -109 2400 -110 450 -SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid; -fid AsText(ExteriorRing(g)) -108 LINESTRING(10 10,20 10,20 20,10 20,10 10) -109 LINESTRING(0 0,50 0,50 50,0 50,0 0) -110 LINESTRING(0 0,30 0,30 30,0 0) -SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid; -fid NumInteriorRings(g) -108 0 -109 1 -110 0 -SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid; -fid AsText(InteriorRingN(g, 1)) -108 NULL -109 LINESTRING(10 10,20 10,20 20,10 20,10 10) -110 NULL -explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` -SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; -fid IsClosed(g) -114 0 -115 0 -116 0 -SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; -fid AsText(Centroid(g)) -117 POINT(55.58852775304245 17.426536064113982) -118 POINT(55.58852775304245 17.426536064113982) -119 POINT(2 2) -SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; -fid Area(g) -117 1684.5 -118 1684.5 -119 4.5 -SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid; -fid NumGeometries(g) -111 4 -112 4 -113 2 -SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid; -fid NumGeometries(g) -114 2 -115 1 -116 2 -SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid; -fid NumGeometries(g) -117 2 -118 2 -119 1 -SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid; -fid NumGeometries(g) -120 2 -121 2 -explain extended SELECT fid, NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; -fid AsText(GeometryN(g, 2)) -111 POINT(10 10) -112 POINT(11 11) -113 POINT(4 10) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid; -fid AsText(GeometryN(g, 2)) -114 LINESTRING(16 0,16 23,16 48) -115 NULL -116 LINESTRING(2 5,5 8,21 7) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid; -fid AsText(GeometryN(g, 2)) -117 POLYGON((59 18,67 18,67 13,59 13,59 18)) -118 POLYGON((59 18,67 18,67 13,59 13,59 18)) -119 NULL -SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 2)) -120 LINESTRING(0 0,10 10) -121 LINESTRING(3 6,7 9) -SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 1)) -120 POINT(0 0) -121 POINT(44 6) -explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` -SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -first second w c o e d t i r -120 120 1 1 0 1 0 0 1 0 -120 121 0 0 1 0 0 0 1 0 -121 120 0 0 1 0 0 0 1 0 -121 121 1 1 0 1 0 0 1 0 -explain extended SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer -Warnings: -Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` -DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE t1 ( -a INTEGER PRIMARY KEY AUTO_INCREMENT, -gp point, -ln linestring, -pg polygon, -mp multipoint, -mln multilinestring, -mpg multipolygon, -gc geometrycollection, -gm geometry -); -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -ALTER TABLE t1 ADD fid INT; -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -fid int(11) YES NULL -DROP TABLE t1; -create table t1 (pk integer primary key auto_increment, a geometry not null); -insert into t1 (a) values (GeomFromText('Point(1 2)')); -insert into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -drop table t1; -create table t1 (pk integer primary key auto_increment, fl geometry not null); -insert into t1 (fl) values (1); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (1.11); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values ("qwerty"); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (pointfromtext('point(1,1)')); -ERROR 23000: Column 'fl' cannot be null -drop table t1; -End of 4.1 tests -CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); -Warnings: -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrcontains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrdisjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrequal -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrintersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbroverlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrtouches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrwithin -big,center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -contains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -disjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -equals -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -intersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -overlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -touches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -within -big,center -SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); -SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); -SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); -SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); -SET @point1 = GeomFromText('POLYGON ((0 0))'); -SET @point2 = GeomFromText('POLYGON ((-2 0))'); -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; -overlaps -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; -overlaps -SELECT Overlaps(@horiz1, @vert1) FROM DUAL; -Overlaps(@horiz1, @vert1) -0 -SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; -Overlaps(@horiz1, @horiz2) -1 -SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; -Overlaps(@horiz1, @horiz3) -0 -SELECT Overlaps(@horiz1, @point1) FROM DUAL; -Overlaps(@horiz1, @point1) -0 -SELECT Overlaps(@horiz1, @point2) FROM DUAL; -Overlaps(@horiz1, @point2) -0 -DROP TABLE t1; -End of 5.0 tests diff --git a/mysql-test/suite/ndb/r/ndb_grant.result b/mysql-test/suite/ndb/r/ndb_grant.result deleted file mode 100644 index 6192a7cace5..00000000000 --- a/mysql-test/suite/ndb/r/ndb_grant.result +++ /dev/null @@ -1,444 +0,0 @@ -drop table if exists t1; -SET NAMES binary; -use mysql; -alter table columns_priv engine=ndb; -alter table db engine=ndb; -alter table func engine=ndb; -alter table help_category engine=ndb; -alter table help_keyword engine=ndb; -alter table help_relation engine=ndb; -alter table help_topic engine=ndb; -alter table host engine=ndb; -alter table tables_priv engine=ndb; -alter table time_zone engine=ndb; -alter table time_zone_leap_second engine=ndb; -alter table time_zone_name engine=ndb; -alter table time_zone_transition engine=ndb; -alter table time_zone_transition_type engine=ndb; -alter table user engine=ndb; -use test; -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -flush privileges; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant delete on mysqltest.* to mysqltest_1@localhost; -commit; -select * from mysql.user where user="mysqltest_1"; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections -localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N 0 0 0 -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT, DELETE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -revoke delete on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant select on mysqltest.* to mysqltest_1@localhost require NONE; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -flush privileges; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; -commit; -flush privileges; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -begin; -revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, CREATE VIEW, SHOW VIEW ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant usage on test.* to mysqltest_1@localhost with grant option; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT USAGE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -GRANT USAGE ON `test`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -delete from mysql.tables_priv where user='mysqltest_1'; -delete from mysql.columns_priv where user='mysqltest_1'; -flush privileges; -show grants for mysqltest_1@localhost; -ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host 'localhost' -create table t1 (a int); -begin; -GRANT select,update,insert on t1 to mysqltest_1@localhost; -GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, SELECT (a), INSERT, INSERT (a), UPDATE, UPDATE (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -table_priv column_priv -Select,Insert,Update Select,Insert,Update,References -begin; -REVOKE select (a), update on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, INSERT (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' -begin; -REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' -begin; -GRANT select,references on t1 to mysqltest_1@localhost; -commit; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -table_priv column_priv -Select,References References -begin; -grant all on test.* to mysqltest_3@localhost with grant option; -revoke all on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' -GRANT USAGE ON `test`.* TO 'mysqltest_3'@'localhost' WITH GRANT OPTION -begin; -revoke grant option on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' -begin; -grant all on test.t1 to mysqltest_2@localhost with grant option; -revoke all on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' -GRANT USAGE ON `test`.`t1` TO 'mysqltest_2'@'localhost' WITH GRANT OPTION -begin; -revoke grant option on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' -delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -flush privileges; -drop table t1; -begin; -GRANT FILE on mysqltest.* to mysqltest_1@localhost; -ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES -commit; -select 1; -1 -1 -create database mysqltest1; -begin; -grant usage on mysqltest1.* to test6123 identified by 'magic123'; -commit; -select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; -host db user select_priv insert_priv -delete from mysql.user where user='test6123'; -drop database mysqltest1; -create table t1 (a int); -begin; -grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; -commit; -show grants for drop_user2@localhost; -Grants for drop_user2@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user2'@'localhost' WITH GRANT OPTION -begin; -revoke all privileges, grant option from drop_user2@localhost; -commit; -drop user drop_user2@localhost; -begin; -grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; -grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; -grant select(a) on test.t1 to drop_user@localhost; -commit; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' -set sql_mode=ansi_quotes; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' -set sql_mode=default; -set sql_quote_show_create=0; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' -set sql_mode="ansi_quotes"; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' -set sql_quote_show_create=1; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' -set sql_mode=""; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' -revoke all privileges, grant option from drop_user@localhost; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT USAGE ON *.* TO 'drop_user'@'localhost' -drop user drop_user@localhost; -begin; -revoke all privileges, grant option from drop_user@localhost; -ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users -commit; -begin; -grant select(a) on test.t1 to drop_user1@localhost; -commit; -flush privileges; -begin; -grant select on test.t1 to drop_user2@localhost; -grant select on test.* to drop_user3@localhost; -grant select on *.* to drop_user4@localhost; -commit; -flush privileges; -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -begin; -revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, -drop_user3@localhost, drop_user4@localhost; -ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users -commit; -flush privileges; -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -drop table t1; -begin; -grant usage on *.* to mysqltest_1@localhost identified by "password"; -grant select, update, insert on test.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' -GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'mysqltest_1'@'localhost' -drop user mysqltest_1@localhost; -SET NAMES koi8r; -CREATE DATABASE ÂÄ; -USE ÂÄ; -CREATE TABLE ÔÁ (ËÏÌ int); -begin; -GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT ON `ÂÄ`.* TO 'ÀÚÅÒ'@'localhost' -begin; -REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; -commit; -begin; -GRANT SELECT ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' -begin; -REVOKE SELECT ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; -begin; -GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' -begin; -REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; -DROP DATABASE ÂÄ; -SET NAMES latin1; -USE test; -CREATE TABLE t1 (a int ); -CREATE TABLE t2 LIKE t1; -CREATE TABLE t3 LIKE t1; -CREATE TABLE t4 LIKE t1; -CREATE TABLE t5 LIKE t1; -CREATE TABLE t6 LIKE t1; -CREATE TABLE t7 LIKE t1; -CREATE TABLE t8 LIKE t1; -CREATE TABLE t9 LIKE t1; -CREATE TABLE t10 LIKE t1; -CREATE DATABASE testdb1; -CREATE DATABASE testdb2; -CREATE DATABASE testdb3; -CREATE DATABASE testdb4; -CREATE DATABASE testdb5; -CREATE DATABASE testdb6; -CREATE DATABASE testdb7; -CREATE DATABASE testdb8; -CREATE DATABASE testdb9; -CREATE DATABASE testdb10; -begin; -GRANT ALL ON testdb1.* TO testuser@localhost; -GRANT ALL ON testdb2.* TO testuser@localhost; -GRANT ALL ON testdb3.* TO testuser@localhost; -GRANT ALL ON testdb4.* TO testuser@localhost; -GRANT ALL ON testdb5.* TO testuser@localhost; -GRANT ALL ON testdb6.* TO testuser@localhost; -GRANT ALL ON testdb7.* TO testuser@localhost; -GRANT ALL ON testdb8.* TO testuser@localhost; -GRANT ALL ON testdb9.* TO testuser@localhost; -GRANT ALL ON testdb10.* TO testuser@localhost; -GRANT SELECT ON test.t1 TO testuser@localhost; -GRANT SELECT ON test.t2 TO testuser@localhost; -GRANT SELECT ON test.t3 TO testuser@localhost; -GRANT SELECT ON test.t4 TO testuser@localhost; -GRANT SELECT ON test.t5 TO testuser@localhost; -GRANT SELECT ON test.t6 TO testuser@localhost; -GRANT SELECT ON test.t7 TO testuser@localhost; -GRANT SELECT ON test.t8 TO testuser@localhost; -GRANT SELECT ON test.t9 TO testuser@localhost; -GRANT SELECT ON test.t10 TO testuser@localhost; -GRANT SELECT (a) ON test.t1 TO testuser@localhost; -GRANT SELECT (a) ON test.t2 TO testuser@localhost; -GRANT SELECT (a) ON test.t3 TO testuser@localhost; -GRANT SELECT (a) ON test.t4 TO testuser@localhost; -GRANT SELECT (a) ON test.t5 TO testuser@localhost; -GRANT SELECT (a) ON test.t6 TO testuser@localhost; -GRANT SELECT (a) ON test.t7 TO testuser@localhost; -GRANT SELECT (a) ON test.t8 TO testuser@localhost; -GRANT SELECT (a) ON test.t9 TO testuser@localhost; -GRANT SELECT (a) ON test.t10 TO testuser@localhost; -commit; -begin; -REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; -commit; -SHOW GRANTS FOR testuser@localhost; -Grants for testuser@localhost -GRANT USAGE ON *.* TO 'testuser'@'localhost' -DROP USER testuser@localhost; -DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -DROP DATABASE testdb1; -DROP DATABASE testdb2; -DROP DATABASE testdb3; -DROP DATABASE testdb4; -DROP DATABASE testdb5; -DROP DATABASE testdb6; -DROP DATABASE testdb7; -DROP DATABASE testdb8; -DROP DATABASE testdb9; -DROP DATABASE testdb10; -SHOW PRIVILEGES; -Privilege Context Comment -Alter Tables To alter the table -Create Databases,Tables,Indexes To create new databases and tables -Create temporary tables Databases To use CREATE TEMPORARY TABLE -Create view Tables To create new views -Delete Tables To delete existing rows -Drop Databases,Tables To drop databases, tables, and views -File File access on server To read and write files on the server -Grant option Databases,Tables To give to other users those privileges you possess -Index Tables To create or drop indexes -Insert Tables To insert data into tables -Lock tables Databases To use LOCK TABLES (together with SELECT privilege) -Process Server Admin To view the plain text of currently executing queries -References Databases,Tables To have references on tables -Reload Server Admin To reload or refresh tables, logs and privileges -Replication client Server Admin To ask where the slave or master servers are -Replication slave Server Admin To read binary log events from the master -Select Tables To retrieve rows from table -Show databases Server Admin To see all databases with SHOW DATABASES -Show view Tables To see views with SHOW CREATE VIEW -Shutdown Server Admin To shut down the server -Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc. -Update Tables To update existing rows -Usage Server Admin No privileges - allow connect only -use mysql; -alter table columns_priv engine=myisam; -alter table db engine=myisam; -alter table func engine=myisam; -alter table help_category engine=myisam; -alter table help_keyword engine=myisam; -alter table help_relation engine=myisam; -alter table help_topic engine=myisam; -alter table host engine=myisam; -alter table tables_priv engine=myisam; -alter table time_zone engine=myisam; -alter table time_zone_leap_second engine=myisam; -alter table time_zone_name engine=myisam; -alter table time_zone_transition engine=myisam; -alter table time_zone_transition_type engine=myisam; -alter table user engine=myisam; -use test; -flush privileges; diff --git a/mysql-test/suite/ndb/r/ndb_index.result b/mysql-test/suite/ndb/r/ndb_index.result deleted file mode 100644 index 5702552b0b5..00000000000 --- a/mysql-test/suite/ndb/r/ndb_index.result +++ /dev/null @@ -1,154 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( -PORT varchar(16) NOT NULL, -ACCESSNODE varchar(16) NOT NULL, -POP varchar(48) NOT NULL, -ACCESSTYPE int unsigned NOT NULL, -CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL, -PROVIDER varchar(16), -TEXPIRE int unsigned, -NUM_IP int unsigned, -LEASED_NUM_IP int unsigned, -LOCKED_IP int unsigned, -STATIC_DNS int unsigned, -SUSPENDED_SERVICE int unsigned, -SUSPENDED_REASON int unsigned, -BGP_COMMUNITY int unsigned, -INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID), -INDEX FQPN_INDEX(POP,ACCESSNODE,PORT), -PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE) -) engine=ndbcluster; -INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278); -select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype; -port accessnode pop accesstype -port67 node78 pop98 1 -port67 node78 pop99 2 -select port, accessnode, pop, accesstype from t1 where port='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype; -port accessnode pop accesstype -port67 node78 pop98 1 -port67 node78 pop99 2 -select port, accessnode, pop, accesstype from t1 where accessnode='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port; -port accessnode pop accesstype -port67 node78 pop99 2 -port79 node79 pop79 2 -select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where customer_id='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where provider='pr_43'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where provider='foo'; -port accessnode pop accesstype -select port, accessnode from t1 where texpire=121212; -port accessnode -port67 node78 -select port, accessnode from t1 where texpire=2323; -port accessnode -select port, accessnode, pop, accesstype from t1 where num_ip=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where num_ip=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where leased_num_ip=2; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where leased_num_ip=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where locked_ip=3; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where locked_ip=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where static_dns=8; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where static_dns=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_service=8; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_service=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_reason=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_reason=0; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where bgp_community=NULL; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where bgp_community=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where bgp_community=0; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99; -port accessnode -select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo'; -port accessnode -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo'; -port accessnode pop accesstype -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_index_ordered.result b/mysql-test/suite/ndb/r/ndb_index_ordered.result deleted file mode 100644 index c99db354314..00000000000 --- a/mysql-test/suite/ndb/r/ndb_index_ordered.result +++ /dev/null @@ -1,839 +0,0 @@ -drop table if exists t1, test1, test2; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned, -KEY(b) -) engine=ndbcluster; -insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b >= 4 order by b; -a b c -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b = 4 order by b; -a b c -3 4 6 -select * from t1 where b > 4 order by b; -a b c -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b < 4 order by b; -a b c -1 2 3 -2 3 5 -select * from t1 where b <= 4 order by b; -a b c -1 2 3 -2 3 5 -3 4 6 -select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select a, b, c from t1 where a!=2 and c=6; -a b c -3 4 6 -select a, b, c from t1 where a!=2 order by a; -a b c -1 2 3 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -update t1 set c = 3 where b = 3; -select * from t1 order by a; -a b c -1 2 3 -2 3 3 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -update t1 set c = 10 where b >= 6; -select * from t1 order by a; -a b c -1 2 3 -2 3 3 -3 4 6 -4 5 8 -5 6 10 -6 7 10 -update t1 set c = 11 where b < 5; -select * from t1 order by a; -a b c -1 2 11 -2 3 11 -3 4 11 -4 5 8 -5 6 10 -6 7 10 -update t1 set c = 12 where b > 0; -select * from t1 order by a; -a b c -1 2 12 -2 3 12 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -update t1 set c = 13 where b <= 3; -select * from t1 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -update t1 set b = b + 1 where b > 4 and b < 7; -select * from t1 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 6 12 -5 7 12 -6 7 12 -update t1 set a = a + 10 where b > 1 and b < 7; -select * from t1 order by a; -a b c -5 7 12 -6 7 12 -11 2 13 -12 3 13 -13 4 12 -14 6 12 -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned, -KEY(b) -) engine=ndbcluster; -insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12); -delete from t1 where b = 3; -select * from t1 order by a; -a b c -1 2 13 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -delete from t1 where b >= 6; -select * from t1 order by a; -a b c -1 2 13 -3 4 12 -4 5 12 -delete from t1 where b < 4; -select * from t1 order by a; -a b c -3 4 12 -4 5 12 -delete from t1 where b > 5; -select * from t1 order by a; -a b c -3 4 12 -4 5 12 -delete from t1 where b <= 4; -select * from t1 order by a; -a b c -4 5 12 -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned not null -) engine = ndb; -create index a1 on t1 (b, c); -insert into t1 values (1, 2, 13); -insert into t1 values (2,3, 13); -insert into t1 values (3, 4, 12); -insert into t1 values (4, 5, 12); -insert into t1 values (5,6, 12); -insert into t1 values (6,7, 12); -insert into t1 values (7, 2, 1); -insert into t1 values (8,3, 6); -insert into t1 values (9, 4, 12); -insert into t1 values (14, 5, 4); -insert into t1 values (15,5,5); -insert into t1 values (16,5, 6); -insert into t1 values (17,4,4); -insert into t1 values (18,1, 7); -select * from t1 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -7 2 1 -8 3 6 -9 4 12 -14 5 4 -15 5 5 -16 5 6 -17 4 4 -18 1 7 -select * from t1 where b<=5 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 5 12 -7 2 1 -8 3 6 -9 4 12 -14 5 4 -15 5 5 -16 5 6 -17 4 4 -18 1 7 -select * from t1 where b<=5 and c=0; -a b c -insert into t1 values (19,4, 0); -select * from t1 where b<=5 and c=0; -a b c -19 4 0 -select * from t1 where b=4 and c<=5 order by a; -a b c -17 4 4 -19 4 0 -select * from t1 where b<=4 and c<=5 order by a; -a b c -7 2 1 -17 4 4 -19 4 0 -select * from t1 where b<=5 and c=0 or b<=5 and c=2; -a b c -19 4 0 -select count(*) from t1 where b = 0; -count(*) -0 -select count(*) from t1 where b = 1; -count(*) -1 -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned, -c int unsigned, -KEY bc(b,c) -) engine = ndb; -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc)order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (bc) order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (PRIMARY) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -a b c -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -a b c -2 NULL 2 -select * from t1 use index (bc) where b < 4 order by a; -a b c -1 1 1 -select * from t1 use index (bc) where b IS NOT NULL order by a; -a b c -1 1 1 -4 4 NULL -drop table t1; -create table t1 ( -a int unsigned primary key, -b int unsigned, -c char(10), -key bc (b, c) -) engine=ndb; -insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); -insert into t1 select a*7,10*b,'f' from t1; -insert into t1 select a*13,10*b,'g' from t1; -insert into t1 select a*17,10*b,'h' from t1; -insert into t1 select a*19,10*b,'i' from t1; -insert into t1 select a*23,10*b,'j' from t1; -insert into t1 select a*29,10*b,'k' from t1; -select b, c from t1 where b <= 10 and c <'f' order by b, c; -b c -1 a -2 b -3 c -4 d -5 e -select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; -b c -5 e -4 d -3 c -2 b -1 a -select b, c from t1 where b=4000 and c<'k' order by b, c; -b c -4000 h -4000 i -4000 i -4000 i -4000 j -4000 j -4000 j -4000 j -4000 j -4000 j -select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; -b c -4000 j -4000 j -4000 j -4000 j -4000 j -4000 j -4000 i -4000 i -4000 i -4000 h -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; -b c -1000 h -1000 i -1000 i -1000 i -2000 h -2000 i -2000 i -2000 i -3000 h -3000 i -3000 i -3000 i -4000 h -4000 i -4000 i -4000 i -5000 h -5000 i -5000 i -5000 i -10000 i -20000 i -30000 i -40000 i -50000 i -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; -b c -50000 i -40000 i -30000 i -20000 i -10000 i -5000 i -5000 i -5000 i -5000 h -4000 i -4000 i -4000 i -4000 h -3000 i -3000 i -3000 i -3000 h -2000 i -2000 i -2000 i -2000 h -1000 i -1000 i -1000 i -1000 h -select min(b), max(b) from t1; -min(b) max(b) -1 5000000 -drop table t1; -CREATE TABLE test1 ( -SubscrID int(11) NOT NULL auto_increment, -UsrID int(11) NOT NULL default '0', -PRIMARY KEY (SubscrID), -KEY idx_usrid (UsrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO test1 VALUES (2,224),(3,224),(1,224); -CREATE TABLE test2 ( -SbclID int(11) NOT NULL auto_increment, -SbcrID int(11) NOT NULL default '0', -PRIMARY KEY (SbclID), -KEY idx_sbcrid (SbcrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2); -select * from test1 order by 1; -SubscrID UsrID -1 224 -2 224 -3 224 -select * from test2 order by 1; -SbclID SbcrID -1 1 -2 1 -3 2 -4 2 -SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON -l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2; -SubscrID SbclID -1 1 -1 2 -2 3 -2 4 -3 NULL -drop table test1; -drop table test2; -create table t1 ( -pk int primary key, -dt datetime not null, -da date not null, -ye year not null, -ti time not null, -ts timestamp not null, -index(dt), -index(da), -index(ye), -index(ti), -index(ts) -) engine=ndb; -insert into t1 (pk,dt,da,ye,ti,ts) values -(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), -(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), -(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), -(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), -(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), -(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), -(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), -(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), -(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); -select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; -count(*)-9 -0 -select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; -count(*)-6 -0 -select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; -count(*)-5 -0 -select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; -count(*)-5 -0 -select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; -count(*)-7 -0 -select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; -count(*)-8 -0 -select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; -count(*)-9 -0 -select count(*)-9 from t1 use index (da) where da > '1900-01-01'; -count(*)-9 -0 -select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; -count(*)-6 -0 -select count(*)-5 from t1 use index (da) where da > '1955-12-31'; -count(*)-5 -0 -select count(*)-5 from t1 use index (da) where da < '1970-03-03'; -count(*)-5 -0 -select count(*)-6 from t1 use index (da) where da < '2001-01-01'; -count(*)-6 -0 -select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; -count(*)-8 -0 -select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; -count(*)-9 -0 -select count(*)-9 from t1 use index (ye) where ye > '1900'; -count(*)-9 -0 -select count(*)-6 from t1 use index (ye) where ye >= '1955'; -count(*)-6 -0 -select count(*)-5 from t1 use index (ye) where ye > '1955'; -count(*)-5 -0 -select count(*)-5 from t1 use index (ye) where ye < '1970'; -count(*)-5 -0 -select count(*)-6 from t1 use index (ye) where ye < '2001'; -count(*)-6 -0 -select count(*)-8 from t1 use index (ye) where ye <= '2001'; -count(*)-8 -0 -select count(*)-9 from t1 use index (ye) where ye <= '2055'; -count(*)-9 -0 -select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; -count(*)-9 -0 -select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; -count(*)-7 -0 -select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; -count(*)-7 -0 -select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; -count(*)-5 -0 -select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; -count(*)-5 -0 -select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; -count(*)-6 -0 -select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; -count(*)-8 -0 -select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; -count(*)-9 -0 -select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; -count(*)-9 -0 -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; -count(*)-7 -0 -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; -count(*)-7 -0 -select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; -count(*)-5 -0 -select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; -count(*)-5 -0 -select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; -count(*)-6 -0 -select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; -count(*)-8 -0 -select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; -count(*)-9 -0 -drop table t1; -create table t1 ( -a int primary key, -s decimal(12), -t decimal(12, 5), -u decimal(12) unsigned, -v decimal(12, 5) unsigned, -key (s), -key (t), -key (u), -key (v) -) engine=ndb; -insert into t1 values -( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), -( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), -( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), -( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), -( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), -( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), -( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), -( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), -( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), -( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); -select count(*)- 5 from t1 use index (s) where s < -000000000007; -count(*)- 5 -0 -select count(*)- 7 from t1 use index (s) where s <= -000000000007; -count(*)- 7 -0 -select count(*)- 2 from t1 use index (s) where s = -000000000007; -count(*)- 2 -0 -select count(*)- 5 from t1 use index (s) where s >= -000000000007; -count(*)- 5 -0 -select count(*)- 3 from t1 use index (s) where s > -000000000007; -count(*)- 3 -0 -select count(*)- 4 from t1 use index (t) where t < -0000061.00003; -count(*)- 4 -0 -select count(*)- 5 from t1 use index (t) where t <= -0000061.00003; -count(*)- 5 -0 -select count(*)- 1 from t1 use index (t) where t = -0000061.00003; -count(*)- 1 -0 -select count(*)- 6 from t1 use index (t) where t >= -0000061.00003; -count(*)- 6 -0 -select count(*)- 5 from t1 use index (t) where t > -0000061.00003; -count(*)- 5 -0 -select count(*)- 2 from t1 use index (u) where u < 000000000061; -count(*)- 2 -0 -select count(*)- 4 from t1 use index (u) where u <= 000000000061; -count(*)- 4 -0 -select count(*)- 2 from t1 use index (u) where u = 000000000061; -count(*)- 2 -0 -select count(*)- 8 from t1 use index (u) where u >= 000000000061; -count(*)- 8 -0 -select count(*)- 6 from t1 use index (u) where u > 000000000061; -count(*)- 6 -0 -select count(*)- 5 from t1 use index (v) where v < 0000965.00042; -count(*)- 5 -0 -select count(*)- 6 from t1 use index (v) where v <= 0000965.00042; -count(*)- 6 -0 -select count(*)- 1 from t1 use index (v) where v = 0000965.00042; -count(*)- 1 -0 -select count(*)- 5 from t1 use index (v) where v >= 0000965.00042; -count(*)- 5 -0 -select count(*)- 4 from t1 use index (v) where v > 0000965.00042; -count(*)- 4 -0 -drop table t1; -create table t1 (a int, c varchar(10), -primary key using hash (a), index(c)) engine=ndb; -insert into t1 (a, c) values (1,'aaa'),(3,'bbb'); -select count(*) from t1 where c<'bbb'; -count(*) -1 -drop table t1; -set autocommit=1; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 32 -ndb_index_stat_enable OFF -ndb_index_stat_update_freq 20 -set ndb_index_stat_enable = off; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 32 -ndb_index_stat_enable OFF -ndb_index_stat_update_freq 20 -create table t1 (a int, b int, c varchar(10) not null, -primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values -(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), -(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), -(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -count(*) -0 -select count(*) from t1 where b >= 10 and c >= 'bbb'; -count(*) -6 -select count(*) from t1 where b > 10; -count(*) -6 -select count(*) from t1 where b <= 20 and c < 'ccc'; -count(*) -4 -select count(*) from t1 where b = 20 and c = 'ccc'; -count(*) -1 -select count(*) from t1 where b > 20; -count(*) -3 -select count(*) from t1 where b = 30 and c > 'aaa'; -count(*) -2 -select count(*) from t1 where b <= 20; -count(*) -6 -select count(*) from t1 where b >= 20 and c > 'aaa'; -count(*) -4 -drop table t1; -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 0; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 0 -ndb_index_stat_enable ON -ndb_index_stat_update_freq 20 -create table t1 (a int, b int, c varchar(10) not null, -primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values -(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), -(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), -(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -count(*) -0 -select count(*) from t1 where b >= 10 and c >= 'bbb'; -count(*) -6 -select count(*) from t1 where b > 10; -count(*) -6 -select count(*) from t1 where b <= 20 and c < 'ccc'; -count(*) -4 -select count(*) from t1 where b = 20 and c = 'ccc'; -count(*) -1 -select count(*) from t1 where b > 20; -count(*) -3 -select count(*) from t1 where b = 30 and c > 'aaa'; -count(*) -2 -select count(*) from t1 where b <= 20; -count(*) -6 -select count(*) from t1 where b >= 20 and c > 'aaa'; -count(*) -4 -drop table t1; -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 4; -set ndb_index_stat_update_freq = 2; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 4 -ndb_index_stat_enable ON -ndb_index_stat_update_freq 2 -create table t1 (a int, b int, c varchar(10) not null, -primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values -(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), -(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), -(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -count(*) -0 -select count(*) from t1 where b >= 10 and c >= 'bbb'; -count(*) -6 -select count(*) from t1 where b > 10; -count(*) -6 -select count(*) from t1 where b <= 20 and c < 'ccc'; -count(*) -4 -select count(*) from t1 where b = 20 and c = 'ccc'; -count(*) -1 -select count(*) from t1 where b > 20; -count(*) -3 -select count(*) from t1 where b = 30 and c > 'aaa'; -count(*) -2 -select count(*) from t1 where b <= 20; -count(*) -6 -select count(*) from t1 where b >= 20 and c > 'aaa'; -count(*) -4 -drop table t1; -set ndb_index_stat_enable = @@global.ndb_index_stat_enable; -set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries; -set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 32 -ndb_index_stat_enable OFF -ndb_index_stat_update_freq 20 -create table t1 (a int primary key) engine = ndb; -insert into t1 values (1), (2), (3); -begin; -delete from t1 where a > 1; -rollback; -select * from t1 order by a; -a -1 -2 -3 -begin; -delete from t1 where a > 1; -rollback; -begin; -select * from t1 order by a; -a -1 -2 -3 -delete from t1 where a > 2; -select * from t1 order by a; -a -1 -2 -delete from t1 where a > 1; -select * from t1 order by a; -a -1 -delete from t1 where a > 0; -select * from t1 order by a; -a -rollback; -select * from t1 order by a; -a -1 -2 -3 -delete from t1; -drop table t1; -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, -CountryCode char(3) NOT NULL, -DishTitle varchar(64) NOT NULL, -calories smallint(5) unsigned DEFAULT NULL, -PRIMARY KEY (DishID), -INDEX i USING HASH (countrycode,calories) -) ENGINE=ndbcluster; -ERROR HY000: Can't create table 'test.nationaldish' (errno: 138) -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, -CountryCode char(3) NOT NULL, -DishTitle varchar(64) NOT NULL, -calories smallint(5) unsigned DEFAULT NULL, -PRIMARY KEY (DishID) -) ENGINE=ndbcluster; -create index i on nationaldish(countrycode,calories) using hash; -ERROR 42000: Table 'nationaldish' uses an extension that doesn't exist in this MySQL version -drop table nationaldish; diff --git a/mysql-test/suite/ndb/r/ndb_index_unique.result b/mysql-test/suite/ndb/r/ndb_index_unique.result deleted file mode 100644 index 5d0f4038211..00000000000 --- a/mysql-test/suite/ndb/r/ndb_index_unique.result +++ /dev/null @@ -1,692 +0,0 @@ -drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; -CREATE TABLE t1 ( -a int NOT NULL PRIMARY KEY, -b int not null, -c int, -UNIQUE ib(b) -) engine=ndbcluster; -insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b = 4 order by b; -a b c -3 4 6 -insert into t1 values(7,8,3); -select * from t1 where b = 4 order by a; -a b c -3 4 6 -insert into t1 values(8, 2, 3); -ERROR 23000: Duplicate entry '2' for key 'ib' -select * from t1 order by a; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -delete from t1 where a = 1; -insert into t1 values(8, 2, 3); -select * from t1 order by a; -a b c -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -8 2 3 -alter table t1 drop index ib; -insert into t1 values(1, 2, 3); -create unique index ib on t1(b); -ERROR 23000: Can't write, because of unique constraint, to table 't1' -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned, -c int unsigned, -UNIQUE bc(b,c) -) engine = ndb; -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc)order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (bc) order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (PRIMARY) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -a b c -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -a b c -2 NULL 2 -select * from t1 use index (bc) where b < 4 order by a; -a b c -1 1 1 -select * from t1 use index (bc) where b IS NOT NULL order by a; -a b c -1 1 1 -4 4 NULL -insert into t1 values(5,1,1); -ERROR 23000: Duplicate entry '1-1' for key 'bc' -drop table t1; -CREATE TABLE t2 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned not null, -UNIQUE (b, c) USING HASH -) engine=ndbcluster; -insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t2 where a = 3; -a b c -3 4 6 -select * from t2 where b = 4; -a b c -3 4 6 -select * from t2 where c = 6; -a b c -3 4 6 -insert into t2 values(7,8,3); -select * from t2 where b = 4 order by a; -a b c -3 4 6 -insert into t2 values(8, 2, 3); -ERROR 23000: Duplicate entry '2-3' for key 'b' -select * from t2 order by a; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -delete from t2 where a = 1; -insert into t2 values(8, 2, 3); -select * from t2 order by a; -a b c -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -8 2 3 -create unique index bi using hash on t2(b); -insert into t2 values(9, 3, 1); -ERROR 23000: Duplicate entry '3' for key 'bi' -alter table t2 drop index bi; -insert into t2 values(9, 3, 1); -select * from t2 order by a; -a b c -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -8 2 3 -9 3 1 -drop table t2; -CREATE TABLE t2 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned, -UNIQUE (b, c) USING HASH -) engine=ndbcluster; -Warnings: -Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan -insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL); -select * from t2 where c IS NULL order by a; -a b c -1 1 NULL -3 3 NULL -5 5 NULL -7 7 NULL -8 3 NULL -9 3 NULL -select * from t2 where b = 3 AND c IS NULL order by a; -a b c -3 3 NULL -8 3 NULL -9 3 NULL -select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a; -a b c -3 3 NULL -5 5 NULL -8 3 NULL -9 3 NULL -set @old_optimizer_switch = @@session.optimizer_switch; -set optimizer_switch = "engine_condition_pushdown=on"; -explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range PRIMARY,b PRIMARY 4 NULL 1 Using where with pushed condition -select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -a b c -3 3 NULL -5 5 NULL -8 3 NULL -set optimizer_switch = @old_optimizer_switch; -drop table t2; -CREATE TABLE t3 ( -a int unsigned NOT NULL, -b int unsigned not null, -c int unsigned, -PRIMARY KEY (a, b) USING HASH -) engine=ndbcluster; -insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t3 where a = 3; -a b c -3 4 6 -select * from t3 where b = 4; -a b c -3 4 6 -select * from t3 where c = 6; -a b c -3 4 6 -insert into t3 values(7,8,3); -select * from t3 where b = 4 order by a; -a b c -3 4 6 -drop table t3; -CREATE TABLE t1 ( -pk int NOT NULL PRIMARY KEY, -a int unsigned, -UNIQUE KEY (a) -) engine=ndbcluster; -insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); -select * from t1 order by pk; -pk a --1 NULL -0 0 -1 NULL -2 2 -3 NULL -4 4 -insert into t1 values (5,0); -ERROR 23000: Duplicate entry '0' for key 'a' -select * from t1 order by pk; -pk a --1 NULL -0 0 -1 NULL -2 2 -3 NULL -4 4 -delete from t1 where a = 0; -insert into t1 values (5,0); -select * from t1 order by pk; -pk a --1 NULL -1 NULL -2 2 -3 NULL -4 4 -5 0 -CREATE TABLE t2 ( -pk int NOT NULL PRIMARY KEY, -a int unsigned, -b tinyint NOT NULL, -c VARCHAR(10), -UNIQUE KEY si(a, c) -) engine=ndbcluster; -insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); -select * from t2 order by pk; -pk a b c --1 1 17 NULL -0 NULL 18 NULL -1 3 19 abc -insert into t2 values(2,3,19,'abc'); -ERROR 23000: Duplicate entry '3-abc' for key 'si' -select * from t2 order by pk; -pk a b c --1 1 17 NULL -0 NULL 18 NULL -1 3 19 abc -delete from t2 where c IS NOT NULL; -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; -pk a b c --1 1 17 NULL -0 NULL 18 NULL -2 3 19 abc -drop table t1, t2; -CREATE TABLE t1 ( -cid smallint(5) unsigned NOT NULL default '0', -cv varchar(250) NOT NULL default '', -PRIMARY KEY (cid), -UNIQUE KEY cv (cv) -) engine=ndbcluster; -INSERT INTO t1 VALUES (8,'dummy'); -CREATE TABLE t2 ( -cid bigint(20) unsigned NOT NULL auto_increment, -cap varchar(255) NOT NULL default '', -PRIMARY KEY (cid), -UNIQUE KEY (cid, cap) -) engine=ndbcluster; -INSERT INTO t2 VALUES (NULL,'another dummy'); -CREATE TABLE t3 ( -gid bigint(20) unsigned NOT NULL auto_increment, -gn varchar(255) NOT NULL default '', -must tinyint(4) default NULL, -PRIMARY KEY (gid) -) engine=ndbcluster; -INSERT INTO t3 VALUES (1,'V1',NULL); -CREATE TABLE t4 ( -uid bigint(20) unsigned NOT NULL default '0', -gid bigint(20) unsigned NOT NULL, -rid bigint(20) unsigned NOT NULL, -cid bigint(20) unsigned NOT NULL, -UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t4 VALUES (1,1,2,4); -INSERT INTO t4 VALUES (1,1,2,3); -INSERT INTO t4 VALUES (1,1,5,7); -INSERT INTO t4 VALUES (1,1,10,8); -CREATE TABLE t5 ( -rid bigint(20) unsigned NOT NULL auto_increment, -rl varchar(255) NOT NULL default '', -PRIMARY KEY (rid) -) engine=ndbcluster; -CREATE TABLE t6 ( -uid bigint(20) unsigned NOT NULL auto_increment, -un varchar(250) NOT NULL default '', -uc smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (uid), -UNIQUE KEY nc (un,uc) -) engine=ndbcluster; -INSERT INTO t6 VALUES (1,'test',8); -INSERT INTO t6 VALUES (2,'test2',9); -INSERT INTO t6 VALUES (3,'tre',3); -CREATE TABLE t7 ( -mid bigint(20) unsigned NOT NULL PRIMARY KEY, -uid bigint(20) unsigned NOT NULL default '0', -gid bigint(20) unsigned NOT NULL, -rid bigint(20) unsigned NOT NULL, -cid bigint(20) unsigned NOT NULL, -UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t7 VALUES(1, 1, 1, 1, 1); -INSERT INTO t7 VALUES(2, 2, 1, 1, 1); -INSERT INTO t7 VALUES(3, 3, 1, 1, 1); -INSERT INTO t7 VALUES(4, 4, 1, 1, 1); -INSERT INTO t7 VALUES(5, 5, 1, 1, 1); -INSERT INTO t7 VALUES(6, 1, 1, 1, 6); -INSERT INTO t7 VALUES(7, 2, 1, 1, 7); -INSERT INTO t7 VALUES(8, 3, 1, 1, 8); -INSERT INTO t7 VALUES(9, 4, 1, 1, 9); -INSERT INTO t7 VALUES(10, 5, 1, 1, 10); -select * from t1 where cv = 'dummy'; -cid cv -8 dummy -select * from t1 where cv = 'test'; -cid cv -select * from t2 where cap = 'another dummy'; -cid cap -1 another dummy -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -uid gid rid cid -1 1 2 4 -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -uid gid rid cid -select * from t4 where uid = 1 order by cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -1 1 5 7 -1 1 10 8 -select * from t4 where rid = 2 order by cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -select * from t6 where un='test' and uc=8; -uid un uc -1 test 8 -select * from t6 where un='test' and uc=7; -uid un uc -select * from t6 where un='test'; -uid un uc -1 test 8 -select * from t7 where mid = 8; -mid uid gid rid cid -8 3 1 1 8 -select * from t7 where uid = 8; -mid uid gid rid cid -select * from t7 where uid = 1 order by mid; -mid uid gid rid cid -1 1 1 1 1 -6 1 1 1 6 -select * from t7 where uid = 4 order by mid; -mid uid gid rid cid -4 4 1 1 1 -9 4 1 1 9 -select * from t7 where gid = 4; -mid uid gid rid cid -select * from t7 where gid = 1 order by mid; -mid uid gid rid cid -1 1 1 1 1 -2 2 1 1 1 -3 3 1 1 1 -4 4 1 1 1 -5 5 1 1 1 -6 1 1 1 6 -7 2 1 1 7 -8 3 1 1 8 -9 4 1 1 9 -10 5 1 1 10 -select * from t7 where cid = 4; -mid uid gid rid cid -select * from t7 where cid = 8; -mid uid gid rid cid -8 3 1 1 8 -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -uid gid rid cid -1 1 2 4 -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -uid gid rid cid -select * from t4 where uid = 1 order by gid,cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -1 1 5 7 -1 1 10 8 -1 1 5 12 -1 2 5 12 -1 3 9 11 -1 3 5 12 -1 4 5 12 -1 5 5 12 -1 6 5 12 -1 7 5 12 -1 8 5 12 -1 9 5 12 -1 10 5 12 -1 11 5 12 -1 12 5 12 -1 13 5 12 -1 14 5 12 -1 15 5 12 -1 16 5 12 -1 17 5 12 -1 18 5 12 -1 19 5 12 -1 20 5 12 -1 21 5 12 -1 22 5 12 -1 23 5 12 -1 24 5 12 -1 25 5 12 -1 26 5 12 -1 27 5 12 -1 28 5 12 -1 29 5 12 -1 30 5 12 -1 31 5 12 -1 32 5 12 -1 33 5 12 -1 34 5 12 -1 35 5 12 -1 36 5 12 -1 37 5 12 -1 38 5 12 -1 39 5 12 -1 40 5 12 -1 41 5 12 -1 42 5 12 -1 43 5 12 -1 44 5 12 -1 45 5 12 -1 46 5 12 -1 47 5 12 -1 48 5 12 -1 49 5 12 -1 50 5 12 -1 51 5 12 -1 52 5 12 -1 53 5 12 -1 54 5 12 -1 55 5 12 -1 56 5 12 -1 57 5 12 -1 58 5 12 -1 59 5 12 -1 60 5 12 -1 61 5 12 -1 62 5 12 -1 63 5 12 -1 64 5 12 -1 65 5 12 -1 66 5 12 -1 67 5 12 -1 68 5 12 -1 69 5 12 -1 70 5 12 -1 71 5 12 -1 72 5 12 -1 73 5 12 -1 74 5 12 -1 75 5 12 -1 76 5 12 -1 77 5 12 -1 78 5 12 -1 79 5 12 -1 80 5 12 -1 81 5 12 -1 82 5 12 -1 83 5 12 -1 84 5 12 -1 85 5 12 -1 86 5 12 -1 87 5 12 -1 88 5 12 -1 89 5 12 -1 90 5 12 -1 91 5 12 -1 92 5 12 -1 93 5 12 -1 94 5 12 -1 95 5 12 -1 96 5 12 -1 97 5 12 -1 98 5 12 -1 99 5 12 -1 100 5 12 -select * from t4 where uid = 1 order by gid,cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -1 1 5 7 -1 1 10 8 -1 1 5 12 -1 2 5 12 -1 3 9 11 -1 3 5 12 -1 4 5 12 -1 5 5 12 -1 6 5 12 -1 7 5 12 -1 8 5 12 -1 9 5 12 -1 10 5 12 -1 11 5 12 -1 12 5 12 -1 13 5 12 -1 14 5 12 -1 15 5 12 -1 16 5 12 -1 17 5 12 -1 18 5 12 -1 19 5 12 -1 20 5 12 -1 21 5 12 -1 22 5 12 -1 23 5 12 -1 24 5 12 -1 25 5 12 -1 26 5 12 -1 27 5 12 -1 28 5 12 -1 29 5 12 -1 30 5 12 -1 31 5 12 -1 32 5 12 -1 33 5 12 -1 34 5 12 -1 35 5 12 -1 36 5 12 -1 37 5 12 -1 38 5 12 -1 39 5 12 -1 40 5 12 -1 41 5 12 -1 42 5 12 -1 43 5 12 -1 44 5 12 -1 45 5 12 -1 46 5 12 -1 47 5 12 -1 48 5 12 -1 49 5 12 -1 50 5 12 -1 51 5 12 -1 52 5 12 -1 53 5 12 -1 54 5 12 -1 55 5 12 -1 56 5 12 -1 57 5 12 -1 58 5 12 -1 59 5 12 -1 60 5 12 -1 61 5 12 -1 62 5 12 -1 63 5 12 -1 64 5 12 -1 65 5 12 -1 66 5 12 -1 67 5 12 -1 68 5 12 -1 69 5 12 -1 70 5 12 -1 71 5 12 -1 72 5 12 -1 73 5 12 -1 74 5 12 -1 75 5 12 -1 76 5 12 -1 77 5 12 -1 78 5 12 -1 79 5 12 -1 80 5 12 -1 81 5 12 -1 82 5 12 -1 83 5 12 -1 84 5 12 -1 85 5 12 -1 86 5 12 -1 87 5 12 -1 88 5 12 -1 89 5 12 -1 90 5 12 -1 91 5 12 -1 92 5 12 -1 93 5 12 -1 94 5 12 -1 95 5 12 -1 96 5 12 -1 97 5 12 -1 98 5 12 -1 99 5 12 -1 100 5 12 -select * from t4 where rid = 2 order by cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -drop table t1,t2,t3,t4,t5,t6,t7; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned, -c int unsigned, -UNIQUE bc(b,c) ) engine = ndb; -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 where b=1 and c=1; -a b c -1 1 1 -select * from t1 where b is null and c is null; -a b c -3 NULL NULL -select * from t1 where b is null and c = 2; -a b c -2 NULL 2 -select * from t1 where b = 4 and c is null; -a b c -4 4 NULL -create table t8 as -select * from t1 where (b = 1 and c = 1) -or (b is null and c is null) -or (b is null and c = 2) -or (b = 4 and c is null); -select * from t8 order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -drop table t1, t8; -create table t1( -id integer not null auto_increment, -month integer not null, -year integer not null, -code varchar( 2) not null, -primary key ( id), -unique idx_t1( month, code, year) -) engine=ndb; -INSERT INTO t1 (month, year, code) VALUES (4,2004,'12'); -INSERT INTO t1 (month, year, code) VALUES (5,2004,'12'); -select * from t1 where code = '12' and month = 4 and year = 2004 ; -id month year code -1 4 2004 12 -drop table t1; -create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) -engine=ndb charset=utf8; -insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); -insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); -ERROR 23000: Duplicate entry '\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bdt\222Bd' for key 'b' -select a, sha1(b) from t1; -a sha1(b) -1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d -drop table t1; -create table t1(id int not null) engine = NDB; -alter table t1 add constraint uk_test unique (id) using hash; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_insert.result b/mysql-test/suite/ndb/r/ndb_insert.result deleted file mode 100644 index 7551dc71823..00000000000 --- a/mysql-test/suite/ndb/r/ndb_insert.result +++ /dev/null @@ -1,659 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -b INT NOT NULL, -c INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; -pk1 b c -0 0 0 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); -SELECT COUNT(*) FROM t1; -COUNT(*) -501 -INSERT INTO t1 VALUES -(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505), -(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510), -(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515), -(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520), -(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525), -(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530), -(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535), -(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540), -(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545), -(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550), -(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555), -(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560), -(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565), -(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570), -(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575), -(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580), -(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585), -(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590), -(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595), -(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600), -(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605), -(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610), -(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615), -(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620), -(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625), -(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630), -(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635), -(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640), -(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645), -(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650), -(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655), -(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660), -(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665), -(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670), -(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675), -(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680), -(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685), -(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690), -(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695), -(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700), -(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705), -(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710), -(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715), -(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720), -(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725), -(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730), -(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735), -(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740), -(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745), -(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750), -(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755), -(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760), -(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765), -(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770), -(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775), -(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780), -(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785), -(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790), -(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795), -(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800), -(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805), -(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810), -(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815), -(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820), -(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825), -(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830), -(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835), -(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840), -(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845), -(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850), -(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855), -(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860), -(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865), -(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870), -(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875), -(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880), -(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885), -(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890), -(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895), -(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900), -(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905), -(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910), -(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915), -(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920), -(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925), -(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930), -(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935), -(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940), -(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945), -(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950), -(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955), -(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960), -(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965), -(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970), -(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975), -(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980), -(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985), -(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990), -(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995), -(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000), -(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005), -(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010), -(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015), -(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020), -(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025), -(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030), -(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035), -(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040), -(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045), -(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050), -(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055), -(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060), -(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065), -(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070), -(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075), -(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080), -(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085), -(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090), -(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095), -(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100), -(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105), -(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110), -(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115), -(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120), -(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125), -(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130), -(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135), -(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140), -(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145), -(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150), -(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155), -(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160), -(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165), -(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170), -(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175), -(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180), -(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185), -(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190), -(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195), -(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200), -(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205), -(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210), -(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215), -(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220), -(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225), -(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230), -(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235), -(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240), -(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245), -(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250), -(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255), -(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260), -(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265), -(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270), -(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275), -(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280), -(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285), -(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290), -(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295), -(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300), -(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305), -(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310), -(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315), -(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320), -(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325), -(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330), -(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335), -(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340), -(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345), -(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350), -(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355), -(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360), -(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365), -(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370), -(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375), -(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380), -(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385), -(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390), -(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395), -(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400), -(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405), -(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410), -(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415), -(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420), -(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425), -(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430), -(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435), -(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440), -(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445), -(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450), -(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455), -(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460), -(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465), -(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470), -(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475), -(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480), -(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485), -(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490), -(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495), -(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500), -(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505), -(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510), -(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515), -(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520), -(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525), -(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530), -(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535), -(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540), -(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545), -(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550), -(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555), -(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560), -(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565), -(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570), -(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575), -(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580), -(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585), -(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590), -(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595), -(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600), -(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605), -(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610), -(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615), -(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620), -(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625), -(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630), -(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635), -(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640), -(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645), -(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650), -(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655), -(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660), -(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665), -(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670), -(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675), -(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680), -(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685), -(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690), -(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695), -(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700), -(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705), -(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710), -(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715), -(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720), -(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725), -(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730), -(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735), -(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740), -(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745), -(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750), -(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755), -(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760), -(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765), -(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770), -(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775), -(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780), -(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785), -(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790), -(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795), -(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800), -(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805), -(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810), -(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815), -(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820), -(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825), -(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830), -(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835), -(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840), -(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845), -(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850), -(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855), -(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860), -(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865), -(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870), -(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875), -(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880), -(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885), -(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890), -(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895), -(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900), -(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905), -(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910), -(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915), -(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920), -(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925), -(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930), -(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935), -(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940), -(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945), -(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950), -(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955), -(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960), -(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965), -(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970), -(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975), -(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980), -(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985), -(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990), -(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995), -(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999); -SELECT COUNT(*) FROM t1; -COUNT(*) -2000 -INSERT INTO t1 VALUES (1,1,1); -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -select count(*) from t1; -count(*) -2000 -begin; -SELECT COUNT(*) FROM t1; -COUNT(*) -2000 -INSERT INTO t1 VALUES -(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005); -SELECT COUNT(*) FROM t1; -COUNT(*) -2005 -rollback; -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -rollback; -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -SELECT * FROM t1 WHERE pk1=10; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -rollback; -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -SELECT * FROM t1 WHERE pk1=10; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -SELECT * FROM t1 WHERE pk1=10; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -INSERT INTO t1 values (4000, 40, 44); -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -rollback; -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -insert into t1 select * from t1 where b < 10 order by pk1; -ERROR 23000: Can't write; duplicate key in table 't1' -DELETE FROM t1 WHERE pk1=2; -begin; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -pk1 b c -0 0 0 -1 1 1 -2 3 4 -rollback; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -pk1 b c -0 0 0 -1 1 1 -2 3 4 -REPLACE INTO t1 values(1, 78, 3); -select * from t1 where pk1=1; -pk1 b c -1 78 3 -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79; -select * from t1 where pk1 < 4 order by pk1; -pk1 b c -0 0 0 -1 79 3 -2 3 4 -3 79 3 -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c; -select * from t1 where pk1 < 4 order by pk1; -pk1 b c -0 0 0 -1 4 3 -2 3 4 -3 6 3 -DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6; -INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b; -select * from t1 where pk1 = b and b != c order by pk1; -pk1 b c -2 2 17 -4 4 3 -6 6 3 -DELETE FROM t1; -CREATE UNIQUE INDEX bi ON t1(b); -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10; -select * from t1 order by pk1; -pk1 b c -2 2 2 -3 3 3 -4 4 4 -5 5 5 -6 6 6 -7 7 7 -8 8 8 -9 9 9 -10 10 10 -11 11 1 -21 21 21 -DROP TABLE t1; -CREATE TABLE t1(a INT) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -SELECT * FROM t1 ORDER BY a; -a -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -DELETE FROM t1; -CREATE UNIQUE INDEX ai ON t1(a); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (NULL),(2); -SELECT * FROM t1 ORDER BY a; -a -NULL -1 -2 -DROP TABLE t1; -CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3); -INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); -SELECT * FROM t1 ORDER BY pk; -pk a -1 1 -2 2 -3 3 -4 NULL -5 NULL -6 NULL -7 4 -DROP TABLE t1; -create table t1(a int primary key, b int, unique key(b)) engine=ndb; -insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); -select * from t1 order by a; -a b -1 0 -2 NULL -3 NULL -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_limit.result b/mysql-test/suite/ndb/r/ndb_limit.result deleted file mode 100644 index da1ec3b61c3..00000000000 --- a/mysql-test/suite/ndb/r/ndb_limit.result +++ /dev/null @@ -1,72 +0,0 @@ -DROP TABLE IF EXISTS t2; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -select count(*) from t2; -count(*) -10000 -delete from t2 limit 1; -select count(*) from t2; -count(*) -9999 -delete from t2 limit 100; -select count(*) from t2; -count(*) -9899 -delete from t2 limit 1000; -select count(*) from t2; -count(*) -8899 -update t2 set c=12345678 limit 100; -select count(*) from t2 where c=12345678; -count(*) -100 -select count(*) from t2 where c=12345678 limit 1000; -count(*) -100 -select * from t2 limit 0; -a b c -drop table t2; -CREATE TABLE `t2` ( -`views` int(11) NOT NULL default '0', -`clicks` int(11) NOT NULL default '0', -`day` date NOT NULL default '0000-00-00', -`hour` tinyint(4) NOT NULL default '0', -`bannerid` smallint(6) NOT NULL default '0', -`zoneid` smallint(6) NOT NULL default '0', -`source` varchar(50) NOT NULL default '', -PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`), -KEY `bannerid_day` (`bannerid`,`day`), -KEY `zoneid` (`zoneid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2` VALUES -( 1,0,'2004-09-17', 5,100,100,''), -( 1,0,'2004-09-18', 7,100,100,''), -( 17,0,'2004-09-27',20,132,100,''), -( 4,0,'2004-09-16',23,132,100,''), -( 86,0,'2004-09-18', 7,196,196,''), -( 11,0,'2004-09-16',16,132,100,''), -(140,0,'2004-09-18', 0,100,164,''), -( 2,0,'2004-09-17', 7,132,100,''), -(846,0,'2004-09-27',11,132,164,''), -( 1,0,'2004-09-18', 8,132,100,''), -( 22,0,'2004-09-27', 9,164,132,''), -(711,0,'2004-09-27', 9,100,164,''), -( 11,0,'2004-09-18', 0,196,132,''), -( 41,0,'2004-09-27',15,196,132,''), -( 57,0,'2004-09-18', 2,164,196,''); -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC; -date date_formatted -20040927 27-09-2004 -20040918 18-09-2004 -20040917 17-09-2004 -20040916 16-09-2004 -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2; -date date_formatted -20040927 27-09-2004 -20040918 18-09-2004 -drop table t2; diff --git a/mysql-test/suite/ndb/r/ndb_load.result b/mysql-test/suite/ndb/r/ndb_load.result deleted file mode 100644 index f990b12e735..00000000000 --- a/mysql-test/suite/ndb/r/ndb_load.result +++ /dev/null @@ -1,80 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; -LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ; -ERROR 23000: Can't write; duplicate key in table 't1' -DROP TABLE t1; -CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; -LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ; -SELECT * FROM t1 ORDER BY word; -word -Aarhus -Aarhus -Aaron -Aaron -Ababa -Ababa -aback -aback -abaft -abaft -abandon -abandon -abandoned -abandoned -abandoning -abandoning -abandonment -abandonment -abandons -abandons -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration -DROP TABLE t1; diff --git a/mysql-test/suite/ndb/r/ndb_loaddatalocal.result b/mysql-test/suite/ndb/r/ndb_loaddatalocal.result deleted file mode 100644 index 71d1b143089..00000000000 --- a/mysql-test/suite/ndb/r/ndb_loaddatalocal.result +++ /dev/null @@ -1,46 +0,0 @@ -DROP TABLE IF EXISTS t1; -create table t1(a int) engine=myisam; -select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int) engine=ndb; -load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select count(*) from t1; -count(*) -10000 -drop table t1; -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (2), (3); -select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key) engine=ndb; -load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1(a int) engine=myisam; -insert into t1 values (1), (1), (2), (3); -select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key) engine=ndb; -load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (3), (3); -select * into outfile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key) engine=ndb; -load data local infile 'MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_lock.result b/mysql-test/suite/ndb/r/ndb_lock.result deleted file mode 100644 index 9057731c3f4..00000000000 --- a/mysql-test/suite/ndb/r/ndb_lock.result +++ /dev/null @@ -1,200 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; -insert into t1 values (1,'one'), (2,'two'); -select * from t1 order by x; -x y -1 one -2 two -select * from t1 order by x; -x y -1 one -2 two -start transaction; -insert into t1 values (3,'three'); -select * from t1 order by x; -x y -1 one -2 two -3 three -start transaction; -select * from t1 order by x; -x y -1 one -2 two -commit; -select * from t1 order by x; -x y -1 one -2 two -3 three -commit; -drop table t1; -create table t1 (pk integer not null primary key, u int not null, o int not null, -unique(u), key(o)) engine = ndb; -insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); -lock tables t1 write; -delete from t1 where pk = 1; -unlock tables; -select * from t1 order by pk; -pk u o -2 2 2 -3 3 3 -4 4 4 -5 5 5 -insert into t1 values (1,1,1); -lock tables t1 write; -delete from t1 where u = 1; -unlock tables; -select * from t1 order by pk; -pk u o -2 2 2 -3 3 3 -4 4 4 -5 5 5 -insert into t1 values (1,1,1); -lock tables t1 write; -delete from t1 where o = 1; -unlock tables; -select * from t1 order by pk; -pk u o -2 2 2 -3 3 3 -4 4 4 -5 5 5 -insert into t1 values (1,1,1); -drop table t1; -create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; -insert into t1 values (1,'one',1); -begin; -select * from t1 where x = 1 for update; -x y z -1 one 1 -begin; -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -rollback; -insert into t1 values (2,'two',2),(3,"three",3); -begin; -select * from t1 where x = 1 for update; -x y z -1 one 1 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -select * from t1 where x = 2 for update; -x y z -2 two 2 -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' for update; -x y z -# # # -# # # -begin; -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' order by x for update; -x y z -1 one 1 -3 three 3 -begin; -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where z > 1 and z < 3 for update; -x y z -2 two 2 -begin; -select * from t1 where x = 1 for update; -x y z -1 one 1 -select * from t1 where x = 2 for update; -Got one of the listed errors -rollback; -commit; -begin; -select * from t1 where x = 1 lock in share mode; -x y z -1 one 1 -begin; -select * from t1 where x = 1 lock in share mode; -x y z -1 one 1 -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' lock in share mode; -x y z -# # # -# # # -begin; -select * from t1 where y = 'one' lock in share mode; -x y z -1 one 1 -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; -x y z -1 one 1 -3 three 3 -begin; -select * from t1 where y = 'one' lock in share mode; -x y z -1 one 1 -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where z > 1 and z < 3 lock in share mode; -x y z -2 two 2 -begin; -select * from t1 where z = 1 lock in share mode; -x y z -1 one 1 -select * from t1 where x = 1 for update; -x y z -1 one 1 -select * from t1 where x = 2 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -drop table t1; -create table t3 (id2 int) engine=ndb; -lock tables t3 write; -unlock tables; -drop table t3; -create table t2 (id int, j int) engine=ndb; -insert into t2 values (2, 2); -create table t3 (id int) engine=ndb; -lock tables t3 read; -delete t2 from t2, t3 where t2.id = t3.id; -unlock tables; -drop table t2, t3; diff --git a/mysql-test/suite/ndb/r/ndb_lock_table.result b/mysql-test/suite/ndb/r/ndb_lock_table.result deleted file mode 100644 index a0550273e1a..00000000000 --- a/mysql-test/suite/ndb/r/ndb_lock_table.result +++ /dev/null @@ -1,11 +0,0 @@ -drop table if exists t1; -create table t1 (a int) engine ndb; -set autocommit=1; -lock table t1 write; -set autocommit=0; -insert into t1 values (0); -rollback; -select * from t1; -a -unlock tables; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_minmax.result b/mysql-test/suite/ndb/r/ndb_minmax.result deleted file mode 100644 index cc0c238ac6e..00000000000 --- a/mysql-test/suite/ndb/r/ndb_minmax.result +++ /dev/null @@ -1,120 +0,0 @@ -drop table if exists t1, t2; -CREATE TABLE t1 ( -a int PRIMARY KEY -) engine = ndb; -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select MIN(a) from t1; -MIN(a) -1 -select MIN(a) from t1; -MIN(a) -1 -select MIN(a) from t1; -MIN(a) -1 -select * from t1 order by a; -a -1 -2 -3 -4 -5 -6 -select MIN(a) from t1; -MIN(a) -1 -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select * from t1 order by a; -a -1 -2 -3 -4 -5 -6 -drop table t1; -CREATE TABLE t2 ( -a int PRIMARY KEY, -b int not null, -c int not null, -KEY(b), -UNIQUE(c) -) engine = ndb; -INSERT INTO t2 VALUES (1, 5, 1); -INSERT INTO t2 VALUES (2, 2, 7); -INSERT INTO t2 VALUES (3, 3, 3); -INSERT INTO t2 VALUES (4, 4, 4); -INSERT INTO t2 VALUES (5, 5, 5); -INSERT INTO t2 VALUES (6, 6, 6); -INSERT INTO t2 VALUES (7, 2, 10); -INSERT INTO t2 VALUES (8, 10, 2); -select MAX(a) from t2; -MAX(a) -8 -select MAX(b) from t2; -MAX(b) -10 -select MAX(c) from t2; -MAX(c) -10 -select MIN(a) from t2; -MIN(a) -1 -select MIN(b) from t2; -MIN(b) -2 -select MIN(c) from t2; -MIN(c) -1 -select * from t2 order by a; -a b c -1 5 1 -2 2 7 -3 3 3 -4 4 4 -5 5 5 -6 6 6 -7 2 10 -8 10 2 -select MIN(b) from t2; -MIN(b) -2 -select MAX(a) from t2; -MAX(a) -8 -select MAX(c) from t2; -MAX(c) -10 -select * from t2 order by a; -a b c -1 5 1 -2 2 7 -3 3 3 -4 4 4 -5 5 5 -6 6 6 -7 2 10 -8 10 2 -drop table t2; diff --git a/mysql-test/suite/ndb/r/ndb_multi.result b/mysql-test/suite/ndb/r/ndb_multi.result deleted file mode 100644 index 40483887919..00000000000 --- a/mysql-test/suite/ndb/r/ndb_multi.result +++ /dev/null @@ -1,145 +0,0 @@ -drop table if exists t1, t2, t3, t4; -flush status; -drop table if exists t1, t2, t3, t4; -flush status; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select * from t2; -a -3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -select * from t1; -a -2 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -select * from t1; -a -2 -flush status; -select * from t1; -a -2 -update t1 set a=3 where a=2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; -select * from t1; -a -3 -select * from t3; -a b c last_col -1 Hi! 89 Longtext column -show tables like 't4'; -Tables_in_test (t4) -t4 -show tables; -Tables_in_test -t1 -t2 -t3 -t4 -drop table t1, t2, t3, t4; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(1),(3),(5); -select * from t1 order by c1; -c1 -1 -3 -5 -show tables; -Tables_in_test -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(100),(344),(533); -select * from t1 order by c1; -c1 -100 -344 -533 -alter table t1 engine=ndb; -show tables; -Tables_in_test -t1 -Warnings: -Warning 1050 Local table test.t1 shadows ndb table -select * from t1 order by c1; -c1 -100 -344 -533 -drop table t1; -select * from t1 order by c1; -c1 -1 -3 -5 -drop table t1; -create database db; -use db; -create table t1(x int) engine=ndb; -use db; -show tables; -Tables_in_db -t1 -drop database db; -show tables; -ERROR 42000: Unknown database 'db' -create database db; -use db; -create table t1(x int) engine=ndb; -use db; -create table t2(x int) engine=myisam; -show tables; -Tables_in_db -t1 -t2 -drop database db; -show tables; -Tables_in_db -t2 -drop database db; -use test; -create table `test`.`t1$EX` - (server_id int unsigned, -master_server_id int unsigned, -master_epoch bigint unsigned, -count int unsigned, -primary key(server_id, master_server_id, -master_epoch, count)) -engine ndb; -show tables like '%$%'; -Tables_in_test (%$%) -t1$ex -use test; -show tables like '%$%'; -Tables_in_test (%$%) -t1$ex -drop table `test`.`t1$EX`; -show tables like '%$%'; -Tables_in_test (%$%) -show tables like '%$%'; -Tables_in_test (%$%) diff --git a/mysql-test/suite/ndb/r/ndb_multi_row.result b/mysql-test/suite/ndb/r/ndb_multi_row.result deleted file mode 100644 index 96986490d23..00000000000 --- a/mysql-test/suite/ndb/r/ndb_multi_row.result +++ /dev/null @@ -1,68 +0,0 @@ -drop table if exists t1, t2, t3, t4; -flush status; -drop table if exists t1, t2, t3, t4; -flush status; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select * from t2; -a -3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -select * from t1; -a -2 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -flush status; -select * from t1; -a -2 -update t1 set a=3 where a=2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; -select * from t1; -a -3 -select * from t3; -a b c last_col -1 Hi! 89 Longtext column -show tables like 't4'; -Tables_in_test (t4) -t4 -show tables; -Tables_in_test -t1 -t2 -t3 -t4 -drop table t1, t2, t3, t4; -drop table if exists t1, t3, t4; -Warnings: -Warning 155 Table 'test.t1' doesn't exist -Warning 155 Table 'test.t3' doesn't exist -Warning 155 Table 'test.t4' doesn't exist diff --git a/mysql-test/suite/ndb/r/ndb_partition_error.result b/mysql-test/suite/ndb/r/ndb_partition_error.result deleted file mode 100644 index df2db5c5f06..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_error.result +++ /dev/null @@ -1,47 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5) nodegroup 12, -partition x2 values less than (10) nodegroup 13, -partition x3 values less than (20) nodegroup 14); -ERROR HY000: Can't create table 'test.t1' (errno: 140) -show warnings; -Level Code Message -Warning 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB -Error 1005 Can't create table 'test.t1' (errno: 140) -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), -partition x2 values less than (10), -partition x3 values less than (20)); -drop table t1; -CREATE TABLE t1 (id INT) ENGINE=NDB -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2); -UPDATE t1 SET id=5 WHERE id=2; -ERROR HY000: Table has no partition for value 5 -DROP TABLE t1; -create table t1 (a int,b int, c int) -engine = ndb -partition by list(a) -partitions 2 -(partition x123 values in (11, 12), -partition x234 values in (5, 1)); -insert into t1 values (NULL,1,1); -ERROR HY000: Table has no partition for value NULL -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_partition_error2.result b/mysql-test/suite/ndb/r/ndb_partition_error2.result deleted file mode 100644 index a739ef3923c..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_error2.result +++ /dev/null @@ -1,3 +0,0 @@ -drop table if exists t1; -create table t1 (s1 int) engine=ndbcluster; -ERROR HY000: For the partitioned engine it is necessary to define all partitions diff --git a/mysql-test/suite/ndb/r/ndb_partition_key.result b/mysql-test/suite/ndb/r/ndb_partition_key.result deleted file mode 100644 index bc15fd30413..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_key.result +++ /dev/null @@ -1,312 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c)) -ENGINE = NDB -PARTITION BY KEY (a,b); -insert into t1 values (1,1,1,1); -select * from t1; -a b c d -1 1 1 1 -update t1 set d = 2 where a = 1 and b = 1 and c = 1; -select * from t1; -a b c d -1 1 1 2 -delete from t1; -select * from t1; -a b c d -drop table t1; -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b)) -ENGINE = NDB -PARTITION BY KEY (c); -ERROR HY000: A PRIMARY KEY must include all columns in the table's partitioning function -CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b)) -ENGINE = NDB -PARTITION BY KEY (a); -insert into t1 values -(1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3), -(1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3); -select * from t1 order by b; -a b c -1 1 3 -1 2 3 -1 3 3 -1 4 3 -1 5 3 -1 6 3 -1 7 3 -1 8 3 -1 9 3 -1 10 3 -1 11 3 -1 12 3 -select max(b) from t1 where a = 1; -max(b) -12 -select b from t1 where a = 1 order by b desc; -b -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 -DROP TABLE t1; -CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT, -PRIMARY KEY (a,b,c) USING HASH) -ENGINE=NDB -DEFAULT CHARSET=latin1 -PARTITION BY KEY (b); -insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1); --- t1 -- - -Fragment type: 5 -K Value: 6 -Min load factor: 78 -Max load factor: 80 -Temporary table: no -Number of attributes: 4 -Number of primary keys: 3 -Length of frm data: # -Row Checksum: 1 -Row GCI: 1 -SingleUserMode: 0 -ForceVarPart: 1 -TableStatus: Retrieved --- Attributes -- -a Int PRIMARY KEY AT=FIXED ST=MEMORY -b Char(10;latin1_bin) PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -c Int PRIMARY KEY AT=FIXED ST=MEMORY -d Int NULL AT=FIXED ST=MEMORY - --- Indexes -- -PRIMARY KEY(a, b, c) - UniqueHashIndex - - -NDBT_ProgramExit: 0 - OK - -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL DEFAULT '0', - `b` char(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', - `c` int(11) NOT NULL DEFAULT '0', - `d` int(11) DEFAULT NULL, - PRIMARY KEY (`a`,`b`,`c`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (b) */ -DROP TABLE t1; -CREATE TABLE t1 (a int not null primary key) -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -drop table t1; -CREATE TABLE t1 (a int not null primary key); -ALTER TABLE t1 -ENGINE = NDB -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -drop table t1; -CREATE TABLE t1 (a int not null primary key) ENGINE = NDB; -ALTER TABLE t1 -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -drop table t1; -create table t1 (a int) -engine=ndb -partition by key(a) -(partition p0, partition p1); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 engine=heap; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = MEMORY, - PARTITION p1 ENGINE = MEMORY) */ -alter table t1 engine=ndb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 engine=heap remove partitioning; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -alter table t1 engine=ndb -partition by key(a) -(partition p0, partition p1 engine = ndb); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 -partition by key (a) -(partition p0 engine=ndb, partition p1 engine=ndb); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 remove partitioning; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -alter table t1 -partition by key(a) -(partition p0 engine=ndb, partition p1); -alter table t1 -engine=ndb -partition by key(a) -(partition p0 engine=ndb, partition p1 engine = ndb); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -drop table t1; -CREATE TABLE t1 ( -c1 MEDIUMINT NOT NULL AUTO_INCREMENT, -c2 TEXT NOT NULL, -c3 INT NOT NULL, -c4 BIT NOT NULL, -c5 FLOAT, -c6 VARCHAR(255), -c7 TIMESTAMP, -PRIMARY KEY(c1,c3)) -ENGINE=NDB -PARTITION BY KEY(c3) PARTITIONS 5; -ALTER TABLE t1 COALESCE PARTITION 4; -DROP TABLE t1; -CREATE TABLE t1 (a int primary key) -ENGINE=NDB -PARTITION BY KEY(a); -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -REPAIR TABLE t1; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -ALTER TABLE t1 OPTIMIZE PARTITION p0; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -ALTER TABLE t1 CHECK PARTITION p0; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -ALTER TABLE t1 REPAIR PARTITION p0; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -ALTER TABLE t1 ANALYZE PARTITION p0; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -ALTER TABLE t1 REBUILD PARTITION p0; -ERROR HY000: Table storage engine for 't1' doesn't have this option -DROP TABLE t1; -CREATE TABLE t1 ( -c1 MEDIUMINT NOT NULL AUTO_INCREMENT, -c2 TEXT NOT NULL, -c3 INT NOT NULL, -PRIMARY KEY(c1,c3)) -ENGINE=NDB -PARTITION BY KEY(c3) PARTITIONS 5; -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -DROP TABLE t1; -CREATE TABLE t1 ( -c1 MEDIUMINT NOT NULL AUTO_INCREMENT, -c2 TEXT NOT NULL, -c3 INT NOT NULL, -PRIMARY KEY(c1,c3)) -ENGINE=NDB -PARTITION BY KEY(c3) -(PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE -table_name = "t1"; -NODEGROUP PARTITION_NAME -0 p0 -0 p1 -DROP TABLE t1; -CREATE TABLE t1 ( -a tinyint unsigned NOT NULL, -b bigint(20) unsigned NOT NULL, -c char(12), -PRIMARY KEY (a,b) -) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a); -insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5'); -select * from t1 where a = 1; -a b c -1 1 1 -select * from t1 where a = 2; -a b c -2 2 2 -select * from t1 where a = 3; -a b c -3 3 3 -select * from t1 where a = 4; -a b c -4 4 4 -select * from t1 where a = 5; -a b c -5 5 5 -delete from t1 where a = 1; -select * from t1 order by 1; -a b c -2 2 2 -3 3 3 -4 4 4 -5 5 5 -delete from t1 where a = 2; -select * from t1 order by 1; -a b c -3 3 3 -4 4 4 -5 5 5 -delete from t1 where a = 3; -select * from t1 order by 1; -a b c -4 4 4 -5 5 5 -delete from t1 where a = 4; -select * from t1 order by 1; -a b c -5 5 5 -delete from t1 where a = 5; -select * from t1 order by 1; -a b c -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_partition_list.result b/mysql-test/suite/ndb/r/ndb_partition_list.result deleted file mode 100644 index ce2574ddcc4..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_list.result +++ /dev/null @@ -1,51 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL, -f_char1 CHAR(10), -f_char2 CHAR(10), f_charbig VARCHAR(1000), -PRIMARY KEY (f_int1,f_int2)) -ENGINE = NDB -PARTITION BY LIST(MOD(f_int1 + f_int2,4)) -(PARTITION part_3 VALUES IN (-3), -PARTITION part_2 VALUES IN (-2), -PARTITION part_1 VALUES IN (-1), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2), -PARTITION part3 VALUES IN (3,4,5)); -INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -SELECT * FROM t1 ORDER BY f_int1; -f_int1 f_int2 f_char1 f_char2 f_charbig --2 20 20 20 ===20=== -1 1 1 1 ===1=== -2 1 1 1 ===1=== -3 1 1 1 ===1=== -4 1 1 1 ===1=== -5 1 1 1 ===1=== -20 1 1 1 ===1=== -DROP TABLE t1; -CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10), -f_char2 CHAR(10), f_charbig VARCHAR(1000)) -ENGINE = NDB -PARTITION BY LIST(f_int1) -(PARTITION part_1 VALUES IN (-1), -PARTITION part0 VALUES IN (0,1), -PARTITION part1 VALUES IN (2)); -INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -ERROR HY000: Table has no partition for value 20 -SELECT * FROM t1 ORDER BY f_int1; -f_int1 f_int2 f_char1 f_char2 f_charbig --1 20 20 20 ===20=== -0 20 20 20 ===20=== -1 1 1 1 ===1=== -2 1 1 1 ===1=== -DROP TABLE t1; diff --git a/mysql-test/suite/ndb/r/ndb_partition_range.result b/mysql-test/suite/ndb/r/ndb_partition_range.result deleted file mode 100644 index fbaec81984d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_partition_range.result +++ /dev/null @@ -1,275 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), -partition x2 values less than (10), -partition x3 values less than (20)); -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (6, 1, 1); -INSERT into t1 values (10, 1, 1); -INSERT into t1 values (15, 1, 1); -select * from information_schema.partitions where table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -def test t1 x1 NULL 1 NULL RANGE NULL a NULL 5 0 0 0 # 0 0 # # NULL NULL default NULL -def test t1 x2 NULL 2 NULL RANGE NULL a NULL 10 0 0 0 # 0 0 # # NULL NULL default NULL -def test t1 x3 NULL 3 NULL RANGE NULL a NULL 20 0 0 0 # 0 0 # # NULL NULL default NULL -select * from t1 order by a; -a b c -1 1 1 -6 1 1 -10 1 1 -15 1 1 -select * from t1 where a=1 order by a; -a b c -1 1 1 -select * from t1 where a=15 and b=1 order by a; -a b c -15 1 1 -select * from t1 where a=21 and b=1 order by a; -a b c -select * from t1 where a=21 order by a; -a b c -select * from t1 where a in (1,6,10,21) order by a; -a b c -1 1 1 -6 1 1 -10 1 1 -select * from t1 where b=1 and a in (1,6,10,21) order by a; -a b c -1 1 1 -6 1 1 -10 1 1 -INSERT into t1 values (1, 2, 2); -select max(b) from t1 where a = 1; -max(b) -2 -select b from t1 where a = 1 order by b desc; -b -2 -1 -drop table t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(b), -unique (a)) -engine = ndb -partition by range (b) -partitions 3 -(partition x1 values less than (5), -partition x2 values less than (10), -partition x3 values less than (20)); -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (2, 6, 1); -INSERT into t1 values (3, 10, 1); -INSERT into t1 values (4, 15, 1); -select * from t1 order by a; -a b c -1 1 1 -2 6 1 -3 10 1 -4 15 1 -UPDATE t1 set a = 5 WHERE b = 15; -select * from t1 order by a; -a b c -1 1 1 -2 6 1 -3 10 1 -5 15 1 -UPDATE t1 set a = 6 WHERE a = 5; -select * from t1 order by a; -a b c -1 1 1 -2 6 1 -3 10 1 -6 15 1 -select * from t1 where b=1 order by b; -a b c -1 1 1 -select * from t1 where b=15 and a=1 order by b; -a b c -select * from t1 where b=21 and a=1 order by b; -a b c -select * from t1 where b=21 order by b; -a b c -select * from t1 where b in (1,6,10,21) order by b; -a b c -1 1 1 -2 6 1 -3 10 1 -select * from t1 where a in (1,2,5,6) order by b; -a b c -1 1 1 -2 6 1 -6 15 1 -select * from t1 where a=1 and b in (1,6,10,21) order by b; -a b c -1 1 1 -DELETE from t1 WHERE b = 6; -DELETE from t1 WHERE a = 6; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`b`), - UNIQUE KEY `a` (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (b) -(PARTITION x1 VALUES LESS THAN (5) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (10) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (20) ENGINE = ndbcluster) */ -drop table t1; -CREATE TABLE t1 -(id MEDIUMINT NOT NULL, -b1 BIT(8), -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE) ENGINE=NDB -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); -INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -id b1 vc bc d f total y t -0 NULL NULL NULL NULL NULL NULL NULL NULL -ALTER TABLE t1 ENGINE=MYISAM; -SELECT * FROM t1; -id b1 vc bc d f total y t -0 NULL NULL NULL NULL NULL NULL NULL NULL -DROP TABLE t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' - INITIAL_SIZE 16M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' - USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 ( -a1 INT, -a2 TEXT NOT NULL, -a3 BIT NOT NULL, -a4 DECIMAL(8,3), -a5 INT NOT NULL, -a6 INT, -PRIMARY KEY(a1)) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB -PARTITION BY LIST (a1) -(PARTITION p0 VALUES IN (1,2,3,4,5), -PARTITION p1 VALUES IN (6,7,8,9, 10), -PARTITION p2 VALUES IN (11, 12, 13, 14, 15)); -ALTER TABLE test.t1 DROP COLUMN a6; -ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255); -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -DROP TABLE t1; -CREATE TABLE test.t1 ( -a1 INT, -a2 TEXT NOT NULL, -a3 BIT NOT NULL, -a4 DECIMAL(8,3), -a5 INT NOT NULL, -a6 VARCHAR(255), -PRIMARY KEY(a1)) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB -PARTITION BY HASH(a1) -PARTITIONS 4; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -DROP TABLE t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -CREATE TABLE t1 -(id MEDIUMINT NOT NULL, -b1 BIT(8), -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE) ENGINE=NDB -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -id b1 vc bc d f total y t -2 NULL NULL NULL NULL NULL NULL NULL NULL -ALTER TABLE t1 ADD PARTITION -(PARTITION p2 VALUES IN (412)); -SELECT * FROM t1; -id b1 vc bc d f total y t -2 NULL NULL NULL NULL NULL NULL NULL NULL -DROP TABLE t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null) -partition by list(a) -partitions 2 -(partition x123 values in (1,5,6), -partition x234 values in (4,7,8)); -INSERT into t1 VALUES (5,1,1); -select * from t1; -a b c -5 1 1 -UPDATE t1 SET a=8 WHERE a=5 AND b=1; -select * from t1; -a b c -8 1 1 -drop table t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb -PARTITION BY RANGE(f1) -( PARTITION part1 VALUES LESS THAN (2), -PARTITION part2 VALUES LESS THAN (1000)); -INSERT INTO t1 VALUES(1, '---1---'); -INSERT INTO t1 VALUES(2, '---2---'); -select * from t1 order by f1; -f1 f2 -1 ---1--- -2 ---2--- -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2; -select * from t1 order by f1; -f1 f2 -1 ---1--- -6 ---2--- -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1; -select * from t1 order by f1; -f1 f2 -5 ---1--- -6 ---2--- -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_read_multi_range.result b/mysql-test/suite/ndb/r/ndb_read_multi_range.result deleted file mode 100644 index 113fb28bb78..00000000000 --- a/mysql-test/suite/ndb/r/ndb_read_multi_range.result +++ /dev/null @@ -1,494 +0,0 @@ -DROP TABLE IF EXISTS t1, t2, r1; -create table t1 ( -a int primary key, -b int not null, -c int not null, -index(b), unique index using hash(c) -) engine = ndb; -insert into t1 values -(1,2,1),(2,3,2),(3,4,3),(4,5,4), -(5,2,12),(6,3,11),(7,4,10),(8,5,9), -(9,2,8),(10,3,7),(11,4,6),(12,5,5); -create table r1 as select * from t1 where a in (2,8,12); -select * from r1 order by a; -a b c -2 3 2 -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where b in (1,2,5); -select * from r1 order by a; -a b c -1 2 1 -4 5 4 -5 2 12 -8 5 9 -9 2 8 -12 5 5 -drop table r1; -create table r1 as select * from t1 where c in (2,8,12); -select * from r1 order by a; -a b c -2 3 2 -5 2 12 -9 2 8 -drop table r1; -create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); -select * from r1 order by a; -a b c -1 2 1 -2 3 2 -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where a in (33,8,12); -select * from r1 order by a; -a b c -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where a in (2,33,8,12,34); -select * from r1 order by a; -a b c -2 3 2 -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where b in (1,33,5); -select * from r1 order by a; -a b c -4 5 4 -8 5 9 -12 5 5 -drop table r1; -select * from t1 where b in (1,33,5) order by a; -a b c -4 5 4 -8 5 9 -12 5 5 -create table r1 as select * from t1 where b in (45,1,33,5,44); -select * from r1 order by a; -a b c -4 5 4 -8 5 9 -12 5 5 -drop table r1; -select * from t1 where b in (45,22) order by a; -a b c -create table r1 as select * from t1 where c in (2,8,33); -select * from r1 order by a; -a b c -2 3 2 -9 2 8 -drop table r1; -create table r1 as select * from t1 where c in (13,2,8,33,12); -select * from r1 order by a; -a b c -2 3 2 -5 2 12 -9 2 8 -drop table r1; -select * from t1 where a in (33,8,12) order by a; -a b c -8 5 9 -12 5 5 -select * from t1 where a in (33,34,35) order by a; -a b c -select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; -a b c -1 2 1 -2 3 2 -8 5 9 -12 5 5 -select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; -a b c -1 2 1 -5 2 12 -9 2 8 -2 3 2 -6 3 11 -10 3 7 -3 4 3 -7 4 10 -11 4 6 -4 5 4 -8 5 9 -12 5 5 -select * from t1 where c in (13,2,8,33,12) order by c,a; -a b c -2 3 2 -9 2 8 -5 2 12 -drop table t1; -create table t1 ( -a int not null, -b int not null, -c int not null, -d int not null, -e int not null, -primary key (a,b,c,d), index (d) -) engine = ndb; -insert into t1 values -(1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), -(5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), -(9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), -(1,2,1,2,1), -(1,2,1,3,1), -(1,2,1,4,1), -(1,2,1,5,1); -create table r1 as select * from t1 -where a=1 and b=2 and c=1 and d in (1,4,3,2); -select * from r1 order by a,b,c,d; -a b c d e -1 2 1 1 1 -1 2 1 2 1 -1 2 1 3 1 -1 2 1 4 1 -drop table r1; -update t1 set e = 100 -where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -a b c d e -4 5 4 7 100 -5 2 12 12 100 -9 2 8 6 100 -select * from t1 where d not in (12,6,7) and e = 100; -a b c d e -update t1 -set e = 101 -where a=1 and -b=2 and -c=1 and -d in (1,4,3,2); -select * -from t1 -where a=1 and b=2 and c=1 and d in (1,4,3,2) -order by a,b,c,d; -a b c d e -1 2 1 1 101 -1 2 1 2 101 -1 2 1 3 101 -1 2 1 4 101 -select * -from t1 -where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) -and e=101; -a b c d e -update t1 -set e = -(case d -when 12 then 112 -when 6 then 106 -when 7 then 107 -end) -where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -a b c d e -4 5 4 7 107 -5 2 12 12 112 -9 2 8 6 106 -update t1 -set e = -(case d -when 1 then 111 -when 4 then 444 -when 3 then 333 -when 2 then 222 -end) -where a=1 and -b=2 and -c=1 and -d in (1,4,3,2); -select * -from t1 -where a=1 and b=2 and c=1 and d in (1,4,3,2) -order by a,b,c,d; -a b c d e -1 2 1 1 111 -1 2 1 2 222 -1 2 1 3 333 -1 2 1 4 444 -delete from t1 where d in (12,6,7); -select * from t1 where d in (12,6,7); -a b c d e -drop table t1; -create table t1 ( -a int not null primary key, -b int, -c int, -d int, -unique index (b), -index(c) -) engine = ndb; -insert into t1 values -(1,null,1,1), -(2,2,2,2), -(3,null,null,3), -(4,4,null,4), -(5,null,5,null), -(6,6,6,null), -(7,null,null,null), -(8,8,null,null), -(9,null,9,9), -(10,10,10,10), -(11,null,null,11), -(12,12,null,12), -(13,null,13,null), -(14,14,14,null), -(15,null,null,null), -(16,16,null,null); -create table t2 as select * from t1 where a in (5,6,7,8,9,10); -select * from t2 order by a; -a b c d -5 NULL 5 NULL -6 6 6 NULL -7 NULL NULL NULL -8 8 NULL NULL -9 NULL 9 9 -10 10 10 10 -drop table t2; -create table t2 as select * from t1 where b in (5,6,7,8,9,10); -select * from t2 order by a; -a b c d -6 6 6 NULL -8 8 NULL NULL -10 10 10 10 -drop table t2; -create table t2 as select * from t1 where c in (5,6,7,8,9,10); -select * from t2 order by a; -a b c d -5 NULL 5 NULL -6 6 6 NULL -9 NULL 9 9 -10 10 10 10 -drop table t2; -drop table t1; -CREATE TABLE t1 ( -a int(11) NOT NULL, -b int(11) NOT NULL, -c datetime default NULL, -PRIMARY KEY (a), -KEY idx_bc (b,c) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), -(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), -(406994,67,'2006-02-27 11:26:46'), (256,67,NULL), -(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), -(406988,67,'2006-02-23 17:07:22'), (255,67,NULL), -(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), -(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), -(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), -(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), -(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), -(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), -(223456,67,NULL),(4101,67,NULL),(1133,67,NULL), -(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), -(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), -(154503,67,'2005-10-28 11:52:38'); -create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; -create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; -create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; -create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; -select * from t11 order by 1,2,3; -a b c -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -select * from t12 order by 1,2,3; -a b c -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -select * from t21 order by 1,2,3; -a b c -1 67 2006-02-23 15:01:35 -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -245651 67 2005-12-08 15:58:27 -245652 67 2005-12-08 15:58:27 -245653 67 2005-12-08 15:59:07 -245654 67 2005-12-08 15:59:08 -245655 67 2005-12-08 15:59:08 -398340 67 2006-02-20 04:38:53 -398341 67 2006-02-20 04:48:44 -398545 67 2006-02-20 04:53:13 -406631 67 2006-02-23 10:49:42 -406988 67 2006-02-23 17:07:22 -406989 67 2006-02-23 17:08:46 -406990 67 2006-02-23 18:01:45 -406991 67 2006-02-24 16:42:32 -406992 67 2006-02-24 16:47:18 -406993 67 2006-02-27 11:20:57 -406994 67 2006-02-27 11:26:46 -406995 67 2006-02-28 11:55:00 -select * from t22 order by 1,2,3; -a b c -1 67 2006-02-23 15:01:35 -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -245651 67 2005-12-08 15:58:27 -245652 67 2005-12-08 15:58:27 -245653 67 2005-12-08 15:59:07 -245654 67 2005-12-08 15:59:08 -245655 67 2005-12-08 15:59:08 -398340 67 2006-02-20 04:38:53 -398341 67 2006-02-20 04:48:44 -398545 67 2006-02-20 04:53:13 -406631 67 2006-02-23 10:49:42 -406988 67 2006-02-23 17:07:22 -406989 67 2006-02-23 17:08:46 -406990 67 2006-02-23 18:01:45 -406991 67 2006-02-24 16:42:32 -406992 67 2006-02-24 16:47:18 -406993 67 2006-02-27 11:20:57 -406994 67 2006-02-27 11:26:46 -406995 67 2006-02-28 11:55:00 -select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a; -a -255 -256 -update t22 set c = '2005-12-08 15:58:27' where a = 255; -select * from t22 order by 1,2,3; -a b c -1 67 2006-02-23 15:01:35 -254 67 NULL -255 67 2005-12-08 15:58:27 -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -245651 67 2005-12-08 15:58:27 -245652 67 2005-12-08 15:58:27 -245653 67 2005-12-08 15:59:07 -245654 67 2005-12-08 15:59:08 -245655 67 2005-12-08 15:59:08 -398340 67 2006-02-20 04:38:53 -398341 67 2006-02-20 04:48:44 -398545 67 2006-02-20 04:53:13 -406631 67 2006-02-23 10:49:42 -406988 67 2006-02-23 17:07:22 -406989 67 2006-02-23 17:08:46 -406990 67 2006-02-23 18:01:45 -406991 67 2006-02-24 16:42:32 -406992 67 2006-02-24 16:47:18 -406993 67 2006-02-27 11:20:57 -406994 67 2006-02-27 11:26:46 -406995 67 2006-02-28 11:55:00 -select t21.* from t21,t22 where t21.a = t22.a and -t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; -a b c -256 67 NULL -delete from t22 where a > 245651; -update t22 set b = a + 1; -select * from t22 order by 1,2,3; -a b c -1 2 2006-02-23 15:01:35 -254 255 NULL -255 256 2005-12-08 15:58:27 -256 257 NULL -1120 1121 NULL -1133 1134 NULL -4101 4102 NULL -9199 9200 NULL -223456 223457 NULL -245651 245652 2005-12-08 15:58:27 -select t21.c, count(*) -from t21 -inner join t22 using (a) -where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652) -group by t21.c -order by t21.c; -c count(*) -NULL 7 -2005-12-08 15:58:27 1 -2006-02-23 15:01:35 1 -DROP TABLE t1, t11, t12, t21, t22; -CREATE TABLE t1 (id varchar(255) NOT NULL, -tag int(11) NOT NULL, -doc text NOT NULL, -type varchar(150) NOT NULL, -modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY (id) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); -id tag doc type -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); -id tag doc type -sakila 1 Some text goes here text -DROP TABLE t1; -CREATE TABLE t1 ( -var1 int(2) NOT NULL, -var2 int(2) NOT NULL, -PRIMARY KEY (var1) -) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; -CREATE TABLE t2 ( -var1 int(2) NOT NULL, -var2 int(2) NOT NULL, -PRIMARY KEY (var1) -) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; -CREATE TRIGGER testtrigger -AFTER UPDATE ON t1 FOR EACH ROW BEGIN -REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| -INSERT INTO t1 VALUES (1,1),(2,2),(3,3); -UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); -DROP TRIGGER testtrigger; -DROP TABLE t1, t2; -create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; -insert into t1 values (1,1), (10,10); -select * from t1 use index (ab) where a in(1,10) order by a; -a b -1 1 -10 10 -create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster -partition by key(a); -insert into t2 values (1,1), (10,10); -select * from t2 where a in (1,10) order by a; -a b -1 1 -10 10 -drop table t1, t2; -create table t1 (id int primary key) engine ndb; -insert into t1 values (1), (2), (3); -create table t2 (id int primary key) engine ndb; -insert into t2 select id from t1; -create trigger kaboom after delete on t1 -for each row begin -delete from t2 where id=old.id; -end| -select * from t1 order by id; -id -1 -2 -3 -delete from t1 where id in (1,2); -select * from t2 order by id; -id -3 -drop trigger kaboom; -drop table t1, t2; diff --git a/mysql-test/suite/ndb/r/ndb_rename.result b/mysql-test/suite/ndb/r/ndb_rename.result deleted file mode 100644 index 2cc2dfb3ff1..00000000000 --- a/mysql-test/suite/ndb/r/ndb_rename.result +++ /dev/null @@ -1,24 +0,0 @@ -DROP TABLE IF EXISTS t1,t2; -drop database if exists mysqltest; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10), -INDEX i1(attr1) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two"); -SELECT * FROM t1 WHERE attr1 = 1; -pk1 attr1 attr2 attr3 -1 1 1 one -alter table t1 rename t2; -SELECT * FROM t2 WHERE attr1 = 1; -pk1 attr1 attr2 attr3 -1 1 1 one -create database ndbtest; -alter table t2 rename ndbtest.t2; -SELECT * FROM ndbtest.t2 WHERE attr1 = 1; -pk1 attr1 attr2 attr3 -1 1 1 one -drop table ndbtest.t2; -drop database ndbtest; diff --git a/mysql-test/suite/ndb/r/ndb_replace.result b/mysql-test/suite/ndb/r/ndb_replace.result deleted file mode 100644 index ba78017ef7b..00000000000 --- a/mysql-test/suite/ndb/r/ndb_replace.result +++ /dev/null @@ -1,99 +0,0 @@ -drop table if exists t1,t2; -CREATE TABLE t1 ( -gesuchnr int(11) DEFAULT '0' NOT NULL, -benutzer_id int(11) DEFAULT '0' NOT NULL, -PRIMARY KEY (gesuchnr,benutzer_id) -) engine=ndbcluster; -replace into t1 (gesuchnr,benutzer_id) values (2,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr, benutzer_id) value (3,2); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr,benutzer_id) values (1,1); -ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY' -replace into t1 (gesuchnr,benutzer_id) values (1,1); -select * from t1 order by gesuchnr; -gesuchnr benutzer_id -1 1 -2 1 -3 2 -drop table t1; -CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT, -j INT, -k INT, -UNIQUE INDEX(j) -) ENGINE = ndb; -INSERT INTO t1 VALUES (1,1,23),(2,2,24); -REPLACE INTO t1 (j,k) VALUES (1,42); -REPLACE INTO t1 (i,j) VALUES (17,2); -SELECT * from t1 ORDER BY i; -i j k -3 1 42 -17 2 NULL -DROP TABLE t1; -CREATE TABLE t2 (a INT(11) NOT NULL, -b INT(11) NOT NULL, -c INT(11) NOT NULL, -x TEXT, -y TEXT, -z TEXT, -id INT(10) unsigned NOT NULL AUTO_INCREMENT, -i INT(11) DEFAULT NULL, -PRIMARY KEY (id), -UNIQUE KEY a (a,b,c) -) ENGINE=ndbcluster; -REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3); -SELECT * FROM t2 ORDER BY id; -a b c x y z id i -1 1 1 c c c 3 3 -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1); -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2); -SELECT * FROM t2 ORDER BY id; -a b c x y z id i -1 1 1 b b b 5 2 -DROP TABLE t2; -drop table if exists t1; -create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster; -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (4, 1), (5, 2); -select * from t1 order by pk; -pk apk data -3 3 3 -4 1 NULL -5 2 NULL -delete from t1; -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (1, 4), (2, 5); -select * from t1 order by pk; -pk apk data -1 4 NULL -2 5 NULL -3 3 3 -delete from t1; -insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -pk apk data -1 1 1 -3 4 NULL -5 6 NULL -delete from t1; -insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -pk apk data -1 1 1 -3 4 NULL -5 6 NULL -delete from t1; -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) select 4, 1; -replace into t1 (pk, apk) select 2, 4; -select * from t1 order by pk; -pk apk data -2 4 NULL -3 3 3 -4 1 NULL -drop table t1; -End of 5.0 tests. diff --git a/mysql-test/suite/ndb/r/ndb_restore.result b/mysql-test/suite/ndb/r/ndb_restore.result deleted file mode 100644 index 186cbb71f5e..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore.result +++ /dev/null @@ -1,501 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -CREATE TABLE `t1_c` ( -`capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment, -`goaledatta` char(2) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt'); -CREATE TABLE `t2_c` ( -`capgotod` smallint(5) unsigned NOT NULL auto_increment, -`gotod` smallint(5) unsigned NOT NULL default '0', -`goaledatta` char(2) default NULL, -`maturegarbagefa` varchar(32) default NULL, -`descrpooppo` varchar(64) default NULL, -`svcutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capgotod`), -KEY `i quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,''); -CREATE TABLE `t3_c` ( -`CapGoaledatta` smallint(5) unsigned NOT NULL default '0', -`capgotod` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); -CREATE TABLE `t4_c` ( -`capfa` bigint(20) unsigned NOT NULL auto_increment, -`realm` varchar(32) NOT NULL default '', -`authpwchap` varchar(32) default NULL, -`fa` varchar(32) NOT NULL default '', -`payyingatta` tinyint(4) NOT NULL default '0', -`status` char(1) default NULL, -PRIMARY KEY (`fa`,`realm`), -KEY `capfa` (`capfa`), -KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); -CREATE TABLE `t5_c` ( -`capfa` bigint(20) unsigned NOT NULL default '0', -`gotod` smallint(5) unsigned NOT NULL default '0', -`orderutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); -CREATE TABLE `t6_c` ( -`capfa_parent` bigint(20) unsigned NOT NULL default '0', -`capfa_child` bigint(20) unsigned NOT NULL default '0', -`relatta` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); -CREATE TABLE `t7_c` ( -`dardpo` char(15) NOT NULL default '', -`dardtestard` tinyint(3) unsigned NOT NULL auto_increment, -`FastFA` char(5) NOT NULL default '', -`FastCode` char(6) NOT NULL default '', -`Fastca` char(1) NOT NULL default '', -`Fastmag` char(1) NOT NULL default '', -`Beareratta` char(2) NOT NULL default '', -PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); -CREATE TABLE `t8_c` ( -`kattjame` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`aaaproxysessfa` varchar(255) default NULL, -`autologonallowed` char(1) default NULL, -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`acctoutputoctets` bigint(20) unsigned default NULL, -`acctinputoctets` bigint(20) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), -KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); -CREATE TABLE `t9_c` ( -`kattjame` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`actcoutpuocttets` bigint(20) unsigned default NULL, -`actinputocctets` bigint(20) unsigned default NULL, -`terminateraste` tinyint(3) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); -CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t10_c VALUES (1),(2),(3); -insert into t10_c values (10000),(2000),(3000); -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -create table t10 engine=myisam as select * from t10_c; -ForceVarPart: 0 -ForceVarPart: 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -ForceVarPart: 0 -ForceVarPart: 1 -select * from information_schema.columns where table_name = "t1_c"; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -def test t1_c capgoaledatta 1 NULL NO mediumint NULL NULL 7 0 NULL NULL mediumint(5) unsigned PRI auto_increment select,insert,update,references -def test t1_c goaledatta 2 NO char 2 2 NULL NULL latin1 latin1_swedish_ci char(2) PRI select,insert,update,references -def test t1_c maturegarbagefa 3 NO varchar 32 32 NULL NULL latin1 latin1_swedish_ci varchar(32) PRI select,insert,update,references -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -7 -select count(*) from t2_c; -count(*) -7 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -7 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -select * from t10_c order by a; -a -1 -2 -3 -2000 -3000 -10000 -select max(capgoaledatta) from t1_c; -max(capgoaledatta) -3000 -select auto_increment from information_schema.tables -where table_name = 't1_c'; -auto_increment -3001 -select max(capgotod) from t2_c; -max(capgotod) -500 -select auto_increment from information_schema.tables -where table_name = 't2_c'; -auto_increment -501 -select max(capfa) from t4_c; -max(capfa) -290000000 -select auto_increment from information_schema.tables -where table_name = 't4_c'; -auto_increment -290000001 -select max(dardtestard) from t7_c; -max(dardtestard) -28 -select auto_increment from information_schema.tables -where table_name = 't7_c'; -auto_increment -29 -select max(a) from t10_c; -max(a) -10000 -select auto_increment from information_schema.tables -where table_name = 't10_c'; -auto_increment -10001 -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -7 -select count(*) from t2_c; -count(*) -7 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -7 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -7 -select count(*) from t2_c; -count(*) -7 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -7 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t2_c; -520093696, diff --git a/mysql-test/suite/ndb/r/ndb_restore_compat.result b/mysql-test/suite/ndb/r/ndb_restore_compat.result deleted file mode 100644 index f2630573220..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore_compat.result +++ /dev/null @@ -1,119 +0,0 @@ -DROP DATABASE IF EXISTS BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; -USE BANK; -SHOW TABLES; -Tables_in_BANK -ACCOUNT -GL -ACCOUNT_TYPE -TRANSACTION -SYSTEM_VALUES -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -TIME ACCOUNT_TYPE BALANCE DEPOSIT_COUNT DEPOSIT_SUM WITHDRAWAL_COUNT WITHDRAWAL_SUM PURGED -0 0 10000000 0 0 0 0 1 -0 1 30000 0 0 0 0 1 -0 2 20000 0 0 0 0 1 -0 3 20000 0 0 0 0 1 -0 4 20000 0 0 0 0 1 -1 0 10000000 0 0 0 0 0 -1 1 30000 0 0 0 0 0 -1 2 20000 0 0 0 0 0 -1 3 20000 0 0 0 0 0 -1 4 20000 0 0 0 0 0 -2 0 9981761 17 80457 19 98696 0 -2 1 17823 55 203688 46 215865 0 -2 2 47056 33 159275 33 132219 0 -2 3 15719 26 126833 29 131114 0 -2 4 27641 32 133459 36 125818 0 -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -ACCOUNT_ID OWNER BALANCE ACCOUNT_TYPE -0 0 9863546 0 -1 3001 12885 1 -2 3002 11012 2 -3 3003 32789 3 -4 3004 10992 4 -5 3005 2247 1 -6 3006 3170 1 -7 3007 60321 2 -8 3008 30508 3 -9 3009 62530 4 -SELECT COUNT(*) FROM TRANSACTION; -COUNT(*) -3444 -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SYSTEM_VALUES_ID VALUE -0 2039 -1 3 -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; -server_id epoch log_name start_pos end_pos -0 151 0 0 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -TRUNCATE GL; -TRUNCATE ACCOUNT; -TRUNCATE TRANSACTION; -TRUNCATE SYSTEM_VALUES; -TRUNCATE ACCOUNT_TYPE; -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -TIME ACCOUNT_TYPE BALANCE DEPOSIT_COUNT DEPOSIT_SUM WITHDRAWAL_COUNT WITHDRAWAL_SUM PURGED -0 0 10000000 0 0 0 0 1 -0 1 30000 0 0 0 0 1 -0 2 20000 0 0 0 0 1 -0 3 20000 0 0 0 0 1 -0 4 20000 0 0 0 0 1 -1 0 10000000 0 0 0 0 1 -1 1 30000 0 0 0 0 1 -1 2 20000 0 0 0 0 1 -1 3 20000 0 0 0 0 1 -1 4 20000 0 0 0 0 1 -2 0 10000000 0 0 0 0 1 -2 1 30000 0 0 0 0 1 -2 2 20000 0 0 0 0 1 -2 3 20000 0 0 0 0 1 -2 4 20000 0 0 0 0 1 -3 0 9963591 14 59111 19 95520 0 -3 1 44264 49 255559 53 241295 0 -3 2 25515 39 177806 36 172291 0 -3 3 16779 26 129200 29 132421 0 -3 4 39851 43 182771 34 162920 0 -4 0 9733661 141 632616 162 862546 0 -4 1 63853 426 2005337 415 1985748 0 -4 2 140473 314 1548632 297 1433674 0 -4 3 13481 310 1528043 324 1531341 0 -4 4 138532 316 1540206 309 1441525 0 -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -ACCOUNT_ID OWNER BALANCE ACCOUNT_TYPE -0 0 9679579 0 -1 3001 18130 1 -2 3002 12318 2 -3 3003 3049 3 -4 3004 39517 4 -5 3005 37051 1 -6 3006 144497 1 -7 3007 130670 2 -8 3008 13747 3 -9 3009 11442 4 -SELECT COUNT(*) FROM TRANSACTION; -COUNT(*) -4056 -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SYSTEM_VALUES_ID VALUE -0 2297 -1 5 -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; -server_id epoch log_name start_pos end_pos -0 331 0 0 -SELECT * FROM DESCRIPTION ORDER BY USERNAME; -USERNAME ADDRESS -Guangbao Ni Suite 503, 5F NCI Tower, A12 Jianguomenwai Avenue Chaoyang District, Beijing, 100022 PRC -USERNAME Varchar(255;latin1_swedish_ci) NULL AT=SHORT_VAR ST=MEMORY -ADDRESS Longvarchar(2002;latin1_swedish_ci) NULL AT=MEDIUM_VAR ST=MEMORY -DROP DATABASE BANK; diff --git a/mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result b/mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result deleted file mode 100644 index b101c93d156..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore_different_endian_data.result +++ /dev/null @@ -1,200 +0,0 @@ -USE test; -DROP TABLE IF EXISTS t_num,t_datetime,t_string_1,t_string_2,t_gis; -SHOW TABLES; -Tables_in_test -t_gis -t_string_1 -t_datetime -t_num -t_string_2 -SHOW CREATE TABLE t_num; -Table Create Table -t_num CREATE TABLE `t_num` ( - `t_pk` int(11) NOT NULL, - `t_bit` bit(64) DEFAULT NULL, - `t_tinyint` tinyint(4) DEFAULT NULL, - `t_bool` tinyint(1) DEFAULT NULL, - `t_smallint` smallint(6) DEFAULT NULL, - `t_mediumint` mediumint(9) DEFAULT NULL, - `t_int` int(11) DEFAULT NULL, - `t_bigint` bigint(20) DEFAULT NULL, - `t_float` float DEFAULT NULL, - `t_double` double DEFAULT NULL, - `t_decimal` decimal(37,16) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_datetime; -Table Create Table -t_datetime CREATE TABLE `t_datetime` ( - `t_pk` int(11) NOT NULL, - `t_date` date DEFAULT NULL, - `t_datetime` datetime DEFAULT NULL, - `t_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `t_time` time DEFAULT NULL, - `t_year` year(4) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_string_1; -Table Create Table -t_string_1 CREATE TABLE `t_string_1` ( - `t_pk` int(11) NOT NULL, - `t_char` char(255) DEFAULT NULL, - `t_varchar` varchar(655) DEFAULT NULL, - `t_binary` binary(255) DEFAULT NULL, - `t_varbinary` varbinary(6553) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_string_2; -Table Create Table -t_string_2 CREATE TABLE `t_string_2` ( - `t_pk` int(11) NOT NULL, - `t_tinyblob` tinyblob, - `t_tinytext` tinytext, - `t_blob` blob, - `t_text` text, - `t_mediumblob` mediumblob, - `t_mediumtext` mediumtext, - `t_longblob` longblob, - `t_longtext` longtext, - `t_enum` enum('001001','001004','001010','001018','001019','001020','001021','001027','001028','001029','001030','001031','001100','002003','002004','002005','002007') NOT NULL DEFAULT '001001', - `t_set` set('a','B') DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_gis; -Table Create Table -t_gis CREATE TABLE `t_gis` ( - `t_pk` int(11) NOT NULL, - `t_point` point DEFAULT NULL, - `t_linestring` linestring DEFAULT NULL, - `t_polygon` polygon DEFAULT NULL, - `t_multipoint` multipoint DEFAULT NULL, - `t_multilinestring` multilinestring DEFAULT NULL, - `t_multipolygon` multipolygon DEFAULT NULL, - `t_geometrycollection` geometrycollection DEFAULT NULL, - `t_geometry` geometry DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t_datetime; -t_pk t_date t_datetime t_timestamp t_time t_year -1 1998-01-01 2006-08-10 10:11:12 2002-10-29 16:51:06 19:38:34 2155 -SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num; -t_pk hex(t_bit) t_tinyint t_bool t_smallint t_mediumint t_int t_bigint t_float t_double t_decimal -1 AAAAAAAAAAAAAAAA 125 1 32765 8388606 2147483647 9223372036854775807 1e20 1e150 331.0000000000000000 -SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1; -t_pk t_char t_varchar hex(t_binary) hex(t_varbinary) -1 abcdefghijklmn abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn 612020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 4100 -SELECT * FROM t_string_2; -t_pk t_tinyblob t_tinytext t_blob t_text t_mediumblob t_mediumtext t_longblob t_longtext t_enum t_set -1 abcdefghijklmnabcdefghijklmn abcdefghijklmnabcdefghijklmn a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 001001 a -SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk; -AsText(t_point) AsText(t_linestring) AsText(t_polygon) -POINT(10 10) LINESTRING(10 10,20 10,20 20,10 20,10 10) POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -POINT(10 20) LINESTRING(10 10,40 10) POLYGON((0 0,30 0,30 30,0 0)) -SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk; -AsText(t_multipoint) AsText(t_multilinestring) AsText(t_multipolygon) -MULTIPOINT(1 1,11 11,11 21,21 21) MULTILINESTRING((10 48,10 21,10 0)) MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -MULTIPOINT(3 6,4 10) MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk; -AsText(t_geometrycollection) AsText(t_geometry) -GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis; -SHOW TABLES; -Tables_in_test -t_gis -t_string_1 -t_datetime -t_num -t_string_2 -SHOW CREATE TABLE t_num; -Table Create Table -t_num CREATE TABLE `t_num` ( - `t_pk` int(11) NOT NULL, - `t_bit` bit(64) DEFAULT NULL, - `t_tinyint` tinyint(4) DEFAULT NULL, - `t_bool` tinyint(1) DEFAULT NULL, - `t_smallint` smallint(6) DEFAULT NULL, - `t_mediumint` mediumint(9) DEFAULT NULL, - `t_int` int(11) DEFAULT NULL, - `t_bigint` bigint(20) DEFAULT NULL, - `t_float` float DEFAULT NULL, - `t_double` double DEFAULT NULL, - `t_decimal` decimal(37,16) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_datetime; -Table Create Table -t_datetime CREATE TABLE `t_datetime` ( - `t_pk` int(11) NOT NULL, - `t_date` date DEFAULT NULL, - `t_datetime` datetime DEFAULT NULL, - `t_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `t_time` time DEFAULT NULL, - `t_year` year(4) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_string_1; -Table Create Table -t_string_1 CREATE TABLE `t_string_1` ( - `t_pk` int(11) NOT NULL, - `t_char` char(255) DEFAULT NULL, - `t_varchar` varchar(655) DEFAULT NULL, - `t_binary` binary(255) DEFAULT NULL, - `t_varbinary` varbinary(6553) DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_string_2; -Table Create Table -t_string_2 CREATE TABLE `t_string_2` ( - `t_pk` int(11) NOT NULL, - `t_tinyblob` tinyblob, - `t_tinytext` tinytext, - `t_blob` blob, - `t_text` text, - `t_mediumblob` mediumblob, - `t_mediumtext` mediumtext, - `t_longblob` longblob, - `t_longtext` longtext, - `t_enum` enum('001001','001004','001010','001018','001019','001020','001021','001027','001028','001029','001030','001031','001100','002003','002004','002005','002007') NOT NULL DEFAULT '001001', - `t_set` set('a','B') DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t_gis; -Table Create Table -t_gis CREATE TABLE `t_gis` ( - `t_pk` int(11) NOT NULL, - `t_point` point DEFAULT NULL, - `t_linestring` linestring DEFAULT NULL, - `t_polygon` polygon DEFAULT NULL, - `t_multipoint` multipoint DEFAULT NULL, - `t_multilinestring` multilinestring DEFAULT NULL, - `t_multipolygon` multipolygon DEFAULT NULL, - `t_geometrycollection` geometrycollection DEFAULT NULL, - `t_geometry` geometry DEFAULT NULL, - PRIMARY KEY (`t_pk`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t_datetime; -t_pk t_date t_datetime t_timestamp t_time t_year -1 1998-01-01 2006-08-10 10:11:12 2002-10-29 16:51:06 19:38:34 2155 -SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num; -t_pk hex(t_bit) t_tinyint t_bool t_smallint t_mediumint t_int t_bigint t_float t_double t_decimal -1 AAAAAAAAAAAAAAAA 125 1 32765 8388606 2147483647 9223372036854775807 1e20 1e150 331.0000000000000000 -SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1; -t_pk t_char t_varchar hex(t_binary) hex(t_varbinary) -1 abcdefghijklmn abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn 612020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 4100 -SELECT * FROM t_string_2; -t_pk t_tinyblob t_tinytext t_blob t_text t_mediumblob t_mediumtext t_longblob t_longtext t_enum t_set -1 abcdefghijklmnabcdefghijklmn abcdefghijklmnabcdefghijklmn a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 a123456789b123456789c123456789d123456789e123456789f123456789g123456789 001001 a -SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk; -AsText(t_point) AsText(t_linestring) AsText(t_polygon) -POINT(10 10) LINESTRING(10 10,20 10,20 20,10 20,10 10) POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -POINT(10 20) LINESTRING(10 10,40 10) POLYGON((0 0,30 0,30 30,0 0)) -SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk; -AsText(t_multipoint) AsText(t_multilinestring) AsText(t_multipolygon) -MULTIPOINT(1 1,11 11,11 21,21 21) MULTILINESTRING((10 48,10 21,10 0)) MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -MULTIPOINT(3 6,4 10) MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk; -AsText(t_geometrycollection) AsText(t_geometry) -GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis; diff --git a/mysql-test/suite/ndb/r/ndb_restore_partition.result b/mysql-test/suite/ndb/r/ndb_restore_partition.result deleted file mode 100644 index b984c76a91d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore_partition.result +++ /dev/null @@ -1,460 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -CREATE TABLE `t1_c` ( -`capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, -`goaledatta` char(2) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt'); -CREATE TABLE `t2_c` ( -`capgotod` smallint(5) unsigned NOT NULL auto_increment, -`gotod` smallint(5) unsigned NOT NULL default '0', -`goaledatta` char(2) default NULL, -`maturegarbagefa` varchar(32) default NULL, -`descrpooppo` varchar(64) default NULL, -`svcutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capgotod`), -KEY `i_quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'); -CREATE TABLE `t3_c` ( -`CapGoaledatta` smallint(5) unsigned NOT NULL default '0', -`capgotod` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); -CREATE TABLE `t4_c` ( -`capfa` bigint(20) unsigned NOT NULL auto_increment, -`realm` varchar(32) NOT NULL default '', -`authpwchap` varchar(32) default NULL, -`fa` varchar(32) NOT NULL default '', -`payyingatta` tinyint(4) NOT NULL default '0', -`status` char(1) default NULL, -PRIMARY KEY (`fa`,`realm`), -KEY `capfa` (`capfa`), -KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); -CREATE TABLE `t5_c` ( -`capfa` bigint(20) unsigned NOT NULL default '0', -`gotod` smallint(5) unsigned NOT NULL default '0', -`orderutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); -CREATE TABLE `t6_c` ( -`capfa_parent` bigint(20) unsigned NOT NULL default '0', -`capfa_child` bigint(20) unsigned NOT NULL default '0', -`relatta` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); -CREATE TABLE `t7_c` ( -`dardpo` char(15) NOT NULL default '', -`dardtestard` tinyint(3) unsigned NOT NULL default '0', -`FastFA` char(5) NOT NULL default '', -`FastCode` char(6) NOT NULL default '', -`Fastca` char(1) NOT NULL default '', -`Fastmag` char(1) NOT NULL default '', -`Beareratta` char(2) NOT NULL default '', -PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); -CREATE TABLE `t8_c` ( -`kattjame` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`aaaproxysessfa` varchar(255) default NULL, -`autologonallowed` char(1) default NULL, -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`acctoutputoctets` bigint(20) unsigned default NULL, -`acctinputoctets` bigint(20) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), -KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); -CREATE TABLE `t9_c` ( -`kattjame` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`actcoutpuocttets` bigint(20) unsigned default NULL, -`actinputocctets` bigint(20) unsigned default NULL, -`terminateraste` tinyint(3) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -6 -select count(*) from t2_c; -count(*) -6 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -6 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -ALTER TABLE t1_c -PARTITION BY RANGE (`capgoaledatta`) -(PARTITION p0 VALUES LESS THAN MAXVALUE); -ALTER TABLE t2_c -PARTITION BY LIST(`capgotod`) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6)); -ALTER TABLE t3_c -PARTITION BY HASH (`CapGoaledatta`); -ALTER TABLE t5_c -PARTITION BY HASH (`capfa`) -PARTITIONS 4; -ALTER TABLE t6_c -PARTITION BY LINEAR HASH (`relatta`) -PARTITIONS 4; -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -6 -select count(*) from t2_c; -count(*) -6 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -6 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -6 -select count(*) from t2_c; -count(*) -6 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -6 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -Create table test/def/t2_c failed: Translate frm error -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t2_c; -520093696, diff --git a/mysql-test/suite/ndb/r/ndb_restore_print.result b/mysql-test/suite/ndb/r/ndb_restore_print.result deleted file mode 100644 index fa52513e7d0..00000000000 --- a/mysql-test/suite/ndb/r/ndb_restore_print.result +++ /dev/null @@ -1,312 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -create table t1 -(pk int key -,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) -,b1 TINYINT, b2 TINYINT UNSIGNED -,c1 SMALLINT, c2 SMALLINT UNSIGNED -,d1 INT, d2 INT UNSIGNED -,e1 BIGINT, e2 BIGINT UNSIGNED -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine myisam; -insert into t1 values -(1 -,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 -,127, 255 -,32767, 65535 -,2147483647, 4294967295 -,9223372036854775807, 18446744073709551615 -,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 -,0x12,0x123456789abcdef0, 0x00123450 -); -insert into t1 values -(2 -,0, 0, 0, 0, 0 -,-128, 0 -,-32768, 0 -,-2147483648, 0 -,-9223372036854775808, 0 -,'','','' - ,'','','' - ,0x0,0x0,0x0 -,0x0,0x0,0x0 -); -insert into t1 values -(3 -,NULL,NULL,NULL,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -); -select pk -,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) -,b1, b2 -,c1 , c2 -,d1 , d2 -,e1 , e2 -,f1 , f2, f3 -,g1 , g2, g3 -,hex(h1), hex(h2), hex(h3) -,hex(i1), hex(i2), hex(i3) -from t1 order by pk; -pk 1 -hex(a1) 1 -hex(a2) 17 -hex(a3) 789A -hex(a4) 789ABCDE -hex(a5) FEDC0001 -b1 127 -b2 255 -c1 32767 -c2 65535 -d1 2147483647 -d2 4294967295 -e1 9223372036854775807 -e2 18446744073709551615 -f1 1 -f2 12345678901234567890123456789012 -f3 123456789 -g1 1 -g2 12345678901234567890123456789012 -g3 123456789 -hex(h1) 12 -hex(h2) 123456789ABCDEF0 -hex(h3) 012345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 12 -hex(i2) 123456789ABCDEF0 -hex(i3) 00123450 -pk 2 -hex(a1) 0 -hex(a2) 0 -hex(a3) 0 -hex(a4) 0 -hex(a5) 0 -b1 -128 -b2 0 -c1 -32768 -c2 0 -d1 -2147483648 -d2 0 -e1 -9223372036854775808 -e2 0 -f1 -f2 -f3 -g1 -g2 -g3 -hex(h1) 00 -hex(h2) 0000000000000000 -hex(h3) 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 00 -hex(i2) 00 -hex(i3) 00 -pk 3 -hex(a1) NULL -hex(a2) NULL -hex(a3) NULL -hex(a4) NULL -hex(a5) NULL -b1 NULL -b2 NULL -c1 NULL -c2 NULL -d1 NULL -d2 NULL -e1 NULL -e2 NULL -f1 NULL -f2 NULL -f3 NULL -g1 NULL -g2 NULL -g3 NULL -hex(h1) NULL -hex(h2) NULL -hex(h3) NULL -hex(i1) NULL -hex(i2) NULL -hex(i3) NULL -alter table t1 engine ndb; -select pk -,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) -,b1, b2 -,c1 , c2 -,d1 , d2 -,e1 , e2 -,f1 , f2, f3 -,g1 , g2, g3 -,hex(h1), hex(h2), hex(h3) -,hex(i1), hex(i2), hex(i3) -from t1 order by pk; -pk 1 -hex(a1) 1 -hex(a2) 17 -hex(a3) 789A -hex(a4) 789ABCDE -hex(a5) FEDC0001 -b1 127 -b2 255 -c1 32767 -c2 65535 -d1 2147483647 -d2 4294967295 -e1 9223372036854775807 -e2 18446744073709551615 -f1 1 -f2 12345678901234567890123456789012 -f3 123456789 -g1 1 -g2 12345678901234567890123456789012 -g3 123456789 -hex(h1) 12 -hex(h2) 123456789ABCDEF0 -hex(h3) 012345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 12 -hex(i2) 123456789ABCDEF0 -hex(i3) 00123450 -pk 2 -hex(a1) 0 -hex(a2) 0 -hex(a3) 0 -hex(a4) 0 -hex(a5) 0 -b1 -128 -b2 0 -c1 -32768 -c2 0 -d1 -2147483648 -d2 0 -e1 -9223372036854775808 -e2 0 -f1 -f2 -f3 -g1 -g2 -g3 -hex(h1) 00 -hex(h2) 0000000000000000 -hex(h3) 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 00 -hex(i2) 00 -hex(i3) 00 -pk 3 -hex(a1) NULL -hex(a2) NULL -hex(a3) NULL -hex(a4) NULL -hex(a5) NULL -b1 NULL -b2 NULL -c1 NULL -c2 NULL -d1 NULL -d2 NULL -e1 NULL -e2 NULL -f1 NULL -f2 NULL -f3 NULL -g1 NULL -g2 NULL -g3 NULL -hex(h1) NULL -hex(h2) NULL -hex(h3) NULL -hex(i1) NULL -hex(i2) NULL -hex(i3) NULL -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -1;0x1;0x17;0x789A;0x789ABCDE;0xFEDC0001;127;255;32767;65535;2147483647;4294967295;9223372036854775807;18446744073709551615;1;12345678901234567890123456789012;123456789;1;12345678901234567890123456789012;123456789;0x12;0x123456789ABCDEF0;0x012345;0x12;0x123456789ABCDEF0;0x00123450 -2;0x0;0x0;0x0;0x0;0x0;-128;0;-32768;0;-2147483648;0;-9223372036854775808;0;;;;;;;0x0;0x0;0x0;0x0;0x0;0x0 -3;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N -1,0x1,0x17,0x789A,0x789ABCDE,0xFEDC0001,127,255,32767,65535,2147483647,4294967295,9223372036854775807,18446744073709551615,'1','12345678901234567890123456789012','123456789','1','12345678901234567890123456789012','123456789',0x12,0x123456789ABCDEF0,0x012345,0x12,0x123456789ABCDEF0,0x00123450 -2,0x0,0x0,0x0,0x0,0x0,-128,0,-32768,0,-2147483648,0,-9223372036854775808,0,'','','','','','',0x0,0x0,0x0,0x0,0x0,0x0 -3,,,,,,,,,,,,,,,,,,,,,,,,, -drop table t1; -create table t1 -(pk int key -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine ndb; -insert into t1 values -(1 -,'1','12345678901234567890123456789012','123456789 ' - ,'1 ','12345678901234567890123456789012 ','123456789 ' - ,0x20,0x123456789abcdef020, 0x012345000020 -,0x1200000020,0x123456789abcdef000000020, 0x00123450000020 -); -create table t2 (pk int key, a int) engine ndb; -create table t3 (pk int key, a int) engine ndb; -create table t4 (pk int key, a int) engine ndb; -insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); -insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); -insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -'1' '1' '12345678901234567890123456789012' '123456789' '1' '12345678901234567890123456789012' '123456789' '0x20' '0x123456789ABCDEF020' '0x012345000020' '0x1200000020' '0x123456789ABCDEF000000020' '0x00123450000020' - -t1 --- -1 1 12345678901234567890123456789012 123456789 1 12345678901234567890123456789012 123456789 0x20 0x123456789ABCDEF020 0x012345000020 0x1200000020 0x123456789ABCDEF000000020 0x00123450000020 - -t2 --- -1 11 -2 12 -3 13 -4 14 -5 15 - -t3 --- -1 21 -2 22 -3 23 -4 24 -5 25 - -t4 --- -1 31 -2 32 -3 33 -4 34 -5 35 -drop table t1; -create table t1 -(pk int key -,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED -) engine ndb; -insert into t1 values(1, 8388607, 16777215); -insert into t1 values(2, -8388608, 0); -insert into t1 values(3, -1, 1); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -1;8388607;16777215 -2;-8388608;0 -3;-1;1 -drop table t1; -drop table t2; -drop table t3; -drop table t4; diff --git a/mysql-test/suite/ndb/r/ndb_row_format.result b/mysql-test/suite/ndb/r/ndb_row_format.result deleted file mode 100644 index 48a314c2fe9..00000000000 --- a/mysql-test/suite/ndb/r/ndb_row_format.result +++ /dev/null @@ -1,65 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; -CREATE TABLE t1 -( a INT KEY, -b VARCHAR(10) ) -ROW_FORMAT=FIXED -ENGINE=NDB; -ERROR HY000: Can't create table 'test.t1' (errno: 138) -SHOW WARNINGS; -Level Code Message -Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute' -Error 1005 Can't create table 'test.t1' (errno: 138) -CREATE TABLE t1 -( a INT KEY, -b INT ) -ENGINE=NDB; -ForceVarPart: 1 -DROP TABLE t1; -CREATE TABLE t1 -( a INT KEY, -b INT ) -ROW_FORMAT=DEFAULT -ENGINE=NDB; -ForceVarPart: 1 -DROP TABLE t1; -CREATE TABLE t1 -( a INT KEY, -b INT ) -ROW_FORMAT=FIXED -ENGINE=NDB; -ForceVarPart: 0 -DROP TABLE t1; -CREATE TABLE t1 -( a INT KEY, -b INT ) -ROW_FORMAT=DYNAMIC -ENGINE=NDB; -ForceVarPart: 1 -DROP TABLE t1; -create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; -insert into t1(b) values ('0123456789'); -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -select count(*) from t1; -count(*) -1024 -begin; -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -rollback; -select count(*),b from t1 group by b; -count(*) b -1024 0123456789 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_single_user.result b/mysql-test/suite/ndb/r/ndb_single_user.result deleted file mode 100644 index 1d5f3041adb..00000000000 --- a/mysql-test/suite/ndb/r/ndb_single_user.result +++ /dev/null @@ -1,119 +0,0 @@ -drop table if exists t1,t2; -create table t1 (a int key, b int unique, c int) engine ndb; -ERROR HY000: Can't create table 'test.t1' (errno: 299) -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ERROR HY000: Failed to create LOGFILE GROUP -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1528 Failed to create LOGFILE GROUP -create table t1 (a int key, b int unique, c int) engine ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ERROR HY000: Failed to create TABLESPACE -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1528 Failed to create TABLESPACE -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -ERROR HY000: Failed to drop LOGFILE GROUP -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1529 Failed to drop LOGFILE GROUP -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -ERROR HY000: Failed to alter: DROP DATAFILE -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1533 Failed to alter: DROP DATAFILE -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -DROP TABLESPACE ts1 -ENGINE NDB; -ERROR HY000: Failed to drop TABLESPACE -show warnings; -Level Code Message -Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1529 Failed to drop TABLESPACE -DROP TABLESPACE ts1 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0); -create table t2 as select * from t1; -select * from t1 where a = 1; -a b c -1 1 0 -select * from t1 where b = 4; -a b c -4 4 0 -select * from t1 where a > 4 order by a; -a b c -5 5 0 -6 6 0 -7 7 0 -8 8 0 -9 9 0 -10 10 0 -update t1 set b=102 where a = 2; -update t1 set b=103 where b = 3; -update t1 set b=b+100; -update t1 set b=b+100 where a > 7; -delete from t1; -insert into t1 select * from t2; -create unique index new_index on t1 (b,c); -drop table t2; -drop table t1; -ERROR 42S02: Unknown table 't1' -create index new_index_fail on t1 (c); -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0); -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -select * from t1 where a = 1; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -select * from t1 where b = 4; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=102 where a = 2; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=103 where b = 3; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=b+100; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=b+100 where a > 7; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -BEGIN; -update t1 set b=b+100 where a=1; -BEGIN; -update t1 set b=b+100 where a=2; -update t1 set b=b+100 where a=3; -COMMIT; -update t1 set b=b+100 where a=4; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -COMMIT; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -create table t2 (a int) engine myisam; -alter table t2 add column (b int); -drop table t2; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_sp.result b/mysql-test/suite/ndb/r/ndb_sp.result deleted file mode 100644 index dbd0325044d..00000000000 --- a/mysql-test/suite/ndb/r/ndb_sp.result +++ /dev/null @@ -1,44 +0,0 @@ -drop table if exists t1; -create table t1 ( -a int not null primary key, -b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,100), (4, 100); -create procedure test_proc1 (in var_in int) -begin -select * from t1 where a = var_in; -end; -create procedure test_proc2 (out var_out int) -begin -select b from t1 where a = 1 into var_out; -end; -create procedure test_proc3 (inout var_inout int) -begin -select b from t1 where a = var_inout into var_inout; -end; -// -call test_proc1(1); -a b -1 10 -call test_proc2(@test_var); -select @test_var; -@test_var -10 -set @test_var = 1; -call test_proc3(@test_var); -select @test_var; -@test_var -10 -alter procedure test_proc1 comment 'new comment'; -show create procedure test_proc1; -Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -test_proc1 CREATE DEFINER=`root`@`localhost` PROCEDURE `test_proc1`(in var_in int) - COMMENT 'new comment' -begin -select * from t1 where a = var_in; -end latin1 latin1_swedish_ci latin1_swedish_ci -drop procedure test_proc1; -drop procedure test_proc2; -drop procedure test_proc3; -drop table t1; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_subquery.result b/mysql-test/suite/ndb/r/ndb_subquery.result deleted file mode 100644 index 45662882d3a..00000000000 --- a/mysql-test/suite/ndb/r/ndb_subquery.result +++ /dev/null @@ -1,92 +0,0 @@ -drop table if exists t1, t2, t3, t4; -create table t1 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; -create table t2 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; -create table t3 (a int not null primary key, b int not null) engine=ndb; -create table t4 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,1,1),(2,2,2),(3,3,3); -insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); -insert into t3 values (1,10), (2,10), (3,30), (4, 30); -insert into t4 values (1,10), (2,10), (3,30), (4, 30); -explain select * from t2 where p NOT IN (select p from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func # -select * from t2 where p NOT IN (select p from t1) order by p; -p u o -4 4 4 -5 5 5 -explain select * from t2 where p NOT IN (select u from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 unique_subquery u u 4 func # -select * from t2 where p NOT IN (select u from t1) order by p; -p u o -4 4 4 -5 5 5 -explain select * from t2 where p NOT IN (select o from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 index_subquery o o 4 func # -select * from t2 where p NOT IN (select o from t1) order by p; -p u o -4 4 4 -5 5 5 -explain select * from t2 where p NOT IN (select p+0 from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL # Using where -select * from t2 where p NOT IN (select p+0 from t1) order by p; -p u o -4 4 4 -5 5 5 -drop table t1; -drop table t2; -create table t1 (p int not null primary key, u int not null) engine=ndb; -insert into t1 values (1,1),(2,2),(3,3); -create table t2 as -select t1.* -from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 -where t1.u = t2.u -and t2.u = t3.u -and t3.u = t4.u -and t4.u = t5.u -and t5.u = t6.u -and t6.u = t7.u -and t7.u = t8.u; -select * from t2 order by 1; -p u -1 1 -2 2 -3 3 -select * from t3 where a = any (select c from t4 where c = 1) order by a; -a b -1 10 -select * from t3 where a in (select c from t4 where c = 1) order by a; -a b -1 10 -select * from t3 where a <> some (select c from t4 where c = 1) order by a; -a b -2 10 -3 30 -4 30 -select * from t3 where a > all (select c from t4 where c = 1) order by a; -a b -2 10 -3 30 -4 30 -select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a; -a b -1 10 -2 10 -3 30 -4 30 -select * from t3 where exists (select * from t4 where c = 1) order by a; -a b -1 10 -2 10 -3 30 -4 30 -drop table if exists t1, t2, t3, t4; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_temporary.result b/mysql-test/suite/ndb/r/ndb_temporary.result deleted file mode 100644 index 7b7740003af..00000000000 --- a/mysql-test/suite/ndb/r/ndb_temporary.result +++ /dev/null @@ -1,21 +0,0 @@ -DROP TABLE IF EXISTS t1; -create temporary table t1 (a int key) engine=ndb; -ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' -create temporary table t1 (a int key) engine=myisam; -alter table t1 engine=ndb; -ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' -drop table t1; -SET SESSION storage_engine=NDBCLUSTER; -create table t1 (a int key); -select engine from information_schema.tables where table_name = 't1'; -engine -ndbcluster -drop table t1; -create temporary table t1 (a int key); -show create table t1; -Table Create Table -t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result b/mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result deleted file mode 100644 index 1b0f718ad65..00000000000 --- a/mysql-test/suite/ndb/r/ndb_tmp_table_and_DDL.result +++ /dev/null @@ -1,90 +0,0 @@ -CREATE TEMPORARY TABLE t1 (a INT); -CREATE TABLE t2 (a INT, b INT) ENGINE= NDB; -INSERT INTO t1 VALUES (1); -CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT 1; -INSERT INTO t1 VALUES (1); -ALTER EVENT e1 ON SCHEDULE EVERY 20 HOUR DO SELECT 1; -INSERT INTO t1 VALUES (1); -DROP EVENT IF EXISTS e1; -INSERT INTO t1 VALUES (1); -CREATE PROCEDURE p1() SELECT 1; -INSERT INTO t1 VALUES (1); -ALTER PROCEDURE p1 SQL SECURITY INVOKER; -INSERT INTO t1 VALUES (1); -CREATE FUNCTION f1() RETURNS INT RETURN 123; -INSERT INTO t1 VALUES (1); -ALTER FUNCTION f1 SQL SECURITY INVOKER; -INSERT INTO t1 VALUES (1); -CREATE DATABASE mysqltest1; -INSERT INTO t1 VALUES (1); -DROP DATABASE mysqltest1; -INSERT INTO t1 VALUES (1); -CREATE USER test_1@localhost; -INSERT INTO t1 VALUES (1); -GRANT SELECT ON t2 TO test_1@localhost; -INSERT INTO t1 VALUES (1); -GRANT ALL ON f1 TO test_1@localhost; -INSERT INTO t1 VALUES (1); -GRANT ALL ON p1 TO test_1@localhost; -INSERT INTO t1 VALUES (1); -GRANT USAGE ON *.* TO test_1@localhost; -INSERT INTO t1 VALUES (1); -REVOKE ALL PRIVILEGES ON f1 FROM test_1@localhost; -INSERT INTO t1 VALUES (1); -REVOKE ALL PRIVILEGES ON p1 FROM test_1@localhost; -INSERT INTO t1 VALUES (1); -REVOKE ALL PRIVILEGES ON t2 FROM test_1@localhost; -INSERT INTO t1 VALUES (1); -REVOKE USAGE ON *.* FROM test_1@localhost; -INSERT INTO t1 VALUES (1); -RENAME USER test_1@localhost TO test_2@localhost; -INSERT INTO t1 VALUES (1); -DROP USER test_2@localhost; -INSERT INTO t1 VALUES (1); -CREATE PROCEDURE p2() -BEGIN -# CREATE USER when a temporary table is open. -CREATE TEMPORARY TABLE t3 (a INT); -CREATE USER test_2@localhost; -INSERT INTO t1 VALUES (1); -# GRANT select on table to user when a temporary table is open. -GRANT SELECT ON t2 TO test_2@localhost; -INSERT INTO t1 VALUES (1); -# GRANT all on function to user when a temporary table is open. -GRANT ALL ON f1 TO test_2@localhost; -INSERT INTO t1 VALUES (1); -# GRANT all on procedure to user when a temporary table is open. -GRANT ALL ON p1 TO test_2@localhost; -INSERT INTO t1 VALUES (1); -# GRANT usage on *.* to user when a temporary table is open. -GRANT USAGE ON *.* TO test_2@localhost; -INSERT INTO t1 VALUES (1); -# REVOKE ALL PRIVILEGES on function to user when a temporary table is open. -REVOKE ALL PRIVILEGES ON f1 FROM test_2@localhost; -INSERT INTO t1 VALUES (1); -# REVOKE ALL PRIVILEGES on procedure to user when a temporary table is open. -REVOKE ALL PRIVILEGES ON p1 FROM test_2@localhost; -INSERT INTO t1 VALUES (1); -# REVOKE ALL PRIVILEGES on table to user when a temporary table is open. -REVOKE ALL PRIVILEGES ON t2 FROM test_2@localhost; -INSERT INTO t1 VALUES (1); -# REVOKE usage on *.* from user when a temporary table is open. -REVOKE USAGE ON *.* FROM test_2@localhost; -INSERT INTO t1 VALUES (1); -# RENAME USER when a temporary table is open. -RENAME USER test_2@localhost TO test_3@localhost; -INSERT INTO t1 VALUES (1); -# DROP USER when a temporary table is open. -DROP USER test_3@localhost; -INSERT INTO t1 VALUES (1); -DROP TEMPORARY TABLE t3; -END | -DROP PROCEDURE p1; -INSERT INTO t1 VALUES (1); -DROP PROCEDURE p2; -INSERT INTO t1 VALUES (1); -DROP FUNCTION f1; -INSERT INTO t1 VALUES (1); -DROP TABLE t2; -INSERT INTO t1 VALUES (1); -DROP TEMPORARY TABLE t1; diff --git a/mysql-test/suite/ndb/r/ndb_transaction.result b/mysql-test/suite/ndb/r/ndb_transaction.result deleted file mode 100644 index 691b91b1d36..00000000000 --- a/mysql-test/suite/ndb/r/ndb_transaction.result +++ /dev/null @@ -1,257 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=ndbcluster; -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 1 -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -attr1 -2 -rollback; -select count(*) from t1; -count(*) -0 -select * from t1 where pk1 = 1; -pk1 attr1 -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -attr1 -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 1 -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -attr1 -2 -begin; -update t1 set attr1 = attr1 * 2; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 2 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -2 4 1 2 -rollback; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 1 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -begin; -update t1 set attr1 = attr1 * 2; -commit; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 2 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -2 4 1 2 -begin; -delete from t1 where attr1 = 2; -select count(*) from t1; -count(*) -1 -select * from t1 where pk1 = 1; -pk1 attr1 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -rollback; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 2 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -2 4 1 2 -begin; -delete from t1 where attr1 = 2; -commit; -select count(*) from t1; -count(*) -1 -select * from t1 where pk1 = 1; -pk1 attr1 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -DROP TABLE t1; -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select sum(id) from t1; -sum(id) -3 -select * from t1 where id = 1; -id id2 -1 1 -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -id -2 -rollback; -select sum(id) from t1; -sum(id) -NULL -select * from t1 where id = 1; -id id2 -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -id -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; -select sum(id) from t1; -sum(id) -3 -select * from t1 where id = 1; -id id2 -1 1 -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -id -2 -begin; -update t1 set id = id * 2; -select sum(id) from t1; -sum(id) -6 -select * from t1 where id = 2; -id id2 -2 1 -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -id id2 id id2 -4 2 2 1 -rollback; -select sum(id) from t1; -sum(id) -3 -select * from t1 where id = 2; -id id2 -2 2 -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -id id2 id id2 -begin; -update t1 set id = id * 2; -commit; -select sum(id) from t1; -sum(id) -6 -select * from t1 where id = 2; -id id2 -2 1 -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -id id2 id id2 -4 2 2 1 -DROP TABLE t1; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -CREATE TABLE t3 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned, -PRIMARY KEY(a) -) engine=ndbcluster; -CREATE TABLE t4 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned NOT NULL, -d int unsigned, -PRIMARY KEY(a, b, c) -) engine=ndbcluster; -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t2; -count(*) -100 -select count(*) from t3; -count(*) -100 -select count(*) from t4; -count(*) -100 -begin; -begin; -drop table t2; -drop table t3; -drop table t4; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=ndbcluster; -create database mysqltest; -use mysqltest; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -begin; -insert into test.t1 values(1,1); -insert into t2 values(1,1,1); -insert into test.t1 values(2,2); -insert into t2 values(2,2,2); -select count(*) from test.t1; -count(*) -2 -select count(*) from t2; -count(*) -2 -select * from test.t1 where pk1 = 1; -pk1 attr1 -1 1 -select * from t2 where a = 1; -a b c -1 1 1 -select test.t1.attr1 -from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; -attr1 -2 -select t2.a -from t2, t2 as t2x where t2.a = t2x.a + 1; -a -2 -select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; -pk1 a -1 2 -rollback; -select count(*) from test.t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -drop table test.t1, t2; -drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_trigger.result b/mysql-test/suite/ndb/r/ndb_trigger.result deleted file mode 100644 index cc3e27df852..00000000000 --- a/mysql-test/suite/ndb/r/ndb_trigger.result +++ /dev/null @@ -1,315 +0,0 @@ -drop table if exists t1, t2, t3, t4, t5; -create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; -create table t2 (op char(1), a int not null, b decimal (63,30)) engine=ndb; -create table t3 engine=ndb select 1 as i; -create table t4 (a int not null primary key, b int) engine=ndb; -create table t5 (a int not null primary key, b int) engine=ndb; -create trigger t1_bu before update on t1 for each row -begin -insert into t2 values ("u", old.a, old.b); -set new.b = old.b + 10; -end;// -create trigger t1_bd before delete on t1 for each row -begin -insert into t2 values ("d", old.a, old.b); -end;// -create trigger t4_au after update on t4 -for each row begin -update t5 set b = b+1; -end; -// -create trigger t4_ad after delete on t4 -for each row begin -update t5 set b = b+1; -end; -// -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05); -insert into t4 values (1,1), (2,2), (3,3), (4, 4); -insert into t5 values (1,0); -update t1 set a=5 where a != 3; -select * from t1 order by id; -id a b -1 5 11.050000000000000000000000000000 -2 5 12.050000000000000000000000000000 -3 3 3.050000000000000000000000000000 -4 5 14.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 1 1.050000000000000000000000000000 -u 2 2.050000000000000000000000000000 -u 4 4.050000000000000000000000000000 -delete from t2; -update t1, t3 set a=6 where a = 5; -select * from t1 order by id; -id a b -1 6 21.050000000000000000000000000000 -2 6 22.050000000000000000000000000000 -3 3 3.050000000000000000000000000000 -4 6 24.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 5 11.050000000000000000000000000000 -u 5 12.050000000000000000000000000000 -u 5 14.050000000000000000000000000000 -delete from t2; -delete from t1 where a != 3; -select * from t1 order by id; -id a b -3 3 3.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 6 21.050000000000000000000000000000 -d 6 22.050000000000000000000000000000 -d 6 24.050000000000000000000000000000 -delete from t2; -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05); -delete t1 from t1, t3 where a != 3; -select * from t1 order by id; -id a b -3 3 3.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 1 1.050000000000000000000000000000 -d 2 2.050000000000000000000000000000 -d 4 4.050000000000000000000000000000 -delete from t2; -insert into t1 values (4, 4, 4.05); -insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1; -select * from t1 order by id; -id a b -3 4 13.050000000000000000000000000000 -4 5 14.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 3 3.050000000000000000000000000000 -u 4 4.050000000000000000000000000000 -delete from t2; -delete from t3; -insert into t3 values (4), (3); -insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1; -select * from t1 order by id; -id a b -3 5 23.050000000000000000000000000000 -4 6 24.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 4 13.050000000000000000000000000000 -u 5 14.050000000000000000000000000000 -delete from t2; -replace into t1 (id, a) values (4, 1), (3, 1); -select * from t1 order by id; -id a b -3 1 0.000000000000000000000000000000 -4 1 0.000000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 5 23.050000000000000000000000000000 -d 6 24.050000000000000000000000000000 -delete from t1; -delete from t2; -insert into t1 values (3, 1, 1.05), (4, 1, 2.05); -replace into t1 (id, a) (select i, 2 from t3); -select * from t1 order by id; -id a b -3 2 0.000000000000000000000000000000 -4 2 0.000000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 1 1.050000000000000000000000000000 -d 1 2.050000000000000000000000000000 -delete from t1; -delete from t2; -insert into t1 values (3, 1, 1.05), (5, 2, 2.05); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a); -select * from t1 order by id; -id a b -3 4 0.000000000000000000000000000000 -5 6 0.000000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 1 1.050000000000000000000000000000 -d 2 2.050000000000000000000000000000 -update t4 set b = 10 where a = 1; -select * from t5 order by a; -a b -1 1 -update t5 set b = 0; -delete from t4 where a = 1; -select * from t5 order by a; -a b -1 1 -drop trigger t4_au; -drop trigger t4_ad; -drop table t1, t2, t3, t4, t5; -CREATE TABLE t1 ( -id INT NOT NULL PRIMARY KEY, -xy INT -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (1, 0); -CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // -CREATE TABLE t2 ( -id INT NOT NULL PRIMARY KEY, -xy INT -) ENGINE=ndbcluster; -INSERT INTO t2 VALUES (2, 0); -CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; -INSERT INTO t3 VALUES (1); -CREATE TABLE t4 LIKE t1; -CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // -CREATE TABLE t5 LIKE t2; -UPDATE t1 SET xy = 3 WHERE id = 1; -SELECT xy FROM t1 where id = 1; -xy -3 -SELECT xy FROM t2 where id = 1; -xy -3 -UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -xy -4 -SELECT xy FROM t2 where id = 1; -xy -4 -INSERT INTO t4 SELECT * FROM t1; -INSERT INTO t5 SELECT * FROM t2; -UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; -SELECT xy FROM t1 where id = 1; -xy -3 -SELECT xy FROM t2 where id = 1; -xy -3 -SELECT xy FROM t4 where id = 1; -xy -3 -SELECT xy FROM t5 where id = 1; -xy -3 -UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -xy -4 -SELECT xy FROM t2 where id = 1; -xy -4 -SELECT xy FROM t4 where id = 1; -xy -4 -SELECT xy FROM t5 where id = 1; -xy -4 -INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; -SELECT xy FROM t1 where id = 1; -xy -5 -SELECT xy FROM t2 where id = 1; -xy -5 -DROP TRIGGER t1_update; -DROP TRIGGER t4_update; -CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // -CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // -INSERT INTO t1 VALUES (5, 0),(6,0); -INSERT INTO t2 VALUES (5, 1),(6,1); -INSERT INTO t3 VALUES (5); -SELECT * FROM t1 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -id xy -1 5 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -INSERT INTO t1 VALUES (5,0); -UPDATE t2 SET xy = 1 WHERE id = 6; -TRUNCATE t4; -INSERT INTO t4 SELECT * FROM t1; -TRUNCATE t5; -INSERT INTO t5 SELECT * FROM t2; -SELECT * FROM t1 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -SELECT * FROM t4 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t5 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -id xy -1 5 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -SELECT * FROM t4 order by id; -id xy -1 5 -6 0 -SELECT * FROM t5 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -INSERT INTO t1 VALUES (5, 0); -REPLACE INTO t2 VALUES (6,1); -SELECT * FROM t1 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -REPLACE INTO t1 VALUES (5, 1); -SELECT * FROM t1 order by id; -id xy -1 5 -5 1 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -DROP TRIGGER t1_delete; -DROP TRIGGER t4_delete; -DROP TABLE t1, t2, t3, t4, t5; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_truncate.result b/mysql-test/suite/ndb/r/ndb_truncate.result deleted file mode 100644 index 811e5e3afeb..00000000000 --- a/mysql-test/suite/ndb/r/ndb_truncate.result +++ /dev/null @@ -1,23 +0,0 @@ -DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 ( -a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -select count(*) from t1; -count(*) -5000 -select * from t1 order by a limit 2; -a b c -1 509 2500 -2 510 7 -truncate table t1; -select count(*) from t1; -count(*) -0 -insert into t1 values(NULL,1,1),(NULL,2,2); -select * from t1 order by a; -a b c -1 1 1 -2 2 2 -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_types.result b/mysql-test/suite/ndb/r/ndb_types.result deleted file mode 100644 index ec2858d818a..00000000000 --- a/mysql-test/suite/ndb/r/ndb_types.result +++ /dev/null @@ -1,76 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -auto int(5) unsigned NOT NULL auto_increment, -string char(10) default "hello", -vstring varchar(10) default "hello", -bin binary(2), -vbin varbinary(7), -tiny tinyint(4) DEFAULT '0' NOT NULL , -short smallint(6) DEFAULT '1' NOT NULL , -medium mediumint(8) DEFAULT '0' NOT NULL, -long_int int(11) DEFAULT '0' NOT NULL, -longlong bigint(13) DEFAULT '0' NOT NULL, -real_float float(13,1) DEFAULT 0.0 NOT NULL, -real_double double(16,4), -real_decimal decimal(16,4), -utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, -ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, -umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, -ulong int(11) unsigned DEFAULT '0' NOT NULL, -ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, -bits bit(3), -options enum('one','two','tree') not null, -flags set('one','two','tree') not null, -date_field date, -year_field year, -time_field time, -date_time datetime, -time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -PRIMARY KEY (auto), -KEY (utiny), -KEY (tiny), -KEY (short), -KEY any_name (medium), -KEY (longlong), -KEY (real_float), -KEY (ushort), -KEY (umedium), -KEY (ulong), -KEY (ulonglong,ulong), -KEY (options,flags) -); -set @now = now(); -insert into t1 -(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, -bits,options,flags,date_field,year_field,time_field,date_time) -values -("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, -b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, -bits,options,flags,date_field,year_field,time_field,date_time -from t1; -auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time -1 aaaa aaaa ªª ªª -1 -1 -1 -1 -1 1.1 1.1000 1.1000 1 00001 1 1 1  one one 1901-01-01 1901 01:01:01 1901-01-01 01:01:01 -select time_stamp>@now from t1; -time_stamp>@now -1 -set @now = now(); -update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, -tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, -real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, -ulonglong=2, bits=b'010', -options='one',flags='one', date_field='1902-02-02',year_field='1902', -time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, -bits,options,flags,date_field,year_field,time_field,date_time -from t1; -auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time -1 bbbb bbbb »» »» -2 -2 -2 -2 -2 2.2 2.2000 2.2000 2 00002 2 2 2  one one 1902-02-02 1902 02:02:02 1902-02-02 02:02:02 -select time_stamp>@now from t1; -time_stamp>@now -1 -drop table t1; -End of 4.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_update.result b/mysql-test/suite/ndb/r/ndb_update.result deleted file mode 100644 index fa083587956..00000000000 --- a/mysql-test/suite/ndb/r/ndb_update.result +++ /dev/null @@ -1,96 +0,0 @@ -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2); -UPDATE t1 set b = c; -select * from t1 order by pk1; -pk1 b c -0 0 0 -1 1 1 -2 2 2 -UPDATE t1 set pk1 = 4 where pk1 = 1; -select * from t1 order by pk1; -pk1 b c -0 0 0 -2 2 2 -4 1 1 -UPDATE t1 set pk1 = 4 where pk1 = 2; -ERROR 23000: Duplicate entry '4' for key 'PRIMARY' -UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; -select * from t1 order by pk1; -pk1 b c -0 0 0 -2 2 2 -4 1 1 -UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; -ERROR 23000: Duplicate entry '2' for key 'c' -UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; -select * from t1 order by pk1; -pk1 b c -0 0 0 -2 2 2 -4 1 1 -UPDATE t1 set pk1 = pk1 + 10; -select * from t1 order by pk1; -pk1 b c -10 0 0 -12 2 2 -14 1 1 -create unique index ib on t1(b); -update t1 set c = 4 where pk1 = 12; -update ignore t1 set b = 55 where pk1 = 14; -select * from t1 order by pk1; -pk1 b c -10 0 0 -12 2 4 -14 55 1 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster; -CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster; -CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b)) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (1, 2); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t2 VALUES (1, 2); -INSERT INTO t2 VALUES (2, 2); -INSERT INTO t3 VALUES (1, 2); -INSERT INTO t3 VALUES (2, 2); -UPDATE t1 SET a = 1; -UPDATE t1 SET a = 1 ORDER BY a; -UPDATE t2 SET a = 1; -ERROR 23000: Duplicate entry '1-2' for key 'a' -UPDATE t2 SET a = 1 ORDER BY a; -ERROR 23000: Duplicate entry '1-2' for key 'a' -UPDATE t3 SET a = 1; -ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY' -UPDATE t3 SET a = 1 ORDER BY a; -ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY' -SELECT count(*) FROM t1; -count(*) -2 -SELECT count(*) FROM t2; -count(*) -2 -SELECT count(*) FROM t3; -count(*) -2 -SELECT * FROM t1 ORDER by a; -a b -1 2 -1 2 -SELECT * FROM t2 ORDER by a; -a b -1 2 -2 2 -SELECT * FROM t3 ORDER by a; -a b -1 2 -2 2 -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; -End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_update_no_read.result b/mysql-test/suite/ndb/r/ndb_update_no_read.result deleted file mode 100644 index 4373800d338..00000000000 --- a/mysql-test/suite/ndb/r/ndb_update_no_read.result +++ /dev/null @@ -1,75 +0,0 @@ -DROP TABLE IF EXISTS t1; -create table t1 (a int not null primary key, b int not null, c int, -unique index_b (b) using hash) -engine ndb; -insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2), -(9,2,2),(10,1,2); -update t1 set c = 111, b = 20 where a = 1; -select * from t1 where a = 1 order by a; -a b c -1 20 111 -delete from t1 where a = 1; -select * from t1 where a = 1 order by a; -a b c -update t1 set c = 12, b = 19 where b = 2; -select * from t1 where b = 2 order by a; -a b c -delete from t1 where b = 19; -select * from t1 where b = 19 order by a; -a b c -update t1 set c = 22 where a = 10 or a >= 10; -select * from t1 order by a; -a b c -2 9 1 -3 8 1 -4 7 1 -5 6 1 -6 5 2 -7 4 2 -8 3 2 -10 1 22 -update t1 set c = 23 where a in (8,10); -select * from t1 order by a; -a b c -2 9 1 -3 8 1 -4 7 1 -5 6 1 -6 5 2 -7 4 2 -8 3 23 -10 1 23 -update t1 set c = 23 where a in (7,8) or a >= 10; -select * from t1 order by a; -a b c -2 9 1 -3 8 1 -4 7 1 -5 6 1 -6 5 2 -7 4 23 -8 3 23 -10 1 23 -update t1 set c = 11 where a = 3 or b = 7; -select * from t1 where a = 3 or b = 7 order by a; -a b c -3 8 11 -4 7 11 -update t1 set a = 13, b = 20 where a = 3; -select * from t1 where a = 13 order by a; -a b c -13 20 11 -update t1 set a = 12, b = 19 where b = 7; -select * from t1 where b = 19 order by a; -a b c -12 19 11 -select * from t1 where b = 7 order by a; -a b c -update t1 set c = 12, b = 29 where a = 5 and b = 6; -select * from t1 where b = 19 order by a; -a b c -12 19 11 -delete from t1 where b = 6 and c = 12; -select * from t1 where b = 6 order by a; -a b c -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_view.result b/mysql-test/suite/ndb/r/ndb_view.result deleted file mode 100644 index b7d1b6860c8..00000000000 --- a/mysql-test/suite/ndb/r/ndb_view.result +++ /dev/null @@ -1,24 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3; -DROP VIEW IF EXISTS v1,v2,v3; -create table t1 (a int, b int, c int, d int) engine=ndb; -insert into t1 values (1,2,3,4),(5,6,7,8); -create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1; -select * from v1 order by a,b,c; -a b c d -3 1 4 6 -7 5 8 18 -update v1 set a=a+100 where b=1; -select * from v1 order by a,b,c; -a b c d -7 5 8 18 -103 1 4 106 -drop view v1; -create view v1 as select t1.c as a from t1; -insert into v1 values (200); -select * from t1 order by a,b,c,d; -a b c d -NULL NULL 200 NULL -1 2 103 4 -5 6 7 8 -drop view v1; -drop table t1; diff --git a/mysql-test/suite/ndb/r/ndbapi.result b/mysql-test/suite/ndb/r/ndbapi.result deleted file mode 100644 index 8e680391a81..00000000000 --- a/mysql-test/suite/ndb/r/ndbapi.result +++ /dev/null @@ -1,22 +0,0 @@ -DROP TABLE IF EXISTS t0; -drop database if exists mysqltest; -Running ndbapi_simple -Running ndbapi_simple_index -Running ndbapi_scan -Running ndbapi_retries -Running ndbapi_async -Running ndbapi_async1 -use TEST_DB; -create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text, -primary key(c0, c2)) engine ndb charset latin1; -insert into t0 values (1, 2, 'a', 'b', null); -insert into t0 values (3, 4, 'c', 'd', null); -update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -update t0 set c3 = 'f'; -update t0 set c3 = 'F'; -update t0 set c2 = 'g' where c0 = 1; -update t0 set c2 = 'G' where c0 = 1; -update t0 set c0 = 5, c2 = 'H' where c0 = 3; -delete from t0; -drop table t0; -Running mgmapi_logevent diff --git a/mysql-test/suite/ndb/r/ps_7ndb.result b/mysql-test/suite/ndb/r/ps_7ndb.result deleted file mode 100644 index cab660e391c..00000000000 --- a/mysql-test/suite/ndb/r/ps_7ndb.result +++ /dev/null @@ -1,3128 +0,0 @@ -use test; -drop table if exists t1, t9 ; -create table t1 -( -a int, b varchar(30), -primary key(a) -) engine = 'NDB' ; -create table t9 -( -c1 tinyint, c2 smallint, c3 mediumint, c4 int, -c5 integer, c6 bigint, c7 float, c8 double, -c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp, c16 time, -c17 year, c18 tinyint, c19 bool, c20 char, -c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, -c25 blob, c26 text, c27 mediumblob, c28 mediumtext, -c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), -c32 set('monday', 'tuesday', 'wednesday'), -primary key(c1) -) engine = 'NDB' ; -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -test_sequence ------- simple select tests ------ -prepare stmt1 from ' select * from t9 order by c1 ' ; -execute stmt1; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t9 t9 c1 c1 1 4 1 N 49155 0 63 -def test t9 t9 c2 c2 2 6 1 Y 32768 0 63 -def test t9 t9 c3 c3 9 9 1 Y 32768 0 63 -def test t9 t9 c4 c4 3 11 1 Y 32768 0 63 -def test t9 t9 c5 c5 3 11 1 Y 32768 0 63 -def test t9 t9 c6 c6 8 20 1 Y 32768 0 63 -def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 -def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 -def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 -def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 246 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 246 10 6 Y 32768 4 63 -def test t9 t9 c13 c13 10 10 10 Y 128 0 63 -def test t9 t9 c14 c14 12 19 19 Y 128 0 63 -def test t9 t9 c15 c15 7 19 19 N 9441 0 63 -def test t9 t9 c16 c16 11 8 8 Y 128 0 63 -def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 -def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 -def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 254 10 10 Y 0 0 8 -def test t9 t9 c22 c22 253 30 30 Y 0 0 8 -def test t9 t9 c23 c23 252 255 8 Y 144 0 63 -def test t9 t9 c24 c24 252 255 8 Y 16 0 8 -def test t9 t9 c25 c25 252 65535 4 Y 144 0 63 -def test t9 t9 c26 c26 252 65535 4 Y 16 0 8 -def test t9 t9 c27 c27 252 16777215 10 Y 144 0 63 -def test t9 t9 c28 c28 252 16777215 10 Y 16 0 8 -def test t9 t9 c29 c29 252 4294967295 8 Y 144 0 63 -def test t9 t9 c30 c30 252 4294967295 8 Y 16 0 8 -def test t9 t9 c31 c31 254 5 3 Y 256 0 8 -def test t9 t9 c32 c32 254 24 7 Y 2048 0 8 -c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday -set @arg00='SELECT' ; -@arg00 a from t1 where a=1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a from t1 where a=1' at line 1 -prepare stmt1 from ' ? a from t1 where a=1 '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a from t1 where a=1' at line 1 -set @arg00=1 ; -select @arg00, b from t1 where a=1 ; -@arg00 b -1 one -prepare stmt1 from ' select ?, b from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -? b -1 one -set @arg00='lion' ; -select @arg00, b from t1 where a=1 ; -@arg00 b -lion one -prepare stmt1 from ' select ?, b from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -? b -lion one -set @arg00=NULL ; -select @arg00, b from t1 where a=1 ; -@arg00 b -NULL one -prepare stmt1 from ' select ?, b from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -? b -NULL one -set @arg00=1 ; -select b, a - @arg00 from t1 where a=1 ; -b a - @arg00 -one 0 -prepare stmt1 from ' select b, a - ? from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -b a - ? -one 0 -set @arg00=null ; -select @arg00 as my_col ; -my_col -NULL -prepare stmt1 from ' select ? as my_col'; -execute stmt1 using @arg00 ; -my_col -NULL -select @arg00 + 1 as my_col ; -my_col -NULL -prepare stmt1 from ' select ? + 1 as my_col'; -execute stmt1 using @arg00 ; -my_col -NULL -select 1 + @arg00 as my_col ; -my_col -NULL -prepare stmt1 from ' select 1 + ? as my_col'; -execute stmt1 using @arg00 ; -my_col -NULL -set @arg00='MySQL' ; -select substr(@arg00,1,2) from t1 where a=1 ; -substr(@arg00,1,2) -My -prepare stmt1 from ' select substr(?,1,2) from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -substr(?,1,2) -My -set @arg00=3 ; -select substr('MySQL',@arg00,5) from t1 where a=1 ; -substr('MySQL',@arg00,5) -SQL -prepare stmt1 from ' select substr(''MySQL'',?,5) from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -substr('MySQL',?,5) -SQL -select substr('MySQL',1,@arg00) from t1 where a=1 ; -substr('MySQL',1,@arg00) -MyS -prepare stmt1 from ' select substr(''MySQL'',1,?) from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -substr('MySQL',1,?) -MyS -set @arg00='MySQL' ; -select a , concat(@arg00,b) from t1 order by a; -a concat(@arg00,b) -1 MySQLone -2 MySQLtwo -3 MySQLthree -4 MySQLfour -prepare stmt1 from ' select a , concat(?,b) from t1 order by a ' ; -execute stmt1 using @arg00; -a concat(?,b) -1 MySQLone -2 MySQLtwo -3 MySQLthree -4 MySQLfour -select a , concat(b,@arg00) from t1 order by a ; -a concat(b,@arg00) -1 oneMySQL -2 twoMySQL -3 threeMySQL -4 fourMySQL -prepare stmt1 from ' select a , concat(b,?) from t1 order by a ' ; -execute stmt1 using @arg00; -a concat(b,?) -1 oneMySQL -2 twoMySQL -3 threeMySQL -4 fourMySQL -set @arg00='MySQL' ; -select group_concat(@arg00,b order by a) from t1 -group by 'a' ; -group_concat(@arg00,b order by a) -MySQLone,MySQLtwo,MySQLthree,MySQLfour -prepare stmt1 from ' select group_concat(?,b order by a) from t1 -group by ''a'' ' ; -execute stmt1 using @arg00; -group_concat(?,b order by a) -MySQLone,MySQLtwo,MySQLthree,MySQLfour -select group_concat(b,@arg00 order by a) from t1 -group by 'a' ; -group_concat(b,@arg00 order by a) -oneMySQL,twoMySQL,threeMySQL,fourMySQL -prepare stmt1 from ' select group_concat(b,? order by a) from t1 -group by ''a'' ' ; -execute stmt1 using @arg00; -group_concat(b,? order by a) -oneMySQL,twoMySQL,threeMySQL,fourMySQL -set @arg00='first' ; -set @arg01='second' ; -set @arg02=NULL; -select @arg00, @arg01 from t1 where a=1 ; -@arg00 @arg01 -first second -prepare stmt1 from ' select ?, ? from t1 where a=1 ' ; -execute stmt1 using @arg00, @arg01 ; -? ? -first second -execute stmt1 using @arg02, @arg01 ; -? ? -NULL second -execute stmt1 using @arg00, @arg02 ; -? ? -first NULL -execute stmt1 using @arg02, @arg02 ; -? ? -NULL NULL -drop table if exists t5 ; -create table t5 (id1 int(11) not null default '0', -value2 varchar(100), value1 varchar(100)) ; -insert into t5 values (1,'hh','hh'),(2,'hh','hh'), -(1,'ii','ii'),(2,'ii','ii') ; -prepare stmt1 from ' select id1,value1 from t5 where id1=? or value1=? order by id1,value1 ' ; -set @arg00=1 ; -set @arg01='hh' ; -execute stmt1 using @arg00, @arg01 ; -id1 value1 -1 hh -1 ii -2 hh -drop table t5 ; -drop table if exists t5 ; -create table t5(session_id char(9) not null) ; -insert into t5 values ('abc') ; -prepare stmt1 from ' select * from t5 -where ?=''1111'' and session_id = ''abc'' ' ; -set @arg00='abc' ; -execute stmt1 using @arg00 ; -session_id -set @arg00='1111' ; -execute stmt1 using @arg00 ; -session_id -abc -set @arg00='abc' ; -execute stmt1 using @arg00 ; -session_id -drop table t5 ; -set @arg00='FROM' ; -select a @arg00 t1 where a=1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 t1 where a=1' at line 1 -prepare stmt1 from ' select a ? t1 where a=1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? t1 where a=1' at line 1 -set @arg00='t1' ; -select a from @arg00 where a=1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 where a=1' at line 1 -prepare stmt1 from ' select a from ? where a=1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? where a=1' at line 1 -set @arg00='WHERE' ; -select a from t1 @arg00 a=1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a=1' at line 1 -prepare stmt1 from ' select a from t1 ? a=1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a=1' at line 1 -set @arg00=1 ; -select a FROM t1 where a=@arg00 ; -a -1 -prepare stmt1 from ' select a FROM t1 where a=? ' ; -execute stmt1 using @arg00 ; -a -1 -set @arg00=1000 ; -execute stmt1 using @arg00 ; -a -set @arg00=NULL ; -select a FROM t1 where a=@arg00 ; -a -prepare stmt1 from ' select a FROM t1 where a=? ' ; -execute stmt1 using @arg00 ; -a -set @arg00=4 ; -select a FROM t1 where a=sqrt(@arg00) ; -a -2 -prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; -execute stmt1 using @arg00 ; -a -2 -set @arg00=NULL ; -select a FROM t1 where a=sqrt(@arg00) ; -a -prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; -execute stmt1 using @arg00 ; -a -set @arg00=2 ; -set @arg01=3 ; -select a FROM t1 where a in (@arg00,@arg01) order by a; -a -2 -3 -prepare stmt1 from ' select a FROM t1 where a in (?,?) order by a '; -execute stmt1 using @arg00, @arg01; -a -2 -3 -set @arg00= 'one' ; -set @arg01= 'two' ; -set @arg02= 'five' ; -prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ; -execute stmt1 using @arg00, @arg01, @arg02 ; -b -one -two -prepare stmt1 from ' select b FROM t1 where b like ? '; -set @arg00='two' ; -execute stmt1 using @arg00 ; -b -two -set @arg00='tw%' ; -execute stmt1 using @arg00 ; -b -two -set @arg00='%wo' ; -execute stmt1 using @arg00 ; -b -two -set @arg00=null ; -insert into t9 set c1= 0, c5 = NULL ; -select c5 from t9 where c5 > NULL ; -c5 -prepare stmt1 from ' select c5 from t9 where c5 > ? '; -execute stmt1 using @arg00 ; -c5 -select c5 from t9 where c5 < NULL ; -c5 -prepare stmt1 from ' select c5 from t9 where c5 < ? '; -execute stmt1 using @arg00 ; -c5 -select c5 from t9 where c5 = NULL ; -c5 -prepare stmt1 from ' select c5 from t9 where c5 = ? '; -execute stmt1 using @arg00 ; -c5 -select c5 from t9 where c5 <=> NULL ; -c5 -NULL -prepare stmt1 from ' select c5 from t9 where c5 <=> ? '; -execute stmt1 using @arg00 ; -c5 -NULL -delete from t9 where c1= 0 ; -set @arg00='>' ; -select a FROM t1 where a @arg00 1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 1' at line 1 -prepare stmt1 from ' select a FROM t1 where a ? 1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? 1' at line 1 -set @arg00=1 ; -select a,b FROM t1 where a is not NULL -AND b is not NULL group by a - @arg00 ; -a b -1 one -2 two -3 three -4 four -prepare stmt1 from ' select a,b FROM t1 where a is not NULL -AND b is not NULL group by a - ? ' ; -execute stmt1 using @arg00 ; -a b -1 one -2 two -3 three -4 four -set @arg00='two' ; -select a,b FROM t1 where a is not NULL -AND b is not NULL having b <> @arg00 order by a ; -a b -1 one -3 three -4 four -prepare stmt1 from ' select a,b FROM t1 where a is not NULL -AND b is not NULL having b <> ? order by a ' ; -execute stmt1 using @arg00 ; -a b -1 one -3 three -4 four -set @arg00=1 ; -select a,b FROM t1 where a is not NULL -AND b is not NULL order by a - @arg00 ; -a b -1 one -2 two -3 three -4 four -prepare stmt1 from ' select a,b FROM t1 where a is not NULL -AND b is not NULL order by a - ? ' ; -execute stmt1 using @arg00 ; -a b -1 one -2 two -3 three -4 four -set @arg00=2 ; -select a,b from t1 order by 2 ; -a b -4 four -1 one -3 three -2 two -prepare stmt1 from ' select a,b from t1 -order by ? '; -execute stmt1 using @arg00; -a b -4 four -1 one -3 three -2 two -set @arg00=1 ; -execute stmt1 using @arg00; -a b -1 one -2 two -3 three -4 four -set @arg00=0 ; -execute stmt1 using @arg00; -ERROR 42S22: Unknown column '?' in 'order clause' -set @arg00=1; -prepare stmt1 from ' select a,b from t1 order by a -limit 1 '; -execute stmt1 ; -a b -1 one -prepare stmt1 from ' select a,b from t1 order by a limit ? '; -execute stmt1 using @arg00; -a b -1 one -set @arg00='b' ; -set @arg01=0 ; -set @arg02=2 ; -set @arg03=2 ; -select sum(a), @arg00 from t1 where a > @arg01 -and b is not null group by substr(b,@arg02) -having sum(a) <> @arg03 ; -sum(a) @arg00 -3 b -1 b -4 b -prepare stmt1 from ' select sum(a), ? from t1 where a > ? -and b is not null group by substr(b,?) -having sum(a) <> ? '; -execute stmt1 using @arg00, @arg01, @arg02, @arg03; -sum(a) ? -3 b -1 b -4 b -test_sequence ------- join tests ------ -select first.a as a1, second.a as a2 -from t1 first, t1 second -where first.a = second.a order by a1 ; -a1 a2 -1 1 -2 2 -3 3 -4 4 -prepare stmt1 from ' select first.a as a1, second.a as a2 - from t1 first, t1 second - where first.a = second.a order by a1 '; -execute stmt1 ; -a1 a2 -1 1 -2 2 -3 3 -4 4 -set @arg00='ABC'; -set @arg01='two'; -set @arg02='one'; -select first.a, @arg00, second.a FROM t1 first, t1 second -where @arg01 = first.b or first.a = second.a or second.b = @arg02 -order by second.a, first.a; -a @arg00 a -1 ABC 1 -2 ABC 1 -3 ABC 1 -4 ABC 1 -2 ABC 2 -2 ABC 3 -3 ABC 3 -2 ABC 4 -4 ABC 4 -prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second - where ? = first.b or first.a = second.a or second.b = ? - order by second.a, first.a'; -execute stmt1 using @arg00, @arg01, @arg02; -a ? a -1 ABC 1 -2 ABC 1 -3 ABC 1 -4 ABC 1 -2 ABC 2 -2 ABC 3 -3 ABC 3 -2 ABC 4 -4 ABC 4 -drop table if exists t2 ; -create table t2 as select * from t1 ; -set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ; -set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ; -set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ; -set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ; -set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ; -set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ; -set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ; -set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ; -set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ; -the join statement is: -SELECT * FROM t2 right join t1 using(a) order by t2.a -prepare stmt1 from @query9 ; -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -the join statement is: -SELECT * FROM t2 natural right join t1 order by t2.a -prepare stmt1 from @query8 ; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -the join statement is: -SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a -prepare stmt1 from @query7 ; -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -the join statement is: -SELECT * FROM t2 left join t1 using(a) order by t2.a -prepare stmt1 from @query6 ; -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -the join statement is: -SELECT * FROM t2 natural left join t1 order by t2.a -prepare stmt1 from @query5 ; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -the join statement is: -SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a -prepare stmt1 from @query4 ; -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -the join statement is: -SELECT * FROM t2 join t1 using(a) order by t2.a -prepare stmt1 from @query3 ; -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -the join statement is: -SELECT * FROM t2 natural join t1 order by t2.a -prepare stmt1 from @query2 ; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -the join statement is: -SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a -prepare stmt1 from @query1 ; -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -drop table t2 ; -test_sequence ------- subquery tests ------ -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = ''two'') '; -execute stmt1 ; -a b -2 two -set @arg00='two' ; -select a, b FROM t1 outer_table where -a = (select a from t1 where b = 'two' ) and b=@arg00 ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = ''two'') and b=? '; -execute stmt1 using @arg00; -a b -2 two -set @arg00='two' ; -select a, b FROM t1 outer_table where -a = (select a from t1 where b = @arg00 ) and b='two' ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = ? ) and b=''two'' ' ; -execute stmt1 using @arg00; -a b -2 two -set @arg00=3 ; -set @arg01='three' ; -select a,b FROM t1 where (a,b) in (select 3, 'three'); -a b -3 three -select a FROM t1 where (a,b) in (select @arg00,@arg01); -a -3 -prepare stmt1 from ' select a FROM t1 where (a,b) in (select ?, ?) '; -execute stmt1 using @arg00, @arg01; -a -3 -set @arg00=1 ; -set @arg01='two' ; -set @arg02=2 ; -set @arg03='two' ; -select a, @arg00, b FROM t1 outer_table where -b=@arg01 and a = (select @arg02 from t1 where b = @arg03 ) ; -a @arg00 b -2 1 two -prepare stmt1 from ' select a, ?, b FROM t1 outer_table where - b=? and a = (select ? from t1 where b = ? ) ' ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; -a ? b -2 1 two -prepare stmt1 from 'select c4 FROM t9 where - c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ; -execute stmt1 using @arg01, @arg02; -c4 -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = outer_table.b ) order by a '; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1= - (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) '; -execute stmt1 ; -ccc -1 -deallocate prepare stmt1 ; -prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1= - (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) '; -execute stmt1 ; -ccc -1 -deallocate prepare stmt1 ; -prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1= - (SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) '; -execute stmt1 ; -ccc -1 -deallocate prepare stmt1 ; -set @arg00='two' ; -select a, b FROM t1 outer_table where -a = (select a from t1 where b = outer_table.b ) and b=@arg00 ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = outer_table.b) and b=? '; -execute stmt1 using @arg00; -a b -2 two -set @arg00=2 ; -select a, b FROM t1 outer_table where -a = (select a from t1 where a = @arg00 and b = outer_table.b) and b='two' ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where a = ? and b = outer_table.b) and b=''two'' ' ; -execute stmt1 using @arg00; -a b -2 two -set @arg00=2 ; -select a, b FROM t1 outer_table where -a = (select a from t1 where outer_table.a = @arg00 and a=2) and b='two' ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where outer_table.a = ? and a=2) and b=''two'' ' ; -execute stmt1 using @arg00; -a b -2 two -set @arg00=1 ; -set @arg01='two' ; -set @arg02=2 ; -set @arg03='two' ; -select a, @arg00, b FROM t1 outer_table where -b=@arg01 and a = (select @arg02 from t1 where outer_table.b = @arg03 -and outer_table.a=a ) ; -a @arg00 b -2 1 two -prepare stmt1 from ' select a, ?, b FROM t1 outer_table where - b=? and a = (select ? from t1 where outer_table.b = ? - and outer_table.a=a ) ' ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; -a ? b -2 1 two -set @arg00=1 ; -set @arg01=0 ; -select a, @arg00 -from ( select a - @arg00 as a from t1 where a=@arg00 ) as t2 -where a=@arg01; -a @arg00 -0 1 -prepare stmt1 from ' select a, ? - from ( select a - ? as a from t1 where a=? ) as t2 - where a=? '; -execute stmt1 using @arg00, @arg00, @arg00, @arg01 ; -a ? -0 1 -drop table if exists t2 ; -create table t2 as select * from t1; -prepare stmt1 from ' select a in (select a from t2) from t1 ' ; -execute stmt1 ; -a in (select a from t2) -1 -1 -1 -1 -drop table if exists t5, t6, t7 ; -create table t5 (a int , b int) ; -create table t6 like t5 ; -create table t7 like t5 ; -insert into t5 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7), -(2, -1), (3, 10) ; -insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1) ; -insert into t7 values (3, 3), (2, 2), (1, 1) ; -prepare stmt1 from ' select a, (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) from t7 ' ; -execute stmt1 ; -a (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) -3 1 -2 2 -1 2 -execute stmt1 ; -a (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) -3 1 -2 2 -1 2 -execute stmt1 ; -a (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) -3 1 -2 2 -1 2 -drop table t5, t6, t7 ; -drop table if exists t2 ; -create table t2 as select * from t9; -set @stmt= ' SELECT - (SELECT SUM(c1 + c12 + 0.0) FROM t2 - where (t9.c2 - 0e-3) = t2.c2 - GROUP BY t9.c15 LIMIT 1) as scalar_s, - exists (select 1.0e+0 from t2 - where t2.c3 * 9.0000000000 = t9.c4) as exists_s, - c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s, - (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s -FROM t9, -(select c25 x, c32 y from t2) tt WHERE x = c25 ' ; -prepare stmt1 from @stmt ; -execute stmt1 ; -execute stmt1 ; -set @stmt= concat('explain ',@stmt); -prepare stmt1 from @stmt ; -execute stmt1 ; -execute stmt1 ; -set @stmt= ' SELECT - (SELECT SUM(c1+c12+?) FROM t2 where (t9.c2-?)=t2.c2 - GROUP BY t9.c15 LIMIT 1) as scalar_s, - exists (select ? from t2 - where t2.c3*?=t9.c4) as exists_s, - c5*? in (select c6+? from t2) as in_s, - (c7-?, c8-?) in (select c9+?, c10+? from t2) as in_row_s -FROM t9, -(select c25 x, c32 y from t2) tt WHERE x =c25 ' ; -set @arg00= 0.0 ; -set @arg01= 0e-3 ; -set @arg02= 1.0e+0 ; -set @arg03= 9.0000000000 ; -set @arg04= 4 ; -set @arg05= 0.3e+1 ; -set @arg06= 4 ; -set @arg07= 4 ; -set @arg08= 4.0 ; -set @arg09= 40e-1 ; -prepare stmt1 from @stmt ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -set @stmt= concat('explain ',@stmt); -prepare stmt1 from @stmt ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -drop table t2 ; -select 1 < (select a from t1) ; -ERROR 21000: Subquery returns more than 1 row -prepare stmt1 from ' select 1 < (select a from t1) ' ; -execute stmt1 ; -ERROR 21000: Subquery returns more than 1 row -select 1 as my_col ; -my_col -1 -test_sequence ------- union tests ------ -prepare stmt1 from ' select a FROM t1 where a=1 - union distinct - select a FROM t1 where a=1 '; -execute stmt1 ; -a -1 -execute stmt1 ; -a -1 -prepare stmt1 from ' select a FROM t1 where a=1 - union all - select a FROM t1 where a=1 '; -execute stmt1 ; -a -1 -1 -prepare stmt1 from ' SELECT 1, 2 union SELECT 1 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -prepare stmt1 from ' SELECT 1 union SELECT 1, 2 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -prepare stmt1 from ' SELECT * from t1 union SELECT 1 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -prepare stmt1 from ' SELECT 1 union SELECT * from t1 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -set @arg00=1 ; -select @arg00 FROM t1 where a=1 -union distinct -select 1 FROM t1 where a=1; -@arg00 -1 -prepare stmt1 from ' select ? FROM t1 where a=1 - union distinct - select 1 FROM t1 where a=1 ' ; -execute stmt1 using @arg00; -? -1 -set @arg00=1 ; -select 1 FROM t1 where a=1 -union distinct -select @arg00 FROM t1 where a=1; -1 -1 -prepare stmt1 from ' select 1 FROM t1 where a=1 - union distinct - select ? FROM t1 where a=1 ' ; -execute stmt1 using @arg00; -1 -1 -set @arg00='a' ; -select @arg00 FROM t1 where a=1 -union distinct -select @arg00 FROM t1 where a=1; -@arg00 -a -prepare stmt1 from ' select ? FROM t1 where a=1 - union distinct - select ? FROM t1 where a=1 '; -execute stmt1 using @arg00, @arg00; -? -a -prepare stmt1 from ' select ? - union distinct - select ? '; -execute stmt1 using @arg00, @arg00; -? -a -set @arg00='a' ; -set @arg01=1 ; -set @arg02='a' ; -set @arg03=2 ; -select @arg00 FROM t1 where a=@arg01 -union distinct -select @arg02 FROM t1 where a=@arg03; -@arg00 -a -prepare stmt1 from ' select ? FROM t1 where a=? - union distinct - select ? FROM t1 where a=? ' ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03; -? -a -set @arg00=1 ; -prepare stmt1 from ' select sum(a) + 200, ? from t1 -union distinct -select sum(a) + 200, 1 from t1 -group by b ' ; -execute stmt1 using @arg00; -sum(a) + 200 ? -210 1 -204 1 -201 1 -203 1 -202 1 -set @Oporto='Oporto' ; -set @Lisboa='Lisboa' ; -set @0=0 ; -set @1=1 ; -set @2=2 ; -set @3=3 ; -set @4=4 ; -select @Oporto,@Lisboa,@0,@1,@2,@3,@4 ; -@Oporto @Lisboa @0 @1 @2 @3 @4 -Oporto Lisboa 0 1 2 3 4 -select sum(a) + 200 as the_sum, @Oporto as the_town from t1 -group by b -union distinct -select sum(a) + 200, @Lisboa from t1 -group by b ; -the_sum the_town -204 Oporto -201 Oporto -203 Oporto -202 Oporto -204 Lisboa -201 Lisboa -203 Lisboa -202 Lisboa -prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 - group by b - union distinct - select sum(a) + 200, ? from t1 - group by b ' ; -execute stmt1 using @Oporto, @Lisboa; -the_sum the_town -204 Oporto -201 Oporto -203 Oporto -202 Oporto -204 Lisboa -201 Lisboa -203 Lisboa -202 Lisboa -select sum(a) + 200 as the_sum, @Oporto as the_town from t1 -where a > @1 -group by b -union distinct -select sum(a) + 200, @Lisboa from t1 -where a > @2 -group by b ; -the_sum the_town -204 Oporto -203 Oporto -202 Oporto -204 Lisboa -203 Lisboa -prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 - where a > ? - group by b - union distinct - select sum(a) + 200, ? from t1 - where a > ? - group by b ' ; -execute stmt1 using @Oporto, @1, @Lisboa, @2; -the_sum the_town -204 Oporto -203 Oporto -202 Oporto -204 Lisboa -203 Lisboa -select sum(a) + 200 as the_sum, @Oporto as the_town from t1 -where a > @1 -group by b -having avg(a) > @2 -union distinct -select sum(a) + 200, @Lisboa from t1 -where a > @2 -group by b -having avg(a) > @3; -the_sum the_town -204 Oporto -203 Oporto -204 Lisboa -prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 - where a > ? - group by b - having avg(a) > ? - union distinct - select sum(a) + 200, ? from t1 - where a > ? - group by b - having avg(a) > ? '; -execute stmt1 using @Oporto, @1, @2, @Lisboa, @2, @3; -the_sum the_town -204 Oporto -203 Oporto -204 Lisboa -test_sequence ------- explain select tests ------ -prepare stmt1 from ' explain select * from t9 ' ; -execute stmt1; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def id 8 3 1 N 32929 0 63 -def select_type 253 19 6 N 1 31 8 -def table 253 64 2 Y 0 31 8 -def type 253 10 3 Y 0 31 8 -def possible_keys 253 4096 0 Y 0 31 8 -def key 253 64 0 Y 0 31 8 -def key_len 253 4096 0 Y 0 31 8 -def ref 253 1024 0 Y 0 31 8 -def rows 8 10 1 Y 32928 0 63 -def Extra 253 255 0 N 1 31 8 -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t9 ALL NULL NULL NULL NULL 2 -test_sequence ------- delete tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -prepare stmt1 from 'delete from t1 where a=2' ; -execute stmt1; -select a,b from t1 where a=2; -a b -execute stmt1; -insert into t1 values(0,NULL); -set @arg00=NULL; -prepare stmt1 from 'delete from t1 where b=?' ; -execute stmt1 using @arg00; -select a,b from t1 where b is NULL ; -a b -0 NULL -set @arg00='one'; -execute stmt1 using @arg00; -select a,b from t1 where b=@arg00; -a b -prepare stmt1 from 'truncate table t1' ; -test_sequence ------- update tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -prepare stmt1 from 'update t1 set b=''a=two'' where a=2' ; -execute stmt1; -select a,b from t1 where a=2; -a b -2 a=two -execute stmt1; -select a,b from t1 where a=2; -a b -2 a=two -set @arg00=NULL; -prepare stmt1 from 'update t1 set b=? where a=2' ; -execute stmt1 using @arg00; -select a,b from t1 where a=2; -a b -2 NULL -set @arg00='two'; -execute stmt1 using @arg00; -select a,b from t1 where a=2; -a b -2 two -set @arg00=2; -prepare stmt1 from 'update t1 set b=NULL where a=?' ; -execute stmt1 using @arg00; -select a,b from t1 where a=@arg00; -a b -2 NULL -update t1 set b='two' where a=@arg00; -set @arg00=2000; -execute stmt1 using @arg00; -select a,b from t1 where a=@arg00; -a b -set @arg00=2; -set @arg01=22; -prepare stmt1 from 'update t1 set a=? where a=?' ; -execute stmt1 using @arg00, @arg00; -select a,b from t1 where a=@arg00; -a b -2 two -execute stmt1 using @arg01, @arg00; -select a,b from t1 where a=@arg01; -a b -22 two -execute stmt1 using @arg00, @arg01; -select a,b from t1 where a=@arg00; -a b -2 two -set @arg00=NULL; -set @arg01=2; -execute stmt1 using @arg00, @arg01; -Warnings: -Warning 1048 Column 'a' cannot be null -select a,b from t1 order by a; -a b -0 two -1 one -3 three -4 four -set @arg00=0; -execute stmt1 using @arg01, @arg00; -select a,b from t1 order by a; -a b -1 one -2 two -3 three -4 four -set @arg00=23; -set @arg01='two'; -set @arg02=2; -set @arg03='two'; -set @arg04=2; -drop table if exists t2; -create table t2 as select a,b from t1 ; -prepare stmt1 from 'update t1 set a=? where b=? - and a in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 where a = @arg00 ; -a b -23 two -prepare stmt1 from 'update t1 set a=? where b=? - and a not in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 order by a ; -a b -1 one -2 two -3 three -4 four -drop table t2 ; -create table t2 -( -a int, b varchar(30), -primary key(a) -) engine = 'NDB' ; -insert into t2(a,b) select a, b from t1 ; -prepare stmt1 from 'update t1 set a=? where b=? - and a in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 where a = @arg00 ; -a b -23 two -prepare stmt1 from 'update t1 set a=? where b=? - and a not in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 order by a ; -a b -1 one -2 two -3 three -4 four -drop table t2 ; -set @arg00=1; -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit 1'; -execute stmt1 ; -select a,b from t1 where b = 'bla' ; -a b -2 bla -prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; -execute stmt1 using @arg00; -test_sequence ------- insert tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -prepare stmt1 from 'insert into t1 values(5, ''five'' )'; -execute stmt1; -select a,b from t1 where a = 5; -a b -5 five -set @arg00='six' ; -prepare stmt1 from 'insert into t1 values(6, ? )'; -execute stmt1 using @arg00; -select a,b from t1 where b = @arg00; -a b -6 six -execute stmt1 using @arg00; -ERROR 23000: Duplicate entry '6' for key 'PRIMARY' -set @arg00=NULL ; -prepare stmt1 from 'insert into t1 values(0, ? )'; -execute stmt1 using @arg00; -select a,b from t1 where b is NULL; -a b -0 NULL -set @arg00=8 ; -set @arg01='eight' ; -prepare stmt1 from 'insert into t1 values(?, ? )'; -execute stmt1 using @arg00, @arg01 ; -select a,b from t1 where b = @arg01; -a b -8 eight -set @NULL= null ; -set @arg00= 'abc' ; -execute stmt1 using @NULL, @NULL ; -ERROR 23000: Column 'a' cannot be null -execute stmt1 using @NULL, @NULL ; -ERROR 23000: Column 'a' cannot be null -execute stmt1 using @NULL, @arg00 ; -ERROR 23000: Column 'a' cannot be null -execute stmt1 using @NULL, @arg00 ; -ERROR 23000: Column 'a' cannot be null -set @arg01= 10000 + 2 ; -execute stmt1 using @arg01, @arg00 ; -set @arg01= 10000 + 1 ; -execute stmt1 using @arg01, @arg00 ; -select * from t1 where a > 10000 order by a ; -a b -10001 abc -10002 abc -delete from t1 where a > 10000 ; -set @arg01= 10000 + 2 ; -execute stmt1 using @arg01, @NULL ; -set @arg01= 10000 + 1 ; -execute stmt1 using @arg01, @NULL ; -select * from t1 where a > 10000 order by a ; -a b -10001 NULL -10002 NULL -delete from t1 where a > 10000 ; -set @arg01= 10000 + 10 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 9 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 8 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 7 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 6 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 5 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 4 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 3 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 2 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 1 ; -execute stmt1 using @arg01, @arg01 ; -select * from t1 where a > 10000 order by a ; -a b -10001 10001 -10002 10002 -10003 10003 -10004 10004 -10005 10005 -10006 10006 -10007 10007 -10008 10008 -10009 10009 -10010 10010 -delete from t1 where a > 10000 ; -set @arg00=81 ; -set @arg01='8-1' ; -set @arg02=82 ; -set @arg03='8-2' ; -prepare stmt1 from 'insert into t1 values(?,?),(?,?)'; -execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; -select a,b from t1 where a in (@arg00,@arg02) ; -a b -81 8-1 -82 8-2 -set @arg00=9 ; -set @arg01='nine' ; -prepare stmt1 from 'insert into t1 set a=?, b=? '; -execute stmt1 using @arg00, @arg01 ; -select a,b from t1 where a = @arg00 ; -a b -9 nine -set @arg00=6 ; -set @arg01=1 ; -prepare stmt1 from 'insert into t1 set a=?, b=''sechs'' - on duplicate key update a=a + ?, b=concat(b,''modified'') '; -execute stmt1 using @arg00, @arg01; -select * from t1 order by a; -a b -0 NULL -1 one -2 two -3 three -4 four -5 five -7 sixmodified -8 eight -9 nine -81 8-1 -82 8-2 -set @arg00=81 ; -set @arg01=1 ; -execute stmt1 using @arg00, @arg01; -ERROR 23000: Duplicate entry '82' for key 'PRIMARY' -drop table if exists t2 ; -create table t2 (id int auto_increment primary key) -ENGINE= 'NDB' ; -prepare stmt1 from ' select last_insert_id() ' ; -insert into t2 values (NULL) ; -execute stmt1 ; -last_insert_id() -1 -insert into t2 values (NULL) ; -execute stmt1 ; -last_insert_id() -2 -drop table t2 ; -set @1000=1000 ; -set @x1000_2="x1000_2" ; -set @x1000_3="x1000_3" ; -set @x1000="x1000" ; -set @1100=1100 ; -set @x1100="x1100" ; -set @100=100 ; -set @updated="updated" ; -insert into t1 values(1000,'x1000_1') ; -insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3) -on duplicate key update a = a + @100, b = concat(b,@updated) ; -select a,b from t1 where a >= 1000 order by a ; -a b -1000 x1000_3 -1100 x1000_1updated -delete from t1 where a >= 1000 ; -insert into t1 values(1000,'x1000_1') ; -prepare stmt1 from ' insert into t1 values(?,?),(?,?) - on duplicate key update a = a + ?, b = concat(b,?) '; -execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ; -select a,b from t1 where a >= 1000 order by a ; -a b -1000 x1000_3 -1100 x1000_1updated -delete from t1 where a >= 1000 ; -insert into t1 values(1000,'x1000_1') ; -execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ; -select a,b from t1 where a >= 1000 order by a ; -a b -1200 x1000_1updatedupdated -delete from t1 where a >= 1000 ; -prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' '; -execute stmt1; -execute stmt1; -execute stmt1; -test_sequence ------- multi table tests ------ -delete from t1 ; -delete from t9 ; -insert into t1(a,b) values (1, 'one'), (2, 'two'), (3, 'three') ; -insert into t9 (c1,c21) -values (1, 'one'), (2, 'two'), (3, 'three') ; -prepare stmt_delete from " delete t1, t9 - from t1, t9 where t1.a=t9.c1 and t1.b='updated' "; -prepare stmt_update from " update t1, t9 - set t1.b='updated', t9.c21='updated' - where t1.a=t9.c1 and t1.a=? "; -prepare stmt_select1 from " select a, b from t1 order by a" ; -prepare stmt_select2 from " select c1, c21 from t9 order by c1" ; -set @arg00= 1 ; -execute stmt_update using @arg00 ; -execute stmt_delete ; -execute stmt_select1 ; -a b -2 two -3 three -execute stmt_select2 ; -c1 c21 -2 two -3 three -set @arg00= @arg00 + 1 ; -execute stmt_update using @arg00 ; -execute stmt_delete ; -execute stmt_select1 ; -a b -3 three -execute stmt_select2 ; -c1 c21 -3 three -set @arg00= @arg00 + 1 ; -execute stmt_update using @arg00 ; -execute stmt_delete ; -execute stmt_select1 ; -a b -execute stmt_select2 ; -c1 c21 -set @arg00= @arg00 + 1 ; -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -insert into t1 values(0,NULL) ; -set @duplicate='duplicate ' ; -set @1000=1000 ; -set @5=5 ; -select a,b from t1 where a < 5 order by a ; -a b -0 NULL -1 one -2 two -3 three -4 four -insert into t1 select a + @1000, concat(@duplicate,b) from t1 -where a < @5 ; -affected rows: 5 -info: Records: 5 Duplicates: 0 Warnings: 0 -select a,b from t1 where a >= 1000 order by a ; -a b -1000 NULL -1001 duplicate one -1002 duplicate two -1003 duplicate three -1004 duplicate four -delete from t1 where a >= 1000 ; -prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1 -where a < ? ' ; -execute stmt1 using @1000, @duplicate, @5; -affected rows: 5 -info: Records: 5 Duplicates: 0 Warnings: 0 -select a,b from t1 where a >= 1000 order by a ; -a b -1000 NULL -1001 duplicate one -1002 duplicate two -1003 duplicate three -1004 duplicate four -delete from t1 where a >= 1000 ; -set @1=1 ; -set @2=2 ; -set @100=100 ; -set @float=1.00; -set @five='five' ; -drop table if exists t2; -create table t2 like t1 ; -insert into t2 (b,a) -select @duplicate, sum(first.a) from t1 first, t1 second -where first.a <> @5 and second.b = first.b -and second.b <> @five -group by second.b -having sum(second.a) > @2 -union -select b, a + @100 from t1 -where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b -from t1); -affected rows: 3 -info: Records: 3 Duplicates: 0 Warnings: 0 -select a,b from t2 order by a ; -a b -3 duplicate -4 duplicate -103 three -delete from t2 ; -prepare stmt1 from ' insert into t2 (b,a) -select ?, sum(first.a) - from t1 first, t1 second - where first.a <> ? and second.b = first.b and second.b <> ? - group by second.b - having sum(second.a) > ? -union -select b, a + ? from t1 - where (a,b) in ( select sqrt(a+?)+CAST(? AS signed),b - from t1 ) ' ; -execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ; -affected rows: 3 -info: Records: 3 Duplicates: 0 Warnings: 0 -select a,b from t2 order by a ; -a b -3 duplicate -4 duplicate -103 three -drop table t2; -drop table if exists t5 ; -set @arg01= 8; -set @arg02= 8.0; -set @arg03= 80.00000000000e-1; -set @arg04= 'abc' ; -set @arg05= CAST('abc' as binary) ; -set @arg06= '1991-08-05' ; -set @arg07= CAST('1991-08-05' as date); -set @arg08= '1991-08-05 01:01:01' ; -set @arg09= CAST('1991-08-05 01:01:01' as datetime) ; -set @arg10= unix_timestamp('1991-01-01 01:01:01'); -set @arg11= YEAR('1991-01-01 01:01:01'); -set @arg12= 8 ; -set @arg12= NULL ; -set @arg13= 8.0 ; -set @arg13= NULL ; -set @arg14= 'abc'; -set @arg14= NULL ; -set @arg15= CAST('abc' as binary) ; -set @arg15= NULL ; -create table t5 as select -8 as const01, @arg01 as param01, -8.0 as const02, @arg02 as param02, -80.00000000000e-1 as const03, @arg03 as param03, -'abc' as const04, @arg04 as param04, -CAST('abc' as binary) as const05, @arg05 as param05, -'1991-08-05' as const06, @arg06 as param06, -CAST('1991-08-05' as date) as const07, @arg07 as param07, -'1991-08-05 01:01:01' as const08, @arg08 as param08, -CAST('1991-08-05 01:01:01' as datetime) as const09, @arg09 as param09, -unix_timestamp('1991-01-01 01:01:01') as const10, @arg10 as param10, -YEAR('1991-01-01 01:01:01') as const11, @arg11 as param11, -NULL as const12, @arg12 as param12, -@arg13 as param13, -@arg14 as param14, -@arg15 as param15; -show create table t5 ; -Table Create Table -t5 CREATE TABLE `t5` ( - `const01` int(1) NOT NULL DEFAULT '0', - `param01` bigint(20) DEFAULT NULL, - `const02` decimal(2,1) NOT NULL DEFAULT '0.0', - `param02` decimal(65,30) DEFAULT NULL, - `const03` double NOT NULL DEFAULT '0', - `param03` double DEFAULT NULL, - `const04` varchar(3) NOT NULL DEFAULT '', - `param04` longtext, - `const05` varbinary(3) NOT NULL DEFAULT '', - `param05` longblob, - `const06` varchar(10) NOT NULL DEFAULT '', - `param06` longtext, - `const07` date DEFAULT NULL, - `param07` longtext, - `const08` varchar(19) NOT NULL DEFAULT '', - `param08` longtext, - `const09` datetime DEFAULT NULL, - `param09` longtext, - `const10` int(10) NOT NULL DEFAULT '0', - `param10` bigint(20) DEFAULT NULL, - `const11` int(4) DEFAULT NULL, - `param11` bigint(20) DEFAULT NULL, - `const12` binary(0) DEFAULT NULL, - `param12` bigint(20) DEFAULT NULL, - `param13` decimal(65,30) DEFAULT NULL, - `param14` longtext, - `param15` longblob -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -select * from t5 ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t5 t5 const01 const01 3 1 1 N 32769 0 63 -def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 246 4 3 N 32769 1 63 -def test t5 t5 param02 param02 246 67 32 Y 32768 30 63 -def test t5 t5 const03 const03 5 17 1 N 32769 31 63 -def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 -def test t5 t5 const04 const04 253 3 3 N 1 0 8 -def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 253 3 3 N 129 0 63 -def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 -def test t5 t5 const06 const06 253 10 10 N 1 0 8 -def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 -def test t5 t5 const07 const07 10 10 10 Y 128 0 63 -def test t5 t5 param07 param07 252 4294967295 10 Y 16 0 8 -def test t5 t5 const08 const08 253 19 19 N 1 0 8 -def test t5 t5 param08 param08 252 4294967295 19 Y 16 0 8 -def test t5 t5 const09 const09 12 19 19 Y 128 0 63 -def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8 -def test t5 t5 const10 const10 3 10 9 N 32769 0 63 -def test t5 t5 param10 param10 8 20 9 Y 32768 0 63 -def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 -def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 -def test t5 t5 const12 const12 254 0 0 Y 128 0 63 -def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 246 67 0 Y 32768 30 63 -def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 -def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 -const01 8 -param01 8 -const02 8.0 -param02 8.000000000000000000000000000000 -const03 8 -param03 8 -const04 abc -param04 abc -const05 abc -param05 abc -const06 1991-08-05 -param06 1991-08-05 -const07 1991-08-05 -param07 1991-08-05 -const08 1991-08-05 01:01:01 -param08 1991-08-05 01:01:01 -const09 1991-08-05 01:01:01 -param09 1991-08-05 01:01:01 -const10 662680861 -param10 662680861 -const11 1991 -param11 1991 -const12 NULL -param12 NULL -param13 NULL -param14 NULL -param15 NULL -drop table t5 ; -test_sequence ------- data type conversion tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -insert into t9 set c1= 0, c15= '1991-01-01 01:01:01' ; -select * from t9 order by c1 ; -c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday -test_sequence ------- select @parameter:= column ------ -prepare full_info from "select @arg01, @arg02, @arg03, @arg04, - @arg05, @arg06, @arg07, @arg08, - @arg09, @arg10, @arg11, @arg12, - @arg13, @arg14, @arg15, @arg16, - @arg17, @arg18, @arg19, @arg20, - @arg21, @arg22, @arg23, @arg24, - @arg25, @arg26, @arg27, @arg28, - @arg29, @arg30, @arg31, @arg32" ; -select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, -@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, -@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, -@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, -@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, -@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, -@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, -@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 -from t9 where c1= 1 ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 32896 30 63 -def @arg12 246 83 6 Y 32896 30 63 -def @arg13 251 16777216 10 Y 0 31 8 -def @arg14 251 16777216 19 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 8 Y 0 31 8 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, -@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, -@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, -@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, -@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, -@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, -@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, -@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 -from t9 where c1= 0 ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 32896 30 63 -def @arg12 246 83 0 Y 32896 30 63 -def @arg13 251 16777216 0 Y 0 31 8 -def @arg14 251 16777216 0 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 0 Y 0 31 8 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select - @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, - @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, - @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, - @arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, - @arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, - @arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, - @arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, - @arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 -from t9 where c1= ?" ; -set @my_key= 1 ; -execute stmt1 using @my_key ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 32896 30 63 -def @arg12 246 83 6 Y 32896 30 63 -def @arg13 251 16777216 10 Y 0 31 8 -def @arg14 251 16777216 19 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 8 Y 0 31 8 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -set @my_key= 0 ; -execute stmt1 using @my_key ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 32896 30 63 -def @arg12 246 83 0 Y 32896 30 63 -def @arg13 251 16777216 0 Y 0 31 8 -def @arg14 251 16777216 0 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 0 Y 0 31 8 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':= c1 from t9 where c1= 1' at line 1 -test_sequence ------- select column, .. into @parm,.. ------ -select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, -c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, -c25, c26, c27, c28, c29, c30, c31, c32 -into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, -@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, -@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, -@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 -from t9 where c1= 1 ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 32896 30 63 -def @arg12 246 83 6 Y 32896 30 63 -def @arg13 251 16777216 10 Y 0 31 8 -def @arg14 251 16777216 19 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 8 Y 0 31 8 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, -c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, -c25, c26, c27, c28, c29, c30, c31, c32 -into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, -@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, -@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, -@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 -from t9 where c1= 0 ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 32896 30 63 -def @arg12 246 83 0 Y 32896 30 63 -def @arg13 251 16777216 0 Y 0 31 8 -def @arg14 251 16777216 0 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 0 Y 0 31 8 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, - c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, - c25, c26, c27, c28, c29, c30, c31, c32 -into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, - @arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, - @arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, - @arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 -from t9 where c1= ?" ; -set @my_key= 1 ; -execute stmt1 using @my_key ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 32896 30 63 -def @arg12 246 83 6 Y 32896 30 63 -def @arg13 251 16777216 10 Y 0 31 8 -def @arg14 251 16777216 19 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 8 Y 0 31 8 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -set @my_key= 0 ; -execute stmt1 using @my_key ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 32896 30 63 -def @arg12 246 83 0 Y 32896 30 63 -def @arg13 251 16777216 0 Y 0 31 8 -def @arg14 251 16777216 0 Y 0 31 8 -def @arg15 251 16777216 19 Y 0 31 8 -def @arg16 251 16777216 0 Y 0 31 8 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t9 where c1= 1' at line 1 -test_sequence --- insert into numeric columns -- -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 ) ; -set @arg00= 21 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 )" ; -execute stmt1 ; -set @arg00= 23; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, -30.0, 30.0, 30.0 ) ; -set @arg00= 31.0 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, - 32.0, 32.0, 32.0 )" ; -execute stmt1 ; -set @arg00= 33.0; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( '40', '40', '40', '40', '40', '40', '40', '40', -'40', '40', '40' ) ; -set @arg00= '41' ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( '42', '42', '42', '42', '42', '42', '42', '42', - '42', '42', '42' )" ; -execute stmt1 ; -set @arg00= '43'; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( CAST('50' as binary), CAST('50' as binary), -CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), -CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), -CAST('50' as binary), CAST('50' as binary), CAST('50' as binary) ) ; -set @arg00= CAST('51' as binary) ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( CAST('52' as binary), CAST('52' as binary), - CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), - CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), - CAST('52' as binary), CAST('52' as binary), CAST('52' as binary) )" ; -execute stmt1 ; -set @arg00= CAST('53' as binary) ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -set @arg00= 2 ; -set @arg00= NULL ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 60, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -NULL, NULL, NULL ) ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 61, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 62, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL )" ; -execute stmt1 ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 63, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -set @arg00= 8.0 ; -set @arg00= NULL ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 71, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 73, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -set @arg00= 'abc' ; -set @arg00= NULL ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 81, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 83, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 -from t9 where c1 >= 20 -order by c1 ; -c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c12 -20 20 20 20 20 20 20 20 20 20 20.0000 -21 21 21 21 21 21 21 21 21 21 21.0000 -22 22 22 22 22 22 22 22 22 22 22.0000 -23 23 23 23 23 23 23 23 23 23 23.0000 -30 30 30 30 30 30 30 30 30 30 30.0000 -31 31 31 31 31 31 31 31 31 31 31.0000 -32 32 32 32 32 32 32 32 32 32 32.0000 -33 33 33 33 33 33 33 33 33 33 33.0000 -40 40 40 40 40 40 40 40 40 40 40.0000 -41 41 41 41 41 41 41 41 41 41 41.0000 -42 42 42 42 42 42 42 42 42 42 42.0000 -43 43 43 43 43 43 43 43 43 43 43.0000 -50 50 50 50 50 50 50 50 50 50 50.0000 -51 51 51 51 51 51 51 51 51 51 51.0000 -52 52 52 52 52 52 52 52 52 52 52.0000 -53 53 53 53 53 53 53 53 53 53 53.0000 -60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -test_sequence --- select .. where numeric column = .. -- -set @arg00= 20; -select 'true' as found from t9 -where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 -and c8= 20 and c9= 20 and c10= 20 and c12= 20; -found -true -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 - and c8= 20 and c9= 20 and c10= 20 and c12= 20 "; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 20.0; -select 'true' as found from t9 -where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 -and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0; -found -true -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 - and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0 "; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -select 'true' as found from t9 -where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' - and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20'; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' - and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20' "; -execute stmt1 ; -found -true -set @arg00= '20'; -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -select 'true' as found from t9 -where c1= CAST('20' as binary) and c2= CAST('20' as binary) and -c3= CAST('20' as binary) and c4= CAST('20' as binary) and -c5= CAST('20' as binary) and c6= CAST('20' as binary) and -c7= CAST('20' as binary) and c8= CAST('20' as binary) and -c9= CAST('20' as binary) and c10= CAST('20' as binary) and -c12= CAST('20' as binary); -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= CAST('20' as binary) and c2= CAST('20' as binary) and - c3= CAST('20' as binary) and c4= CAST('20' as binary) and - c5= CAST('20' as binary) and c6= CAST('20' as binary) and - c7= CAST('20' as binary) and c8= CAST('20' as binary) and - c9= CAST('20' as binary) and c10= CAST('20' as binary) and - c12= CAST('20' as binary) "; -execute stmt1 ; -found -true -set @arg00= CAST('20' as binary) ; -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -delete from t9 ; -test_sequence --- some numeric overflow experiments -- -prepare my_insert from "insert into t9 - ( c21, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 'O', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 -from t9 where c21 = 'O' "; -prepare my_delete from "delete from t9 where c21 = 'O' "; -set @arg00= 9223372036854775807 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 9.22337e18 -c8 9.223372036854776e18 -c9 9.223372036854776e18 -c10 9.223372036854776e18 -c12 9999.9999 -execute my_delete ; -set @arg00= '9223372036854775807' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 9.22337e18 -c8 9.223372036854776e18 -c9 9.223372036854776e18 -c10 9.223372036854776e18 -c12 9999.9999 -execute my_delete ; -set @arg00= -9223372036854775808 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -9.22337e18 -c8 -9.223372036854776e18 -c9 -9.223372036854776e18 -c10 -9.223372036854776e18 -c12 -9999.9999 -execute my_delete ; -set @arg00= '-9223372036854775808' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -9.22337e18 -c8 -9.223372036854776e18 -c9 -9.223372036854776e18 -c10 -9.223372036854776e18 -c12 -9999.9999 -execute my_delete ; -set @arg00= 1.11111111111111111111e+50 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 3.40282e38 -c8 1.111111111111111e50 -c9 1.111111111111111e50 -c10 1.111111111111111e50 -c12 9999.9999 -execute my_delete ; -set @arg00= '1.11111111111111111111e+50' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 3.40282e38 -c8 1.111111111111111e50 -c9 1.111111111111111e50 -c10 1.111111111111111e50 -c12 9999.9999 -execute my_delete ; -set @arg00= -1.11111111111111111111e+50 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -3.40282e38 -c8 -1.111111111111111e50 -c9 -1.111111111111111e50 -c10 -1.111111111111111e50 -c12 -9999.9999 -execute my_delete ; -set @arg00= '-1.11111111111111111111e+50' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -3.40282e38 -c8 -1.111111111111111e50 -c9 -1.111111111111111e50 -c10 -1.111111111111111e50 -c12 -9999.9999 -execute my_delete ; -test_sequence --- insert into string columns -- -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -select c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 -from t9 where c1 >= 20 -order by c1 ; -c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 -20 2 20 20 20 20 20 20 20 20 20 20 -21 2 21 21 21 21 21 21 21 21 21 21 -22 2 22 22 22 22 22 22 22 22 22 22 -23 2 23 23 23 23 23 23 23 23 23 23 -30 3 30 30 30 30 30 30 30 30 30 30 -31 3 31 31 31 31 31 31 31 31 31 31 -32 3 32 32 32 32 32 32 32 32 32 32 -33 3 33 33 33 33 33 33 33 33 33 33 -40 4 40 40 40 40 40 40 40 40 40 40 -41 4 41 41 41 41 41 41 41 41 41 41 -42 4 42 42 42 42 42 42 42 42 42 42 -43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 -51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 -52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 -53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 -54 5 54 54 54 54 54 54 54 54 54 54 -55 6 55 55 55 55 55 55 55 55 55 55 -56 6 56 56 56 56 56 56 56 56 56 56 -57 6 57 57 57 57 57 57 57 57 57 57 -60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -test_sequence --- select .. where string column = .. -- -set @arg00= '20'; -select 'true' as found from t9 -where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and -c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and -c27= '20' and c28= '20' and c29= '20' and c30= '20' ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and - c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and - c27= '20' and c28= '20' and c29= '20' and c30= '20'" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and - c21= ? and c22= ? and c23= ? and c25= ? and - c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= CAST('20' as binary); -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) -= CAST('20' as binary) and c21= CAST('20' as binary) -and c22= CAST('20' as binary) and c23= CAST('20' as binary) and -c24= CAST('20' as binary) and c25= CAST('20' as binary) and -c26= CAST('20' as binary) and c27= CAST('20' as binary) and -c28= CAST('20' as binary) and c29= CAST('20' as binary) and -c30= CAST('20' as binary) ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20))) = @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and -c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) - = CAST('20' as binary) and c21= CAST('20' as binary) - and c22= CAST('20' as binary) and c23= CAST('20' as binary) and - c24= CAST('20' as binary) and c25= CAST('20' as binary) and - c26= CAST('20' as binary) and c27= CAST('20' as binary) and - c28= CAST('20' as binary) and c29= CAST('20' as binary) and - c30= CAST('20' as binary)" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20))) = ? and c21= ? and - c22= ? and c23= ? and c25= ? and c26= ? and c27= ? and c28= ? and - c29= ? and c30= ?"; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 20; -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and -c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and -c27= 20 and c28= 20 and c29= 20 and c30= 20 ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and - c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and - c27= 20 and c28= 20 and c29= 20 and c30= 20" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and - c21= ? and c22= ? and c23= ? and c25= ? and - c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 20.0; -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and -c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and -c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0 ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and - c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and - c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and - c21= ? and c22= ? and c23= ? and c25= ? and - c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -delete from t9 ; -test_sequence --- insert into date/time columns -- -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; -c1 c13 c14 c15 c16 c17 -20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -21 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -22 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -23 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -30 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -31 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -32 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -33 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -40 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -41 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -60 NULL NULL 1991-01-01 01:01:01 NULL NULL -61 NULL NULL 1991-01-01 01:01:01 NULL NULL -62 NULL NULL 1991-01-01 01:01:01 NULL NULL -63 NULL NULL 1991-01-01 01:01:01 NULL NULL -71 NULL NULL 1991-01-01 01:01:01 NULL NULL -73 NULL NULL 1991-01-01 01:01:01 NULL NULL -81 NULL NULL 1991-01-01 01:01:01 NULL NULL -83 NULL NULL 1991-01-01 01:01:01 NULL NULL -test_sequence --- select .. where date/time column = .. -- -set @arg00= '1991-01-01 01:01:01' ; -select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and -c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and -c17= '1991-01-01 01:01:01' ; -found -true -select 'true' as found from t9 -where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 -and c17= @arg00 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and - c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and - c17= '1991-01-01 01:01:01'" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= CAST('1991-01-01 01:01:01' as datetime) ; -select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and -c14= CAST('1991-01-01 01:01:01' as datetime) and -c15= CAST('1991-01-01 01:01:01' as datetime) and -c16= CAST('1991-01-01 01:01:01' as datetime) and -c17= CAST('1991-01-01 01:01:01' as datetime) ; -found -true -select 'true' as found from t9 -where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 -and c17= @arg00 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and - c14= CAST('1991-01-01 01:01:01' as datetime) and - c15= CAST('1991-01-01 01:01:01' as datetime) and - c16= CAST('1991-01-01 01:01:01' as datetime) and - c17= CAST('1991-01-01 01:01:01' as datetime)" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 1991 ; -select 'true' as found from t9 -where c1= 20 and c17= 1991 ; -found -true -select 'true' as found from t9 -where c1= 20 and c17= @arg00 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c17= 1991" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c17= ?" ; -execute stmt1 using @arg00 ; -found -true -set @arg00= 1.991e+3 ; -select 'true' as found from t9 -where c1= 20 and abs(c17 - 1.991e+3) < 0.01 ; -found -true -select 'true' as found from t9 -where c1= 20 and abs(c17 - @arg00) < 0.01 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and abs(c17 - 1.991e+3) < 0.01" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and abs(c17 - ?) < 0.01" ; -execute stmt1 using @arg00 ; -found -true -drop table t1, t9; diff --git a/mysql-test/suite/ndb/r/strict_autoinc_5ndb.result b/mysql-test/suite/ndb/r/strict_autoinc_5ndb.result deleted file mode 100644 index ea6e5ffc741..00000000000 --- a/mysql-test/suite/ndb/r/strict_autoinc_5ndb.result +++ /dev/null @@ -1,28 +0,0 @@ -drop table if exists t1; -set @org_mode=@@sql_mode; -create table t1 -( -`a` tinyint(4) NOT NULL auto_increment, -primary key (`a`) -) engine = 'NDB' ; -set @@sql_mode='strict_all_tables'; -insert into t1 values(1000); -ERROR 22003: Out of range value for column 'a' at row 1 -select count(*) from t1; -count(*) -0 -set auto_increment_increment=1000; -set auto_increment_offset=700; -insert into t1 values(null); -ERROR 22003: Out of range value for column 'a' at row 1 -select count(*) from t1; -count(*) -0 -set @@sql_mode=@org_mode; -insert into t1 values(null); -Warnings: -Warning 1264 Out of range value for column 'a' at row 1 -select * from t1; -a -127 -drop table t1; diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def deleted file mode 100644 index c3c046e7ece..00000000000 --- a/mysql-test/suite/ndb/t/disabled.def +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# : BUG# -# -# Do not use any TAB characters for whitespace. -# -############################################################################## - -ndb_binlog_discover : Bug#54851 2010-07-02 alik ndb.ndb_binlog_discover crashes the server -ndb_partition_error2 : Bug#40989 ndb_partition_error2 needs maintenance - - -# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open -ndb_alter_table3 : Bug#45621 2009-06-10 alik A few test files are disabled due to WL#4284 diff --git a/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test b/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test deleted file mode 100644 index f4a6743aabe..00000000000 --- a/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test +++ /dev/null @@ -1,4 +0,0 @@ ---source include/have_ndb.inc -let $engine_type=ndbcluster; - ---source include/loaddata_autocom.inc diff --git a/mysql-test/suite/ndb/t/ndb_alter_table.test b/mysql-test/suite/ndb/t/ndb_alter_table.test deleted file mode 100644 index bf0f8a540bb..00000000000 --- a/mysql-test/suite/ndb/t/ndb_alter_table.test +++ /dev/null @@ -1,458 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; -drop database if exists mysqltest; ---enable_warnings - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -connection con2; --- sleep 2 -connection con1; - -# -# Basic test to show that the ALTER TABLE -# is working -# -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412); - -ALTER TABLE t1 ADD COLUMN c int not null; -SELECT * FROM t1; - -DROP TABLE t1; - -# -# Verfify changing table names between databases -# -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; -RENAME TABLE t1 TO test.t1; -SHOW TABLES; -DROP DATABASE mysqltest; -USE test; -SHOW TABLES; -DROP TABLE t1; - -# -# More advanced test -# -create table t1 ( -col1 int not null auto_increment primary key, -col2 varchar(30) not null, -col3 varchar (20) not null, -col4 varchar(4) not null, -col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, -col6 int not null, to_be_deleted int) ENGINE=ndbcluster; ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -insert into t1 values -(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -alter table t1 -add column col4_5 varchar(20) not null after col4, -add column col7 varchar(30) not null after col5, -add column col8 datetime not null, drop column to_be_deleted, -change column col2 fourth varchar(30) not null after col3, -modify column col6 int not null first; ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -delete from t1; -insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -SET SQL_MODE=''; -insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -alter table t1 drop column col4_5; -insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -drop table t1; - - -# -# Check that invalidating dictionary cache works -# - -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412); - -ALTER TABLE t1 ADD COLUMN c int not null; -select * from t1 order by a; - -connection con2; -select * from t1 order by a; -alter table t1 drop c; - -connection con1; -select * from t1 order by a; -drop table t1; - -connection con2; ---error 1146 -select * from t1 order by a; - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -alter table t1 modify column a int not null auto_increment; -SET SQL_MODE=''; -select * from t1 order by a; -INSERT INTO t1 VALUES (0,19),(20,21); -select * from t1 order by a; -drop table t1; - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -alter table t1 add c int not null unique auto_increment; -select c from t1 order by c; -INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); -select c from t1 order by c; -drop table t1; - -## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs -#create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -#engine=ndb; -#insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -#create index c on t1(c); -#connection server2; -#select * from t1 where c = 'two'; -#connection server1; -#alter table t1 drop index c; -#connection server2; -#select * from t1 where c = 'two'; -#connection server1; -#drop table t1; - -#--disable_warnings -#DROP TABLE IF EXISTS t2; -#--enable_warnings - -#create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam; -#let $1=12001; -#disable_query_log; -#while ($1) -#{ -# eval insert into t2 values($1); -# dec $1; -#} -#enable_query_log; -#alter table t2 engine=ndbcluster; -#alter table t2 add c int; -#--error 1297 -#delete from t2; -#to make sure we do a full table scan -#select count(*) from t2 where a+0 > 0; -#truncate table t2; -#select count(*) from t2; -#drop table t2; - -## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs -#connection server1; -#create table t3 (a int primary key) engine=ndbcluster; - -#connection server2; -#begin; -#insert into t3 values (1); - -#connection server1; -#alter table t3 rename t4; - -#connection server2; -## with rbr the below will not work as the "alter" event -## explicitly invalidates the dictionary cache. -### This should work as transaction is ongoing... -##delete from t3; -##insert into t3 values (1); -#commit; - -## This should fail as its a new transaction -#--error 1146 -#select * from t3; -#select * from t4; -#drop table t4; -#show tables; -#connection server1; - -create table t1 ( -ai bigint auto_increment, -c001 int(11) not null, -c002 int(11) not null, -c003 int(11) not null, -c004 int(11) not null, -c005 int(11) not null, -c006 int(11) not null, -c007 int(11) not null, -c008 int(11) not null, -c009 int(11) not null, -c010 int(11) not null, -c011 int(11) not null, -c012 int(11) not null, -c013 int(11) not null, -c014 int(11) not null, -c015 int(11) not null, -c016 int(11) not null, -c017 int(11) not null, -c018 int(11) not null, -c019 int(11) not null, -c020 int(11) not null, -c021 int(11) not null, -c022 int(11) not null, -c023 int(11) not null, -c024 int(11) not null, -c025 int(11) not null, -c026 int(11) not null, -c027 int(11) not null, -c028 int(11) not null, -c029 int(11) not null, -c030 int(11) not null, -c031 int(11) not null, -c032 int(11) not null, -c033 int(11) not null, -c034 int(11) not null, -c035 int(11) not null, -c036 int(11) not null, -c037 int(11) not null, -c038 int(11) not null, -c039 int(11) not null, -c040 int(11) not null, -c041 int(11) not null, -c042 int(11) not null, -c043 int(11) not null, -c044 int(11) not null, -c045 int(11) not null, -c046 int(11) not null, -c047 int(11) not null, -c048 int(11) not null, -c049 int(11) not null, -c050 int(11) not null, -c051 int(11) not null, -c052 int(11) not null, -c053 int(11) not null, -c054 int(11) not null, -c055 int(11) not null, -c056 int(11) not null, -c057 int(11) not null, -c058 int(11) not null, -c059 int(11) not null, -c060 int(11) not null, -c061 int(11) not null, -c062 int(11) not null, -c063 int(11) not null, -c064 int(11) not null, -c065 int(11) not null, -c066 int(11) not null, -c067 int(11) not null, -c068 int(11) not null, -c069 int(11) not null, -c070 int(11) not null, -c071 int(11) not null, -c072 int(11) not null, -c073 int(11) not null, -c074 int(11) not null, -c075 int(11) not null, -c076 int(11) not null, -c077 int(11) not null, -c078 int(11) not null, -c079 int(11) not null, -c080 int(11) not null, -c081 int(11) not null, -c082 int(11) not null, -c083 int(11) not null, -c084 int(11) not null, -c085 int(11) not null, -c086 int(11) not null, -c087 int(11) not null, -c088 int(11) not null, -c089 int(11) not null, -c090 int(11) not null, -c091 int(11) not null, -c092 int(11) not null, -c093 int(11) not null, -c094 int(11) not null, -c095 int(11) not null, -c096 int(11) not null, -c097 int(11) not null, -c098 int(11) not null, -c099 int(11) not null, -c100 int(11) not null, -c101 int(11) not null, -c102 int(11) not null, -c103 int(11) not null, -c104 int(11) not null, -c105 int(11) not null, -c106 int(11) not null, -c107 int(11) not null, -c108 int(11) not null, -c109 int(11) not null, -primary key (ai), -unique key tx1 (c002, c003, c004, c005)) engine=ndb; - -create index tx2 -on t1 (c010, c011, c012, c013); - -drop table t1; - -# End of 4.1 tests - -# On-line alter table - - -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10), - vstring varchar(10), - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('zero','one','two','three','four') not null, - flags set('zero','one','two','three','four') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp, - PRIMARY KEY (auto) -) engine=ndb; - -CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255)); - ---disable_warnings -let $MYSQLD_DATADIR= `select @@datadir`; ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---enable_warnings - -# Ndb doesn't support renaming attributes on-line -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; - -alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---enable_warnings - -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; - -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; - -create index i1 on t1(medium); -alter table t1 add index i2(new_tiny); -drop index i1 on t1; - ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLD_DATADIR/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---exec rm $MYSQLD_DATADIR/test/tmp.dat || true ---enable_warnings - -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; - -DROP TABLE t1, ndb_show_tables; - -# simple test that auto incr is not lost at rename or alter -create table t1 (a int primary key auto_increment, b int) engine=ndb; -insert into t1 (b) values (101),(102),(103); -select * from t1 where a = 3; -alter table t1 rename t2; -insert into t2 (b) values (201),(202),(203); -select * from t2 where a = 6; -alter table t2 add c int; -insert into t2 (b) values (301),(302),(303); -select * from t2 where a = 9; -alter table t2 rename t1; -insert into t1 (b) values (401),(402),(403); -select * from t1 where a = 12; -drop table t1; - -# some other ALTER combinations -# Check add/drop primary key (not supported on-line) -create table t1(a int not null) engine=ndb; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -insert into t1 values (1),(2),(3); -alter table t1 add primary key (a); ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -update t1 set a = 17 where a = 1; -select * from t1 order by a; -alter table t1 drop primary key; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -update t1 set a = 1 where a = 17; -select * from t1 order by a; -drop table t1; - -# bug#31233 mysql_alter_table() fails to drop UNIQUE KEY -create table t1(a int not null) engine=ndb; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -insert into t1 values (1),(2),(3); -create unique index pk on t1(a); ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -update t1 set a = 17 where a = 1; -select * from t1 order by a; -alter table t1 drop index pk; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY -update t1 set a = 1 where a = 17; -select * from t1 order by a; -drop table t1; - -# alter .. alter -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -show create table t1; -alter table t1 alter b set default 1; -show create table t1; -drop table t1; - -# alter .. order by -create table t1 (a int not null, b int not null) engine=ndb; -insert into t1 values (1, 300), (2, 200), (3, 100); -select * from t1 order by a; -alter table t1 order by b; -select * from t1 order by b; -drop table t1; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_alter_table2.test b/mysql-test/suite/ndb/t/ndb_alter_table2.test deleted file mode 100644 index f078ed6b479..00000000000 --- a/mysql-test/suite/ndb/t/ndb_alter_table2.test +++ /dev/null @@ -1,84 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connect (con3,localhost,root,,test); -connect (con4,localhost,root,,test); -connect (con5,localhost,root,,test); -connect (con6,localhost,root,,test); - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -connection con1; -BEGIN; -INSERT INTO t1 VALUES (9410,9412); -connection con2; -BEGIN; ---send -INSERT INTO t1 VALUES (9411,9412); -connection con3; -BEGIN; ---send -INSERT INTO t1 VALUES (9412,9412); -connection con4; -BEGIN; ---send -INSERT INTO t1 VALUES (9413,9412); -connection con5; -BEGIN; ---send -INSERT INTO t1 VALUES (9414,9412); -connection con6; -BEGIN; ---send -INSERT INTO t1 VALUES (9415,9412); -connection con1; -sleep 1; - -ROLLBACK; -connection con2; -reap; -ROLLBACK; -connection con3; -reap; -ROLLBACK; -connection con4; -reap; -ROLLBACK; -connection con5; -reap; -ROLLBACK; -connection con6; -reap; -ROLLBACK; - -connection server2; - -drop table t1; -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL -) ENGINE=ndbcluster; - -connection server1; - ---disable_result_log ---error 0,1412 -select * from t1; ---enable_result_log -select * from t1; -select * from t1; -select * from t1; -select * from t1; -select * from t1; - -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_alter_table3.test b/mysql-test/suite/ndb/t/ndb_alter_table3.test deleted file mode 100644 index 86e664b23b0..00000000000 --- a/mysql-test/suite/ndb/t/ndb_alter_table3.test +++ /dev/null @@ -1,48 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -connection server1; -create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -engine=ndb; -insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -create index c on t1(c); -connection server2; -show indexes from t1; -select * from t1 where c = 'two'; -connection server1; -alter table t1 drop index c; -connection server2; -show indexes from t1; -select * from t1 where c = 'two'; -connection server1; -drop table t1; - -connection server1; -create table t3 (a int primary key) engine=ndbcluster; - -connection server2; -begin; -insert into t3 values (1); - -connection server1; -alter table t3 rename t4; - -connection server2; -# with rbr the below will not work as the "alter" event -# explicitly invalidates the dictionary cache. -## This should work as transaction is ongoing... -#delete from t3; -#insert into t3 values (1); -commit; - -# This should fail as its a new transaction ---error 1146 -select * from t3; -select * from t4; -drop table t4; -show tables; -connection server1; diff --git a/mysql-test/suite/ndb/t/ndb_auto_increment.test b/mysql-test/suite/ndb/t/ndb_auto_increment.test deleted file mode 100644 index 14e7ae7ca7b..00000000000 --- a/mysql-test/suite/ndb/t/ndb_auto_increment.test +++ /dev/null @@ -1,293 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -connection server1; -DROP TABLE IF EXISTS t1,t2; -connection server2; -DROP TABLE IF EXISTS t1; -connection server1; ---enable_warnings - -set @old_auto_increment_offset = @@session.auto_increment_offset; -set @old_auto_increment_increment = @@session.auto_increment_increment; -set @old_ndb_autoincrement_prefetch_sz = @@session.ndb_autoincrement_prefetch_sz; - -flush status; - -create table t1 (a int not null auto_increment primary key) engine ndb; - -# Step 1: Verify simple insert -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 2: Verify simple update with higher than highest value causes -# next insert to use updated_value + 1 -update t1 set a = 5 where a = 1; -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 3: Verify insert that inserts higher than highest value causes -# next insert to use inserted_value + 1 -insert into t1 values (7); -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 4: Verify that insert into hole, lower than highest value doesn't -# affect next insert -insert into t1 values (2); -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 5: Verify that update into hole, lower than highest value doesn't -# affect next insert -update t1 set a = 4 where a = 2; -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 6: Verify that delete of highest value doesn't cause the next -# insert to reuse this value -delete from t1 where a = 10; -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 7: Verify that REPLACE has the same effect as INSERT -replace t1 values (NULL); -select * from t1 order by a; -replace t1 values (15); -select * from t1 order by a; -replace into t1 values (NULL); -select * from t1 order by a; - -# Step 8: Verify that REPLACE has the same effect as UPDATE -replace t1 values (15); -select * from t1 order by a; - -# Step 9: Verify that IGNORE doesn't affect auto_increment -insert ignore into t1 values (NULL); -select * from t1 order by a; -insert ignore into t1 values (15), (NULL); -select * from t1 order by a; - -# Step 10: Verify that on duplicate key as UPDATE behaves as an -# UPDATE -insert into t1 values (15) -on duplicate key update a = 20; -insert into t1 values (NULL); -select * from t1 order by a; - -# Step 11: Verify that on duplicate key as INSERT behaves as INSERT -insert into t1 values (NULL) on duplicate key update a = 30; -select * from t1 order by a; -insert into t1 values (30) on duplicate key update a = 40; -select * from t1 order by a; - -#Step 12: Vefify INSERT IGNORE (bug#32055) -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); -select * from t1 order by a; -drop table t1; - -#Step 13: Verify auto_increment of unique key -create table t1 (a int not null primary key, - b int not null unique auto_increment) engine ndb; -insert into t1 values (1, NULL); -insert into t1 values (3, NULL); -update t1 set b = 3 where a = 3; -insert into t1 values (4, NULL); -select * from t1 order by a; -drop table t1; - -#Step 14: Verify that auto_increment_increment and auto_increment_offset -# work as expected - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM; - -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_offset=5; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_increment=2; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; - -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 3; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 5; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 100; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -#Step 15: Now verify that behaviour on multiple MySQL Servers behave -# properly. Start by dropping table and recreating it to start -# counters and id caches from zero again. ---disable_warnings -connection server2; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -set ndb_autoincrement_prefetch_sz = 32; -drop table if exists t1; -connection server1; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -set ndb_autoincrement_prefetch_sz = 32; ---enable_warnings - - -create table t1 (a int not null auto_increment primary key) engine ndb; -# Basic test, ensure that the second server gets a new range. -#Generate record with key = 1 -insert into t1 values (NULL); -connection server2; -#Generate record with key = 33 -insert into t1 values (NULL); -connection server1; -select * from t1 order by a; - -#This insert should not affect the range of the second server -insert into t1 values (20); -connection server2; -insert into t1 values (NULL); -select * from t1 order by a; - -connection server1; -#This insert should remove cached values but also skip values already -#taken by server2, given that there is no method of communicating with -#the other server it should also cause a conflict -connection server1; - -insert into t1 values (35); -insert into t1 values (NULL); -connection server2; ---error ER_DUP_ENTRY -insert into t1 values (NULL); -select * from t1 order by a; - -insert into t1 values (100); -insert into t1 values (NULL); -connection server1; -insert into t1 values (NULL); -select * from t1 order by a; - -set auto_increment_offset = @old_auto_increment_offset; -set auto_increment_increment = @old_auto_increment_increment; -set ndb_autoincrement_prefetch_sz = @old_ndb_autoincrement_prefetch_sz; - -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_autoinc.test b/mysql-test/suite/ndb/t/ndb_autoinc.test deleted file mode 100644 index a5ae52c88d7..00000000000 --- a/mysql-test/suite/ndb/t/ndb_autoinc.test +++ /dev/null @@ -1,45 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; ---enable_warnings - -USE test; - -CREATE TABLE t1 ( - id INT AUTO_INCREMENT, - PRIMARY KEY(id) -) ENGINE=NDBCLUSTER; - -# Test For bug#30417 ---error 1005 - -CREATE TABLE t2 ( - id INT AUTO_INCREMENT, - KEY(id) -) ENGINE=NDBCLUSTER; - -SHOW TABLES; - -CREATE TABLE t3 ( - id INT AUTO_INCREMENT, - KEY(id) -) ENGINE=MYISAM; - ---disable_result_log ---error 1005 -ALTER TABLE t3 -ENGINE NDBCLUSTER; ---enable_result_log - -SHOW CREATE TABLE t3; - -ALTER TABLE t3 -ADD PRIMARY KEY (id); - -SHOW CREATE TABLE t3; - -DROP TABLE t1, t3; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_basic.test b/mysql-test/suite/ndb/t/ndb_basic.test deleted file mode 100644 index 2fc140288ca..00000000000 --- a/mysql-test/suite/ndb/t/ndb_basic.test +++ /dev/null @@ -1,861 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# workaround for bug#16445 -# remove to reproduce bug and run tests from ndb start -# and with ndb_autodiscover disabled. Fails on Linux 50 % of the times -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; -drop table t1; - -# -# Basic test to show that the NDB -# table handler is working -# - -# -# Show status and variables -# ---replace_column 2 # -SHOW GLOBAL STATUS LIKE 'ndb%'; ---replace_column 2 # -SHOW GLOBAL VARIABLES LIKE 'ndb%'; - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; - -SHOW INDEX FROM t1; -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -SHOW INDEX FROM t1; -SELECT pk1 FROM t1 ORDER BY pk1; -SELECT * FROM t1 ORDER BY pk1; -SELECT t1.* FROM t1 ORDER BY pk1; - -# Update on record by primary key -UPDATE t1 SET attr1=1 WHERE pk1=9410; -SELECT * FROM t1 ORDER BY pk1; - -# Update primary key -UPDATE t1 SET pk1=2 WHERE attr1=1; -SELECT * FROM t1 ORDER BY pk1; -UPDATE t1 SET pk1=pk1 + 1; -SELECT * FROM t1 ORDER BY pk1; -UPDATE t1 SET pk1=4 WHERE pk1 = 3; -SELECT * FROM t1 ORDER BY pk1; - -# Delete the record -DELETE FROM t1; -SELECT * FROM t1; - -# Insert more records and update them all at once -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), -(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); -UPDATE t1 SET attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; - -UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; -SELECT * FROM t1 ORDER BY pk1; - -UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; - -# Delete one record by specifying pk -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1 ORDER BY pk1; - -# Delete all from table -DELETE FROM t1; -SELECT * FROM t1; - -# Insert three records with attr1=4 and two with attr1=5 -# Delete all with attr1=4 -INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); -DELETE FROM t1 WHERE attr1=4; -SELECT * FROM t1 order by pk1; -DELETE FROM t1; - -# Insert two records and delete one -INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1; -DROP TABLE t1; - -# -# Create table without primary key -# a hidden primary key column is created by handler -# -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -INSERT INTO t1 values(3456, 7890); -SELECT * FROM t1; -UPDATE t1 SET id=2 WHERE id2=12; -SELECT * FROM t1; -UPDATE t1 SET id=1234 WHERE id2=7890; -SELECT * FROM t1; -DELETE FROM t1; - -INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); -SELECT * FROM t1 ORDER BY id; -DELETE FROM t1 WHERE id = 3456; -SELECT * FROM t1 ORDER BY id; - -DROP TABLE t1; - -# test create with the keyword "engine=NDBCLUSTER" -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=NDBCLUSTER; - -INSERT INTO t1 values(1, 9999); - -DROP TABLE t1; - -# test create with the keyword "engine=NDB" -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=NDB; - -INSERT INTO t1 values(1, 9999); - -DROP TABLE t1; - - -# -# A more extensive test with a lot more records -# - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -CREATE TABLE t3 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned, - PRIMARY KEY(a) -) engine=ndbcluster; - -CREATE TABLE t4 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - - -# -# insert more records into tables -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -enable_query_log; - - -# -# delete every other record in the tables -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval delete from t2 where a=$1; - eval delete from t3 where a=$1; - eval delete from t4 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - - -select * from t2 where a = 7 order by b; -select * from t2 where a = 7 order by a; -select * from t2 where a = 7 order by 2; -select * from t2 where a = 7 order by c; - -select * from t2 where a = 7 and b = 16 order by b; -select * from t2 where a = 7 and b = 16 order by a; -select * from t2 where a = 7 and b = 17 order by a; -select * from t2 where a = 7 and b != 16 order by b; - -select * from t2 where a = 7 and b = 16 and c = 5 order by b; -select * from t2 where a = 7 and b = 16 and c = 5 order by a; -select * from t2 where a = 7 and b = 16 and c = 6 order by a; -select * from t2 where a = 7 and b != 16 and c = 5 order by b; - -select * from t3 where a = 7 order by b; -select * from t3 where a = 7 order by a; -select * from t3 where a = 7 order by 2; -select * from t3 where a = 7 order by c; - -select * from t3 where a = 7 and b = 16 order by b; -select * from t3 where a = 7 and b = 16 order by a; -select * from t3 where a = 7 and b = 17 order by a; -select * from t3 where a = 7 and b != 16 order by b; - -select * from t4 where a = 7 order by b; -select * from t4 where a = 7 order by a; -select * from t4 where a = 7 order by 2; -select * from t4 where a = 7 order by c; - -select * from t4 where a = 7 and b = 16 order by b; -select * from t4 where a = 7 and b = 16 order by a; -select * from t4 where a = 7 and b = 17 order by a; -select * from t4 where a = 7 and b != 16 order by b; - -# -# update records -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - -delete from t2 where a > 5; -select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; -select a, b FROM t2 outer_table where -a = (select a from t2 where b = outer_table.b ) order by a; - - -delete from t2; -delete from t3; -delete from t4; - -drop table t2; -drop table t3; -drop table t4; - -# -# Test delete and update from table with 3 keys -# - -CREATE TABLE t5 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - -insert into t5 values(10, 19, 5, 26010); - -delete from t5 where a=10 and b=19 and c=5; - -select * from t5; - -insert into t5 values(10, 19, 5, 26010); - -update t5 set d=21997 where a=10 and b=19 and c=5; - -select * from t5; - -delete from t5; - -drop table t5; - -# -# Test using table with a char(255) column first in table -# - -CREATE TABLE t6 ( - adress char(255), - a int NOT NULL PRIMARY KEY, - b int -) engine = NDB; - -insert into t6 values - ("Nice road 3456", 1, 23), - ("Street Road 78", 3, 92), - ("Road street 89C", 5, 71), - (NULL, 7, NULL); -select * from t6 order by a; -select a, b from t6 order by a; - -update t6 set adress="End of road 09" where a=3; -update t6 set b=181, adress="Street 76" where a=7; -select * from t6 order by a; -select * from t6 where a=1; -delete from t6 where a=1; -select * from t6 order by a; -delete from t6 where b=71; -select * from t6 order by a; - -drop table t6; - -# -# Test using table with a char(255) column first in table and a -# primary key consisting of two columns -# - -CREATE TABLE t7 ( - adress char(255), - a int NOT NULL, - b int, - c int NOT NULL, - PRIMARY KEY(a, c) -) engine = NDB; - -insert into t7 values - ("Highway 3456", 1, 23, 2), - ("Street Road 78", 3, 92, 3), - ("Main street 89C", 5, 71, 4), - (NULL, 8, NULL, 12); -select * from t7 order by a; -select a, b from t7 order by a; - -update t7 set adress="End of road 09" where a=3; -update t7 set adress="Gatuvägen 90C" where a=5 and c=4; -update t7 set adress="No adress" where adress is NULL; -select * from t7 order by a; -select * from t7 where a=1 and c=2; -delete from t7 where a=1; -delete from t7 where a=3 and c=3; -delete from t7 where a=5 and c=4; -select * from t7; -delete from t7 where b=23; -select * from t7; - -drop table t7; - -# -# Test multiple databases in one statement -# - -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); - -create database mysqltest; -use mysqltest; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -insert into t2 select pk1,attr1,attr2 from test.t1; -select * from t2 order by a; -select b from test.t1, t2 where c = test.t1.attr2; -select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; - -drop table test.t1, t2; -drop database mysqltest; - -# -# BUG#6031 - DROP DATABASE doesn't drop database on first try -# - ---disable_warnings -drop database if exists ndbtest1; ---enable_warnings - -create database ndbtest1; -use ndbtest1; -create table t1(id int) engine=ndbcluster; -drop database ndbtest1; ---error 1008 -drop database ndbtest1; - -# -# test support of char(0) -# - -use test; -create table t1 (a int primary key, b char(0)); -insert into t1 values (1,""); -insert into t1 values (2,NULL); -select * from t1 order by a; -select * from t1 order by b; -select * from t1 where b IS NULL; -select * from t1 where b IS NOT NULL; -drop table t1; - -# -# test the limit of no of attributes in one table -# -# also tests bug#17179, more than 31 attributes in -# a partitioned table -# -create table t1 ( -c1 int, -c2 int, -c3 int, -c4 int, -c5 int, -c6 int, -c7 int, -c8 int, -c9 int, -c10 int, -c11 int, -c12 int, -c13 int, -c14 int, -c15 int, -c16 int, -c17 int, -c18 int, -c19 int, -c20 int, -c21 int, -c22 int, -c23 int, -c24 int, -c25 int, -c26 int, -c27 int, -c28 int, -c29 int, -c30 int, -c31 int, -c32 int, -c33 int, -c34 int, -c35 int, -c36 int, -c37 int, -c38 int, -c39 int, -c40 int, -c41 int, -c42 int, -c43 int, -c44 int, -c45 int, -c46 int, -c47 int, -c48 int, -c49 int, -c50 int, -c51 int, -c52 int, -c53 int, -c54 int, -c55 int, -c56 int, -c57 int, -c58 int, -c59 int, -c60 int, -c61 int, -c62 int, -c63 int, -c64 int, -c65 int, -c66 int, -c67 int, -c68 int, -c69 int, -c70 int, -c71 int, -c72 int, -c73 int, -c74 int, -c75 int, -c76 int, -c77 int, -c78 int, -c79 int, -c80 int, -c81 int, -c82 int, -c83 int, -c84 int, -c85 int, -c86 int, -c87 int, -c88 int, -c89 int, -c90 int, -c91 int, -c92 int, -c93 int, -c94 int, -c95 int, -c96 int, -c97 int, -c98 int, -c99 int, -c100 int, -c101 int, -c102 int, -c103 int, -c104 int, -c105 int, -c106 int, -c107 int, -c108 int, -c109 int, -c110 int, -c111 int, -c112 int, -c113 int, -c114 int, -c115 int, -c116 int, -c117 int, -c118 int, -c119 int, -c120 int, -c121 int, -c122 int, -c123 int, -c124 int, -c125 int, -c126 int, -c127 int, -c128 int, -primary key using hash(c1)) engine=ndb partition by key(c1); -drop table t1; - -# -# test max size of attribute name and truncation -# - -create table t1 ( -a1234567890123456789012345678901234567890 int primary key, -a12345678901234567890123456789a1234567890 int, -index(a12345678901234567890123456789a1234567890) -) engine=ndb; -show tables; -insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); ---replace_column 9 # -explain select * from t1 where a12345678901234567890123456789a1234567890=2; -select * from t1 where a12345678901234567890123456789a1234567890=2; -drop table t1; - -# -# test fragment creation -# -# first a table with _many_ fragments per node group -# then a table with just one fragment per node group -# -create table t1 - (a bigint, b bigint, c bigint, d bigint, - primary key (a,b,c,d)) - engine=ndb - max_rows=800000000; -insert into t1 values - (1,2,3,4),(2,3,4,5),(3,4,5,6), - (3,2,3,4),(1,3,4,5),(2,4,5,6), - (1,2,3,5),(2,3,4,8),(3,4,5,9), - (3,2,3,5),(1,3,4,8),(2,4,5,9), - (1,2,3,6),(2,3,4,6),(3,4,5,7), - (3,2,3,6),(1,3,4,6),(2,4,5,7), - (1,2,3,7),(2,3,4,7),(3,4,5,8), - (3,2,3,7),(1,3,4,7),(2,4,5,8), - (1,3,3,4),(2,4,4,5),(3,5,5,6), - (3,3,3,4),(1,4,4,5),(2,5,5,6), - (1,3,3,5),(2,4,4,8),(3,5,5,9), - (3,3,3,5),(1,4,4,8),(2,5,5,9), - (1,3,3,6),(2,4,4,6),(3,5,5,7), - (3,3,3,6),(1,4,4,6),(2,5,5,7), - (1,3,3,7),(2,4,4,7),(3,5,5,8), - (3,3,3,7),(1,4,4,7),(2,5,5,8); -select count(*) from t1; -drop table t1; - -create table t1 - (a bigint, b bigint, c bigint, d bigint, - primary key (a)) - engine=ndb - max_rows=1; -drop table t1; - -# -# Test auto_increment -# - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -create table t1 - (counter int(64) NOT NULL auto_increment, - datavalue char(40) default 'XXXX', - primary key (counter) - ) ENGINE=ndbcluster; - -connection con1; -insert into t1 (datavalue) values ('newval'); -insert into t1 (datavalue) values ('newval'); -select * from t1 order by counter; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -connection con2; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; - -drop table t1; - -# -# bug#27437 -connection con1; -create table t1 (a int primary key auto_increment) engine = ndb; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -connection con2; -insert into t1(a) values (20),(28); -connection con1; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -connection con2; -insert into t1() values (21), (22); -connection con1; - -drop table t1; - -# -# BUG#14514 Creating table with packed key fails silently -# - -CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; -select * from t1; -drop table t1; - -# -# Bug #17249 delete statement with join where clause fails -# when table do not have pk - # - -create table t1 (a int) engine=ndb; -create table t2 (a int) engine=ndb; -insert into t1 values (1); -insert into t2 values (1); -delete t1.* from t1, t2 where t1.a = t2.a; -select * from t1; -select * from t2; -drop table t1; -drop table t2; - -# -# Bug #17257 update fails for inner joins if tables -# do not have Primary Key -# - -CREATE TABLE t1 ( - i INT, - j INT, - x INT, - y INT, - z INT -) engine=ndb; - -CREATE TABLE t2 ( - i INT, - k INT, - x INT, - y INT, - z INT -) engine=ndb; - -CREATE TABLE t3 ( - j INT, - k INT, - x INT, - y INT, - z INT -) engine=ndb; - -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); - -UPDATE t1 AS a -INNER JOIN t2 AS b - ON a.i = b.i -INNER JOIN t3 AS c - ON a.j = c.j AND b.k = c.k -SET a.x = b.x, - a.y = b.y, - a.z = ( - SELECT sum(z) - FROM t3 - WHERE y = 34 - ) -WHERE b.x = 23; -select * from t1; -drop table t1; -drop table t2; -drop table t3; - -# End of 4.1 tests - -# -# Test long table name -# -create table atablewithareallylongandirritatingname (a int); -insert into atablewithareallylongandirritatingname values (2); -select * from atablewithareallylongandirritatingname; -drop table atablewithareallylongandirritatingname; - -# -# Bug#15682 -# -create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; -insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from t1 order by f1; -select * from t1 order by f2; -select * from t1 order by f3; -drop table t1; -# Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror -# - -# As long there is no error code 1186 defined by NDB -# we should get a message "Illegal ndb error code: 1186" ---error 1 ---exec $MY_PERROR --ndb 1186 2>&1 - -# -# Bug #25746 - VARCHAR UTF8 PK issue -# - prior to bugfix 4209, illegal length parameter would be -# returned in SELECT * - -CREATE TABLE t1 ( -a VARBINARY(40) NOT NULL, -b VARCHAR (256) CHARACTER SET UTF8 NOT NULL, -c VARCHAR(256) CHARACTER SET UTF8 NOT NULL, -PRIMARY KEY (b,c)) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc"); -SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; - -# delete -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t2 values (1,10), (2,20), (3,30); -select * from t1 order by a; -delete from t1 where a > 0 order by a desc limit 1; -select * from t1 order by a; -delete from t1,t2 using t1,t2 where t1.a = t2.a; -select * from t2 order by a; -drop table t1,t2; - -# insert ignore -create table t1 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); ---error ER_DUP_ENTRY -insert into t1 set a=1, b=100; -insert ignore into t1 set a=1, b=100; -select * from t1 order by a; -insert into t1 set a=1, b=1000 on duplicate key update b=b+1; -select * from t1 order by a; -drop table t1; - -# update -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,10), (2,10), (3,30), (4, 30); -insert into t2 values (1,10), (2,10), (3,30), (4, 30); ---error ER_DUP_ENTRY -update t1 set a = 1 where a = 3; -select * from t1 order by a; -update t1 set b = 1 where a > 1 order by a desc limit 1; -select * from t1 order by a; ---error ER_DUP_ENTRY -update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -drop table t1,t2; - -# -# Bug#31635 -# -create table t1 (a varchar(100) primary key, b varchar(100)) engine = NDB; -insert into t1 values - ('a', 'a'),('b','b'),('c', 'c'),('aa', 'aa'),('bb', 'bb'),('cc', 'cc'); -replace into t1 values ('a', '-a'); -replace into t1 values ('b', '-b'); -replace into t1 values ('c', '-c'); - -replace into t1 values ('aa', '-aa'); -replace into t1 values ('bb', '-bb'); -replace into t1 values ('cc', '-cc'); - -replace into t1 values ('aaa', '-aaa'); -replace into t1 values ('bbb', '-bbb'); -replace into t1 values ('ccc', '-ccc'); -select * from t1 order by 1,2; -drop table t1; - ---echo End of 5.0 tests - -# -# Bug #18483 Cannot create table with FK constraint -# ndb does not support foreign key constraint, it is silently ignored -# in line with other storage engines -# -CREATE TABLE t1 (a VARCHAR(255) NOT NULL, - CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; -CREATE TABLE t2(a VARCHAR(255) NOT NULL, - b VARCHAR(255) NOT NULL, - c VARCHAR(255) NOT NULL, - CONSTRAINT pk_b_c_id PRIMARY KEY (b,c), - CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb; -drop table t1, t2; - -# bug#24301 -create table t1 (a int not null primary key, b int) engine=ndb; -insert into t1 values(1,1),(2,2),(3,3); -create table t2 like t1; -insert into t2 select * from t1; -select * from t1 order by a; -select * from t2 order by a; -drop table t1, t2; - -# create table if not exists ---disable_warnings -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; ---enable_warnings - -# create like -create table t2 like t1; - -# multi rename -rename table t1 to t10, t2 to t20; -drop table t10,t20; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_binlog_basic.test b/mysql-test/suite/ndb/t/ndb_binlog_basic.test deleted file mode 100644 index 4d8b7a8b127..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_basic.test +++ /dev/null @@ -1,80 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -drop table if exists t1, t2; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -drop database mysqltest; -use test; ---enable_warnings - -# -# basic insert, update, delete test, alter, rename, drop -# check that ndb_binlog_index gets the right info -# - -create table t1 (a int primary key) engine=ndb; -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -save_master_pos; ---replace_column 1 # -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; - -delete from t1; -alter table t1 add (b int); -insert into t1 values (3,3),(4,4); -alter table t1 rename t2; - -# get all in one epoch -begin; -insert into t2 values (1,1),(2,2); -update t2 set b=1 where a=3; -delete from t2 where a=4; -commit; -drop table t2; - -# check that above is ok -# (save_master_pos waits for last gcp to complete, ensuring that we have -# the expected data in the binlog) -save_master_pos; -select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5; -select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5; -select inserts,updates,deletes from - mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0; - -# -# check that purge clears the ndb_binlog_index -# -# TODO: make this deterministic -# This test is disabled until we can make this determistic under load. -# The problem is that in some cases, the binlog writing thread gets -# scheduled after the purge, writes pending things, then the select -# gets scheduled -# -flush logs; ---sleep 1 -purge master logs before now(); ---disable_parsing -select count(*) from mysql.ndb_binlog_index; ---enable_parsing - -# -# several tables in different databases -# check that same table name in different databases don't mix up -# -create table t1 (a int primary key, b int) engine=ndb; -create database mysqltest; -use mysqltest; -create table t1 (c int, d int primary key) engine=ndb; -use test; - -insert into mysqltest.t1 values (2,1),(2,2); -save_master_pos; ---replace_column 1 # -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; - -drop table t1; -drop database mysqltest; -select inserts,updates,deletes from - mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test b/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test deleted file mode 100644 index a70dbe2011f..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test +++ /dev/null @@ -1,190 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -connection server2; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -connection server1; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; ---connection server1 -reset master; ---connection server2 -reset master; ---enable_warnings - -# -# basic test to see if ddl distribution works across -# multiple binlogs -# - -# create database ---connection server1 -create database mysqltest; - -# create table ---connection server1 -use mysqltest; -create table t1 (a int primary key) engine=ndb; - ---connection server2 -create table t2 (a int primary key) engine=ndb; ---source include/show_binlog_events2.inc - ---connection server1 ---source include/show_binlog_events2.inc - -# alter table ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server2 -alter table t2 add column (b int); - ---connection server1 ---source include/show_binlog_events2.inc - -# alter database ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server2 -ALTER DATABASE mysqltest CHARACTER SET latin1; - - -# having drop here instead of below sometimes triggers bug#18976 -## drop table and drop should come after data events ---connection server2 -drop table mysqltest.t1; - ---connection server1 ---source include/show_binlog_events2.inc -# to track down bug#18976 ---real_sleep 10 ---source include/show_binlog_events2.inc - -#--connection server2 -#drop table mysqltest.t1; - -# drop database and drop should come after data events ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server1 -use test; -insert into t2 values (1,2); -drop database mysqltest; -create table t1 (a int primary key) engine=ndb; - ---connection server2 ---source include/show_binlog_events2.inc - ---connection server2 -drop table t2; - -# logfile groups and table spaces ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server1 -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 -ENGINE = NDB; - -DROP LOGFILE GROUP lg1 -ENGINE =NDB; - -# having drop here instead of below sometimes triggers bug#18976 -#drop table t1; - ---connection server2 ---source include/show_binlog_events2.inc -# to track down bug#18976 ---real_sleep 10 ---source include/show_binlog_events2.inc - -drop table t1; - -# -# Bug #17827 cluster: rename of several tables in one statement, -# gets multiply logged -# ---connection server1 -reset master; -show tables; ---connection server2 -reset master; -show tables; - ---connection server1 -create table t1 (a int key) engine=ndb; -create table t2 (a int key) engine=ndb; -create table t3 (a int key) engine=ndb; -rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; ---connection server2 ---source include/show_binlog_events2.inc - -drop table t1; -drop table t2; -drop table t3; - -# -# Bug #17838 binlog not setup on seconday master after rename -# -# ---connection server1 -reset master; -show tables; ---connection server2 -reset master; -show tables; - ---connection server1 -create table t1 (a int key) engine=ndb; -insert into t1 values(1); -rename table t1 to t2; -insert into t2 values(2); - -# now we should see data in table t1 _and_ t2 -# prior to bug fix, data was missing for t2 ---connection server2 -drop table t2; ---source include/show_binlog_events2.inc diff --git a/mysql-test/suite/ndb/t/ndb_binlog_discover.test b/mysql-test/suite/ndb/t/ndb_binlog_discover.test deleted file mode 100644 index dc8275a8a39..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_discover.test +++ /dev/null @@ -1,36 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Bug #14516 Restart of cluster can cause NDB API replication failure -# -create table t1 (a int key) engine=ndb; -reset master; ---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null ---exec $NDB_MGM --no-defaults -e "all start" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null - ---disable_query_log -let $mysql_errno= 1; -while ($mysql_errno) -{ - # Table t1 is readonly until the mysqld has reconnected properly - --error 0,1036,1296 - insert into t1 values(1); - if ($mysql_errno) - { - --sleep 0.1 - } -} ---enable_query_log - ---source include/show_binlog_events2.inc -PURGE MASTER LOGS TO 'mysqld-bin.000002'; - ---source include/show_binlog_events2.inc -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_format.test b/mysql-test/suite/ndb/t/ndb_binlog_format.test deleted file mode 100644 index e240a33a20e..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_format.test +++ /dev/null @@ -1,35 +0,0 @@ -# -# test different behavior of ndb using different binlog formats -# - --- source include/have_blackhole.inc --- source include/have_ndb.inc --- source include/have_log_bin.inc - -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); - ---disable_warnings -drop table if exists t1, t2, t3; ---enable_warnings - -# -# Bug #29222 Statement mode replicates both statement and -# rows when writing to an NDB table -# -CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM; -CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE; -CREATE TABLE t3 (e INT, f INT) ENGINE=NDB; -RESET MASTER; -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c; -# A transaction here is not necessary, but I wanted to group the bad statements -START TRANSACTION; -INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f; -UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c; -COMMIT; ---source include/show_binlog_events.inc -DROP TABLE t1, t2, t3; - diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt deleted file mode 100644 index e3947c0eeed..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-ignore-db=mysqltest diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test deleted file mode 100644 index 013df54a76a..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test +++ /dev/null @@ -1,16 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc -reset master; - ---disable_warnings -drop table if exists t1; -drop database if exists mysqltest; ---enable_warnings - -create database mysqltest; -use mysqltest; -create table t1 (a int primary key, b int) engine=ndb; -insert into t1 values (1, 1); --- source include/show_binlog_events2.inc - -drop database mysqltest; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test b/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test deleted file mode 100644 index 75ac766fd25..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test +++ /dev/null @@ -1,49 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -connection server2; -drop table if exists t1,t2,t3; -reset master; -connection server1; -drop table if exists t1,t2,t3; -reset master; ---enable_warnings - -# basic SQL_LOG_BIN functionality -# see updates from one thread but not the other -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); -# do some stuff with SQL_LOG_BIN=0 -connection con2; -set SQL_LOG_BIN=0; -create database mysqltest; -use mysqltest; -create table t1 (a int key, b int) engine=ndb; -create table t2 (a int key, b int) engine=ndb; -insert into t1 values (1,1); -alter table t1 add c int; -# we should not see it in the local server --- source include/show_binlog_events2.inc -reset master; -# we should not see it in another server -connection server2; -use mysqltest; -insert into t2 values (1,1); --- source include/show_binlog_events2.inc -reset master; -# but if you do stuff in "default" client setting -connection con1; -use mysqltest; -drop table t1; -drop table t2; -create table t1 (d int key, e int) engine=ndb; -create table t2 (d int key, e int) engine=ndb; -insert into t1 values (1,1); --- source include/show_binlog_events2.inc -# and in another server -connection server2; -use mysqltest; -insert into t2 values (1,1); --- source include/show_binlog_events2.inc -drop database mysqltest; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_multi.test b/mysql-test/suite/ndb/t/ndb_binlog_multi.test deleted file mode 100644 index c39034c71f6..00000000000 --- a/mysql-test/suite/ndb/t/ndb_binlog_multi.test +++ /dev/null @@ -1,82 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -connection server2; -drop table if exists t1,t2,t3; -connection server1; -drop table if exists t1,t2,t3; ---enable_warnings - -# Dummy table create/drop to avoid a race where table is created -# before event subscription is set up, causing test failure (BUG#20677). -connection server2; -CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; -connection server1; -DROP TABLE t3; - -# reset for test -connection server1; -reset master; -connection server2; -reset master; - -# -# basic test to see if one server sees the table from the other -# and sets up the replication correctly -# - -# create table on the other server -connection server2; -CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; - -# insert something on server2 -INSERT INTO t2 VALUES (1,1),(2,2); -# verify that we get the data in the binlog ---source include/show_binlog_events2.inc -select * from t2 order by a; ---replace_column 1 -SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -let $the_epoch= `SELECT @the_epoch`; - -# see if we got something on server1 -connection server1; -SELECT * FROM t2 ORDER BY a; -# doing drop table will ensure that all the events have been received -DROP TABLE t2; -# verify thar we have table and data in binlog ---source include/show_binlog_events2.inc ---replace_result $the_epoch -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch=$the_epoch; - -# reset for next test -connection server1; -reset master; -connection server2; -reset master; - -# single schema ops will not show -connection server2; -CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; -INSERT INTO t1 VALUES (1),(2); ---source include/show_binlog_events2.inc ---replace_column 1 -SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -let $the_epoch2= `SELECT @the_epoch2`; - ---replace_result $the_epoch $the_epoch2 -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; - -# now see that we have the events on the other server -connection server2; -# doing drop table will ensure that all the events have been received -drop table t1; -# verify thar we have table and data in binlog ---source include/show_binlog_events2.inc ---replace_result $the_epoch $the_epoch2 -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; diff --git a/mysql-test/suite/ndb/t/ndb_bitfield.test b/mysql-test/suite/ndb/t/ndb_bitfield.test deleted file mode 100644 index de0ae23bfe6..00000000000 --- a/mysql-test/suite/ndb/t/ndb_bitfield.test +++ /dev/null @@ -1,124 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 ( - pk1 int not null primary key, - b bit(64) -) engine=ndbcluster; - -show create table t1; -insert into t1 values -(0,b'1111111111111111111111111111111111111111111111111111111111111111'), -(1,b'1000000000000000000000000000000000000000000000000000000000000000'), -(2,b'0000000000000000000000000000000000000000000000000000000000000001'), -(3,b'1010101010101010101010101010101010101010101010101010101010101010'), -(4,b'0101010101010101010101010101010101010101010101010101010101010101'); -select hex(b) from t1 order by pk1; -drop table t1; - -create table t1 ( - pk1 int not null primary key, - b bit(9) -) engine=ndbcluster; -insert into t1 values -(0,b'000000000'), -(1,b'000000001'), -(2,b'000000010'), -(3,b'000000011'), -(4,b'000000100'); -select hex(b) from t1 order by pk1; -update t1 set b = b + b'101010101'; -select hex(b) from t1 order by pk1; -drop table t1; - -create table t1 (a bit(7), b bit(9)) engine = ndbcluster; -insert into t1 values -(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), -(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), -(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), -(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), -(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), -(44, 307), (68, 454), (57, 135); -select a+0 from t1 order by a; -select b+0 from t1 order by b; -drop table t1; - -create table t1 ( - dummyKey INTEGER NOT NULL, - a001 TINYINT, - a010 TINYINT, - a012 TINYINT, - a015 TINYINT, - a016 TINYINT, - a017 TINYINT, - a019 TINYINT, - a029 TINYINT, - a030 TINYINT, - a031 TINYINT, - a032 TINYINT, - a042 TINYINT, - a043 TINYINT, - a044 TINYINT, - a3001 TINYINT, - a3002 TINYINT, - a3003 TINYINT, - a3004 TINYINT, - a3005 TINYINT, - a3021 TINYINT, - a3022 TINYINT, - a BIT(6), - b BIT(6), - c BIT(6), - d TINYINT, - e TINYINT, - f TINYINT, - g TINYINT, - h TINYINT, - i TINYINT, - j TINYINT, - k TINYINT, - l TINYINT, - m TINYINT, - n TINYINT, - o TINYINT, - a034 TINYINT, -PRIMARY KEY USING HASH (dummyKey) ) engine=ndb; -INSERT INTO `t1` VALUES -(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1), -(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1), -(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1), -(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); ---exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1 -drop table t1; - ---error 1005 -create table t1 ( - pk1 bit(9) not null primary key, - b int -) engine=ndbcluster; -show warnings; - ---error 1005 -create table t1 ( - pk1 int not null primary key, - b bit(9), - key(b) -) engine=ndbcluster; -show warnings; - -# bug#16125 -create table t1 ( - pk1 int primary key, - b bit(32) not null -) engine=ndbcluster; - -insert into t1 values (1,1); -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_blob.test b/mysql-test/suite/ndb/t/ndb_blob.test deleted file mode 100644 index 0388913df8b..00000000000 --- a/mysql-test/suite/ndb/t/ndb_blob.test +++ /dev/null @@ -1,519 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; -drop database if exists test2; ---enable_warnings - -# -# Minimal NDB blobs test. -# -# On NDB API level there is an extensive test program "testBlobs". -# A prerequisite for this handler test is that "testBlobs" succeeds. -# - -# -- general test starts -- - -# make test harder with autocommit off -set autocommit=0; - -create table t1 ( - a int not null primary key, - b text not null, - c int not null, - d longblob, - key (c) -) engine=ndbcluster; - -# -- values -- - -# x0 size 256 (current inline size) -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 (blob part aligned) -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - -# -- pk ops -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where a = 1; - -# pk read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; - -# pk update -update t1 set b=@b2,d=@d2 where a=1; -update t1 set b=@b1,d=@d1 where a=2; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; - -# pk update -update t1 set b=concat(b,b),d=concat(d,d) where a=1; -update t1 set b=concat(b,b),d=concat(d,d) where a=2; -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; - -# pk update to null -update t1 set d=null where a=1; -commit; -select a from t1 where d is null; - -# bug#24028 - does not occur on MySQL level -# bug#17986 - not seen by us anymore but could show as warning here -delete from t1 where a=45567; -commit; - -# pk delete -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; - -# -- replace ( bug-6018 ) -- - -# insert -replace t1 set a=1,b=@b1,c=111,d=@d1; -replace t1 set a=2,b=@b2,c=222,d=@d2; -commit; ---replace_column 9 # -explain select * from t1 where a = 1; - -# pk read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; - -# update -replace t1 set a=1,b=@b2,c=111,d=@d2; -replace t1 set a=2,b=@b1,c=222,d=@d1; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; - -# update -replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2); -replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; - -# update to null -replace t1 set a=1,b='xyz',c=111,d=null; -commit; -select a,b from t1 where d is null; - -# pk delete -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; - -# -- hash index ops -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where c = 111; - -# hash key read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=111; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=222; - -# hash key update -update t1 set b=@b2,d=@d2 where c=111; -update t1 set b=@b1,d=@d1 where c=222; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=111; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=222; - -# hash key update to null -update t1 set d=null where c=111; -commit; -select a from t1 where d is null; - -# hash key delete -delete from t1 where c=111; -delete from t1 where c=222; -commit; -select count(*) from t1; - -# -- table scan ops, short values -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; ---replace_column 9 # -explain select * from t1; - -# table scan read -select * from t1 order by a; - -# table scan update -update t1 set b=concat(a,'x',b),d=concat(a,'x',d); -commit; -select * from t1 order by a; - -# table scan delete -delete from t1; -commit; -select count(*) from t1; - -# -- table scan ops, long values -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1; - -# table scan read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; - -# table scan update -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 order by a; - -# table scan delete -delete from t1; -commit; -select count(*) from t1; - -# -- range scan ops, short values -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; ---replace_column 9 # -explain select * from t1 where c >= 100 order by a; - -# range scan read -select * from t1 where c >= 100 order by a; - -# range scan update -update t1 set b=concat(a,'x',b),d=concat(a,'x',d) -where c >= 100; -commit; -select * from t1 where c >= 100 order by a; - -# range scan delete -delete from t1 where c >= 100; -commit; -select count(*) from t1; - -# -- range scan ops, long values -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where c >= 100 order by a; - -# range scan read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c >= 100 order by a; - -# range scan update -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where c >= 100 order by a; - -# range scan delete -delete from t1 where c >= 100; -commit; -select count(*) from t1; - -# -- rollback -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -# 626 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 0; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 2; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -rollback; -select count(*) from t1; - -# -- alter table and multi db -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; - -select * from t1 order by a; -alter table t1 add x int; -select * from t1 order by a; -alter table t1 drop x; -select * from t1 order by a; - -create database test2; -use test2; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -insert into t2 values (1,1,1),(2,2,2); -select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; - -drop table t2; -use test; - -select * from t1 order by a; -alter table t1 add x int; -select * from t1 order by a; -alter table t1 drop x; -select * from t1 order by a; - -# -- end general test -- - -drop table t1; -drop database test2; - -# -- bug-5252 tinytext crashes + no-commit result + replace -- - -set autocommit=0; -create table t1 ( - a int not null primary key, - b tinytext -) engine=ndbcluster; - -insert into t1 values(1, 'x'); -update t1 set b = 'y'; -select * from t1; -delete from t1; -select * from t1; -commit; -replace t1 set a=2, b='y'; -select * from t1; -delete from t1; -select * from t1; -drop table t1; - -# -- bug-5013 insert empty string to text -- - -set autocommit=0; -create table t1 ( - a int not null primary key, - b text not null -) engine=ndbcluster; - -insert into t1 values(1, ''); -select * from t1; -commit; -drop table t1; - -# -- bug #5349 -- -set autocommit=1; -use test; -CREATE TABLE t1 ( - a int, - b text, - PRIMARY KEY (a) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES -(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); -INSERT INTO t1 VALUES -(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'); - -select * from t1 order by a; -alter table t1 engine=ndb; -select * from t1 order by a; - -# -- bug #5872 -- -set autocommit=1; -alter table t1 engine=myisam; -select * from t1 order by a; -drop table t1; - -# -- bug #7340 -- -create table t1 ( - id int(11) unsigned primary key NOT NULL auto_increment, - msg text NOT NULL -) engine=ndbcluster default charset=utf8; -insert into t1 (msg) values( -'Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel.'); -select * from t1; -drop table t1; - -# -- bug #19201 -create table t1 ( - a int primary key not null auto_increment, - b text -) engine=ndbcluster; ---disable_query_log -set autocommit=1; -# more rows than batch size (64) -# for this bug no blob parts would be necessary -let $1 = 500; -while ($1) -{ - insert into t1 (b) values (repeat('x',4000)); - dec $1; -} ---enable_query_log -select count(*) from t1; -truncate t1; -select count(*) from t1; -drop table t1; - -# -- bug#19956 - var* key, complex key - -create table t1 ( - a varchar(40) not null, - b mediumint not null, - t text, - c varchar(2) not null, - d bigint not null, - primary key (a,b,c), - key (c,a), - unique key (d) -) engine=ndb; - ---disable_query_log -set @s1 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s2 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s3 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; -set @v1 = repeat(@s1,123); -set @v2 = repeat(@s2,234); -set @v3 = repeat(@s3,345); -set @v4 = NULL; ---enable_query_log - -insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1); -insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2); -insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3); -insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4); -select a,b,c,d,sha1(t) from t1 order by c,a; - -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a'; -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b'; - -update t1 set t=@v4 where a='b' and b=1110 and c='a'; -update t1 set t=@v2 where a='b' and b=1110 and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v2 where d=2; -update t1 set t=@v4 where d=4; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v4 where a='b' and c='a'; -update t1 set t=@v2 where a='b' and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v2 where b+d=1112; -update t1 set t=@v4 where b+d=1114; -select a,b,c,d,sha1(t) from t1 order by c,a; - -delete from t1 where a='a' and b=1110 and c='a'; -delete from t1 where a='b' and c='a'; -delete from t1 where d=3; -delete from t1 where b+d=1114; -select count(*) from t1; - -drop table t1; - -# End of 4.1 tests - - -# bug # 30674 : -# NOT NULL Blobs should default to zero-length. Not NULL TEXT -# should default to zero-chars -create table t1( - a int, - blob_nn blob not null, - text_nn text not null, - blob_nl blob, - text_nl text, - primary key(a) -) engine=ndb; - -insert into t1(a) values (1); -insert into t1(a, text_nl) values (2, 'MySQL Cluster NDB'); - -select a, length(blob_nn), length(text_nn), blob_nl, text_nl from t1 order by a; - -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_blob_partition.test b/mysql-test/suite/ndb/t/ndb_blob_partition.test deleted file mode 100644 index 35df57b96ba..00000000000 --- a/mysql-test/suite/ndb/t/ndb_blob_partition.test +++ /dev/null @@ -1,97 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Minimal NDB blobs test with range partitions. -# - -create table t1 ( - a mediumint not null, - b text not null, - c int not null, - d longblob, - primary key using hash (a,c), - unique key (c) -) - engine=ndb - partition by range (c) - partitions 3 - ( partition p1 values less than (200), - partition p2 values less than (300), - partition p3 values less than (400)); - ---disable_query_log -sleep 1; - -# length 61 -set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; - -set @v1 = repeat(@s0, 100); # 1d42dd9090cf78314a06665d4ea938c35cc760f4 -set @v2 = repeat(@s1, 200); # 10d3c783026b310218d10b7188da96a2401648c6 -set @v3 = repeat(@s2, 300); # a33549d9844092289a58ac348dd59f09fc28406a -set @v4 = repeat(@s0, 400); # daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -set @v5 = repeat(@s1, 500); # 70fc9a7d08beebc522258bfb02000a30c77a8f1d -set @v6 = repeat(@s2, 600); # 090565c580809efed3d369481a4bbb168b20713e -set @v7 = repeat(@s0, 700); # 1e0070bec426871a46291de27b9bd6e4255ab4e5 -set @v8 = repeat(@s1, 800); # acbaba01bc2e682f015f40e79d9cbe475db3002e -set @v9 = repeat(@s2, 900); # 9ee30d99162574f79c66ae95cdf132dcf9cbc259 ---enable_query_log - -# -- insert -- -insert into t1 values (1, @v1, 101, @v2); -insert into t1 values (1, @v2, 102, @v3); -insert into t1 values (1, @v3, 103, @v4); -insert into t1 values (2, @v4, 201, @v5); -insert into t1 values (2, @v5, 202, @v6); -insert into t1 values (2, @v6, 203, @v7); -insert into t1 values (3, @v7, 301, @v8); -insert into t1 values (3, @v8, 302, @v9); -insert into t1 values (3, @v9, 303, @v1); -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- pk read -- -select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; -select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; -select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; - -# -- pk update -- -update t1 set b = @v3, d = @v4 where a = 1 and c = 102; -update t1 set b = @v6, d = @v7 where a = 2 and c = 202; -update t1 set b = @v9, d = @v1 where a = 3 and c = 302; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- hash index update -- -update t1 set b = @v4, d = @v5 where c = 103; -update t1 set b = @v7, d = @v8 where c = 203; -update t1 set b = @v1, d = @v2 where c = 303; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- full scan update -- -update t1 set b = @v5, d = @v6; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- range scan update -update t1 set b = @v1, d = @v2 where 100 < c and c < 200; -update t1 set b = @v4, d = @v5 where 200 < c and c < 300; -update t1 set b = @v7, d = @v8 where 300 < c and c < 400; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- delete -- -delete from t1 where a = 1 and c = 101; -delete from t1 where c = 102; -# delete from t1 where c < 300; # XXX coredump -delete from t1; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- clean up -- -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_bug26793.test b/mysql-test/suite/ndb/t/ndb_bug26793.test deleted file mode 100644 index f35d8808c1a..00000000000 --- a/mysql-test/suite/ndb/t/ndb_bug26793.test +++ /dev/null @@ -1,35 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE `test` ( -`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , -`t` VARCHAR( 10 ) NOT NULL -) ENGINE = ndbcluster; - -# Add user1@localhost with a specific password -# and connect as that user -GRANT USAGE ON *.* TO user1@localhost IDENTIFIED BY 'pass'; -connect (user1,localhost,user1,pass,*NO-ONE*); - -# Run the query 100 times -disable_query_log; -disable_result_log; -let $i= 100; -while ($i) -{ -select count(*) from information_schema.tables union all select count(*) from information_schema.tables union all select count(*) from information_schema.tables; -dec $i; -} -enable_query_log; -enable_result_log; - -disconnect user1; - -# Switch back to the default connection and cleanup -connection default; -DROP TABLE `test`.`test`; -drop user user1@localhost; - diff --git a/mysql-test/suite/ndb/t/ndb_bug31477.test b/mysql-test/suite/ndb/t/ndb_bug31477.test deleted file mode 100644 index 41c519e56fd..00000000000 --- a/mysql-test/suite/ndb/t/ndb_bug31477.test +++ /dev/null @@ -1,109 +0,0 @@ ---source include/have_ndb.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# setup - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -# unique index -connection con1; -create table t1(a int primary key, b int, c int, unique(b)) engine = ndb; -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); - -begin; -insert into t1 values (1,1,1); - -connection con2; -begin; ---error 1205 -update t1 set c = 2 where b = 1; -rollback; - -connection con1; -rollback; -drop table t1; -# ordered index - -connection con1; -create table t1(a int primary key, b int, c int, key(b)) engine = ndb; -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); - -begin; -insert into t1 values (1,1,1); - -connection con2; -begin; ---error 1205 -update t1 set c = 2 where b = 1; -rollback; - -connection con1; -rollback; -drop table t1; - -# multiple versions - ---echo --con1 -connection con1; -create table t1(a int primary key, b int, c int, key(b)) engine = ndb; -insert into t1 values (1,1,1); -insert into t1 values (2,2,2); -insert into t1 values (3,3,3); -insert into t1 values (4,4,4); - -begin; -update t1 set c = 10 where a = 1; -update t1 set c = 20 where a = 1; -update t1 set c = 30 where a = 1; - ---echo --con1 c=30 -select * from t1 where b >= 1 order by b; ---echo --con2 c=1 -connection con2; -select * from t1 where b >= 1 order by b; - ---echo --con1 -connection con1; -delete from t1 where a = 1; - ---echo --con1 c=none -select * from t1 where b >= 1 order by b; ---echo --con2 c=1 -connection con2; -select * from t1 where b >= 1 order by b; - ---echo --con1 -connection con1; -commit; - ---echo --con1 c=none -select * from t1 where b >= 1 order by b; ---echo --con2 c=none -connection con2; -select * from t1 where b >= 1 order by b; - ---echo --con1 -connection con1; -begin; -insert into t1 values (1,1,1); -update t1 set c = 10 where a = 1; -update t1 set c = 20 where a = 1; -update t1 set c = 30 where a = 1; - ---echo --con1 c=30 -select * from t1 where b >= 1 order by b; ---echo --con2 c=none -connection con2; -select * from t1 where b >= 1 order by b; - -# this fails with "no such table" via con2 ??? -connection con1; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_cache.test b/mysql-test/suite/ndb/t/ndb_cache.test deleted file mode 100644 index 9c299b61c24..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cache.test +++ /dev/null @@ -1,122 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# Turn on and reset query cache -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - -# Create test table in NDB -CREATE TABLE t1 ( pk int not null primary key, - a int, b int not null, c varchar(20)) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); - -# Perform one query which should be inerted in query cache -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Perform the same query and make sure the query cache is hit -select * from t1; -show status like "Qcache_hits"; - -# Update the table and make sure the correct data is returned -update t1 set a=3 where pk=1; -select * from t1; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Insert a new record and make sure the correct data is returned -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk; -show status like "Qcache_hits"; - -# Perform a "new" query and make sure the query cache is not hit -select * from t1 where b=3; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; - -# Same query again... -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Delete from the table -delete from t1 where c='Fourth row'; -show status like "Qcache_queries_in_cache"; -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Start another connection and check that the query cache is hit -connect (con1,localhost,root,,); -connection con1; -use test; -select * from t1 order by pk; -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Update the table and switch to other connection -update t1 set a=4 where b=3; -connect (con2,localhost,root,,); -connection con2; -use test; -show status like "Qcache_queries_in_cache"; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Use transactions and make sure the query cache is not updated until -# transaction is commited -begin; -update t1 set a=5 where pk=1; -# Note!! the below test shows that table is invalidated -# before transaction is committed -# TODO Fix so that cache is not invalidated HERE! -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -commit; -# TODO Here query is invalidated once again, commit count in NDB has changed -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1; - -show status like "Qcache_queries_in_cache"; - -SET GLOBAL query_cache_size=0; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_cache2.test b/mysql-test/suite/ndb/t/ndb_cache2.test deleted file mode 100644 index 352b01ef73f..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cache2.test +++ /dev/null @@ -1,361 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5; ---enable_warnings - - -# Turn on and reset query cache -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -# Turn on thread that will fetch commit count for open tables -set GLOBAL ndb_cache_check_time=100; -reset query cache; -flush status; - -# Create test tables in NDB -CREATE TABLE t1 ( - pk int not null primary key, - a1 int, - b1 int not null, - c1 varchar(20) -) ENGINE=ndb; -CREATE TABLE t2 ( - pk int not null primary key, - a2 int, - b2 int not null -) ENGINE=ndb; -CREATE TABLE t3 ( - pk int not null primary key, - a3 int, - b3 int not null, - c3 int not null, - d3 varchar(20) -) ENGINE=ndb; -CREATE TABLE t4 ( - a4 int, - b4 int not null, - c4 char(20) -) ENGINE=ndbcluster; -CREATE TABLE t5 ( - pk int not null primary key, - a5 int, - b5 int not null, - c5 varchar(255) -) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -insert into t2 value (1, 2, 3); -insert into t3 value (1, 2, 3, 4, '3 - First row'); -insert into t4 value (2, 3, '4 - First row'); -insert into t5 value (1, 2, 3, '5 - First row'); - -# Perform one query which should be inserted in query cache -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Perform the same query and make sure the query cache is hit -select * from t1; -show status like "Qcache_hits"; - -# Update the table and make sure the correct data is returned -update t1 set a1=3 where pk=1; -select * from t1; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Insert a new record and make sure the correct data is returned -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk desc; -show status like "Qcache_hits"; - -# Perform a "new" query and make sure the query cache is not hit -select * from t1 where b1=3; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; - -# Same query again... -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Delete from the table -delete from t1 where c1='Fourth row'; -show status like "Qcache_queries_in_cache"; -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Start another connection and check that the query cache is hit -connect (con1,localhost,root,,); -connection con1; -use test; -select * from t1 order by pk desc; -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Update the table and switch to other connection -update t1 set a1=4 where b1=3; -connect (con2,localhost,root,,); -connection con2; -use test; -show status like "Qcache_queries_in_cache"; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Load all tables into cache -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; - -##################################################################### -# Start transaction and perform update -# Switch to other transaction and check that update does not show up -# Switch back and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -update t1 set a1=5 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -commit; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -##################################################################### -# Start transaction and perform update -# Switch to other transaction and check that update does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -update t1 set a1=6 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The two queries below will not hit cache since transaction is ongoing -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -##################################################################### -# Start transaction and perform insert -# Switch to other transaction and check that insert does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -insert into t1 set pk=5, a1=6, b1=3, c1="New row"; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 where pk=5; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below four queries will not be cached, trans is ongoing -select * from t1 where pk=5; -select * from t1 where pk=5; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; - -##################################################################### -# Start transaction and perform delete -# Switch to other transaction and check that delete does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -delete from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 where pk=2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below four queries will not be cached, trans is ongoing -select * from t1 where pk=2; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -select * from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -select * from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; - -##################################################################### -# Start a transaction which updates all tables -# Switch to other transaction and check updates does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -flush status; -begin; -update t1 set a1=9 where pk=1; -update t2 set a2=9 where pk=1; -update t3 set a3=9 where pk=1; -update t4 set a4=9 where a4=2; -update t5 set a5=9 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below five queries will not be cached, trans is ongoing -select * from t1 order by pk desc; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1, t2, t3, t4, t5; - -# There should be no queries in cache, when tables have been dropped -show status like "Qcache_queries_in_cache"; - -SET GLOBAL query_cache_size=0; -SET GLOBAL ndb_cache_check_time=0; - - diff --git a/mysql-test/suite/ndb/t/ndb_cache_multi.test b/mysql-test/suite/ndb/t/ndb_cache_multi.test deleted file mode 100644 index 8c7f186b866..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cache_multi.test +++ /dev/null @@ -1,71 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - - -# Turn on and reset query cache on server1 -connection server1; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - -# Turn on and reset query cache on server2 -connection server2; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - - - -# Create test tables in NDB and load them into cache -# on server1 -connection server1; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - - -# Connect server2, load table in to cache, then update the table -connection server2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -update t1 set a=3 where a=2; - -# Connect to server1 and check that cache is invalidated -# and correct data is returned -connection server1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1, t2; - - -# Turn off query cache on server1 -connection server1; -set GLOBAL query_cache_size=0; - -# Turn off query cache on server2 -connection server2; -set GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/ndb/t/ndb_cache_multi2.test b/mysql-test/suite/ndb/t/ndb_cache_multi2.test deleted file mode 100644 index 853e4090193..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cache_multi2.test +++ /dev/null @@ -1,125 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - - -# Turn on and reset query cache on server1 -connection server1; -echo == Connected to server1 ==; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; - -# Turn on and reset query cache on server2 -connection server2; -echo == Connected to server2 ==; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; - -# Create test tables in NDB and load them into cache -# on server1 -connection server1; -echo == Connected to server1 ==; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -# Run the check query once to load it into qc on server1 -# See at the end of this test why we need to disable ps-protocol for -# this query (*) ---disable_ps_protocol -select a != 3 from t1; ---enable_ps_protocol -select * from t2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - - -# Connect server2, load table in to cache, then update the table -connection server2; -echo == Connected to server2 ==; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -update t1 set a=3 where a=2; - -# Connect to server1 and check that cache is invalidated -# and correct data is returned -connection server1; -echo == Connected to server1 ==; - -# Loop and wait for max 10 seconds until query cache thread -# has invalidated the cache and the column a in t1 is equal to 3 -let $retries=20; -while (`select a != 3 from t1`) -{ - dec $retries; - if (!$retries) - { - The query_cache thread failed to invalidate query_cache in 10 seconds; - } - sleep 0.5; -} - -# Select from t1 one last time for the result file -# Column a should be 3 -select * from t1; - -# There should now be three queries in the cache -show status like "Qcache_queries_in_cache"; - -drop table t1, t2; - -# Turn off and reset query cache on server1 and server2 -connection server1; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; -connection server2; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; - -# (*) Why we need to execute the query in non-ps mode. -# The principle of this test is: two mysqlds connected to one cluster, -# both using their query cache. Queries are cached in server1 -# ("select a!=3 from t1", "select * from t1"), -# table t1 is modified in server2, we want to see that this invalidates -# the query cache of server1. Invalidation with NDB works like this: -# when a query is found in the query cache, NDB is asked if the tables -# have changed. In this test, ha_ndbcluster calls NDB every millisecond -# to collect change information about tables. -# Due to this millisecond delay, there is need for a loop ("while...") -# in this test, which waits until a query1 ("select a!=3 from t1") is -# invalidated (which is equivalent to it returning -# up-to-date results), and then expects query2 ("select * from t1") -# to have been invalidated (see up-to-date results). -# But when enabling --ps-protocol in this test, the logic breaks, -# because query1 is still done via mysql_real_query() (see mysqltest.c: -# eval_expr() always uses mysql_real_query()). So, query1 returning -# up-to-date results is not a sign of it being invalidated in the cache, -# because it was NOT in the cache ("select a!=3 from t1" on line 39 -# was done with prep stmts, while `select a!=3 from t1` is not, -# thus the second does not see the first in the cache). Thus, we may run -# query2 when cache still has not been invalidated. -# The solution is to make the initial "select a!=3 from t1" run -# as a normal query, this repairs the broken logic. -# But note, "select * from t1" is still using prepared statements -# which was the goal of this test with --ps-protocol. diff --git a/mysql-test/suite/ndb/t/ndb_charset.test b/mysql-test/suite/ndb/t/ndb_charset.test deleted file mode 100644 index 2d9f66564bc..00000000000 --- a/mysql-test/suite/ndb/t/ndb_charset.test +++ /dev/null @@ -1,257 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Minimal NDB charset test. -# - -# pk - binary - -create table t1 ( - a char(3) character set latin1 collate latin1_bin primary key -) engine=ndb; -# ok -insert into t1 values('aAa'); -insert into t1 values('aaa'); -insert into t1 values('AAA'); -# 3 -select * from t1 order by a; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 0 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# pk - case insensitive - -create table t1 ( - a char(3) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -# ok -insert into t1 values('aAa'); -# fail ---error ER_DUP_ENTRY -insert into t1 values('aaa'); ---error ER_DUP_ENTRY -insert into t1 values('AAA'); -# 1 -select * from t1 order by a; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 1 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# pk - varchar - -create table t1 ( - a varchar(20) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -# -insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); --- error ER_DUP_ENTRY -insert into t1 values('b'); --- error ER_DUP_ENTRY -insert into t1 values('a '); -# -select a,length(a) from t1 order by a; -select a,length(a) from t1 order by a desc; -select * from t1 where a = 'a'; -select * from t1 where a = 'a '; -select * from t1 where a = 'd'; -drop table t1; - -# unique hash index - binary - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_bin not null, - unique key(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -# 3 -select * from t1 order by p; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 0 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# unique hash index - case insensitive - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_swedish_ci not null, - unique key(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -# fail ---error ER_DUP_ENTRY -insert into t1 values(2, 'aaa'); ---error ER_DUP_ENTRY -insert into t1 values(3, 'AAA'); -# 1 -select * from t1 order by p; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 1 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# unique hash index - varchar - -create table t1 ( - p int primary key, - a varchar(20) character set latin1 collate latin1_swedish_ci not null, - unique key(a) -) engine=ndb; -# -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); --- error ER_DUP_ENTRY -insert into t1 values(99,'b'); --- error ER_DUP_ENTRY -insert into t1 values(99,'a '); -# -select a,length(a) from t1 order by a; -select a,length(a) from t1 order by a desc; -select * from t1 where a = 'a'; -select * from t1 where a = 'a '; -select * from t1 where a = 'd'; -drop table t1; - -# ordered index - binary - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_bin not null, - index(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -# 6 -select * from t1 order by p; -# plan too flaky -#--replace_column 9 # -#explain select * from t1 where a = 'zZz' order by p; -# 2 -select * from t1 where a = 'aAa' order by p; -# 2 -select * from t1 where a = 'aaa' order by p; -# 0 -select * from t1 where a = 'AaA' order by p; -# 2 -select * from t1 where a = 'AAA' order by p; -drop table t1; - -# ordered index - case insensitive - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_swedish_ci not null, - index(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -# 6 -select * from t1 order by p; -# plan too flaky -#--replace_column 9 # -#explain select * from t1 where a = 'zZz' order by p; -# 6 -select * from t1 where a = 'aAa' order by p; -# 6 -select * from t1 where a = 'aaa' order by p; -# 6 -select * from t1 where a = 'AaA' order by p; -# 6 -select * from t1 where a = 'AAA' order by p; -drop table t1; - -# ordered index - varchar - -create table t1 ( - p int primary key, - a varchar(20) character set latin1 collate latin1_swedish_ci not null, - index(a, p) -) engine=ndb; -# -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); -select p,a,length(a) from t1 order by a, p; -select * from t1 where a = 'a ' order by a desc, p desc; -select * from t1 where a >= 'D' order by a, p; -select * from t1 where a < 'D' order by a, p; -# -select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; -drop table t1; - -# minimal multi-byte test -# removed by jonas as this requires a configure --with-extra-charsets -#create table t1 ( -# a char(5) character set ucs2, -# b varchar(7) character set utf8, -# primary key(a, b) -#) engine=ndb; -# -#insert into t1 values -# ('a','A '),('B ','b'),('c','C '),('D','d'),('e ','E'),('F','f '), -# ('A','b '),('b ','C'),('C','d '),('d','E'),('E ','f'), -# ('a','C '),('B ','d'),('c','E '),('D','f'); -#-- error ER_DUP_ENTRY -#insert into t1 values('d','f'); -# -#select a,b,length(a),length(b) from t1 order by a,b limit 3; -#select a,b,length(a),length(b) from t1 order by a desc, b desc limit 3; -#select a,b,length(a),length(b) from t1 where a='c' and b='c'; -#drop table t1; - -# bug#14007 -create table t1 ( - a char(10) primary key -) engine=ndbcluster default charset=latin1; - -insert into t1 values ('aaabb'); -select * from t1; -replace into t1 set a = 'AAABB'; -select * from t1; -replace into t1 set a = 'aAaBb'; -select * from t1; -replace into t1 set a = 'aaabb'; -select * from t1; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test deleted file mode 100644 index a6ab06eae31..00000000000 --- a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test +++ /dev/null @@ -1,2054 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4; ---enable_warnings - -# -# Test of condition pushdown to storage engine -# -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10), - vstring varchar(10), - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('zero','one','two','three','four') not null, - flags set('zero','one','two','three','four') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp, - PRIMARY KEY (auto) -) engine=ndb; - -insert into t1 values -(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, - b'001','one','one', - '1901-01-01','1901', -'01:01:01','1901-01-01 01:01:01',NULL), -(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, - b'010','two','one,two', - '1902-02-02','1902', -'02:02:02','1902-02-02 02:02:02',NULL), -(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, - b'011','three','one,two,three', - '1903-03-03','1903', -'03:03:03','1903-03-03 03:03:03',NULL), -(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, - b'100','four','one,two,three,four', - '1904-04-04','1904', -'04:04:04','1904-04-04 04:04:04',NULL); - -CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; - -insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); - -CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; - -insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); - -CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; - -insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); - -set @old_optimizer_switch = @@session.optimizer_switch; -set optimizer_switch = "engine_condition_pushdown=off"; - -# Test all types and compare operators -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -bits = b'001' and -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -bits != b'001' and -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -bits > b'001' and -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -bits >= b'001' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -bits < b'100' and -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 and -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -bits <= b'100' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test LIKE/NOT LIKE -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -# BETWEEN -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -(bits between b'001' and b'011') and -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -(b'001' between bits and bits) and -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -# NOT BETWEEN -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -(bits not between b'001' and b'011') and -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -(b'001' not between bits and bits) and -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -# IN -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -bits in(b'001',b'011') and -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in(short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -b'001' in(bits) and -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -# NOT IN -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -bits not in(b'001',b'011') and -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -b'001' not in(bits) and -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -# Various tests -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; - -set optimizer_switch = "engine_condition_pushdown=on"; - -# Test all types and compare operators ---replace_column 9 # -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test index scan with filter -create index medium_index on t1(medium); - -# Test all types and compare operators ---replace_column 9 # -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test LIKE/NOT LIKE ---replace_column 9 # -explain -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -# BETWEEN ---replace_column 9 # -explain -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -# NOT BETWEEN ---replace_column 9 # -explain -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -# IN ---replace_column 9 # -explain -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -# NOT IN ---replace_column 9 # -explain -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -# Update test -update t1 -set medium = 17 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; - -# Delete test -delete from t1 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = 17 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; - -select count(*) from t1; - -# Various tests ---replace_column 9 # -explain -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; - ---replace_column 9 # -explain -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; - ---replace_column 9 # -explain -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; - ---replace_column 9 # -explain -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; - ---replace_column 9 # -explain -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; - ---replace_column 9 # -explain -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; - -# Some tests that are currently not supported and should not push condition ---replace_column 9 # -explain -select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; ---replace_column 9 # -explain -select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; ---replace_column 9 # -explain -select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; - -# bug#15722 -create table t5 (a int primary key auto_increment, b tinytext not null) -engine = ndb; -insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t5 where b like '%jo%' order by a; -set optimizer_switch = "engine_condition_pushdown=on"; ---replace_column 9 # -explain select * from t5 where b like '%jo%'; -select * from t5 where b like '%jo%' order by a; - -# bug#21056 ndb pushdown equal/setValue error on datetime -set optimizer_switch = "engine_condition_pushdown=off"; -select auto from t1 where date_time like '1902-02-02 %' order by auto; -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -set optimizer_switch = "engine_condition_pushdown=on"; ---replace_column 9 # -explain select auto from t1 where date_time like '1902-02-02 %'; -select auto from t1 where date_time like '1902-02-02 %' order by auto; ---replace_column 9 # -explain select auto from t1 where date_time not like '1902-02-02 %'; -select auto from t1 where date_time not like '1902-02-02 %' order by auto; - -# bug#17421 -1 -drop table t1; -create table t1 (a int, b varchar(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -# in TUP the constants 'ab' 'abc' were expected in varchar format -# "like" returned error which became "false" -# scan filter negates "or" which exposes the bug -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; -set optimizer_switch = "engine_condition_pushdown=on"; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; - -# bug#17421 -2 -drop table t1; -create table t1 (a int, b char(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -# test that incorrect MySQL behaviour is preserved -# 'ab ' LIKE 'ab' is true in MySQL -set optimizer_switch = "engine_condition_pushdown=off"; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; -set optimizer_switch = "engine_condition_pushdown=on"; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; - -# bug#20406 (maybe same as bug#17421 -1, not seen on 32-bit x86) -drop table t1; -create table t1 ( fname varchar(255), lname varchar(255) ) -engine=ndbcluster; -insert into t1 values ("Young","Foo"); - -set optimizer_switch = "engine_condition_pushdown=off"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set optimizer_switch = "engine_condition_pushdown=on"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); - -# make sure optimizer does not do some crazy shortcut -insert into t1 values ("aaa", "aaa"); -insert into t1 values ("bbb", "bbb"); -insert into t1 values ("ccc", "ccc"); -insert into t1 values ("ddd", "ddd"); - -set optimizer_switch = "engine_condition_pushdown=off"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set optimizer_switch = "engine_condition_pushdown=on"; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); - -# bug#29390 (scan filter is too large, discarded) -# bug#34107 (previous limit was too large for TUP) - -drop table t1; - -create table t1 (a int, b int, c int, d int, primary key using hash(a)) - engine=ndbcluster; - -insert into t1 values (10,1,100,0+0x1111); -insert into t1 values (20,2,200,0+0x2222); -insert into t1 values (30,3,300,0+0x3333); -insert into t1 values (40,4,400,0+0x4444); -insert into t1 values (50,5,500,0+0x5555); - -set optimizer_switch = "engine_condition_pushdown=on"; - -select a,b,d from t1 - where b in (0,1,2,5) - order by b; - ---echo -- big filter just below limit ---disable_query_log -select a,b,d from t1 - where b in ( -0,1,2,5,0,1,2,5,0,1, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,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0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2) - order by b; ---enable_query_log - -set optimizer_switch = @old_optimizer_switch; -DROP TABLE t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/ndb/t/ndb_config.test b/mysql-test/suite/ndb/t/ndb_config.test deleted file mode 100644 index 08d1226953c..00000000000 --- a/mysql-test/suite/ndb/t/ndb_config.test +++ /dev/null @@ -1,23 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults -r \\\n -f " " --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --type=ndbd --host=localhost 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null - -# End of 4.1 tests - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.jonas --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf1.cnf --query=type,nodeid,host,IndexMemory,DataMemory --mycnf 2> /dev/null - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster0 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster1 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null - - ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=localhost --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=1.2.3.4 --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=127.0.0.1 --config-file=$MYSQL_TEST_DIR/std_data/ndb_config_config.ini 2> /dev/null diff --git a/mysql-test/suite/ndb/t/ndb_config2.test b/mysql-test/suite/ndb/t/ndb_config2.test deleted file mode 100644 index 170f1b2e5e7..00000000000 --- a/mysql-test/suite/ndb/t/ndb_config2.test +++ /dev/null @@ -1,7 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# Following doesn't work in all configurations (if shm is not defined) - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null diff --git a/mysql-test/suite/ndb/t/ndb_cursor.test b/mysql-test/suite/ndb/t/ndb_cursor.test deleted file mode 100644 index 406f8629cfe..00000000000 --- a/mysql-test/suite/ndb/t/ndb_cursor.test +++ /dev/null @@ -1,47 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; -drop table if exists t2; ---enable_warnings - -create table t1 ( - a int not null primary key, - b int not null -) engine=ndb; - -create table t2 ( - a int not null primary key, - b int not null -) engine=ndb; - -insert into t1 values (1,10), (2,20), (3,30), (4, 40); - -delimiter //; -create procedure test_cursor () -begin - declare done int default 0; - declare temp_a int; - declare temp_b int; - declare cur1 cursor for select a,b from t1; - declare continue handler for sqlstate '02000' set done = 1; - open cur1; - repeat - fetch cur1 into temp_a, temp_b; - if not done then - insert into t2 values (temp_a, temp_b); - end if; - until done end repeat; - close cur1; -end; -// -delimiter ;// - -select * from t2 order by a; -call test_cursor(); -select * from t2 order by a; -drop procedure test_cursor; -drop table t1,t2; - ---echo end of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_database.test b/mysql-test/suite/ndb/t/ndb_database.test deleted file mode 100644 index 8bfdf40de88..00000000000 --- a/mysql-test/suite/ndb/t/ndb_database.test +++ /dev/null @@ -1,24 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop database if exists mysqltest; ---enable_warnings - -# -# Check that all tables in a database are dropped when database is dropped -# - -create database mysqltest; -create table mysqltest.t1 (a int primary key, b int) engine=ndb; -use mysqltest; -show tables; - -drop database mysqltest; -create database mysqltest; -use mysqltest; -show tables; - -drop database mysqltest; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_dd_alter.test b/mysql-test/suite/ndb/t/ndb_dd_alter.test deleted file mode 100644 index 7635a8944da..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_alter.test +++ /dev/null @@ -1,274 +0,0 @@ -############################################################## -# Author: JBM -# Date: 2006-01-12 -# Purpose: To test using ndb memory and disk tables together. -############################################################## - -############################################################## -# Author: Nikolay -# Date: 2006-05-12 -# Purpose: To test using ndb memory and disk tables together. -# -# Select from disk into memory table -# Select from disk into memory table -# Create test that loads data, use mysql dump to dump data, drop table, -# create table and load from mysql dump. -# Use group by asc and dec; Use having; Use order by -# ALTER Tests (Meta data testing): -# ALTER from InnoDB to Cluster Disk Data -# ALTER from MyISAM to Cluster Disk Data -# ALTER from Cluster Disk Data to InnoDB -# ALTER from Cluster Disk Data to MyISAM -# ALTER DD Tables and add columns -# ALTER DD Tables and add Indexes -# ALTER DD Tables and drop columns -# -############################################################## -# Author: Jonathan -# Date 2006-08-28 -# Purpose: To take out some of the test that are already -# Covered by other tests. Per Jonas -# The new purpose of this test is testing "Alter" -# Statements. Therefore the name is changed to -# ndb_dd_alter.test -# Removed tests include: -# Select from disk into memory table -# Select from disk into memory table -# Create test that loads data, use mysql dump to dump data, drop table, -# create table and load from mysql dump. -# Use group by asc and dec; Use having; Use order by -############################################################## - --- source include/have_ndb.inc --- source include/have_innodb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings - -############ Test Setup Section ############# --- echo **** Test Setup Section **** -################## ALTER Tests (Meta data testing) #################### - - CREATE LOGFILE GROUP lg - ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE = 1M - ENGINE=NDB; - - CREATE TABLESPACE ts - ADD DATAFILE './table_space/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 12M - ENGINE NDB; - -#### Try to ALTER from InnoDB to Cluster Disk Data - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) ENGINE=InnoDB; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} -enable_query_log; - -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' -SELECT * FROM test.t1 ORDER BY a1; -DROP TABLE test.t1; - -#### Try to ALTER from MyISAM to Cluster Disk Data - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) ENGINE=MyISAM; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} -enable_query_log; - -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' -SELECT * FROM test.t1 ORDER BY a1; - -#### Try to ALTER from Cluster Disk Data to InnoDB - -ALTER TABLE test.t1 ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -#### Try to ALTER from Cluster Disk Data to MyISAM - -ALTER TABLE test.t1 ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -DROP TABLE test.t1; - -#### Try to ALTER DD Tables and add columns - -CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1); - dec $1; -} -enable_query_log; - -SELECT * FROM test.t1 ORDER BY a1; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; - -ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a2 = $1+1.2345, a3 = $1+20000000.00 where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT * FROM test.t1 ORDER BY a1; - -ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a4 = 0, a5 = 1, a6 = $1+23456, a7 = '2006-1-1', - a8 = '07:04:00' where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1; - -ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -disable_query_log; -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -enable_query_log; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a9 = '1971-5-28 16:55:03', a10 = 'abc', a11 = 'abcdefg', - a12 = 'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', a13 = 'Text Field', - a14 = @d2 where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1; - -#### Try to ALTER DD Tables and add Indexes - -ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3); - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -ALTER TABLE test.t1 DROP INDEX a2_i; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -TRUNCATE TABLE test.t1; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -#### Try to ALTER DD Tables and drop columns - - -ALTER TABLE test.t1 DROP a14; -ALTER TABLE test.t1 DROP a13; -ALTER TABLE test.t1 DROP a12; -ALTER TABLE test.t1 DROP a11; -ALTER TABLE test.t1 DROP a10; -ALTER TABLE test.t1 DROP a9; -ALTER TABLE test.t1 DROP a8; -ALTER TABLE test.t1 DROP a7; -ALTER TABLE test.t1 DROP a6; -ALTER TABLE test.t1 DROP PRIMARY KEY; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -DROP TABLE test.t1; - - ALTER TABLESPACE ts - DROP DATAFILE './table_space/datafile.dat' - ENGINE NDB; - DROP TABLESPACE ts ENGINE NDB; - DROP LOGFILE GROUP lg ENGINE=NDB; - -####################### End section 4 ######################### -#End 5.1 test case - diff --git a/mysql-test/suite/ndb/t/ndb_dd_basic.test b/mysql-test/suite/ndb/t/ndb_dd_basic.test deleted file mode 100644 index 0fb793e2142..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_basic.test +++ /dev/null @@ -1,485 +0,0 @@ -################################# -# Author: JO -# Org Date: ? -# Purpose: To test basic Cluster Disk Data -################################# -# Change Author: JBM -# Change Date: 2006-01-11 -# Change: Cleanup and test rename -################################# -# Change Author: Guangbao Ni -# Change Date: 2007-03-20 -# Change: Test insert data when no datafile in spacetable -################################# - --- source include/have_ndb.inc - -# -# Bug#30322 Server crashes on selecting from i_s.columns when cluster is running -regression -# ---replace_column 1 # -select count(*) from information_schema.columns; - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# some negative tests -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=MYISAM; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=XYZ; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M; - -################################## -# Basic test of disk tables for NDB -# Start by creating a logfile group -################################## - -set storage_engine=ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################### -# Create a tablespace connected to the logfile group -################################################### - -set storage_engine=myisam; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -######################################## -# Create a table using this tablespace -######################################## - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -SHOW CREATE TABLE t1; - -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -SELECT COUNT(*) FROM t1; - -#################################### -# Test error cases with size numbers -#################################### ---error ER_WRONG_SIZE_NUMBER -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10y -ENGINE = NDB; - ---error ER_WRONG_SIZE_NUMBER -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10MB -ENGINE = NDB; - ---error 1064 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 MB -ENGINE = NDB; - ---error 1064 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 M -ENGINE = NDB; - ---error ER_SIZE_OVERFLOW_ERROR -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 1000000000000K -ENGINE = NDB; - -DROP TABLE t1; - -create tablespace ts2 -add datafile 'datafile2_1.dat' -use logfile group lg1 -initial_size 12M -engine ndb; - -CREATE TABLE City ( - ID int(11) NOT NULL AUTO_INCREMENT, - Name char(35) NOT NULL, - CountryCode char(3) NOT NULL, - District char(20) NOT NULL, - Population int(11) NOT NULL, - PRIMARY KEY (ID) -) ENGINE=ndbcluster -tablespace ts2 -storage disk; - -alter tablespace ts2 -drop datafile 'datafile2_1.dat' -engine ndb; - -#It will give error messages: NoDatafile in tablespace ---error ER_GET_ERRMSG -insert -into City (Name,CountryCode,District,Population) -values ('BeiJing','CN','Beijing',2000); - ---error ER_DROP_FILEGROUP_FAILED -drop tablespace ts2 -engine ndb; - -drop table City; - -drop tablespace ts2 -engine ndb; - -############################ -# Test update of mm/dd part -############################ - -CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; -INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '7'WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -DROP TABLE t1; - -##### - -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB; -INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '7' WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; - -DELETE FROM t1; -INSERT INTO t1 VALUES (3,'1','1'); -BEGIN; -UPDATE t1 SET b = b + 2 WHERE A = 3; -DELETE FROM t1 WHERE A = 3; -INSERT INTO t1 VALUES (3,'0','0'); -COMMIT; -SELECT * from t1 ORDER BY 1; - -DROP TABLE t1; - -######################## -# Test for blobs... -######################## - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b TEXT NOT NULL -) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; - -# b1 length 2000+256 (blob part aligned) -######################################### -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# b2 length 20000 -########################################## -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); - -INSERT INTO t1 VALUES(1,@b1); -INSERT INTO t1 VALUES(2,@b2); -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2; -UPDATE t1 SET b=@b2 WHERE a=1; -UPDATE t1 SET b=@b1 WHERE a=2; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2; -UPDATE t1 SET b=concat(b,b) WHERE a=1; -UPDATE t1 SET b=concat(b,b) WHERE a=2; -SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2; -DELETE FROM t1 WHERE a=1; -DELETE FROM t1 WHERE a=2; -SELECT COUNT(*) FROM t1; -DROP TABLE t1; - -# bug#20612 INS-DEL bug (not pgman bug) -# found via disk data assert but is not pgman or disk data related - -CREATE TABLE t1 ( - a int NOT NULL, - b varchar(4000), -- must use 2 pages undo - PRIMARY KEY using hash (a) -) -TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; - -set autocommit = 0; -insert into t1 values(0,'x'); -insert into t1 values(1,'x'); -insert into t1 values(2,'x'); -insert into t1 values(3,'x'); -insert into t1 values(4,'x'); -insert into t1 values(5,'x'); -insert into t1 values(6,'x'); -insert into t1 values(7,'x'); -insert into t1 values(8,'x'); -delete from t1 where a = 0; -commit; - -delete from t1; -begin; -insert into t1 values (1, 'x'); -select * from t1; -rollback; - -set autocommit = 1; - - -drop table t1; -############################# -# Customer posted order by test case -# Org in ndb_dd_advance.test -############################# - -create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) -TABLESPACE ts1 STORAGE DISK engine=NDB; -insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from test.t1 order by f1; -select f1,f2 from test.t1 order by f2; -select f2 from test.t1 order by f2; -select f1,f2 from test.t1 order by f1; -drop table test.t1; - -# bug#34118 hash index trigger and do not update any disk attr -CREATE TABLE t1 ( -id int unsigned NOT NULL, -c1 int unsigned NOT NULL, -c2 int DEFAULT NULL, -PRIMARY KEY using hash (id), -UNIQUE KEY c1 using hash (c1)) -TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster; - -insert into t1 values(1, 1, 3); -insert into t1 values(2, 2, 3); ---error ER_DUP_ENTRY -update t1 set c1 = 1 where id = 2; -drop table t1; - -################### -# Test Cleanup -################### - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 -ENGINE = NDB; - -DROP LOGFILE GROUP lg1 -ENGINE =NDB; - -#End 5.1 test case diff --git a/mysql-test/suite/ndb/t/ndb_dd_ddl.test b/mysql-test/suite/ndb/t/ndb_dd_ddl.test deleted file mode 100644 index ca39be87c94..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_ddl.test +++ /dev/null @@ -1,470 +0,0 @@ -######################################### -# Author: JBM -# Date: 2006-01-03 -# Purpose: Test the NDB engine reaction to duplicate -# Table spaces and log groups. Also to test -# Statement mixed case. -############################################ -# Change Author:JBM -# Change Date 2006-01-19 -# Change: Adding to test cases feedback from OB -# 1) The 'duplicate' tests. -# a) The test is using the default (test) database and is not -# attempting to create databases (only logs, table spaces and -# tables). Is this intentional? -# b) What about a duplication of table name when one exists on disk and -# you are trying to create it again in memory? -# -#2) 'CaSE SensiTiVE' tests -# a) Suggest you include a test case where the case difference is in -# the file name. I know this is not an issue for *nix systems but -# will be when we expand to Windows and Mac. Better put it in now. -############################################ -# -# Jonas 2006-03-10 -# Add verification that ndb currently is limited to 1 logfile group -# - - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP DATABASE IF EXISTS mysqltest; -CREATE DATABASE mysqltest; ---enable_warnings - -############## Duplcate Statement Testing ######### - ---echo **** Begin Duplicate Statement Testing **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -# Verify that one currently can create only 1 logfile group ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'undofile2.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -SHOW WARNINGS; - ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - ---error ER_CREATE_FILEGROUP_FAILED -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; - -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - ---error ER_TABLE_EXISTS_ERROR -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - ---error ER_TABLE_EXISTS_ERROR -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -ENGINE=NDB; - - -DROP TABLE mysqltest.t1; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 -ENGINE=NDB; - ---error ER_DROP_FILEGROUP_FAILED -DROP TABLESPACE ts1 -ENGINE=NDB; - -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - ---error ER_DROP_FILEGROUP_FAILED -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - -DROP DATABASE IF EXISTS mysqltest; - ---echo **** End Duplicate Statement Testing **** -############# End Duplicate Statments ############ ---echo -############ Begin CaSe Testing ################## ---echo **** Begin Statment CaSe Testing **** - -creaTE LOgfilE GrOuP lg1 -adD undoFILE 'undofile.dat' -initiAL_siZE 1M -UnDo_BuFfEr_SiZe = 1M -ENGInE=NDb; - -altER LOgFiLE GrOUp lg1 -AdD UnDOfILe 'uNdOfiLe02.daT' -INItIAl_SIzE 1M ENgINE nDB; - -CrEAtE TABLEspaCE ts1 -ADD DATAfilE 'datafile.dat' -UsE LoGFiLE GRoUP lg1 -INITiaL_SizE 1M -ENGiNe NDb; - -AlTeR tAbLeSpAcE ts1 -AdD DaTaFiLe 'dAtAfiLe2.daT' -InItIaL_SiZe 1M -EnGiNe=NDB; - -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -TABLEspace ts1 storAGE dISk -ENGine nDb; - -DROP TABLE t1; - -AlteR TAblespaCE ts1 -droP DATAfile 'dAtAfiLe2.daT' -ENGINE=NDB; - -ALter tablesPACE ts1 -dROp dAtAfIlE 'datafile.dat' -ENGine=Ndb; - -DrOp TaBleSpAcE ts1 -engINE=ndB; - -DrOp lOgFiLe GrOuP lg1 -EnGiNe=nDb; - ---echo **** End Statment CaSe Testing **** -############ End CaSe Testing ################## ---echo -############ Begin = and no = Testing ########## ---echo **** Begin = And No = Testing **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE=1M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE=1M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE=1M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE=1M -ENGINE=NDB; - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -DROP TABLE t1; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 -ENGINE=NDB; - -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - ---echo ---echo **** End of = **** ---echo - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE NDB; - ---error 1005 -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE MEMORY -ENGINE NDB; - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE NDB; - - -CREATE INDEX b_i on t1(b); -CREATE INDEX bc_i on t1(b, c); - -DROP TABLE t1; - -# bug#20053 - -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile3.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -# bug#20053 - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; - -DROP TABLESPACE ts1 -ENGINE NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; - -DROP TABLESPACE ts2 -ENGINE NDB; - -DROP LOGFILE GROUP lg1 -ENGINE NDB; - ---echo **** End = And No = **** -############ End = And No = ################## - -### -# -# bug#16341 -#create table t1 (a int primary key) engine = myisam; -# 2007-08-22 Jeb -# Removed the use of create table and manually -# created the file to cause failure due to -# inconsistant results on other OS -# see #bug30559 - ---exec touch $MYSQLTEST_VARDIR/tmp/t1.frm - ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---error ER_CREATE_FILEGROUP_FAILED ---eval create logfile group lg1 add undofile '$MYSQLTEST_VARDIR/tmp/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb; - -create logfile group lg1 -add undofile 'undofile.dat' -initial_size 1M -undo_buffer_size = 1M -engine=ndb; - ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---error ER_CREATE_FILEGROUP_FAILED ---eval create tablespace ts1 add datafile '$MYSQLTEST_VARDIR/tmp/t1.frm' use logfile group lg1 initial_size 1M engine ndb; - ---error ER_DROP_FILEGROUP_FAILED -drop tablespace ts1 -engine ndb; - -drop logfile group lg1 -engine ndb; - -#drop table t1; ---exec rm $MYSQLTEST_VARDIR/tmp/t1.frm - - ---echo ---echo # ----------------------------------------------------------------- ---echo # End 5.1 test ---echo # ----------------------------------------------------------------- - ---echo ---echo # -- ---echo # -- WL#4300: Define privileges for tablespaces. ---echo # -- - -GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost; - ---echo - ---disable_warnings -DROP DATABASE IF EXISTS mysqltest2; ---enable_warnings - -CREATE DATABASE mysqltest2; - -GRANT ALL PRIVILEGES ON mysqltest2.* TO mysqltest_u2@localhost; - ---echo ---echo # -- Connection: mysqltest_u1@localhost ---echo ---connect(con1, localhost, mysqltest_u1,,) - ---echo # -- Grants for mysqltest_u1@localhost: -SHOW GRANTS; - ---echo ---echo # -- Check CREATE LOGFILE GROUP... -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE = NDB; - ---echo ---echo # -- Check ALTER LOGFILE GROUP... -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE = NDB; - ---echo ---echo # -- Check CREATE TABLESPACE... -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE = NDB; - ---echo ---echo # -- Check ALTER TABLESPACE... -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -INITIAL_SIZE 1M -ENGINE = NDB; - ---echo ---echo # -- Connection: mysqltest_u2@localhost ---echo ---connect(con2, localhost, mysqltest_u2,,mysqltest2) - ---echo # -- Grants for mysqltest_u2@localhost: -SHOW GRANTS; - -CREATE TABLE t1(c INT) TABLESPACE ts1; - -DROP TABLE t1; - ---echo ---echo # -- Connection: mysqltest_u1@localhost ---echo ---connection con1 - ---echo ---echo # -- Check DROP TABLESPACE... -DROP TABLESPACE ts1 -ENGINE = NDB; - ---echo ---echo # -- Check DROP LOGFILE GROUP... -DROP LOGFILE GROUP lg1 -ENGINE = NDB; - ---echo ---echo # -- Connection: root@localhost ---echo ---connection default ---disconnect con1 - -DROP USER mysqltest_u1@localhost; -DROP USER mysqltest_u2@localhost; -DROP DATABASE mysqltest2; - ---echo ---echo # ----------------------------------------------------------------- ---echo # End 6.0 test ---echo # ----------------------------------------------------------------- diff --git a/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test b/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test deleted file mode 100644 index 5975f44e087..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test +++ /dev/null @@ -1,292 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-12 -# Purpose: To test using ndb memory and -# disk tables together. -######################################## - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings - -############ Test Setup Section ############# --- echo **** Test Setup Section **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE test.t2 -(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL) -ENGINE=NDB; - ---echo -##################### Data load for first test #################### ---echo **** Data load for first test **** - -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - - -INSERT INTO test.t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - ---echo -##################### Test 1 Section Begins ############### ---echo *** Test 1 Section Begins *** -SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4); -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75); -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; ---echo -####################### Test 1 Section End ################ - -##################### Setup for test 2 #################### ---echo *** Setup for test 2 **** -DELETE FROM test.t1; -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45); ---echo -############################# Test Section 2 ############### ---echo **** Test Section 2 **** -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2; -SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2; -SHOW CREATE TABLE test.t2; -SHOW CREATE TABLE test.t1; -ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE test.t2; -ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER; -SHOW CREATE TABLE test.t1; ---echo -######################### End Test Section 2 ################# -DROP TABLE test.t1; -DROP TABLE test.t2; -##################### Setup for Test Section 3 ############### ---echo *** Setup for Test Section 3 *** -CREATE TABLE test.t1 ( - usr_id INT unsigned NOT NULL, - uniq_id INT unsigned NOT NULL AUTO_INCREMENT, - start_num INT unsigned NOT NULL DEFAULT 1, - increment INT unsigned NOT NULL DEFAULT 1, - PRIMARY KEY (uniq_id), - INDEX usr_uniq_idx (usr_id, uniq_id), - INDEX uniq_usr_idx (uniq_id, usr_id)) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; - - -CREATE TABLE test.t2 ( - id INT unsigned NOT NULL DEFAULT 0, - usr2_id INT unsigned NOT NULL DEFAULT 0, - max INT unsigned NOT NULL DEFAULT 0, - c_amount INT unsigned NOT NULL DEFAULT 0, - d_max INT unsigned NOT NULL DEFAULT 0, - d_num INT unsigned NOT NULL DEFAULT 0, - orig_time INT unsigned NOT NULL DEFAULT 0, - c_time INT unsigned NOT NULL DEFAULT 0, - active ENUM ("no","yes") NOT NULL, - PRIMARY KEY (id,usr2_id), - INDEX id_idx (id), - INDEX usr2_idx (usr2_id)) -ENGINE=NDB; - -INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198); - ---echo -###################### Test Section 3 ###################### ---echo **** Test Section 3 **** -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; - -INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); - -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; ---echo -####################### End Section 3 ######################### -DROP TABLE test.t1; -DROP TABLE test.t2; - -########## Test that use to be in ndb_dd_advance.test ######### -########## ndb_dd_advance.test is now ndb_dd_alter.test ####### -#### Use group by asc and dec; Use having; Use order by. #### - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t2 ( - b1 smallint NOT NULL, - b2 int NOT NULL, - b3 bigint NOT NULL, - b4 char(10), - b5 decimal(5,1), - b6 time, - b7 date, - b8 datetime, - b9 VARCHAR(255), - b10 blob, - PRIMARY KEY(b1) -) ENGINE=NDB; - -### ADD Some DATA to tables ###### - - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - eval insert into test.t2 values($1+2, $1+3, $1+3000000000, "aaa$1", 35.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} - -ALTER TABLE test.t1 ADD INDEX (a2), ADD INDEX (a3), ADD INDEX (a8); -ALTER TABLE test.t2 ADD INDEX (b2), ADD INDEX (b3), ADD INDEX (b8); -SHOW CREATE TABLE test.t1; -SHOW CREATE TABLE test.t2; -SELECT * FROM test.t1 order by a1; -SELECT * FROM test.t2 order by b1; -SELECT COUNT(a1), a1, COUNT(a1)*a1 FROM test.t1 GROUP BY a1; -SELECT COUNT(a2), (a2+1), COUNT(a2)*(a2+0) FROM test.t1 GROUP BY a2; - -DROP TABLE test.t1; -DROP TABLE test.t2; - -CREATE TABLE test.t1 (a INT NOT NULL, -b CHAR(5), c TEXT, d INT NOT NULL PRIMARY KEY) TABLESPACE -table_space1 STORAGE DISK ENGINE=NDB; - -insert into test.t1 (a,b,c,d) values (1,'a','Jonas',1),(2,'b','Tomas',2), -(3,'c','Pekka',3),(4,'d','Martin',4),(5,'e','Stewart',5),(6,'f','Jeb',6), -(7,'g','Serge',7),(8,'h','Clavin',8); -select distinct a from test.t1 group by b,a having a > 4 order by a desc; -select distinct a,c from test.t1 group by b,c,a having a > 2 order by a desc; -select distinct a from test.t1 group by b,a having a > 1 order by a asc; -select distinct a,c from test.t1 group by b,c,a having a > 3 order by a asc; -drop table test.t1; - -create table test.t1 (a char(1), key(a)) TABLESPACE table_space1 -STORAGE DISK ENGINE=NDB; -insert into test.t1 values('1'),('1'),('1'),('2'),('2'),('3'),('3'); -select * from test.t1 where a >= '1' order by a; -select distinct a from test.t1 order by a desc; -select distinct a from test.t1 where a >= '1' order by a desc; -select distinct a from test.t1 where a >= '1' order by a asc; -drop table test.t1; - -CREATE TABLE test.t1 (email varchar(50), infoID BIGINT, dateentered DATETIME) -TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (infoID BIGINT, shipcode varchar(10)) ENGINE=NDB; - -INSERT INTO test.t1 (email, infoID, dateentered) VALUES - ('test1@testdomain.com', 1, '2002-07-30 22:56:38'), - ('test1@testdomain.com', 1, '2002-07-27 22:58:16'), - ('test2@testdomain.com', 1, '2002-06-19 15:22:19'), - ('test2@testdomain.com', 2, '2002-06-18 14:23:47'), - ('test3@testdomain.com', 1, '2002-05-19 22:17:32'); - -INSERT INTO test.t2(infoID, shipcode) VALUES - (1, 'Z001'), - (2, 'R002'); - -SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 -WHERE t1.infoID=t2.infoID order by email, shipcode; -SELECT DISTINCTROW email FROM test.t1 ORDER BY dateentered DESC; -SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 -WHERE test.t1.infoID=test.t2.infoID ORDER BY dateentered DESC; - -DROP TABLE test.t1,test.t2; - -################# -# Test Cleanup -################# - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - -#End 5.1 test case - diff --git a/mysql-test/suite/ndb/t/ndb_dd_dump.test b/mysql-test/suite/ndb/t/ndb_dd_dump.test deleted file mode 100644 index 7fc315ef167..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_dump.test +++ /dev/null @@ -1,289 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; ---enable_warnings - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_01.dat' -INITIAL_SIZE 2M -UNDO_BUFFER_SIZE = 1M -ENGINE NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_02.dat' -INITIAL_SIZE = 4M -ENGINE NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_01.dat' -USE LOGFILE GROUP lg1 -EXTENT_SIZE 1M -INITIAL_SIZE 2M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_02.dat' -INITIAL_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile_ts2_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 2M -ENGINE NDB; - -CREATE TABLESPACE ts3 -ADD DATAFILE 'datafile_ts3_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 4M -ENGINE NDB; - -######################################## -# Create a table using this tablespace -######################################## - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE t2 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE t3 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts3 STORAGE DISK -ENGINE=NDB; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -INSERT INTO t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); - -INSERT INTO t3 VALUES -(1,1,1); - ---exec $MYSQL_DUMP --skip-comments --compact -Y test > $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; - -DROP LOGFILE GROUP lg1 ENGINE = NDB; - ---exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql - -SELECT DISTINCT - LOGFILE_GROUP_NAME, - FILE_NAME, - TOTAL_EXTENTS, - INITIAL_SIZE, - ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; - -SELECT DISTINCT - TABLESPACE_NAME, - LOGFILE_GROUP_NAME, - FILE_NAME, - EXTENT_SIZE, - INITIAL_SIZE, - ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME; - -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -SELECT COUNT(*) FROM t3; - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -#### BUG 18856 test case comented out -##### Use "SELECT * INTO OUTFILE" to dump data and "LOAD DATA INFILE" to load ##### data back to the data file. - -CREATE TABLE test.t ( - a smallint NOT NULL, - b int NOT NULL, - c bigint NOT NULL, - d char(10), - e TEXT, - f VARCHAR(255), - PRIMARY KEY(a) -) TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f); - SHOW CREATE TABLE test.t; - -# insert records into tables - - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t values($1, $1+1, $1+2, "aaa$1", "bbb$1", "ccccc$1"); - dec $1; - } - enable_query_log; - - SELECT * FROM test.t order by a; - - SELECT * INTO OUTFILE 't_backup' FROM test.t; - TRUNCATE test.t; - -#'TRUNCATE test.t' failed: 1205: Lock wait timeout exceeded; try restarting -#transaction. TABLESPACE ts STORAGE DISK ENGINE=NDB; - - SELECT count(*) FROM test.t; - LOAD DATA INFILE 't_backup' INTO TABLE test.t; - - SELECT * FROM test.t order by a; - - DROP TABLE test.t; - - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; - -DROP LOGFILE GROUP lg1 ENGINE = NDB; - -#End 5.1 test case diff --git a/mysql-test/suite/ndb/t/ndb_dd_sql_features.test b/mysql-test/suite/ndb/t/ndb_dd_sql_features.test deleted file mode 100644 index f46cb217ab4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_dd_sql_features.test +++ /dev/null @@ -1,551 +0,0 @@ -############################################################## -# Author: Nikolay -# Date: 2006-04-01 -# Purpose: Specific Blob and Varchar testing using disk tables. -############################################################## -# Create Stored procedures that use disk based tables. -# Create function that operate on disk based tables. -# Create triggers that operate on disk based tables. -# Create views that operate on disk based tables. -# Try to create FK constraints on disk based tables. -# Create and use disk based table that use auto inc. -# Create test that use transaction (commit, rollback) -# Create large disk base table, do random queries, check cache hits, -# do same query 10 times check cache hits. -# Create test that uses COUNT(), SUM(), MAX(), MIN(), -# NOW(), USER(), ... other built in # SQL functions -# Create test that uses locks. -# Create test using truncate. -############################################################## -# Author: Jonathan -# Date: 2006-08-28 -# Change: Remove all the create and drop LFG and TS except -# The first create and the last drop to make test -# run faster. -# In addition, renamed test to be to a name that -# gives a better idea of what the test is about -########################################################### --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -#### Copy data from table in one table space to table in ### -#### different table space. #### ---echo ***** ---echo **** Copy data from table in one table space to table ---echo **** in different table space ---echo ***** - - CREATE LOGFILE GROUP lg - ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE = 1M - ENGINE=NDB; - - CREATE TABLESPACE ts1 - ADD DATAFILE './table_space1/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 25M - ENGINE NDB; - - CREATE TABLESPACE ts2 - ADD DATAFILE './table_space2/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 20M - ENGINE NDB; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - SHOW CREATE TABLE test.t1; - SHOW CREATE TABLE test.t2; - - INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa'); - INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb'); - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; - SELECT * FROM test.t2 ORDER BY a1; - - DROP TABLE test.t1, test.t2; - - # populate BLOB field with large data - -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); - -# x0 size 256 -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - SHOW CREATE TABLE test.t1; - SHOW CREATE TABLE test.t2; - - INSERT INTO test.t1 VALUES (1,@vc1,@d1); - INSERT INTO test.t1 VALUES (2,@vc2,@b1); - INSERT INTO test.t1 VALUES (3,@vc3,@d2); - INSERT INTO test.t1 VALUES (4,@vc4,@b2); - - SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 WHERE a1=1; - SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) - FROM test.t1 where a1=2; - - INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; - SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) - FROM test.t2 WHERE a1=1; - SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) - FROM test.t2 where a1=2; - - - DROP TABLE test.t1, test.t2; - -#### Insert, Update, Delete from NDB table with BLOB fields #### ---echo ***** ---echo **** Insert, Update, Delete from NDB table with BLOB fields ---echo ***** - -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @vc5 = repeat('d', 5000); - -set @bb1 = repeat('1', 2000); -set @bb2 = repeat('2', 5000); -set @bb3 = repeat('3', 10000); -set @bb4 = repeat('4', 40000); -set @bb5 = repeat('5', 50000); - -select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5) -from dual; -select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5) -from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -# CREATE TABLE test.t2 (a1 int NOT NULL, a2 VARCHAR(5000), a3 BLOB) -# TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 VALUES (1,@vc1,@bb1); - INSERT INTO test.t1 VALUES (2,@vc2,@bb2); - INSERT INTO test.t1 VALUES (3,@vc3,@bb3); - INSERT INTO test.t1 VALUES (4,@vc4,@bb4); - INSERT INTO test.t1 VALUES (5,@vc5,@bb5); - - UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1; - SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3) - FROM test.t1 WHERE a1=1; - - UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2; - SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3) - FROM test.t1 WHERE a1=2; - - UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3; - SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3) - FROM test.t1 WHERE a1=3; - - UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4; - SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3) - FROM test.t1 WHERE a1=4; - - UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5; - SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3) - FROM test.t1 WHERE a1=5; - - DELETE FROM test.t1 where a1=5; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=4; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=3; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=2; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=1; - SELECT count(*) from test.t1; - - DROP TABLE test.t1; - -##### Create Stored procedures that use disk based tables ##### ---echo ***** ---echo **** Create Stored procedures that use disk based tables ---echo ***** - -delimiter //; - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB// - CREATE PROCEDURE test.sp1() - BEGIN - INSERT INTO test.t1 values (1,'111111','aaaaaaaa'); - END// -delimiter ;// - - CALL test.sp1(); - SELECT * FROM test.t1; - -delimiter //; - CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB) - BEGIN - UPDATE test.t1 SET a2=vc, a3=blb where a1=n; - END// -delimiter ;// - - CALL test.sp2(1,'222222','bbbbbbbb'); - SELECT * FROM test.t1; - - DELETE FROM test.t1; - DROP PROCEDURE test.sp1; - DROP PROCEDURE test.sp2; - DROP TABLE test.t1; - - -#### Create function that operate on disk based tables #### ---echo ***** ---echo ***** Create function that operate on disk based tables ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - - delimiter //; - CREATE FUNCTION test.fn1(n INT) RETURNS INT - BEGIN - DECLARE v INT; - SELECT a1 INTO v FROM test.t1 WHERE a1=n; - RETURN v; - END// - delimiter ;// - -delimiter //; - CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB - BEGIN - DECLARE vv BLOB; - UPDATE test.t1 SET a3=blb where a1=n; - SELECT a3 INTO vv FROM test.t1 WHERE a1=n; - RETURN vv; - END// - delimiter ;// - - SELECT test.fn1(10) FROM DUAL; - SELECT test.fn2(50, 'new BLOB content') FROM DUAL; - - DELETE FROM test.t1; - DROP FUNCTION test.fn1; - DROP FUNCTION test.fn2; - DROP TABLE test.t1; - -#### Create triggers that operate on disk based tables #### ---echo ***** ---echo ***** Create triggers that operate on disk based tables ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - delimiter //; - CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW - BEGIN - if isnull(new.a2) then - set new.a2:= 'trg1 works on a2 field'; - end if; - if isnull(new.a3) then - set new.a3:= 'trg1 works on a3 field'; - end if; - end// - insert into test.t1 (a1) values (1)// - insert into test.t1 (a1,a2) values (2, 'ccccccc')// - select * from test.t1 order by a1// - delimiter ;// - - DELETE FROM test.t1; - DROP TRIGGER test.trg1; - DROP TABLE test.t1; - -#### Create, update views that operate on disk based tables #### ---echo ***** ---echo ***** Create, update views that operate on disk based tables ---echo ***** - - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=10; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - CREATE VIEW test.v1 AS SELECT * FROM test.t1; - SELECT * FROM test.v1 order by a1; - CHECK TABLE test.v1, test.t1; - - UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5; - SELECT * FROM test.v1 order by a1; - - DROP VIEW test.v1; - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create and use disk based table that use auto inc #### ---echo ***** ---echo ***** Create and use disk based table that use auto inc ---echo ***** - - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=10; - disable_query_log; - while ($1) - { - eval insert into test.t1 values(NULL, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - SELECT * FROM test.t1 ORDER BY a1; - DELETE FROM test.t1; - DROP TABLE test.t1; - - -#### Create test that use transaction (commit, rollback) #### ---echo ***** ---echo ***** Create test that use transaction (commit, rollback) ---echo ***** - - SET AUTOCOMMIT=0; - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - COMMIT; - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - ROLLBACK; - SELECT * FROM test.t1 ORDER BY a1; - - DELETE FROM test.t1; - DROP TABLE test.t1; - SET AUTOCOMMIT=1; - -# Now do the same thing with START TRANSACTION without using AUTOCOMMIT. - - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - START TRANSACTION; - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - COMMIT; - SELECT * FROM test.t1 ORDER BY a1; - - START TRANSACTION; - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - ROLLBACK; - SELECT * FROM test.t1 ORDER BY a1; - - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create test that uses locks #### ---echo ***** ---echo ***** Create test that uses locks ---echo ***** - - connect (con1,localhost,root,,); - connect (con2,localhost,root,,); - -# connection con1; ---disable_warnings - drop table if exists test.t1; - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; ---enable_warnings - - LOCK TABLES test.t1 write; - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - SELECT * FROM test.t1 ORDER BY a1; - - connection con2; - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); - - connection con1; - UNLOCK TABLES; - - connection con2; - INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); - SELECT * FROM test.t1 ORDER BY a1; - DELETE FROM test.t1; - DROP TABLE test.t1; - - #connection defualt; - -#### Create large disk base table, do random queries, check cache hits #### ---echo ***** ---echo ***** Create large disk base table, do random queries, check cache hits ---echo ***** - -set @vc1 = repeat('a', 200); -SELECT @vc1 FROM DUAL; -set @vc2 = repeat('b', 500); -set @vc3 = repeat('b', 998); - -# x0 size 256 -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 (blob part aligned) -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 values(1,@vc1,@d1); - INSERT INTO test.t1 values(2,@vc2,@d2); - --replace_column 9 # - explain SELECT * from test.t1 WHERE a1 = 1; - - SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 WHERE a1=1 ORDER BY a1; - SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) - FROM test.t1 where a1=2 ORDER BY a1; - - UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1; - UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2; - - SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) - FROM test.t1 where a1=1; - SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 where a1=2; - - #SHOW VARIABLES LIKE 'have_query_cache'; - #SHOW STATUS LIKE 'Qcache%'; - - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create test that uses COUNT(), SUM(), MAX(), #### -##### MIN(), NOW(), USER(), TRUNCATE #### ---echo ***** ---echo ***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(), ---echo ***** USER(), TRUNCATE ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), - a3 BLOB, a4 DATE, a5 CHAR(250)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaaaaaaaaaaaaa$1", - "bbbbbbbbbbbbbbbbbb$1", '2006-06-20' , USER()); - dec $1; - } - enable_query_log; - - SELECT COUNT(*) from test.t1; - SELECT SUM(a1) from test.t1; - SELECT MIN(a1) from test.t1; - SELECT MAX(a1) from test.t1; - SELECT a5 from test.t1 where a1=50; - - - SELECT * from test.t1 order by a1; - - DROP TABLE test.t1; - - ALTER TABLESPACE ts1 - DROP DATAFILE './table_space1/datafile.dat' - ENGINE=NDB; - DROP TABLESPACE ts1 ENGINE=NDB; - - ALTER TABLESPACE ts2 - DROP DATAFILE './table_space2/datafile.dat' - ENGINE=NDB; - DROP TABLESPACE ts2 ENGINE=NDB; - - DROP LOGFILE GROUP lg - ENGINE=NDB; - - -#End 5.1 test case - diff --git a/mysql-test/suite/ndb/t/ndb_gis.test b/mysql-test/suite/ndb/t/ndb_gis.test deleted file mode 100644 index babff535f94..00000000000 --- a/mysql-test/suite/ndb/t/ndb_gis.test +++ /dev/null @@ -1,5 +0,0 @@ ---source include/have_ndb.inc -SET storage_engine=ndbcluster; ---source include/gis_generic.inc -set optimizer_switch = "engine_condition_pushdown=on"; ---source include/gis_generic.inc diff --git a/mysql-test/suite/ndb/t/ndb_grant.later b/mysql-test/suite/ndb/t/ndb_grant.later deleted file mode 100644 index 5431d94e1f8..00000000000 --- a/mysql-test/suite/ndb/t/ndb_grant.later +++ /dev/null @@ -1,385 +0,0 @@ --- source include/have_ndb.inc -# Test of GRANT commands - -# Cleanup ---disable_warnings -drop table if exists t1; ---enable_warnings - -SET NAMES binary; - -# -# Alter mysql system tables to ndb -# make sure you alter all back in the end -# -use mysql; -alter table columns_priv engine=ndb; -alter table db engine=ndb; -alter table func engine=ndb; -alter table help_category engine=ndb; -alter table help_keyword engine=ndb; -alter table help_relation engine=ndb; -alter table help_topic engine=ndb; -alter table host engine=ndb; -alter table tables_priv engine=ndb; -alter table time_zone engine=ndb; -alter table time_zone_leap_second engine=ndb; -alter table time_zone_name engine=ndb; -alter table time_zone_transition engine=ndb; -alter table time_zone_transition_type engine=ndb; -alter table user engine=ndb; -use test; - -# -# Test that SSL options works properly -# -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -flush privileges; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; -commit; -show grants for mysqltest_1@localhost; -begin; -grant delete on mysqltest.* to mysqltest_1@localhost; -commit; -select * from mysql.user where user="mysqltest_1"; -show grants for mysqltest_1@localhost; -begin; -revoke delete on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require NONE; -commit; -show grants for mysqltest_1@localhost; -begin; -grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; -commit; -show grants for mysqltest_1@localhost; -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; -flush privileges; - -# -# Test that the new db privileges are stored/retrieved correctly -# - -begin; -grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -flush privileges; -show grants for mysqltest_1@localhost; -begin; -revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; -commit; -flush privileges; -show grants for mysqltest_1@localhost; -begin; -revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant usage on test.* to mysqltest_1@localhost with grant option; -commit; -show grants for mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -delete from mysql.tables_priv where user='mysqltest_1'; -delete from mysql.columns_priv where user='mysqltest_1'; -flush privileges; ---error 1141 -show grants for mysqltest_1@localhost; - -# -# Test what happens when you have same table and colum level grants -# - -create table t1 (a int); -begin; -GRANT select,update,insert on t1 to mysqltest_1@localhost; -GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -begin; -REVOKE select (a), update on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -GRANT select,references on t1 to mysqltest_1@localhost; -commit; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -begin; -grant all on test.* to mysqltest_3@localhost with grant option; -revoke all on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -begin; -revoke grant option on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -begin; -grant all on test.t1 to mysqltest_2@localhost with grant option; -revoke all on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -begin; -revoke grant option on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -flush privileges; -drop table t1; - -# -# Test some error conditions -# -begin; ---error 1221 -GRANT FILE on mysqltest.* to mysqltest_1@localhost; -commit; -select 1; -- To test that the previous command didn't cause problems - -# -# Bug#6123: GRANT USAGE inserts useless Db row -# -create database mysqltest1; -begin; -grant usage on mysqltest1.* to test6123 identified by 'magic123'; -commit; -select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; -delete from mysql.user where user='test6123'; -drop database mysqltest1; - -# -# Test for 'drop user', 'revoke privileges, grant' -# - -create table t1 (a int); -begin; -grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; -commit; -show grants for drop_user2@localhost; -begin; -revoke all privileges, grant option from drop_user2@localhost; -commit; -drop user drop_user2@localhost; - -begin; -grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; -grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; -grant select(a) on test.t1 to drop_user@localhost; -commit; -show grants for drop_user@localhost; - -# -# Bug3086 -# -set sql_mode=ansi_quotes; -show grants for drop_user@localhost; -set sql_mode=default; - -set sql_quote_show_create=0; -show grants for drop_user@localhost; -set sql_mode="ansi_quotes"; -show grants for drop_user@localhost; -set sql_quote_show_create=1; -show grants for drop_user@localhost; -set sql_mode=""; -show grants for drop_user@localhost; - -revoke all privileges, grant option from drop_user@localhost; -show grants for drop_user@localhost; -drop user drop_user@localhost; -begin; ---error 1269 -revoke all privileges, grant option from drop_user@localhost; -commit; - -begin; -grant select(a) on test.t1 to drop_user1@localhost; -commit; -flush privileges; -begin; -grant select on test.t1 to drop_user2@localhost; -grant select on test.* to drop_user3@localhost; -grant select on *.* to drop_user4@localhost; -commit; -flush privileges; -# Drop user now implicitly revokes all privileges. -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -begin; ---error 1269 -revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, -drop_user3@localhost, drop_user4@localhost; -commit; -flush privileges; -#--error 1268 -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -drop table t1; -begin; -grant usage on *.* to mysqltest_1@localhost identified by "password"; -grant select, update, insert on test.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -drop user mysqltest_1@localhost; - -# -# Bug #3403 Wrong encodin in SHOW GRANTS output -# -SET NAMES koi8r; -CREATE DATABASE ÂÄ; -USE ÂÄ; -CREATE TABLE ÔÁ (ËÏÌ int); - -begin; -GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; -commit; - -begin; -GRANT SELECT ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; - -begin; -GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; - -DROP DATABASE ÂÄ; -SET NAMES latin1; - -# -# Bug #5831: REVOKE ALL PRIVILEGES, GRANT OPTION does not revoke everything -# -USE test; -CREATE TABLE t1 (a int ); -CREATE TABLE t2 LIKE t1; -CREATE TABLE t3 LIKE t1; -CREATE TABLE t4 LIKE t1; -CREATE TABLE t5 LIKE t1; -CREATE TABLE t6 LIKE t1; -CREATE TABLE t7 LIKE t1; -CREATE TABLE t8 LIKE t1; -CREATE TABLE t9 LIKE t1; -CREATE TABLE t10 LIKE t1; -CREATE DATABASE testdb1; -CREATE DATABASE testdb2; -CREATE DATABASE testdb3; -CREATE DATABASE testdb4; -CREATE DATABASE testdb5; -CREATE DATABASE testdb6; -CREATE DATABASE testdb7; -CREATE DATABASE testdb8; -CREATE DATABASE testdb9; -CREATE DATABASE testdb10; -begin; -GRANT ALL ON testdb1.* TO testuser@localhost; -GRANT ALL ON testdb2.* TO testuser@localhost; -GRANT ALL ON testdb3.* TO testuser@localhost; -GRANT ALL ON testdb4.* TO testuser@localhost; -GRANT ALL ON testdb5.* TO testuser@localhost; -GRANT ALL ON testdb6.* TO testuser@localhost; -GRANT ALL ON testdb7.* TO testuser@localhost; -GRANT ALL ON testdb8.* TO testuser@localhost; -GRANT ALL ON testdb9.* TO testuser@localhost; -GRANT ALL ON testdb10.* TO testuser@localhost; -GRANT SELECT ON test.t1 TO testuser@localhost; -GRANT SELECT ON test.t2 TO testuser@localhost; -GRANT SELECT ON test.t3 TO testuser@localhost; -GRANT SELECT ON test.t4 TO testuser@localhost; -GRANT SELECT ON test.t5 TO testuser@localhost; -GRANT SELECT ON test.t6 TO testuser@localhost; -GRANT SELECT ON test.t7 TO testuser@localhost; -GRANT SELECT ON test.t8 TO testuser@localhost; -GRANT SELECT ON test.t9 TO testuser@localhost; -GRANT SELECT ON test.t10 TO testuser@localhost; -GRANT SELECT (a) ON test.t1 TO testuser@localhost; -GRANT SELECT (a) ON test.t2 TO testuser@localhost; -GRANT SELECT (a) ON test.t3 TO testuser@localhost; -GRANT SELECT (a) ON test.t4 TO testuser@localhost; -GRANT SELECT (a) ON test.t5 TO testuser@localhost; -GRANT SELECT (a) ON test.t6 TO testuser@localhost; -GRANT SELECT (a) ON test.t7 TO testuser@localhost; -GRANT SELECT (a) ON test.t8 TO testuser@localhost; -GRANT SELECT (a) ON test.t9 TO testuser@localhost; -GRANT SELECT (a) ON test.t10 TO testuser@localhost; -commit; -begin; -REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; -commit; -SHOW GRANTS FOR testuser@localhost; -DROP USER testuser@localhost; -DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -DROP DATABASE testdb1; -DROP DATABASE testdb2; -DROP DATABASE testdb3; -DROP DATABASE testdb4; -DROP DATABASE testdb5; -DROP DATABASE testdb6; -DROP DATABASE testdb7; -DROP DATABASE testdb8; -DROP DATABASE testdb9; -DROP DATABASE testdb10; - -# -# just SHOW PRIVILEGES test -# -SHOW PRIVILEGES; - -# -# Alter mysql system tables back to myisam -# -use mysql; -alter table columns_priv engine=myisam; -alter table db engine=myisam; -alter table func engine=myisam; -alter table help_category engine=myisam; -alter table help_keyword engine=myisam; -alter table help_relation engine=myisam; -alter table help_topic engine=myisam; -alter table host engine=myisam; -alter table tables_priv engine=myisam; -alter table time_zone engine=myisam; -alter table time_zone_leap_second engine=myisam; -alter table time_zone_name engine=myisam; -alter table time_zone_transition engine=myisam; -alter table time_zone_transition_type engine=myisam; -alter table user engine=myisam; -use test; -flush privileges; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_index.test b/mysql-test/suite/ndb/t/ndb_index.test deleted file mode 100644 index 272f30e3e6f..00000000000 --- a/mysql-test/suite/ndb/t/ndb_index.test +++ /dev/null @@ -1,131 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -CREATE TABLE t1 ( - PORT varchar(16) NOT NULL, - ACCESSNODE varchar(16) NOT NULL, - POP varchar(48) NOT NULL, - ACCESSTYPE int unsigned NOT NULL, - CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL, - PROVIDER varchar(16), - TEXPIRE int unsigned, - NUM_IP int unsigned, - LEASED_NUM_IP int unsigned, - LOCKED_IP int unsigned, - STATIC_DNS int unsigned, - SUSPENDED_SERVICE int unsigned, - SUSPENDED_REASON int unsigned, - BGP_COMMUNITY int unsigned, - INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID), - INDEX FQPN_INDEX(POP,ACCESSNODE,PORT), - PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE) -) engine=ndbcluster; - -INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278); - - -# Test select using port -select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype; -select port, accessnode, pop, accesstype from t1 where port='foo'; - -# Test select using accessnode -select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype; -select port, accessnode, pop, accesstype from t1 where accessnode='foo'; - -# Test select using pop -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype; -# The following two querys will not return any rows since -# the index used for access is case sensitive -# They are thus disabled for now -#select port, accessnode, pop, accesstype from t1 where pop='POP98'; -#select port, accessnode, pop, accesstype from t1 where pop='POP98' order by accesstype; -select port, accessnode, pop, accesstype from t1 where pop='foo'; - -# Test select using accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=1; -select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port; -select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port; - -# Test select using customer_id -# NOTE! customer_id has a INDEX (ordered index in NDB), it's case sensitive! -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN'; -select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn'; -select port, accessnode, pop, accesstype from t1 where customer_id='foo'; - -# Test select using provider -select port, accessnode, pop, accesstype from t1 where provider='pr_43'; -select port, accessnode, pop, accesstype from t1 where provider='foo'; - -# Test select using texpire -select port, accessnode from t1 where texpire=121212; -select port, accessnode from t1 where texpire=2323; - -# Test select using num_ip -select port, accessnode, pop, accesstype from t1 where num_ip=1; -select port, accessnode, pop, accesstype from t1 where num_ip=89; - -# Test select using leased_num_ip -select port, accessnode, pop, accesstype from t1 where leased_num_ip=2; -select port, accessnode, pop, accesstype from t1 where leased_num_ip=89; - -# Test select using locked_ip -select port, accessnode, pop, accesstype from t1 where locked_ip=3; -select port, accessnode, pop, accesstype from t1 where locked_ip=89; - -# Test select using static_dns -select port, accessnode, pop, accesstype from t1 where static_dns=8; -select port, accessnode, pop, accesstype from t1 where static_dns=89; - -# Test select using suspended_service -select port, accessnode, pop, accesstype from t1 where suspended_service=8; -select port, accessnode, pop, accesstype from t1 where suspended_service=89; - -# Test select using suspended_reason -select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL; -select port, accessnode, pop, accesstype from t1 where suspended_reason=89; -select port, accessnode, pop, accesstype from t1 where suspended_reason=0; - -# Test select using bgp_community -select port, accessnode, pop, accesstype from t1 where bgp_community=NULL; -select port, accessnode, pop, accesstype from t1 where bgp_community=89; -select port, accessnode, pop, accesstype from t1 where bgp_community=0; - -# Test select using full primary key -select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78'; -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99; - -# Test select using partial primary key -select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98'; -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78'; -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo'; - -# Test select using CUSTOMER_ID_INDEX -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2; -select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn'; - -# Test select using FQPN_INDEX -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67'; -#select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' order by accesstype; -#select port, accessnode, pop, accesstype from t1 where accessnode='node78' and port='port67' and pop='pop98' order by accesstype; -#select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accessnode='node78' order by accesstype; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo'; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_index_ordered.test b/mysql-test/suite/ndb/t/ndb_index_ordered.test deleted file mode 100644 index c8dfc1de59f..00000000000 --- a/mysql-test/suite/ndb/t/ndb_index_ordered.test +++ /dev/null @@ -1,488 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, test1, test2; ---enable_warnings - -# -# Simple test to show use of ordered indexes -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - KEY(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -select * from t1 where b >= 4 order by b; -select * from t1 where b = 4 order by b; -select * from t1 where b > 4 order by b; -select * from t1 where b < 4 order by b; -select * from t1 where b <= 4 order by b; - -# Test of reset_bounds -select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b; -select a, b, c from t1 where a!=2 and c=6; -select a, b, c from t1 where a!=2 order by a; - -# -# Here we should add some "explain select" to verify that the ordered index is -# used for these queries. -# - -# -# Update using ordered index scan -# - -update t1 set c = 3 where b = 3; -select * from t1 order by a; -update t1 set c = 10 where b >= 6; -select * from t1 order by a; -update t1 set c = 11 where b < 5; -select * from t1 order by a; -update t1 set c = 12 where b > 0; -select * from t1 order by a; -update t1 set c = 13 where b <= 3; -select * from t1 order by a; -update t1 set b = b + 1 where b > 4 and b < 7; -select * from t1 order by a; -# Update primary key -update t1 set a = a + 10 where b > 1 and b < 7; -select * from t1 order by a; - -# -# Delete using ordered index scan -# - -drop table t1; - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - KEY(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12); - -delete from t1 where b = 3; -select * from t1 order by a; -delete from t1 where b >= 6; -select * from t1 order by a; -delete from t1 where b < 4; -select * from t1 order by a; -delete from t1 where b > 5; -select * from t1 order by a; -delete from t1 where b <= 4; -select * from t1 order by a; - -drop table t1; - - -# -#multi part key -# -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned not null -) engine = ndb; - -create index a1 on t1 (b, c); - -insert into t1 values (1, 2, 13); -insert into t1 values (2,3, 13); -insert into t1 values (3, 4, 12); -insert into t1 values (4, 5, 12); -insert into t1 values (5,6, 12); -insert into t1 values (6,7, 12); -insert into t1 values (7, 2, 1); -insert into t1 values (8,3, 6); -insert into t1 values (9, 4, 12); -insert into t1 values (14, 5, 4); -insert into t1 values (15,5,5); -insert into t1 values (16,5, 6); -insert into t1 values (17,4,4); -insert into t1 values (18,1, 7); - - - -select * from t1 order by a; -select * from t1 where b<=5 order by a; -select * from t1 where b<=5 and c=0; -insert into t1 values (19,4, 0); -select * from t1 where b<=5 and c=0; -select * from t1 where b=4 and c<=5 order by a; -select * from t1 where b<=4 and c<=5 order by a; -select * from t1 where b<=5 and c=0 or b<=5 and c=2; - -select count(*) from t1 where b = 0; -select count(*) from t1 where b = 1; -drop table t1; - -# -# Indexing NULL values -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - KEY bc(b,c) -) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; - -select * from t1 use index (bc)order by a; -select * from t1 use index (bc) order by a; -select * from t1 use index (PRIMARY) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -select * from t1 use index (bc) where b < 4 order by a; -select * from t1 use index (bc) where b IS NOT NULL order by a; -drop table t1; - -# -# Order by again, including descending. -# - -create table t1 ( - a int unsigned primary key, - b int unsigned, - c char(10), - key bc (b, c) -) engine=ndb; - -insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); -insert into t1 select a*7,10*b,'f' from t1; -insert into t1 select a*13,10*b,'g' from t1; -insert into t1 select a*17,10*b,'h' from t1; -insert into t1 select a*19,10*b,'i' from t1; -insert into t1 select a*23,10*b,'j' from t1; -insert into t1 select a*29,10*b,'k' from t1; -# -select b, c from t1 where b <= 10 and c <'f' order by b, c; -select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; -# -select b, c from t1 where b=4000 and c<'k' order by b, c; -select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; -# -select min(b), max(b) from t1; -# -drop table t1; - -# -# Bug #6435 -CREATE TABLE test1 ( -SubscrID int(11) NOT NULL auto_increment, -UsrID int(11) NOT NULL default '0', -PRIMARY KEY (SubscrID), -KEY idx_usrid (UsrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO test1 VALUES (2,224),(3,224),(1,224); - -CREATE TABLE test2 ( -SbclID int(11) NOT NULL auto_increment, -SbcrID int(11) NOT NULL default '0', -PRIMARY KEY (SbclID), -KEY idx_sbcrid (SbcrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2); -select * from test1 order by 1; -select * from test2 order by 1; -SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON -l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2; -drop table test1; -drop table test2; - -# bug#7424 + bug#7725 - -create table t1 ( - pk int primary key, - dt datetime not null, - da date not null, - ye year not null, - ti time not null, - ts timestamp not null, - index(dt), - index(da), - index(ye), - index(ti), - index(ts) -) engine=ndb; - -insert into t1 (pk,dt,da,ye,ti,ts) values - (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), - (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), - (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), - (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), - (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), - (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), - (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), - (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), - (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); - -# datetime -select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; -select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; -select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; -select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; -select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; -select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; -select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; - -# date -select count(*)-9 from t1 use index (da) where da > '1900-01-01'; -select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; -select count(*)-5 from t1 use index (da) where da > '1955-12-31'; -select count(*)-5 from t1 use index (da) where da < '1970-03-03'; -select count(*)-6 from t1 use index (da) where da < '2001-01-01'; -select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; -select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; - -# year -select count(*)-9 from t1 use index (ye) where ye > '1900'; -select count(*)-6 from t1 use index (ye) where ye >= '1955'; -select count(*)-5 from t1 use index (ye) where ye > '1955'; -select count(*)-5 from t1 use index (ye) where ye < '1970'; -select count(*)-6 from t1 use index (ye) where ye < '2001'; -select count(*)-8 from t1 use index (ye) where ye <= '2001'; -select count(*)-9 from t1 use index (ye) where ye <= '2055'; - -# time -select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; -select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; -select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; -select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; -select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; -select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; -select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; -select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; - -# timestamp -select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; -select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; -select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; -select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; -select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; -select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; - -drop table t1; - -# decimal (not the new 5.0 thing) - -create table t1 ( - a int primary key, - s decimal(12), - t decimal(12, 5), - u decimal(12) unsigned, - v decimal(12, 5) unsigned, - key (s), - key (t), - key (u), - key (v) -) engine=ndb; -# -insert into t1 values - ( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), - ( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), - ( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), - ( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), - ( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), - ( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), - ( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), - ( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), - ( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), - ( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); -# -select count(*)- 5 from t1 use index (s) where s < -000000000007; -select count(*)- 7 from t1 use index (s) where s <= -000000000007; -select count(*)- 2 from t1 use index (s) where s = -000000000007; -select count(*)- 5 from t1 use index (s) where s >= -000000000007; -select count(*)- 3 from t1 use index (s) where s > -000000000007; -# -select count(*)- 4 from t1 use index (t) where t < -0000061.00003; -select count(*)- 5 from t1 use index (t) where t <= -0000061.00003; -select count(*)- 1 from t1 use index (t) where t = -0000061.00003; -select count(*)- 6 from t1 use index (t) where t >= -0000061.00003; -select count(*)- 5 from t1 use index (t) where t > -0000061.00003; -# -select count(*)- 2 from t1 use index (u) where u < 000000000061; -select count(*)- 4 from t1 use index (u) where u <= 000000000061; -select count(*)- 2 from t1 use index (u) where u = 000000000061; -select count(*)- 8 from t1 use index (u) where u >= 000000000061; -select count(*)- 6 from t1 use index (u) where u > 000000000061; -# -select count(*)- 5 from t1 use index (v) where v < 0000965.00042; -select count(*)- 6 from t1 use index (v) where v <= 0000965.00042; -select count(*)- 1 from t1 use index (v) where v = 0000965.00042; -select count(*)- 5 from t1 use index (v) where v >= 0000965.00042; -select count(*)- 4 from t1 use index (v) where v > 0000965.00042; - -drop table t1; - -# -# Disabled due to WL#4284 -# -# Needs to be reworked. It's not possible anymore to do a non-fast alter table -# on a table that is being used by a pending transaction (transaction holds a -# metadata lock on the table). -# -# bug#7798 -# create table t1(a int primary key, b int not null, c int, index(b)); -# insert into t1 values (1,1,1), (2,2,2); -# connect (con1,localhost,root,,test); -# connect (con2,localhost,root,,test); -# connection con1; -# set autocommit=0; -# begin; -# select count(*) from t1; -# connection con2; -# ALTER TABLE t1 ADD COLUMN c int -# connection con1; -# select a from t1 where b = 2; -# show tables; -# drop table t1; -# - -# mysqld 5.0.13 crash, no bug# -create table t1 (a int, c varchar(10), - primary key using hash (a), index(c)) engine=ndb; -insert into t1 (a, c) values (1,'aaa'),(3,'bbb'); -select count(*) from t1 where c<'bbb'; -drop table t1; - -# -- index statistics -- - -set autocommit=1; -show session variables like 'ndb_index_stat_%'; - -set ndb_index_stat_enable = off; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 0; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 4; -set ndb_index_stat_update_freq = 2; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = @@global.ndb_index_stat_enable; -set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries; -set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq; -show session variables like 'ndb_index_stat_%'; - -# End of 4.1 tests - -# bug#24039 - -create table t1 (a int primary key) engine = ndb; -insert into t1 values (1), (2), (3); -begin; -delete from t1 where a > 1; -rollback; -select * from t1 order by a; -begin; -delete from t1 where a > 1; -rollback; - -begin; -select * from t1 order by a; -delete from t1 where a > 2; -select * from t1 order by a; -delete from t1 where a > 1; -select * from t1 order by a; -delete from t1 where a > 0; -select * from t1 order by a; -rollback; -select * from t1 order by a; -delete from t1; -drop table t1; - -# bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index - ---error ER_CANT_CREATE_TABLE -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, - CountryCode char(3) NOT NULL, - DishTitle varchar(64) NOT NULL, - calories smallint(5) unsigned DEFAULT NULL, - PRIMARY KEY (DishID), - INDEX i USING HASH (countrycode,calories) - ) ENGINE=ndbcluster; - -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, - CountryCode char(3) NOT NULL, - DishTitle varchar(64) NOT NULL, - calories smallint(5) unsigned DEFAULT NULL, - PRIMARY KEY (DishID) - ) ENGINE=ndbcluster; - ---error ER_UNSUPPORTED_EXTENSION -create index i on nationaldish(countrycode,calories) using hash; - -drop table nationaldish; diff --git a/mysql-test/suite/ndb/t/ndb_index_unique.test b/mysql-test/suite/ndb/t/ndb_index_unique.test deleted file mode 100644 index 9178ace1ad0..00000000000 --- a/mysql-test/suite/ndb/t/ndb_index_unique.test +++ /dev/null @@ -1,361 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; ---enable_warnings - -# -# Simple test to show use of UNIQUE indexes -# - -CREATE TABLE t1 ( - a int NOT NULL PRIMARY KEY, - b int not null, - c int, - UNIQUE ib(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -select * from t1 where b = 4 order by b; -insert into t1 values(7,8,3); -select * from t1 where b = 4 order by a; - --- error ER_DUP_ENTRY -insert into t1 values(8, 2, 3); -select * from t1 order by a; -delete from t1 where a = 1; -insert into t1 values(8, 2, 3); -select * from t1 order by a; - -alter table t1 drop index ib; -insert into t1 values(1, 2, 3); -# Bug# #18129 ---error 1169 -create unique index ib on t1(b); - -drop table t1; - -# -# Indexing NULL values -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - UNIQUE bc(b,c) -) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; - -select * from t1 use index (bc)order by a; -select * from t1 use index (bc) order by a; -select * from t1 use index (PRIMARY) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -select * from t1 use index (bc) where b < 4 order by a; -select * from t1 use index (bc) where b IS NOT NULL order by a; --- error ER_DUP_ENTRY -insert into t1 values(5,1,1); -drop table t1; - - -# -# Show use of UNIQUE USING HASH indexes -# - -CREATE TABLE t2 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned not null, - UNIQUE (b, c) USING HASH -) engine=ndbcluster; - -insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t2 where a = 3; -select * from t2 where b = 4; -select * from t2 where c = 6; -insert into t2 values(7,8,3); -select * from t2 where b = 4 order by a; - --- error ER_DUP_ENTRY -insert into t2 values(8, 2, 3); -select * from t2 order by a; -delete from t2 where a = 1; -insert into t2 values(8, 2, 3); -select * from t2 order by a; - -# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld -create unique index bi using hash on t2(b); --- error ER_DUP_ENTRY -insert into t2 values(9, 3, 1); -alter table t2 drop index bi; -insert into t2 values(9, 3, 1); -select * from t2 order by a; - -drop table t2; - -CREATE TABLE t2 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - UNIQUE (b, c) USING HASH -) engine=ndbcluster; - - -insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL); - -select * from t2 where c IS NULL order by a; -select * from t2 where b = 3 AND c IS NULL order by a; -select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a; -set @old_optimizer_switch = @@session.optimizer_switch; -set optimizer_switch = "engine_condition_pushdown=on"; -explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -set optimizer_switch = @old_optimizer_switch; - -drop table t2; - -# -# Show use of PRIMARY KEY USING HASH indexes -# - -CREATE TABLE t3 ( - a int unsigned NOT NULL, - b int unsigned not null, - c int unsigned, - PRIMARY KEY (a, b) USING HASH -) engine=ndbcluster; - -insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t3 where a = 3; -select * from t3 where b = 4; -select * from t3 where c = 6; -insert into t3 values(7,8,3); -select * from t3 where b = 4 order by a; - -drop table t3; - -# -# Indexes on NULL-able columns -# - -CREATE TABLE t1 ( - pk int NOT NULL PRIMARY KEY, - a int unsigned, - UNIQUE KEY (a) -) engine=ndbcluster; - -insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); - -select * from t1 order by pk; - ---error ER_DUP_ENTRY -insert into t1 values (5,0); -select * from t1 order by pk; -delete from t1 where a = 0; -insert into t1 values (5,0); -select * from t1 order by pk; - -CREATE TABLE t2 ( - pk int NOT NULL PRIMARY KEY, - a int unsigned, - b tinyint NOT NULL, - c VARCHAR(10), - UNIQUE KEY si(a, c) -) engine=ndbcluster; - -insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); - -select * from t2 order by pk; - ---error ER_DUP_ENTRY -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; -delete from t2 where c IS NOT NULL; -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; - -drop table t1, t2; - -# -# More complex tables -# - -CREATE TABLE t1 ( - cid smallint(5) unsigned NOT NULL default '0', - cv varchar(250) NOT NULL default '', - PRIMARY KEY (cid), - UNIQUE KEY cv (cv) -) engine=ndbcluster; -INSERT INTO t1 VALUES (8,'dummy'); -CREATE TABLE t2 ( - cid bigint(20) unsigned NOT NULL auto_increment, - cap varchar(255) NOT NULL default '', - PRIMARY KEY (cid), - UNIQUE KEY (cid, cap) -) engine=ndbcluster; -INSERT INTO t2 VALUES (NULL,'another dummy'); -CREATE TABLE t3 ( - gid bigint(20) unsigned NOT NULL auto_increment, - gn varchar(255) NOT NULL default '', - must tinyint(4) default NULL, - PRIMARY KEY (gid) -) engine=ndbcluster; -INSERT INTO t3 VALUES (1,'V1',NULL); -CREATE TABLE t4 ( - uid bigint(20) unsigned NOT NULL default '0', - gid bigint(20) unsigned NOT NULL, - rid bigint(20) unsigned NOT NULL, - cid bigint(20) unsigned NOT NULL, - UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t4 VALUES (1,1,2,4); -INSERT INTO t4 VALUES (1,1,2,3); -INSERT INTO t4 VALUES (1,1,5,7); -INSERT INTO t4 VALUES (1,1,10,8); -CREATE TABLE t5 ( - rid bigint(20) unsigned NOT NULL auto_increment, - rl varchar(255) NOT NULL default '', - PRIMARY KEY (rid) -) engine=ndbcluster; -CREATE TABLE t6 ( - uid bigint(20) unsigned NOT NULL auto_increment, - un varchar(250) NOT NULL default '', - uc smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (uid), - UNIQUE KEY nc (un,uc) -) engine=ndbcluster; -INSERT INTO t6 VALUES (1,'test',8); -INSERT INTO t6 VALUES (2,'test2',9); -INSERT INTO t6 VALUES (3,'tre',3); -CREATE TABLE t7 ( - mid bigint(20) unsigned NOT NULL PRIMARY KEY, - uid bigint(20) unsigned NOT NULL default '0', - gid bigint(20) unsigned NOT NULL, - rid bigint(20) unsigned NOT NULL, - cid bigint(20) unsigned NOT NULL, - UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t7 VALUES(1, 1, 1, 1, 1); -INSERT INTO t7 VALUES(2, 2, 1, 1, 1); -INSERT INTO t7 VALUES(3, 3, 1, 1, 1); -INSERT INTO t7 VALUES(4, 4, 1, 1, 1); -INSERT INTO t7 VALUES(5, 5, 1, 1, 1); -INSERT INTO t7 VALUES(6, 1, 1, 1, 6); -INSERT INTO t7 VALUES(7, 2, 1, 1, 7); -INSERT INTO t7 VALUES(8, 3, 1, 1, 8); -INSERT INTO t7 VALUES(9, 4, 1, 1, 9); -INSERT INTO t7 VALUES(10, 5, 1, 1, 10); - -select * from t1 where cv = 'dummy'; -select * from t1 where cv = 'test'; -select * from t2 where cap = 'another dummy'; -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -select * from t4 where uid = 1 order by cid; -select * from t4 where rid = 2 order by cid; -select * from t6 where un='test' and uc=8; -select * from t6 where un='test' and uc=7; -select * from t6 where un='test'; -select * from t7 where mid = 8; -select * from t7 where uid = 8; -select * from t7 where uid = 1 order by mid; -select * from t7 where uid = 4 order by mid; -select * from t7 where gid = 4; -select * from t7 where gid = 1 order by mid; -select * from t7 where cid = 4; -select * from t7 where cid = 8; - -# -# insert more records into t4 -# -let $1=100; -disable_query_log; -while ($1) -{ - eval insert into t4 values(1, $1, 5, 12); - eval insert into t4 values($1, 3, 9, 11); - dec $1; -} -enable_query_log; - -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -select * from t4 where uid = 1 order by gid,cid; -select * from t4 where uid = 1 order by gid,cid; -select * from t4 where rid = 2 order by cid; - - -drop table t1,t2,t3,t4,t5,t6,t7; - -# test null in indexes -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - UNIQUE bc(b,c) ) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 where b=1 and c=1; -select * from t1 where b is null and c is null; -select * from t1 where b is null and c = 2; -select * from t1 where b = 4 and c is null; -create table t8 as -select * from t1 where (b = 1 and c = 1) - or (b is null and c is null) - or (b is null and c = 2) - or (b = 4 and c is null); -select * from t8 order by a; -select * from t1 order by a; -drop table t1, t8; - -############################### -# Bug 8101 -# -# Unique index not specified in the same order as in table -# - -create table t1( - id integer not null auto_increment, - month integer not null, - year integer not null, - code varchar( 2) not null, - primary key ( id), - unique idx_t1( month, code, year) -) engine=ndb; - -INSERT INTO t1 (month, year, code) VALUES (4,2004,'12'); -INSERT INTO t1 (month, year, code) VALUES (5,2004,'12'); - -select * from t1 where code = '12' and month = 4 and year = 2004 ; - -drop table t1; - -# bug#15918 Unique Key Limit in NDB Engine - -create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) -engine=ndb charset=utf8; - -insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); ---error ER_DUP_ENTRY -insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); -select a, sha1(b) from t1; - -# perl -e 'print pack("H2000","e288ab6474"x200)' | sha1sum - -drop table t1; - -# bug#21873 MySQLD Crash on ALTER...ADD..UNIQUE..USING HASH statement for NDB backed table - -create table t1(id int not null) engine = NDB; - -alter table t1 add constraint uk_test unique (id) using hash; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_insert.test b/mysql-test/suite/ndb/t/ndb_insert.test deleted file mode 100644 index d659f8357f2..00000000000 --- a/mysql-test/suite/ndb/t/ndb_insert.test +++ /dev/null @@ -1,641 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of INSERT in NDB -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -SELECT COUNT(*) FROM t1; - -INSERT INTO t1 VALUES -(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505), -(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510), -(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515), -(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520), -(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525), -(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530), -(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535), -(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540), -(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545), -(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550), -(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555), -(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560), -(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565), -(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570), -(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575), -(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580), -(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585), -(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590), -(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595), -(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600), -(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605), -(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610), -(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615), -(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620), -(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625), -(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630), -(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635), -(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640), -(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645), -(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650), -(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655), -(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660), -(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665), -(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670), -(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675), -(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680), -(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685), -(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690), -(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695), -(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700), -(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705), -(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710), -(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715), -(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720), -(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725), -(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730), -(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735), -(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740), -(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745), -(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750), -(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755), -(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760), -(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765), -(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770), -(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775), -(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780), -(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785), -(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790), -(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795), -(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800), -(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805), -(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810), -(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815), -(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820), -(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825), -(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830), -(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835), -(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840), -(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845), -(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850), -(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855), -(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860), -(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865), -(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870), -(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875), -(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880), -(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885), -(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890), -(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895), -(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900), -(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905), -(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910), -(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915), -(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920), -(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925), -(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930), -(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935), -(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940), -(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945), -(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950), -(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955), -(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960), -(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965), -(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970), -(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975), -(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980), -(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985), -(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990), -(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995), -(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000), -(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005), -(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010), -(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015), -(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020), -(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025), -(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030), -(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035), -(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040), -(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045), -(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050), -(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055), -(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060), -(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065), -(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070), -(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075), -(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080), -(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085), -(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090), -(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095), -(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100), -(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105), -(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110), -(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115), -(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120), -(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125), -(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130), -(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135), -(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140), -(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145), -(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150), -(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155), -(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160), -(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165), -(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170), -(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175), -(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180), -(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185), -(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190), -(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195), -(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200), -(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205), -(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210), -(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215), -(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220), -(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225), -(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230), -(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235), -(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240), -(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245), -(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250), -(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255), -(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260), -(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265), -(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270), -(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275), -(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280), -(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285), -(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290), -(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295), -(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300), -(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305), -(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310), -(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315), -(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320), -(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325), -(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330), -(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335), -(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340), -(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345), -(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350), -(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355), -(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360), -(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365), -(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370), -(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375), -(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380), -(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385), -(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390), -(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395), -(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400), -(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405), -(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410), -(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415), -(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420), -(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425), -(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430), -(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435), -(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440), -(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445), -(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450), -(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455), -(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460), -(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465), -(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470), -(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475), -(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480), -(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485), -(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490), -(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495), -(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500), -(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505), -(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510), -(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515), -(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520), -(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525), -(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530), -(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535), -(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540), -(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545), -(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550), -(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555), -(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560), -(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565), -(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570), -(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575), -(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580), -(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585), -(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590), -(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595), -(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600), -(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605), -(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610), -(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615), -(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620), -(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625), -(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630), -(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635), -(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640), -(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645), -(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650), -(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655), -(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660), -(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665), -(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670), -(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675), -(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680), -(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685), -(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690), -(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695), -(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700), -(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705), -(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710), -(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715), -(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720), -(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725), -(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730), -(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735), -(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740), -(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745), -(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750), -(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755), -(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760), -(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765), -(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770), -(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775), -(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780), -(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785), -(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790), -(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795), -(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800), -(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805), -(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810), -(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815), -(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820), -(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825), -(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830), -(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835), -(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840), -(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845), -(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850), -(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855), -(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860), -(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865), -(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870), -(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875), -(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880), -(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885), -(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890), -(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895), -(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900), -(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905), -(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910), -(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915), -(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920), -(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925), -(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930), -(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935), -(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940), -(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945), -(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950), -(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955), -(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960), -(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965), -(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970), -(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975), -(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980), -(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985), -(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990), -(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995), -(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999); - -SELECT COUNT(*) FROM t1; - - -# -# Insert duplicate rows -# ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (1,1,1); - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - -select count(*) from t1; - - -# -# Test that select count(*) can see inserts made in the same transaction -# -begin; -SELECT COUNT(*) FROM t1; -INSERT INTO t1 VALUES -(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005); -SELECT COUNT(*) FROM t1; -rollback; - -# -# Insert duplicate rows, inside transaction -# try to commit -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -commit; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# rollback -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to select, finally rollback -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to select, finally commit -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - ---error 1296 -commit; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to do another insert -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -INSERT INTO t1 values (4000, 40, 44); - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - -# -# Insert duplicate rows using "insert .. select" - -# ---error 1022 -insert into t1 select * from t1 where b < 10 order by pk1; - -DELETE FROM t1 WHERE pk1=2; - -begin; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -rollback; - -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; - -REPLACE INTO t1 values(1, 78, 3); -select * from t1 where pk1=1; - -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79; -select * from t1 where pk1 < 4 order by pk1; - -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c; -select * from t1 where pk1 < 4 order by pk1; - -DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6; -INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b; -select * from t1 where pk1 = b and b != c order by pk1; - -# Test handling of duplicate unique -DELETE FROM t1; -CREATE UNIQUE INDEX bi ON t1(b); -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10; -select * from t1 order by pk1; - -DROP TABLE t1; - -# -# Bug #6331: problem with 'insert ignore' -# - -CREATE TABLE t1(a INT) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -SELECT * FROM t1 ORDER BY a; -DELETE FROM t1; -CREATE UNIQUE INDEX ai ON t1(a); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (NULL),(2); -SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; - -# Ignore and NULL values -CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3); -INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); -SELECT * FROM t1 ORDER BY pk; -DROP TABLE t1; - -# -# Bug #27980 INSERT IGNORE wrongly ignores NULLs in unique index -# - -create table t1(a int primary key, b int, unique key(b)) engine=ndb; -insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); -select * from t1 order by a; -drop table t1; -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_limit.test b/mysql-test/suite/ndb/t/ndb_limit.test deleted file mode 100644 index 01613606d66..00000000000 --- a/mysql-test/suite/ndb/t/ndb_limit.test +++ /dev/null @@ -1,85 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t2; ---enable_warnings - - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - - -# -# insert records into table -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1); - dec $1; -} -enable_query_log; - -select count(*) from t2; - -delete from t2 limit 1; -select count(*) from t2; - -delete from t2 limit 100; -select count(*) from t2; - -delete from t2 limit 1000; -select count(*) from t2; - -update t2 set c=12345678 limit 100; -select count(*) from t2 where c=12345678; -select count(*) from t2 where c=12345678 limit 1000; - -select * from t2 limit 0; - -drop table t2; - -CREATE TABLE `t2` ( - `views` int(11) NOT NULL default '0', - `clicks` int(11) NOT NULL default '0', - `day` date NOT NULL default '0000-00-00', - `hour` tinyint(4) NOT NULL default '0', - `bannerid` smallint(6) NOT NULL default '0', - `zoneid` smallint(6) NOT NULL default '0', - `source` varchar(50) NOT NULL default '', - PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`), - KEY `bannerid_day` (`bannerid`,`day`), - KEY `zoneid` (`zoneid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO `t2` VALUES -( 1,0,'2004-09-17', 5,100,100,''), -( 1,0,'2004-09-18', 7,100,100,''), -( 17,0,'2004-09-27',20,132,100,''), -( 4,0,'2004-09-16',23,132,100,''), -( 86,0,'2004-09-18', 7,196,196,''), -( 11,0,'2004-09-16',16,132,100,''), -(140,0,'2004-09-18', 0,100,164,''), -( 2,0,'2004-09-17', 7,132,100,''), -(846,0,'2004-09-27',11,132,164,''), -( 1,0,'2004-09-18', 8,132,100,''), -( 22,0,'2004-09-27', 9,164,132,''), -(711,0,'2004-09-27', 9,100,164,''), -( 11,0,'2004-09-18', 0,196,132,''), -( 41,0,'2004-09-27',15,196,132,''), -( 57,0,'2004-09-18', 2,164,196,''); - -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC; - -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2; - -drop table t2; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_load.test b/mysql-test/suite/ndb/t/ndb_load.test deleted file mode 100644 index aa48b3dfdcf..00000000000 --- a/mysql-test/suite/ndb/t/ndb_load.test +++ /dev/null @@ -1,24 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test for different types of loading data -# - -# should give duplicate key -CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; ---error 1022 -LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ; -DROP TABLE t1; - -# now without a primary key we should be ok -CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; -LOAD DATA INFILE '../../../std_data/words.dat' INTO TABLE t1 ; -SELECT * FROM t1 ORDER BY word; -DROP TABLE t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_loaddatalocal.test b/mysql-test/suite/ndb/t/ndb_loaddatalocal.test deleted file mode 100644 index 257a26087b7..00000000000 --- a/mysql-test/suite/ndb/t/ndb_loaddatalocal.test +++ /dev/null @@ -1,71 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -create table t1(a int) engine=myisam; -let $1=10000; -disable_query_log; -set SQL_LOG_BIN=0; -while ($1) -{ - insert into t1 values(1); - dec $1; -} -set SQL_LOG_BIN=1; -let $MYSQLD_DATADIR= `select @@datadir`; -enable_query_log; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -#This will generate a 20KB file, now test LOAD DATA LOCAL -drop table t1; - -create table t1(a int) engine=ndb; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; -select count(*) from t1; ---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (2), (3); ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (1), (2), (3); ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (3), (3); ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval select * into outfile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -eval load data local infile '$MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLD_DATADIR/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_lock.test b/mysql-test/suite/ndb/t/ndb_lock.test deleted file mode 100644 index b6cd1ca7eb4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_lock.test +++ /dev/null @@ -1,269 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; ---enable_warnings - -# -# Transaction lock test to show that the NDB -# table handler is working properly with -# transaction locks -# - -# -# Testing of scan isolation -# -connection con1; -create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; -insert into t1 values (1,'one'), (2,'two'); -select * from t1 order by x; - -connection con2; -select * from t1 order by x; - -connection con1; -start transaction; -insert into t1 values (3,'three'); -select * from t1 order by x; - -connection con2; -start transaction; -select * from t1 order by x; - -connection con1; -commit; - -connection con2; -select * from t1 order by x; -commit; - -drop table t1; - -### -# Bug#6020 -create table t1 (pk integer not null primary key, u int not null, o int not null, - unique(u), key(o)) engine = ndb; -insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); - -lock tables t1 write; -delete from t1 where pk = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -lock tables t1 write; -delete from t1 where u = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -lock tables t1 write; -delete from t1 where o = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -drop table t1; - -# Lock for update - -create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; - -insert into t1 values (1,'one',1); - -# PK access -connection con1; -begin; -select * from t1 where x = 1 for update; - -connection con2; -begin; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -rollback; -insert into t1 values (2,'two',2),(3,"three",3); -begin; -select * from t1 where x = 1 for update; - -connection con2; ---error 1205 -select * from t1 where x = 1 for update; -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -# table scan -# -# Note that there are two distinct execution paths in which we unlock -# non-matching rows inspected during table scan - one that is used in -# case of filesort and one that used in rest of cases. Below we cover -# the latter (Bug #20390 "SELECT FOR UPDATE does not release locks of -# untouched rows in full table scans"). -connection con1; -begin; -# We can't use "order by x" here as it will cause filesort ---replace_column 1 # 2 # 3 # -select * from t1 where y = 'one' or y = 'three' for update; - -connection con2; -begin; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# And now the test for case with filesort -begin; -select * from t1 where y = 'one' or y = 'three' order by x for update; -connection con2; -begin; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# index scan -connection con1; -begin; -select * from t1 where z > 1 and z < 3 for update; - -connection con2; -begin; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 1 for update; ---error 1105,1205 -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -# share locking - -# PK access -connection con1; -begin; -select * from t1 where x = 1 lock in share mode; - -connection con2; -begin; -select * from t1 where x = 1 lock in share mode; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# table scan -connection con1; -begin; -# We can't use "order by x" here as it will cause filesort ---replace_column 1 # 2 # 3 # -select * from t1 where y = 'one' or y = 'three' lock in share mode; - -connection con2; -begin; -select * from t1 where y = 'one' lock in share mode; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# And the same test for case with filesort -connection con1; -begin; -select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; - -connection con2; -begin; -select * from t1 where y = 'one' lock in share mode; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# index scan -connection con1; -begin; -select * from t1 where z > 1 and z < 3 lock in share mode; - -connection con2; -begin; -select * from t1 where z = 1 lock in share mode; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 1 for update; ---error 1205 -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -drop table t1; - -# End of 4.1 tests - -# -# Bug #17812 Previous lock table for write causes "stray" lock -# although table is recreated -# -# this creating, locking, and dropping causes a subsequent hang -# on the delete below waiting for table t2 the locking in the -# "other" connection is relevant, as without it there is no problem -# -connection con1; -create table t3 (id2 int) engine=ndb; - -connection con2; -lock tables t3 write; -unlock tables; - -connection con1; -drop table t3; - -connection con1; -create table t2 (id int, j int) engine=ndb; -insert into t2 values (2, 2); -create table t3 (id int) engine=ndb; - -connection con2; -lock tables t3 read; - -connection con1; -# here we get a hang before bugfix although we shouldn't -delete t2 from t2, t3 where t2.id = t3.id; - -connection con2; -unlock tables; - -connection con1; -drop table t2, t3; diff --git a/mysql-test/suite/ndb/t/ndb_lock_table.test b/mysql-test/suite/ndb/t/ndb_lock_table.test deleted file mode 100644 index 6c21e8e8232..00000000000 --- a/mysql-test/suite/ndb/t/ndb_lock_table.test +++ /dev/null @@ -1,15 +0,0 @@ --- source include/have_ndb.inc - -# BUG 30996 ---disable_warnings -drop table if exists t1; ---enable_warnings -create table t1 (a int) engine ndb; -set autocommit=1; -lock table t1 write; -set autocommit=0; -insert into t1 values (0); -rollback; -select * from t1; -unlock tables; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_minmax.test b/mysql-test/suite/ndb/t/ndb_minmax.test deleted file mode 100644 index a3ac677cd2a..00000000000 --- a/mysql-test/suite/ndb/t/ndb_minmax.test +++ /dev/null @@ -1,65 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -CREATE TABLE t1 ( - a int PRIMARY KEY -) engine = ndb; - -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); - -select MAX(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select MIN(a) from t1; -select MIN(a) from t1; -select MIN(a) from t1; -select * from t1 order by a; -select MIN(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select * from t1 order by a; -drop table t1; - - -CREATE TABLE t2 ( - a int PRIMARY KEY, - b int not null, - c int not null, - KEY(b), - UNIQUE(c) -) engine = ndb; - -INSERT INTO t2 VALUES (1, 5, 1); -INSERT INTO t2 VALUES (2, 2, 7); -INSERT INTO t2 VALUES (3, 3, 3); -INSERT INTO t2 VALUES (4, 4, 4); -INSERT INTO t2 VALUES (5, 5, 5); -INSERT INTO t2 VALUES (6, 6, 6); -INSERT INTO t2 VALUES (7, 2, 10); -INSERT INTO t2 VALUES (8, 10, 2); - - -select MAX(a) from t2; -select MAX(b) from t2; -select MAX(c) from t2; -select MIN(a) from t2; -select MIN(b) from t2; -select MIN(c) from t2; -select * from t2 order by a; -select MIN(b) from t2; -select MAX(a) from t2; -select MAX(c) from t2; -select * from t2 order by a; -drop table t2; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_multi.test b/mysql-test/suite/ndb/t/ndb_multi.test deleted file mode 100644 index e033ad1e479..00000000000 --- a/mysql-test/suite/ndb/t/ndb_multi.test +++ /dev/null @@ -1,154 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -connection server2; -drop table if exists t1, t2, t3, t4; -flush status; -connection server1; -drop table if exists t1, t2, t3, t4; -flush status; ---enable_warnings - -# Create test tables on server1 -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like 'handler_discover%'; - -# Check dropping and recreating table on same server -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -select * from t1; -connection con2; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection con1; -select * from t1; - -# Check dropping and recreating table on different server -connection server2; -show status like 'handler_discover%'; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection server1; -select * from t1; -select * from t1; - -# Connect to server2 and use the tables from there -connection server2; -flush status; -select * from t1; -update t1 set a=3 where a=2; -show status like 'handler_discover%'; - -# Create a new table on server2 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; - -# Check that the tables are accessible from server1 -connection server1; -select * from t1; -select * from t3; -show tables like 't4'; -show tables; - -drop table t1, t2, t3, t4; -# bug#21378 -connection server1; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(1),(3),(5); -select * from t1 order by c1; - -connection server2; -show tables; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(100),(344),(533); -select * from t1 order by c1; - -connection server1; -alter table t1 engine=ndb; - -connection server2; -show tables; -select * from t1 order by c1; -drop table t1; - -connection server1; -select * from t1 order by c1; -drop table t1; -# End of 4.1 tests - -# Check distributed drop of database in 5.1 -create database db; -use db; -create table t1(x int) engine=ndb; - -connection server2; -use db; -show tables; - -connection server1; -drop database db; - -connection server2; ---error 1049 -show tables; - -connection server1; - -# bug#21495 -create database db; -use db; -create table t1(x int) engine=ndb; - -connection server2; -use db; -create table t2(x int) engine=myisam; -show tables; - -connection server1; -drop database db; - -connection server2; -show tables; -drop database db; - - -# -# bug#31470, ndb table with special characters in name -# are not discovered correctly -connection server1; -use test; -create table `test`.`t1$EX` - (server_id int unsigned, - master_server_id int unsigned, - master_epoch bigint unsigned, - count int unsigned, - primary key(server_id, master_server_id, - master_epoch, count)) - engine ndb; - -# check that table shows up ok on both servers -# before bugfix table would not show up on server2 ---replace_regex /EX/ex/ -show tables like '%$%'; -connection server2; -use test; ---replace_regex /EX/ex/ -show tables like '%$%'; - -# check cleanup -drop table `test`.`t1$EX`; -show tables like '%$%'; - -connection server1; -show tables like '%$%'; diff --git a/mysql-test/suite/ndb/t/ndb_multi_row.test b/mysql-test/suite/ndb/t/ndb_multi_row.test deleted file mode 100644 index 26953093ed0..00000000000 --- a/mysql-test/suite/ndb/t/ndb_multi_row.test +++ /dev/null @@ -1,76 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/not_embedded.inc --- source include/have_binlog_format_mixed_or_row.inc - - ---disable_warnings -connection server2; -drop table if exists t1, t2, t3, t4; -flush status; -connection server1; -drop table if exists t1, t2, t3, t4; -flush status; ---enable_warnings - - -# Create test tables on server1 -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like 'handler_discover%'; - -# Check dropping and recreating table on same server -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -select * from t1; -connection con2; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection con1; -select * from t1; - -# Check dropping and recreating table on different server -connection server2; -show status like 'handler_discover%'; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection server1; -## Currently a retry is required remotely -#--error 1412 -#select * from t1; -#show warnings; -#flush table t1; -# Table definition change should be propagated automatically -select * from t1; - -# Connect to server2 and use the tables from there -connection server2; -flush status; -select * from t1; -update t1 set a=3 where a=2; -show status like 'handler_discover%'; - -# Create a new table on server2 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; - -# Check that the tables are accessible from server1 -connection server1; -select * from t1; -select * from t3; -show tables like 't4'; -show tables; - -drop table t1, t2, t3, t4; -connection server2; -drop table if exists t1, t3, t4; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_partition_error.test b/mysql-test/suite/ndb/t/ndb_partition_error.test deleted file mode 100644 index 9db2a6a6f6d..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_error.test +++ /dev/null @@ -1,74 +0,0 @@ --- source include/have_ndb.inc -#--disable_abort_on_error -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - ---disable_query_log -set new=on; ---enable_query_log -# -# Partition by range, generate node group error -# ---error 1005 -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5) nodegroup 12, - partition x2 values less than (10) nodegroup 13, - partition x3 values less than (20) nodegroup 14); -show warnings; - -# -# Partition by range, create normal valid table -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -drop table t1; - -# -# Bug #17763 mysqld cores with list partitioning if update to missing partition -# -CREATE TABLE t1 (id INT) ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2); ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -UPDATE t1 SET id=5 WHERE id=2; -DROP TABLE t1; - -# -# NULL for LIST partition -# -create table t1 (a int,b int, c int) -engine = ndb -partition by list(a) -partitions 2 -(partition x123 values in (11, 12), - partition x234 values in (5, 1)); ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -insert into t1 values (NULL,1,1); -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt b/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt deleted file mode 100644 index 955f7692c8b..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---ndbcluster diff --git a/mysql-test/suite/ndb/t/ndb_partition_error2.test b/mysql-test/suite/ndb/t/ndb_partition_error2.test deleted file mode 100644 index afedd0e3c5c..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_error2.test +++ /dev/null @@ -1,14 +0,0 @@ -disable_query_log; ---require r/true.require -select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; -enable_query_log; - ---disable_warnings -drop table if exists t1; ---enable_warnings -# -# Bug #27359 Partitions: memory allocation error message -# ---error ER_PARTITION_NOT_DEFINED_ERROR -create table t1 (s1 int) engine=ndbcluster; - diff --git a/mysql-test/suite/ndb/t/ndb_partition_key.test b/mysql-test/suite/ndb/t/ndb_partition_key.test deleted file mode 100644 index a3898407445..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_key.test +++ /dev/null @@ -1,244 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic syntax test -# - -# Support for partition key verified -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c)) - ENGINE = NDB - PARTITION BY KEY (a,b); - -insert into t1 values (1,1,1,1); -select * from t1; -update t1 set d = 2 where a = 1 and b = 1 and c = 1; -select * from t1; -delete from t1; -select * from t1; - -drop table t1; - -# only support for partition key on primary key ---error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b)) - ENGINE = NDB - PARTITION BY KEY (c); - -CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b)) - ENGINE = NDB - PARTITION BY KEY (a); - -insert into t1 values - (1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3), - (1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3); - -select * from t1 order by b; - -# BUG#33061: ORDER BY DESC becomes ASC in NDB partition pruning to one partition -select max(b) from t1 where a = 1; -select b from t1 where a = 1 order by b desc; - -DROP TABLE t1; - -# -# Test partition and char support -# - -CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT, - PRIMARY KEY (a,b,c) USING HASH) - ENGINE=NDB - DEFAULT CHARSET=latin1 - PARTITION BY KEY (b); - -insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1); - -# should show only one attribute with DISTRIBUTION KEY ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | sed 's/Version: [0-9]*//' | sed 's/\(Length of frm data: \)[0-9]*/\1#/' - -# -# Test that explicit partition info is not shown in show create table -# result should not contain (PARTITION P0 ... etc) since this is what shows up in -# mysqldump, and we don't want that info there -# -show create table t1; - -DROP TABLE t1; - -# -# Bug #13155: Problem in Create Table using SHOW CREATE TABLE syntax -# -CREATE TABLE t1 (a int not null primary key) -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -CREATE TABLE t1 (a int not null primary key); -ALTER TABLE t1 -ENGINE = NDB -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -CREATE TABLE t1 (a int not null primary key) ENGINE = NDB; -ALTER TABLE t1 -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -# -# Bug #17754 Improper handling of removal of partitioning in ALTER TABLE -# Also added a number of general test cases in the same area -# -create table t1 (a int) -engine=ndb -partition by key(a) -(partition p0, partition p1); -show create table t1; - -alter table t1 engine=heap; -show create table t1; - -alter table t1 engine=ndb; -show create table t1; - -alter table t1 engine=heap remove partitioning; -show create table t1; - -alter table t1 engine=ndb -partition by key(a) -(partition p0, partition p1 engine = ndb); -show create table t1; - -alter table t1 -partition by key (a) -(partition p0 engine=ndb, partition p1 engine=ndb); -show create table t1; - -alter table t1 remove partitioning; -show create table t1; - -# after bug#31931 was fixed -# this is OK, since the storage engine is specified -# on table level before. -#--error ER_MIX_HANDLER_ERROR -alter table t1 -partition by key(a) -(partition p0 engine=ndb, partition p1); - -alter table t1 -engine=ndb -partition by key(a) -(partition p0 engine=ndb, partition p1 engine = ndb); -show create table t1; - -drop table t1; - -# -# BUG 16810 Out of memory when coalesce partition -# -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - c4 BIT NOT NULL, - c5 FLOAT, - c6 VARCHAR(255), - c7 TIMESTAMP, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) PARTITIONS 5; - -let $j= 11; ---disable_query_log -while ($j) -{ - eval INSERT INTO t1 VALUES (NULL, "Tested Remotely from Texas, USA", $j, -b'0', - $j.00,"By JBM $j","2006-01-26"); - dec $j; -} ---enable_query_log -ALTER TABLE t1 COALESCE PARTITION 4; - -DROP TABLE t1; - -# -# Bug 16822: OPTIMIZE TABLE hangs test -# -CREATE TABLE t1 (a int primary key) -ENGINE=NDB -PARTITION BY KEY(a); -ANALYZE TABLE t1; -CHECK TABLE t1; -OPTIMIZE TABLE t1; -REPAIR TABLE t1; -ALTER TABLE t1 OPTIMIZE PARTITION p0; -ALTER TABLE t1 CHECK PARTITION p0; -ALTER TABLE t1 REPAIR PARTITION p0; -ALTER TABLE t1 ANALYZE PARTITION p0; ---error ER_ILLEGAL_HA -ALTER TABLE t1 REBUILD PARTITION p0; -DROP TABLE t1; - -# -# BUG 16806: ALTER TABLE fails -# -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) PARTITIONS 5; - -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -DROP TABLE t1; - -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) - (PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); - -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE -table_name = "t1"; -DROP TABLE t1; - -# bug#25587 - -CREATE TABLE t1 ( -a tinyint unsigned NOT NULL, -b bigint(20) unsigned NOT NULL, -c char(12), -PRIMARY KEY (a,b) -) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a); - -insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5'); -select * from t1 where a = 1; -select * from t1 where a = 2; -select * from t1 where a = 3; -select * from t1 where a = 4; -select * from t1 where a = 5; -delete from t1 where a = 1; -select * from t1 order by 1; -delete from t1 where a = 2; -select * from t1 order by 1; -delete from t1 where a = 3; -select * from t1 order by 1; -delete from t1 where a = 4; -select * from t1 order by 1; -delete from t1 where a = 5; -select * from t1 order by 1; - -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_partition_list.test b/mysql-test/suite/ndb/t/ndb_partition_list.test deleted file mode 100644 index ccfcdbc84f4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_list.test +++ /dev/null @@ -1,68 +0,0 @@ ---source include/have_ndb.inc -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Partition by list, basic -# - -CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL, - f_char1 CHAR(10), - f_char2 CHAR(10), f_charbig VARCHAR(1000), -PRIMARY KEY (f_int1,f_int2)) -ENGINE = NDB -PARTITION BY LIST(MOD(f_int1 + f_int2,4)) -(PARTITION part_3 VALUES IN (-3), - PARTITION part_2 VALUES IN (-2), - PARTITION part_1 VALUES IN (-1), - PARTITION part0 VALUES IN (0), - PARTITION part1 VALUES IN (1), - PARTITION part2 VALUES IN (2), - PARTITION part3 VALUES IN (3,4,5)); - -INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; - -SELECT * FROM t1 ORDER BY f_int1; - -DROP TABLE t1; - -# -# Partition by list, no pk -# - -CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10), - f_char2 CHAR(10), f_charbig VARCHAR(1000)) -ENGINE = NDB -PARTITION BY LIST(f_int1) -(PARTITION part_1 VALUES IN (-1), - PARTITION part0 VALUES IN (0,1), - PARTITION part1 VALUES IN (2)); - -INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; - -SELECT * FROM t1 ORDER BY f_int1; - -DROP TABLE t1; - diff --git a/mysql-test/suite/ndb/t/ndb_partition_range.test b/mysql-test/suite/ndb/t/ndb_partition_range.test deleted file mode 100644 index 778e552c6d8..00000000000 --- a/mysql-test/suite/ndb/t/ndb_partition_range.test +++ /dev/null @@ -1,269 +0,0 @@ --- source include/have_ndb.inc -#--disable_abort_on_error -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Partition by range, basic -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -# Simple insert and verify test -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (6, 1, 1); -INSERT into t1 values (10, 1, 1); -INSERT into t1 values (15, 1, 1); - ---replace_column 16 # 19 # 20 # -select * from information_schema.partitions where table_name= 't1'; - -select * from t1 order by a; - -select * from t1 where a=1 order by a; -select * from t1 where a=15 and b=1 order by a; -select * from t1 where a=21 and b=1 order by a; -select * from t1 where a=21 order by a; -select * from t1 where a in (1,6,10,21) order by a; -select * from t1 where b=1 and a in (1,6,10,21) order by a; - -# BUG#33061: ORDER BY DESC becomes ASC in NDB partition pruning to one partition -INSERT into t1 values (1, 2, 2); -select max(b) from t1 where a = 1; -select b from t1 where a = 1 order by b desc; - -drop table t1; - -# -# Partition by range, basic -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(b), -unique (a)) -engine = ndb -partition by range (b) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -# Simple insert and verify test -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (2, 6, 1); -INSERT into t1 values (3, 10, 1); -INSERT into t1 values (4, 15, 1); - -select * from t1 order by a; -UPDATE t1 set a = 5 WHERE b = 15; -select * from t1 order by a; -UPDATE t1 set a = 6 WHERE a = 5; -select * from t1 order by a; - -select * from t1 where b=1 order by b; -select * from t1 where b=15 and a=1 order by b; -select * from t1 where b=21 and a=1 order by b; -select * from t1 where b=21 order by b; -select * from t1 where b in (1,6,10,21) order by b; -select * from t1 where a in (1,2,5,6) order by b; -select * from t1 where a=1 and b in (1,6,10,21) order by b; - -DELETE from t1 WHERE b = 6; -DELETE from t1 WHERE a = 6; - -# -# Test that explicit partition info _is_ shown in show create table -# result _should_ contain (PARTITION x1 ... etc) -# -show create table t1; - -drop table t1; - -# -# Bug #17499, #17687 -# Alter partitioned NDB table causes mysqld to core -# - -CREATE TABLE t1 - (id MEDIUMINT NOT NULL, - b1 BIT(8), - vc VARCHAR(255), - bc CHAR(255), - d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, - total BIGINT UNSIGNED, - y YEAR, - t DATE) ENGINE=NDB - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - -INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -ALTER TABLE t1 ENGINE=MYISAM; -SELECT * FROM t1; -DROP TABLE t1; - -CREATE LOGFILE GROUP lg1 - ADD UNDOFILE 'undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE=1M - ENGINE=NDB; - -CREATE TABLESPACE ts1 - ADD DATAFILE 'datafile.dat' - USE LOGFILE GROUP lg1 - INITIAL_SIZE 12M - ENGINE NDB; - -CREATE TABLE test.t1 ( - a1 INT, - a2 TEXT NOT NULL, - a3 BIT NOT NULL, - a4 DECIMAL(8,3), - a5 INT NOT NULL, - a6 INT, - PRIMARY KEY(a1)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB - PARTITION BY LIST (a1) - (PARTITION p0 VALUES IN (1,2,3,4,5), - PARTITION p1 VALUES IN (6,7,8,9, 10), - PARTITION p2 VALUES IN (11, 12, 13, 14, 15)); - -# Alter table directly without any statements inbetween -ALTER TABLE test.t1 DROP COLUMN a6; -ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255); - -let $j= 15; ---disable_query_log -while ($j) -{ -eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", -b'1',$j.00,$j+1,"By NIK $j"); -dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; - -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; - -DROP TABLE t1; - -CREATE TABLE test.t1 ( - a1 INT, - a2 TEXT NOT NULL, - a3 BIT NOT NULL, - a4 DECIMAL(8,3), - a5 INT NOT NULL, - a6 VARCHAR(255), - PRIMARY KEY(a1)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB - PARTITION BY HASH(a1) - PARTITIONS 4; - -let $j= 15; ---disable_query_log -while ($j) -{ -eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", -b'1',$j.00,$j+1,"By NIK $j"); -dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; - -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; - -DROP TABLE t1; - -ALTER TABLESPACE ts1 - DROP DATAFILE 'datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; - - -# -# Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test -# - -CREATE TABLE t1 - (id MEDIUMINT NOT NULL, - b1 BIT(8), - vc VARCHAR(255), - bc CHAR(255), - d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, - total BIGINT UNSIGNED, - y YEAR, - t DATE) ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); - -INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -ALTER TABLE t1 ADD PARTITION - (PARTITION p2 VALUES IN (412)); -SELECT * FROM t1; -DROP TABLE t1; - -# -# Bug #17806 Update on NDB table with list partition causes mysqld to core -# Bug #16385 Partitions: crash when updating a range partitioned NDB table -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null) -partition by list(a) -partitions 2 -(partition x123 values in (1,5,6), - partition x234 values in (4,7,8)); -INSERT into t1 VALUES (5,1,1); -select * from t1; -UPDATE t1 SET a=8 WHERE a=5 AND b=1; -select * from t1; -drop table t1; - -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb -PARTITION BY RANGE(f1) -( PARTITION part1 VALUES LESS THAN (2), -PARTITION part2 VALUES LESS THAN (1000)); -INSERT INTO t1 VALUES(1, '---1---'); -INSERT INTO t1 VALUES(2, '---2---'); -select * from t1 order by f1; -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2; -select * from t1 order by f1; -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1; -select * from t1 order by f1; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_read_multi_range.test b/mysql-test/suite/ndb/t/ndb_read_multi_range.test deleted file mode 100644 index 1c439e65099..00000000000 --- a/mysql-test/suite/ndb/t/ndb_read_multi_range.test +++ /dev/null @@ -1,340 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2, r1; ---enable_warnings - -# -# Basic test to see that batching is working -# - -create table t1 ( - a int primary key, - b int not null, - c int not null, - index(b), unique index using hash(c) -) engine = ndb; -insert into t1 values - (1,2,1),(2,3,2),(3,4,3),(4,5,4), - (5,2,12),(6,3,11),(7,4,10),(8,5,9), - (9,2,8),(10,3,7),(11,4,6),(12,5,5); - -# batch on primary key -create table r1 as select * from t1 where a in (2,8,12); -select * from r1 order by a; -drop table r1; - -# batch on ordered index -create table r1 as select * from t1 where b in (1,2,5); -select * from r1 order by a; -drop table r1; - -# batch on unique hash index -create table r1 as select * from t1 where c in (2,8,12); -select * from r1 order by a; -drop table r1; - -# batch mixed -create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); -select * from r1 order by a; -drop table r1; - -# batch on primary key, missing values -create table r1 as select * from t1 where a in (33,8,12); -select * from r1 order by a; -drop table r1; -create table r1 as select * from t1 where a in (2,33,8,12,34); -select * from r1 order by a; -drop table r1; - -# batch on ordered index, missing values -create table r1 as select * from t1 where b in (1,33,5); -select * from r1 order by a; -drop table r1; -select * from t1 where b in (1,33,5) order by a; -create table r1 as select * from t1 where b in (45,1,33,5,44); -select * from r1 order by a; -drop table r1; -select * from t1 where b in (45,22) order by a; - -# batch on unique hash index, missing values -create table r1 as select * from t1 where c in (2,8,33); -select * from r1 order by a; -drop table r1; -create table r1 as select * from t1 where c in (13,2,8,33,12); -select * from r1 order by a; -drop table r1; - -select * from t1 where a in (33,8,12) order by a; -select * from t1 where a in (33,34,35) order by a; -select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; -select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; -select * from t1 where c in (13,2,8,33,12) order by c,a; -drop table t1; - -# -# Somewhat more complicated -# - -create table t1 ( - a int not null, - b int not null, - c int not null, - d int not null, - e int not null, - primary key (a,b,c,d), index (d) -) engine = ndb; - -insert into t1 values - (1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), - (5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), - (9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), - (1,2,1,2,1), - (1,2,1,3,1), - (1,2,1,4,1), - (1,2,1,5,1); - -# batch on primary key -create table r1 as select * from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2); -select * from r1 order by a,b,c,d; -drop table r1; - -# batched update ordered index, one value for all -update t1 set e = 100 - where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -select * from t1 where d not in (12,6,7) and e = 100; - -# batched update primary key, one value for all -update t1 - set e = 101 - where a=1 and - b=2 and - c=1 and - d in (1,4,3,2); -select * - from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2) - order by a,b,c,d; -select * - from t1 - where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) - and e=101; - - -# batched update ordered index, different values -update t1 - set e = - (case d - when 12 then 112 - when 6 then 106 - when 7 then 107 - end) - where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; - -# batched update primary key, different values -update t1 - set e = - (case d - when 1 then 111 - when 4 then 444 - when 3 then 333 - when 2 then 222 - end) - where a=1 and - b=2 and - c=1 and - d in (1,4,3,2); -select * - from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2) - order by a,b,c,d; - -# batched delete -delete from t1 where d in (12,6,7); -select * from t1 where d in (12,6,7); - -drop table t1; - -# null handling -create table t1 ( - a int not null primary key, - b int, - c int, - d int, - unique index (b), - index(c) -) engine = ndb; - -insert into t1 values - (1,null,1,1), - (2,2,2,2), - (3,null,null,3), - (4,4,null,4), - (5,null,5,null), - (6,6,6,null), - (7,null,null,null), - (8,8,null,null), - (9,null,9,9), - (10,10,10,10), - (11,null,null,11), - (12,12,null,12), - (13,null,13,null), - (14,14,14,null), - (15,null,null,null), - (16,16,null,null); - -create table t2 as select * from t1 where a in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -create table t2 as select * from t1 where b in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -create table t2 as select * from t1 where c in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -drop table t1; - -# bug17729 - -CREATE TABLE t1 ( - a int(11) NOT NULL, - b int(11) NOT NULL, - c datetime default NULL, - PRIMARY KEY (a), - KEY idx_bc (b,c) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES -(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), -(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), -(406994,67,'2006-02-27 11:26:46'), (256,67,NULL), -(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), -(406988,67,'2006-02-23 17:07:22'), (255,67,NULL), -(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), -(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), -(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), -(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), -(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), -(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), -(223456,67,NULL),(4101,67,NULL),(1133,67,NULL), -(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), -(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), -(154503,67,'2005-10-28 11:52:38'); - -create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; -create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; -create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; -create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; - -select * from t11 order by 1,2,3; -select * from t12 order by 1,2,3; -select * from t21 order by 1,2,3; -select * from t22 order by 1,2,3; - -# join tests -select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a; - -update t22 set c = '2005-12-08 15:58:27' where a = 255; -select * from t22 order by 1,2,3; -select t21.* from t21,t22 where t21.a = t22.a and -t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; - -delete from t22 where a > 245651; -update t22 set b = a + 1; -select * from t22 order by 1,2,3; -select t21.c, count(*) -from t21 -inner join t22 using (a) -where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652) -group by t21.c -order by t21.c; - -DROP TABLE t1, t11, t12, t21, t22; - -# bug#19956 -CREATE TABLE t1 (id varchar(255) NOT NULL, - tag int(11) NOT NULL, - doc text NOT NULL, - type varchar(150) NOT NULL, - modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (id) - ) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); - -DROP TABLE t1; - -#bug#25522 -CREATE TABLE t1 ( - var1 int(2) NOT NULL, - var2 int(2) NOT NULL, - PRIMARY KEY (var1) - ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; - - -CREATE TABLE t2 ( - var1 int(2) NOT NULL, - var2 int(2) NOT NULL, - PRIMARY KEY (var1) - ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; - - -DELIMITER |; -CREATE TRIGGER testtrigger - AFTER UPDATE ON t1 FOR EACH ROW BEGIN - REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| -DELIMITER ;| - -INSERT INTO t1 VALUES (1,1),(2,2),(3,3); - -UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); - -DROP TRIGGER testtrigger; - -DROP TABLE t1, t2; - -#bug#25821 -create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; - -insert into t1 values (1,1), (10,10); - -select * from t1 use index (ab) where a in(1,10) order by a; - -create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster -partition by key(a); - -insert into t2 values (1,1), (10,10); - -select * from t2 where a in (1,10) order by a; -drop table t1, t2; - -#bug#30337 - -create table t1 (id int primary key) engine ndb; -insert into t1 values (1), (2), (3); - -create table t2 (id int primary key) engine ndb; -insert into t2 select id from t1; - -delimiter |; -create trigger kaboom after delete on t1 -for each row begin - delete from t2 where id=old.id; -end| -delimiter ;| - -select * from t1 order by id; -delete from t1 where id in (1,2); -select * from t2 order by id; - -drop trigger kaboom; -drop table t1, t2; diff --git a/mysql-test/suite/ndb/t/ndb_rename.test b/mysql-test/suite/ndb/t/ndb_rename.test deleted file mode 100644 index 7f9fd0e6984..00000000000 --- a/mysql-test/suite/ndb/t/ndb_rename.test +++ /dev/null @@ -1,36 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2; -drop database if exists mysqltest; ---enable_warnings - -# -# Table rename tests -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10), - INDEX i1(attr1) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two"); -SELECT * FROM t1 WHERE attr1 = 1; -alter table t1 rename t2; -SELECT * FROM t2 WHERE attr1 = 1; - -create database ndbtest; -alter table t2 rename ndbtest.t2; -SELECT * FROM ndbtest.t2 WHERE attr1 = 1; - -drop table ndbtest.t2; -drop database ndbtest; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_replace.test b/mysql-test/suite/ndb/t/ndb_replace.test deleted file mode 100644 index 432cf7f2dcd..00000000000 --- a/mysql-test/suite/ndb/t/ndb_replace.test +++ /dev/null @@ -1,104 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# -# Test of REPLACE with NDB -# - ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - -CREATE TABLE t1 ( - gesuchnr int(11) DEFAULT '0' NOT NULL, - benutzer_id int(11) DEFAULT '0' NOT NULL, - PRIMARY KEY (gesuchnr,benutzer_id) -) engine=ndbcluster; - -replace into t1 (gesuchnr,benutzer_id) values (2,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr, benutzer_id) value (3,2); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); ---error ER_DUP_ENTRY -insert into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -select * from t1 order by gesuchnr; -drop table t1; - -# End of 4.1 tests - -# bug#17431 -CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT, - j INT, - k INT, - UNIQUE INDEX(j) - ) ENGINE = ndb; -INSERT INTO t1 VALUES (1,1,23),(2,2,24); -REPLACE INTO t1 (j,k) VALUES (1,42); -REPLACE INTO t1 (i,j) VALUES (17,2); -SELECT * from t1 ORDER BY i; -DROP TABLE t1; - -# bug#19906 -CREATE TABLE t2 (a INT(11) NOT NULL, - b INT(11) NOT NULL, - c INT(11) NOT NULL, - x TEXT, - y TEXT, - z TEXT, - id INT(10) unsigned NOT NULL AUTO_INCREMENT, - i INT(11) DEFAULT NULL, - PRIMARY KEY (id), - UNIQUE KEY a (a,b,c) -) ENGINE=ndbcluster; - -REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3); - -SELECT * FROM t2 ORDER BY id; - -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1); -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2); - -SELECT * FROM t2 ORDER BY id; - -DROP TABLE t2; - -# -# Bug #20728 "REPLACE does not work correctly for NDB table with PK and -# unique index" -# ---disable_warnings -drop table if exists t1; ---enable_warnings -create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster; -# Test for plain replace which updates pk -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (4, 1), (5, 2); -select * from t1 order by pk; -delete from t1; -# Another test for plain replace which doesn't touch pk -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (1, 4), (2, 5); -select * from t1 order by pk; -delete from t1; -# Test for load data replace which updates pk -insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -delete from t1; -# Now test for load data replace which doesn't touch pk -insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -delete from t1; -# Finally test for both types of replace ... select -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) select 4, 1; -replace into t1 (pk, apk) select 2, 4; -select * from t1 order by pk; -# Clean-up -drop table t1; - ---echo End of 5.0 tests. diff --git a/mysql-test/suite/ndb/t/ndb_restore.test b/mysql-test/suite/ndb/t/ndb_restore.test deleted file mode 100644 index c8b07fd351a..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore.test +++ /dev/null @@ -1,413 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---enable_warnings - -# Bug #27775 - mediumint auto inc not restored correctly -# - check mediumint -CREATE TABLE `t1_c` ( - `capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment, - `goaledatta` char(2) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt'); -# -# Bug #27758 Restoring NDB backups makes table usable in SQL nodes -# - space in key made table unusable after restore -# -# Bug #27775 - mediumint auto inc not restored correctly -# - check smallint -CREATE TABLE `t2_c` ( - `capgotod` smallint(5) unsigned NOT NULL auto_increment, - `gotod` smallint(5) unsigned NOT NULL default '0', - `goaledatta` char(2) default NULL, - `maturegarbagefa` varchar(32) default NULL, - `descrpooppo` varchar(64) default NULL, - `svcutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capgotod`), - KEY `i quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,''); - -# Added ROW_FORMAT=FIXED to use below to see that setting is preserved -# by restore -CREATE TABLE `t3_c` ( - `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', - `capgotod` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); - -# Bug #27775 - mediumint auto inc not restored correctly -# - check bigint -CREATE TABLE `t4_c` ( - `capfa` bigint(20) unsigned NOT NULL auto_increment, - `realm` varchar(32) NOT NULL default '', - `authpwchap` varchar(32) default NULL, - `fa` varchar(32) NOT NULL default '', - `payyingatta` tinyint(4) NOT NULL default '0', - `status` char(1) default NULL, - PRIMARY KEY (`fa`,`realm`), - KEY `capfa` (`capfa`), - KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); - -CREATE TABLE `t5_c` ( - `capfa` bigint(20) unsigned NOT NULL default '0', - `gotod` smallint(5) unsigned NOT NULL default '0', - `orderutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); - -CREATE TABLE `t6_c` ( - `capfa_parent` bigint(20) unsigned NOT NULL default '0', - `capfa_child` bigint(20) unsigned NOT NULL default '0', - `relatta` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); - -# Bug #27775 - mediumint auto inc not restored correctly -# - check tinyint -CREATE TABLE `t7_c` ( - `dardpo` char(15) NOT NULL default '', - `dardtestard` tinyint(3) unsigned NOT NULL auto_increment, - `FastFA` char(5) NOT NULL default '', - `FastCode` char(6) NOT NULL default '', - `Fastca` char(1) NOT NULL default '', - `Fastmag` char(1) NOT NULL default '', - `Beareratta` char(2) NOT NULL default '', - PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); - -CREATE TABLE `t8_c` ( - `kattjame` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `aaaproxysessfa` varchar(255) default NULL, - `autologonallowed` char(1) default NULL, - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `acctoutputoctets` bigint(20) unsigned default NULL, - `acctinputoctets` bigint(20) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), - KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); - -CREATE TABLE `t9_c` ( - `kattjame` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `actcoutpuocttets` bigint(20) unsigned default NULL, - `actinputocctets` bigint(20) unsigned default NULL, - `terminateraste` tinyint(3) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); - -# Bug #20820 -# auto inc table not handled correctly when restored from cluster backup -# - before fix ndb_restore would not set auto inc value correct, -# seen by select below -CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t10_c VALUES (1),(2),(3); -# Bug #27775 - mediumint auto inc not restored correctly -# - check int -insert into t10_c values (10000),(2000),(3000); - -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -create table t10 engine=myisam as select * from t10_c; - -# check that force varpart is preserved by ndb_restore -# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT -# check that force varpart is preserved by ndb_restore -# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart - -# Bug #30667 -# ndb table discovery does not work correcly with information schema -# - prior to bug fix this would yeild no output and a warning -select * from information_schema.columns where table_name = "t1_c"; - -# random output order?? -#show tables; - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# Bug #20820 cont'd -select * from t10_c order by a; -# Bug #27775 cont'd -# - auto inc info should be correct -select max(capgoaledatta) from t1_c; -select auto_increment from information_schema.tables -where table_name = 't1_c'; -select max(capgotod) from t2_c; -select auto_increment from information_schema.tables -where table_name = 't2_c'; -select max(capfa) from t4_c; -select auto_increment from information_schema.tables -where table_name = 't4_c'; -select max(dardtestard) from t7_c; -select auto_increment from information_schema.tables -where table_name = 't7_c'; -select max(a) from t10_c; -select auto_increment from information_schema.tables -where table_name = 't10_c'; - -# -# Try Partitioned tables as well -# -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Drop all table except t2_c -# This to make sure that error returned from ndb_restore above is -# guaranteed to be from t2_c, this since order of tables in backup -# is none deterministic -# -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---source include/ndb_backup.inc ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true - -# -# Cleanup -# - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t2_c; ---enable_warnings - -# -# Test BUG#10287 -# - ---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" - -# End of 5.0 tests (4.1 test intermixed to save test time) diff --git a/mysql-test/suite/ndb/t/ndb_restore_compat.test b/mysql-test/suite/ndb/t/ndb_restore_compat.test deleted file mode 100644 index 8e5b30aa6fd..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_compat.test +++ /dev/null @@ -1,67 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc --- source include/have_case_sensitive_file_system.inc - -# This test currently requires case sensitive file system as the tables -# are originally stored with uppercase - -# -# Bug #18594 ndb_restore log boken in 5.1 -# - ---disable_warnings -DROP DATABASE IF EXISTS BANK; ---enable_warnings -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT -USE BANK; -SHOW TABLES; -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -SELECT COUNT(*) FROM TRANSACTION; -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; - -# Check that force varpart is set by ndb_restore ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart - -# -# verify restore of 5.0 backup -# here we must use the already created tables as restoring the old -# table definitions will not work -# -TRUNCATE GL; -TRUNCATE ACCOUNT; -TRUNCATE TRANSACTION; -TRUNCATE SYSTEM_VALUES; -TRUNCATE ACCOUNT_TYPE; - -# Check that force varpart is not changed by truncate ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart - -# Restore data ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT - -# Check data -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -SELECT COUNT(*) FROM TRANSACTION; -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 2 -n 1 -m -p 1 -s -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 2 -n 2 -p 1 -s -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT -SELECT * FROM DESCRIPTION ORDER BY USERNAME; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK DESCRIPTION | grep SHORT_VAR ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK DESCRIPTION | grep MEDIUM_VAR - -DROP DATABASE BANK; diff --git a/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test b/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test deleted file mode 100644 index 069796f43c4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_different_endian_data.test +++ /dev/null @@ -1,185 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# -# Bug #27543 restore of backup from different endian does not work for blob column -# Bug #30024 restore of backup from different endian does not work for datetime column -# Bug #28674 backup will run forever if disk full and later write succes will kill ndb node -# -# The table structure and data list below -# -# CREATE TABLE t_num ( -# t_pk INT PRIMARY KEY, -# t_bit BIT(64), -# t_tinyint TINYINT, -# t_bool BOOL, -# t_smallint SMALLINT, -# t_mediumint MEDIUMINT, -# t_int INT, -# t_bigint BIGINT, -# t_float FLOAT, -# t_double DOUBLE, -# t_decimal DECIMAL (37, 16) -# ) ENGINE=NDBCLUSTER; -# -# INSERT INTO t_num VALUE ( -# 1, -# b'1010101010101010101010101010101010101010101010101010101010101010', -# 125, -# 1, -# 32765, -# 8388606, -# 2147483647, -# 9223372036854775807, -# 1e+20, -# 1e+150, -# '331.0000000000' -# ); -# -# CREATE TABLE t_datetime ( -# t_pk INT PRIMARY KEY, -# t_date DATE, -# t_datetime DATETIME, -# t_timestamp TIMESTAMP, -# t_time TIME, -# t_year YEAR -# ) ENGINE=NDBCLUSTER; -# -# INSERT INTO t_datetime VALUE ( -# 1, -# '1998-01-01', -# '2006-08-10 10:11:12', -# 20021029165106, -# '19:38:34', -# 2155 -# ); -# -# CREATE TABLE t_string_1 ( -# t_pk INT PRIMARY KEY, -# t_char CHAR(255), -# t_varchar VARCHAR(655), -# t_binary BINARY(255), -# t_varbinary VARBINARY(6553) -# ) ENGINE=NDBCLUSTER; -# -# CREATE TABLE t_string_2 ( -# t_pk INT PRIMARY KEY, -# t_tinyblob TINYBLOB, -# t_tinytext TINYTEXT, -# t_blob BLOB, -# t_text TEXT, -# t_mediumblob MEDIUMBLOB, -# t_mediumtext MEDIUMTEXT, -# t_longblob LONGBLOB, -# t_longtext LONGTEXT, -# t_enum ENUM('001001','001004','001010','001018','001019','001020','001021','001027','001028','001029','001030','001031','001100','002003','002004','002005','002007')DEFAULT '001001' NOT NULL, -# t_set SET('a','B') -# ) ENGINE=NDBCLUSTER; -# -# INSERT INTO t_string_1 VALUE ( -# 1, -# 'abcdefghijklmn', -# 'abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn', -# 0x612020, -# 0x4100 -# ); -# -# INSERT INTO t_string_2 VALUE ( -# 1, -# 'abcdefghijklmnabcdefghijklmn', -# 'abcdefghijklmnabcdefghijklmn', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# 'a123456789b123456789c123456789d123456789e123456789f123456789g123456789', -# '001001', -# 'a' -# ); -# -# CREATE TABLE t_gis ( -# t_pk INT PRIMARY KEY, -# t_point POINT, -# t_linestring LINESTRING, -# t_polygon POLYGON, -# t_multipoint MULTIPOINT, -# t_multilinestring MULTILINESTRING, -# t_multipolygon MULTIPOLYGON, -# t_geometrycollection GEOMETRYCOLLECTION, -# t_geometry GEOMETRY -# ) ENGINE=NDBCLUSTER; -# -# INSERT INTO t_gis VALUE ( -# 1, -# PointFromText('POINT(10 10)'), -# LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)'), -# PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'), -# MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)'), -# MLineFromText('MULTILINESTRING((10 48,10 21,10 0))'), -# MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'), -# GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))'), -# MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))') -# ); -# -# INSERT INTO t_gis VALUE ( -# 2, -# PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))), -# LineStringFromWKB(LineString(Point(10, 10), Point(40, 10))), -# PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))), -# MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10))), -# MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))), -# MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))), -# GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))), -# GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))) -# ); - - - -# -# Restore backup files (from little endian) -# - ---disable_warnings -USE test; -DROP TABLE IF EXISTS t_num,t_datetime,t_string_1,t_string_2,t_gis; ---enable_warnings ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_le >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 2 -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_le >> $NDB_TOOLS_OUTPUT -SHOW TABLES; -SHOW CREATE TABLE t_num; -SHOW CREATE TABLE t_datetime; -SHOW CREATE TABLE t_string_1; -SHOW CREATE TABLE t_string_2; -SHOW CREATE TABLE t_gis; -SELECT * FROM t_datetime; -SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num; -SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1; -SELECT * FROM t_string_2; -SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk; -SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk; -SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk; - -# -# Restore backup files (from big endian) -# - -DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_be >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 2 -r $MYSQL_TEST_DIR/std_data/ndb_backup51_data_be >> $NDB_TOOLS_OUTPUT -SHOW TABLES; -SHOW CREATE TABLE t_num; -SHOW CREATE TABLE t_datetime; -SHOW CREATE TABLE t_string_1; -SHOW CREATE TABLE t_string_2; -SHOW CREATE TABLE t_gis; -SELECT * FROM t_datetime; -SELECT t_pk,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num; -SELECT t_pk,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1; -SELECT * FROM t_string_2; -SELECT AsText(t_point), AsText(t_linestring),AsText(t_polygon) FROM t_gis ORDER by t_pk; -SELECT AsText(t_multipoint), AsText(t_multilinestring),AsText(t_multipolygon) FROM t_gis ORDER by t_pk; -SELECT AsText(t_geometrycollection), AsText(t_geometry) FROM t_gis ORDER by t_pk; - -DROP TABLE t_num,t_datetime,t_string_1,t_string_2,t_gis; diff --git a/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt b/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt deleted file mode 100644 index 075c6392dde..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new diff --git a/mysql-test/suite/ndb/t/ndb_restore_partition.test b/mysql-test/suite/ndb/t/ndb_restore_partition.test deleted file mode 100644 index f11324492c2..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_partition.test +++ /dev/null @@ -1,375 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---enable_warnings - -CREATE TABLE `t1_c` ( - `capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, - `goaledatta` char(2) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt'); - -CREATE TABLE `t2_c` ( - `capgotod` smallint(5) unsigned NOT NULL auto_increment, - `gotod` smallint(5) unsigned NOT NULL default '0', - `goaledatta` char(2) default NULL, - `maturegarbagefa` varchar(32) default NULL, - `descrpooppo` varchar(64) default NULL, - `svcutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capgotod`), - KEY `i_quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'); - -CREATE TABLE `t3_c` ( - `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', - `capgotod` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); - -CREATE TABLE `t4_c` ( - `capfa` bigint(20) unsigned NOT NULL auto_increment, - `realm` varchar(32) NOT NULL default '', - `authpwchap` varchar(32) default NULL, - `fa` varchar(32) NOT NULL default '', - `payyingatta` tinyint(4) NOT NULL default '0', - `status` char(1) default NULL, - PRIMARY KEY (`fa`,`realm`), - KEY `capfa` (`capfa`), - KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); - -CREATE TABLE `t5_c` ( - `capfa` bigint(20) unsigned NOT NULL default '0', - `gotod` smallint(5) unsigned NOT NULL default '0', - `orderutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); - -CREATE TABLE `t6_c` ( - `capfa_parent` bigint(20) unsigned NOT NULL default '0', - `capfa_child` bigint(20) unsigned NOT NULL default '0', - `relatta` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); - -CREATE TABLE `t7_c` ( - `dardpo` char(15) NOT NULL default '', - `dardtestard` tinyint(3) unsigned NOT NULL default '0', - `FastFA` char(5) NOT NULL default '', - `FastCode` char(6) NOT NULL default '', - `Fastca` char(1) NOT NULL default '', - `Fastmag` char(1) NOT NULL default '', - `Beareratta` char(2) NOT NULL default '', - PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); - -CREATE TABLE `t8_c` ( - `kattjame` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `aaaproxysessfa` varchar(255) default NULL, - `autologonallowed` char(1) default NULL, - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `acctoutputoctets` bigint(20) unsigned default NULL, - `acctinputoctets` bigint(20) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), - KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); - -CREATE TABLE `t9_c` ( - `kattjame` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `actcoutpuocttets` bigint(20) unsigned default NULL, - `actinputocctets` bigint(20) unsigned default NULL, - `terminateraste` tinyint(3) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); - -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; - - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# random output order?? -#show tables; - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Try Partitioned tables as well -# -ALTER TABLE t1_c -PARTITION BY RANGE (`capgoaledatta`) -(PARTITION p0 VALUES LESS THAN MAXVALUE); - -ALTER TABLE t2_c -PARTITION BY LIST(`capgotod`) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6)); - -ALTER TABLE t3_c -PARTITION BY HASH (`CapGoaledatta`); - -ALTER TABLE t5_c -PARTITION BY HASH (`capfa`) -PARTITIONS 4; - -ALTER TABLE t6_c -PARTITION BY LINEAR HASH (`relatta`) -PARTITIONS 4; - -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Drop all table except t2_c -# This to make sure that error returned from ndb_restore above is -# guaranteed to be from t2_c, this since order of tables in backup -# is none deterministic -# -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---source include/ndb_backup.inc ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true - -# -# Cleanup -# - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t2_c; ---enable_warnings - -# -# Test BUG#10287 -# - ---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_restore_print.test b/mysql-test/suite/ndb/t/ndb_restore_print.test deleted file mode 100644 index 9a880f8968c..00000000000 --- a/mysql-test/suite/ndb/t/ndb_restore_print.test +++ /dev/null @@ -1,193 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -# basic datatypes -create table t1 - (pk int key - ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) - ,b1 TINYINT, b2 TINYINT UNSIGNED - ,c1 SMALLINT, c2 SMALLINT UNSIGNED - ,d1 INT, d2 INT UNSIGNED - ,e1 BIGINT, e2 BIGINT UNSIGNED - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine myisam; - -# max values -insert into t1 values - (1 - ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 - ,127, 255 - ,32767, 65535 - ,2147483647, 4294967295 - ,9223372036854775807, 18446744073709551615 - ,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 - ,0x12,0x123456789abcdef0, 0x00123450 - ); - -# min values -insert into t1 values - (2 - ,0, 0, 0, 0, 0 - ,-128, 0 - ,-32768, 0 - ,-2147483648, 0 - ,-9223372036854775808, 0 - ,'','','' - ,'','','' - ,0x0,0x0,0x0 - ,0x0,0x0,0x0 - ); - -# null values -insert into t1 values - (3 - ,NULL,NULL,NULL,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ); - ---vertical_results -select pk - ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) - ,b1, b2 - ,c1 , c2 - ,d1 , d2 - ,e1 , e2 - ,f1 , f2, f3 - ,g1 , g2, g3 - ,hex(h1), hex(h2), hex(h3) - ,hex(i1), hex(i2), hex(i3) - from t1 order by pk; - -alter table t1 engine ndb; - -select pk - ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) - ,b1, b2 - ,c1 , c2 - ,d1 , d2 - ,e1 , e2 - ,f1 , f2, f3 - ,g1 , g2, g3 - ,hex(h1), hex(h2), hex(h3) - ,hex(i1), hex(i2), hex(i3) - from t1 order by pk; ---horizontal_results - ---source include/ndb_backup.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" ---source include/ndb_backup_print.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by="," --fields-optionally-enclosed-by="'" ---source include/ndb_backup_print.inc - - -drop table t1; - -# some binary char tests with trailing spaces -create table t1 - (pk int key - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine ndb; - -insert into t1 values - (1 - ,'1','12345678901234567890123456789012','123456789 ' - ,'1 ','12345678901234567890123456789012 ','123456789 ' - ,0x20,0x123456789abcdef020, 0x012345000020 - ,0x1200000020,0x123456789abcdef000000020, 0x00123450000020 - ); - -create table t2 (pk int key, a int) engine ndb; -create table t3 (pk int key, a int) engine ndb; -create table t4 (pk int key, a int) engine ndb; - -insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); -insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); -insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); - ---source include/ndb_backup.inc ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-enclosed-by="'" --fields-optionally-enclosed-by="X" ---let ndb_restore_filter=test t1 ---source include/ndb_backup_print.inc - ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/t1.txt ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/t2.txt ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/t3.txt ---error 0,1 ---remove_file $MYSQLTEST_VARDIR/tmp/t4.txt - ---let ndb_restore_opts=--verbose=0 --print_data --hex --tab $MYSQLTEST_VARDIR/tmp --append ---let ndb_restore_filter=test ---source include/ndb_backup_print.inc - ---let $message= t1 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t1.txt ---let $message= t2 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t2.txt ---let $message= t3 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t3.txt ---let $message= t4 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t4.txt - ---remove_file $MYSQLTEST_VARDIR/tmp/t1.txt ---remove_file $MYSQLTEST_VARDIR/tmp/t2.txt ---remove_file $MYSQLTEST_VARDIR/tmp/t3.txt ---remove_file $MYSQLTEST_VARDIR/tmp/t4.txt - -# now test some other datatypes -drop table t1; -create table t1 - (pk int key - ,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED - ) engine ndb; - -# max values -insert into t1 values(1, 8388607, 16777215); -# min values -insert into t1 values(2, -8388608, 0); -# small values -insert into t1 values(3, -1, 1); - -# backup and print ---source include/ndb_backup.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" ---source include/ndb_backup_print.inc - -# clean up -drop table t1; -drop table t2; -drop table t3; -drop table t4; diff --git a/mysql-test/suite/ndb/t/ndb_row_format.test b/mysql-test/suite/ndb/t/ndb_row_format.test deleted file mode 100644 index b1582cbe339..00000000000 --- a/mysql-test/suite/ndb/t/ndb_row_format.test +++ /dev/null @@ -1,86 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# -# some negative tests -# - -# cannot have ROW_FORMAT=FIXED and var attrs mixed ---error 1005 -CREATE TABLE t1 - ( a INT KEY, - b VARCHAR(10) ) - ROW_FORMAT=FIXED - ENGINE=NDB; - -# warnings give more detail on the error -SHOW WARNINGS; - - -# -# Check force var part for different ROW_FORMAT -# - -# default => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# explicit DEFAULT => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=DEFAULT - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# FIXED => ForceVarPart: 0 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=FIXED - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# DYNAMIC => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=DYNAMIC - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# test of bug -create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; -insert into t1(b) values ('0123456789'); -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -select count(*) from t1; -begin; -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -rollback; -select count(*),b from t1 group by b; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_single_user.test b/mysql-test/suite/ndb/t/ndb_single_user.test deleted file mode 100644 index a64ac066a49..00000000000 --- a/mysql-test/suite/ndb/t/ndb_single_user.test +++ /dev/null @@ -1,174 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - -# operations allowed while cluster is in single user mode - ---connection server1 ---let $node_id= `SHOW STATUS LIKE 'Ndb_cluster_node_id'` ---disable_query_log ---eval set @node_id= SUBSTRING('$node_id', 20)+0 ---enable_query_log ---let $node_id= `SELECT @node_id` ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" --single-user >> $NDB_TOOLS_OUTPUT - -# verify that we are indeed in single user mode -# and test that some operations give correct errors ---connection server2 ---error 1005 -create table t1 (a int key, b int unique, c int) engine ndb; -# Bug #27712 Single user mode. Creating logfile group and tablespace is allowed -# - before bug fix these would succeed ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -show warnings; - -# test some sql on first mysqld ---connection server1 -create table t1 (a int key, b int unique, c int) engine ndb; -# Check that we can create logfile group -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; ---connection server2 ---error ER_CREATE_FILEGROUP_FAILED -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -show warnings; ---error ER_DROP_FILEGROUP_FAILED -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -show warnings; ---connection server1 -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; ---connection server2 ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -show warnings; ---connection server1 -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; ---connection server2 ---error ER_DROP_FILEGROUP_FAILED -DROP TABLESPACE ts1 -ENGINE NDB; -show warnings; ---connection server1 -DROP TABLESPACE ts1 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0); -create table t2 as select * from t1; -# read with pk -select * from t1 where a = 1; -# read with unique index -select * from t1 where b = 4; -# read with ordered index -select * from t1 where a > 4 order by a; -# update with pk -update t1 set b=102 where a = 2; -# update with unique index -update t1 set b=103 where b = 3; -# update with full table scan -update t1 set b=b+100; -# update with ordered insex scan -update t1 set b=b+100 where a > 7; -# delete with full table scan -delete from t1; -insert into t1 select * from t2; -# Bug #27710 Creating unique index fails during single user mode -# - prior to bugfix this would fail -create unique index new_index on t1 (b,c); - -drop table t2; - -# test some sql on other mysqld ---connection server2 ---error 1051 -drop table t1; ---error 1296 -create index new_index_fail on t1 (c); ---error 1296 -insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0); ---error 1296 -select * from t1 where a = 1; ---error 1296 -select * from t1 where b = 4; ---error 1296 -update t1 set b=102 where a = 2; ---error 1296 -update t1 set b=103 where b = 3; ---error 1296 -update t1 set b=b+100; ---error 1296 -update t1 set b=b+100 where a > 7; - ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT - -# -# we should be able to run transaction while in single user mode -# ---connection server1 -BEGIN; -update t1 set b=b+100 where a=1; - ---connection server2 -BEGIN; -update t1 set b=b+100 where a=2; - -# enter single user mode ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" --single-user >> $NDB_TOOLS_OUTPUT - ---connection server1 -update t1 set b=b+100 where a=3; -COMMIT; - -# while on other mysqld it should be aborted ---connection server2 ---error 1296 -update t1 set b=b+100 where a=4; ---error 1296 -COMMIT; - -# Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb -# tables for other mysqld nodes ---connection server2 -create table t2 (a int) engine myisam; -alter table t2 add column (b int); - -# exit single user mode ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT - -# cleanup ---connection server2 -drop table t2; ---connection server1 -drop table t1; - -# End of 5.0 tests - diff --git a/mysql-test/suite/ndb/t/ndb_sp.test b/mysql-test/suite/ndb/t/ndb_sp.test deleted file mode 100644 index b833869cad0..00000000000 --- a/mysql-test/suite/ndb/t/ndb_sp.test +++ /dev/null @@ -1,42 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 ( - a int not null primary key, - b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,100), (4, 100); - -delimiter //; -create procedure test_proc1 (in var_in int) -begin - select * from t1 where a = var_in; -end; -create procedure test_proc2 (out var_out int) -begin - select b from t1 where a = 1 into var_out; -end; -create procedure test_proc3 (inout var_inout int) -begin - select b from t1 where a = var_inout into var_inout; -end; -// -delimiter ;// -call test_proc1(1); -call test_proc2(@test_var); -select @test_var; -set @test_var = 1; -call test_proc3(@test_var); -select @test_var; -alter procedure test_proc1 comment 'new comment'; -show create procedure test_proc1; -drop procedure test_proc1; -drop procedure test_proc2; -drop procedure test_proc3; -drop table t1; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_subquery.test b/mysql-test/suite/ndb/t/ndb_subquery.test deleted file mode 100644 index 6282c31c922..00000000000 --- a/mysql-test/suite/ndb/t/ndb_subquery.test +++ /dev/null @@ -1,79 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings - -########## -# bug#5367 -create table t1 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; - -create table t2 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; - -create table t3 (a int not null primary key, b int not null) engine=ndb; -create table t4 (c int not null primary key, d int not null) engine=ndb; - -insert into t1 values (1,1,1),(2,2,2),(3,3,3); -insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); -insert into t3 values (1,10), (2,10), (3,30), (4, 30); -insert into t4 values (1,10), (2,10), (3,30), (4, 30); - -# Use pk ---replace_column 9 # -explain select * from t2 where p NOT IN (select p from t1); -select * from t2 where p NOT IN (select p from t1) order by p; - -# Use unique index ---replace_column 9 # -explain select * from t2 where p NOT IN (select u from t1); -select * from t2 where p NOT IN (select u from t1) order by p; - -# Use ordered index ---replace_column 9 # -explain select * from t2 where p NOT IN (select o from t1); -select * from t2 where p NOT IN (select o from t1) order by p; - -# Use scan ---replace_column 9 # -explain select * from t2 where p NOT IN (select p+0 from t1); -select * from t2 where p NOT IN (select p+0 from t1) order by p; - -drop table t1; -drop table t2; -# bug#5367 -########## - -# End of 4.1 tests - -# -# bug#11205 -# -create table t1 (p int not null primary key, u int not null) engine=ndb; -insert into t1 values (1,1),(2,2),(3,3); - -create table t2 as -select t1.* -from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 -where t1.u = t2.u - and t2.u = t3.u - and t3.u = t4.u - and t4.u = t5.u - and t5.u = t6.u - and t6.u = t7.u - and t7.u = t8.u; - -select * from t2 order by 1; - -select * from t3 where a = any (select c from t4 where c = 1) order by a; -select * from t3 where a in (select c from t4 where c = 1) order by a; -select * from t3 where a <> some (select c from t4 where c = 1) order by a; -select * from t3 where a > all (select c from t4 where c = 1) order by a; -select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a; -select * from t3 where exists (select * from t4 where c = 1) order by a; - -drop table if exists t1, t2, t3, t4; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_temporary.test b/mysql-test/suite/ndb/t/ndb_temporary.test deleted file mode 100644 index 7f6902bf745..00000000000 --- a/mysql-test/suite/ndb/t/ndb_temporary.test +++ /dev/null @@ -1,38 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# creating a temporary table with engine=ndb should give an error -# ---error ER_ILLEGAL_HA_CREATE_OPTION -create temporary table t1 (a int key) engine=ndb; - - -# -# alter temporary table to engine=ndb should give an error -# -create temporary table t1 (a int key) engine=myisam; ---error ER_ILLEGAL_HA_CREATE_OPTION -alter table t1 engine=ndb; -drop table t1; - - -# -# if default storage engine=ndb, temporary tables -# without explicit engine= should be created as myisam -# -SET SESSION storage_engine=NDBCLUSTER; -create table t1 (a int key); - -# verify that we have a ndb table -select engine from information_schema.tables where table_name = 't1'; -drop table t1; - -# verify that we have a myisam table -create temporary table t1 (a int key); -show create table t1; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test b/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test deleted file mode 100644 index 748c0ac28e4..00000000000 --- a/mysql-test/suite/ndb/t/ndb_tmp_table_and_DDL.test +++ /dev/null @@ -1,11 +0,0 @@ -# -# Bug#49132 -# This test verifies if executing DDL statement before trying to manipulate -# a temporary table causes row-based replication to break with error 'table -# does not exist' base on ndb engine. -# - -source include/have_ndb.inc; - -LET $ENGINE_TYPE= NDB; -source extra/rpl_tests/rpl_tmp_table_and_DDL.test; diff --git a/mysql-test/suite/ndb/t/ndb_transaction.test b/mysql-test/suite/ndb/t/ndb_transaction.test deleted file mode 100644 index d3ebadb1a78..00000000000 --- a/mysql-test/suite/ndb/t/ndb_transaction.test +++ /dev/null @@ -1,298 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# -# Transactionc test to show that the NDB -# table handler is working properly with -# transactions -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=ndbcluster; - -# insert -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; - -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; - -# update -begin; -update t1 set attr1 = attr1 * 2; -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -begin; -update t1 set attr1 = attr1 * 2; -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -# delete -begin; -delete from t1 where attr1 = 2; -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -begin; -delete from t1 where attr1 = 2; -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -DROP TABLE t1; - -# -# Create table without primary key -# a hidden primary key column is created by handler -# -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; - -# insert -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -rollback; - -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; - -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; - -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; - -# update -begin; -update t1 set id = id * 2; -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -rollback; - -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; - -begin; -update t1 set id = id * 2; -commit; - -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; - -# delete - -DROP TABLE t1; - -# -# A more extensive test with a lot more records -# - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -CREATE TABLE t3 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned, - PRIMARY KEY(a) -) engine=ndbcluster; - -CREATE TABLE t4 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - - -# -# insert records into tables and rollback -# -let $1=100; -disable_query_log; -begin; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -rollback; -enable_query_log; - -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; - -# -# insert records into tables and commit; -# -let $1=100; -disable_query_log; -begin; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -commit; -enable_query_log; - -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; - -# -# delete every other record in the tables -# -let $1=100; -disable_query_log; -while ($1) -{ - eval delete from t2 where a=$1; - eval delete from t3 where a=$1; - eval delete from t4 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - -# -# update records and rollback -# -begin; -let $1=100; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -rollback; -enable_query_log; - -# -# update records and commit -# -begin; -let $1=100; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -rollback; -enable_query_log; - -drop table t2; -drop table t3; -drop table t4; - -# -# Test multiple databases in one transaction -# - -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=ndbcluster; - -create database mysqltest; -use mysqltest; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -begin; -insert into test.t1 values(1,1); -insert into t2 values(1,1,1); -insert into test.t1 values(2,2); -insert into t2 values(2,2,2); -select count(*) from test.t1; -select count(*) from t2; -select * from test.t1 where pk1 = 1; -select * from t2 where a = 1; -select test.t1.attr1 -from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; -select t2.a -from t2, t2 as t2x where t2.a = t2x.a + 1; -select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; -rollback; - -select count(*) from test.t1; -select count(*) from t2; - -drop table test.t1, t2; -drop database mysqltest; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_trigger.test b/mysql-test/suite/ndb/t/ndb_trigger.test deleted file mode 100644 index 9f01157fc93..00000000000 --- a/mysql-test/suite/ndb/t/ndb_trigger.test +++ /dev/null @@ -1,221 +0,0 @@ -# Tests which involve triggers and NDB storage engine ---source include/have_ndb.inc ---source include/not_embedded.inc - -# -# Test for bug#18437 "Wrong values inserted with a before update -# trigger on NDB table". SQL-layer didn't properly inform handler -# about fields which were read and set in triggers. In some cases -# this resulted in incorrect (garbage) values of OLD variables and -# lost changes to NEW variables. -# You can find similar tests for ON INSERT triggers in federated.test -# since this engine so far is the only engine in MySQL which cares -# about field mark-up during handler::write_row() operation. -# - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5; ---enable_warnings - -create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; -create table t2 (op char(1), a int not null, b decimal (63,30)) engine=ndb; -create table t3 engine=ndb select 1 as i; -create table t4 (a int not null primary key, b int) engine=ndb; -create table t5 (a int not null primary key, b int) engine=ndb; - -delimiter //; -create trigger t1_bu before update on t1 for each row -begin - insert into t2 values ("u", old.a, old.b); - set new.b = old.b + 10; -end;// -create trigger t1_bd before delete on t1 for each row -begin - insert into t2 values ("d", old.a, old.b); -end;// -create trigger t4_au after update on t4 - for each row begin - update t5 set b = b+1; - end; -// -create trigger t4_ad after delete on t4 - for each row begin - update t5 set b = b+1; - end; -// -delimiter ;// - -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05); -insert into t4 values (1,1), (2,2), (3,3), (4, 4); -insert into t5 values (1,0); - -# Check that usual update works as it should -update t1 set a=5 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check that everything works for multi-update -update t1, t3 set a=6 where a = 5; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for delete -delete from t1 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for multi-delete -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05); -delete t1 from t1, t3 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for insert ... on duplicate key update -insert into t1 values (4, 4, 4.05); -insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for insert ... select ... on duplicate key update -delete from t3; -insert into t3 values (4), (3); -insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for replace -replace into t1 (id, a) values (4, 1), (3, 1); -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t1; -delete from t2; -# Check for replace ... select ... -insert into t1 values (3, 1, 1.05), (4, 1, 2.05); -replace into t1 (id, a) (select i, 2 from t3); -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t1; -delete from t2; -# Check for load data replace -insert into t1 values (3, 1, 1.05), (5, 2, 2.05); -load data infile '../../../std_data/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a); -select * from t1 order by id; -select * from t2 order by op, a, b; -update t4 set b = 10 where a = 1; -select * from t5 order by a; -update t5 set b = 0; -delete from t4 where a = 1; -select * from t5 order by a; -drop trigger t4_au; -drop trigger t4_ad; - -drop table t1, t2, t3, t4, t5; -# Test for bug#26242 -# Verify that AFTER UPDATE/DELETE triggers are executed -# after the change has actually taken place - -CREATE TABLE t1 ( - id INT NOT NULL PRIMARY KEY, - xy INT -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (1, 0); - -DELIMITER //; -CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // -DELIMITER ;// - -CREATE TABLE t2 ( - id INT NOT NULL PRIMARY KEY, - xy INT -) ENGINE=ndbcluster; - -INSERT INTO t2 VALUES (2, 0); - -CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; - -INSERT INTO t3 VALUES (1); - -CREATE TABLE t4 LIKE t1; - -DELIMITER //; -CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // -DELIMITER ;// - -CREATE TABLE t5 LIKE t2; - -UPDATE t1 SET xy = 3 WHERE id = 1; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -INSERT INTO t4 SELECT * FROM t1; -INSERT INTO t5 SELECT * FROM t2; -UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; -SELECT xy FROM t4 where id = 1; -SELECT xy FROM t5 where id = 1; - -UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; -SELECT xy FROM t4 where id = 1; -SELECT xy FROM t5 where id = 1; - -INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -DROP TRIGGER t1_update; -DROP TRIGGER t4_update; - -DELIMITER //; -CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // -DELIMITER ;// - -DELIMITER //; -CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // -DELIMITER ;// - -INSERT INTO t1 VALUES (5, 0),(6,0); -INSERT INTO t2 VALUES (5, 1),(6,1); -INSERT INTO t3 VALUES (5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; - -INSERT INTO t1 VALUES (5,0); -UPDATE t2 SET xy = 1 WHERE id = 6; -TRUNCATE t4; -INSERT INTO t4 SELECT * FROM t1; -TRUNCATE t5; -INSERT INTO t5 SELECT * FROM t2; -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -SELECT * FROM t4 order by id; -SELECT * FROM t5 order by id; -DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -SELECT * FROM t4 order by id; -SELECT * FROM t5 order by id; - -INSERT INTO t1 VALUES (5, 0); -REPLACE INTO t2 VALUES (6,1); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -REPLACE INTO t1 VALUES (5, 1); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; - -DROP TRIGGER t1_delete; -DROP TRIGGER t4_delete; -DROP TABLE t1, t2, t3, t4, t5; - ---echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_truncate.test b/mysql-test/suite/ndb/t/ndb_truncate.test deleted file mode 100644 index a1ef4be0d48..00000000000 --- a/mysql-test/suite/ndb/t/ndb_truncate.test +++ /dev/null @@ -1,41 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; ---enable_warnings - -CREATE TABLE t1 ( - a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - - -# -# insert records into table -# -let $1=500; -disable_query_log; -while ($1) -{ - eval insert into t1 values(NULL, $1+9, 5*$1), (NULL, $1+10, 7),(NULL, $1+10, 7*$1), (NULL, $1+10, 10+$1), (NULL, $1+10, 70*$1), (NULL, $1+10, 7), (NULL, $1+10, 9), (NULL, $1+299, 899), (NULL, $1+10, 12), (NULL, $1+10, 14*$1); - dec $1; -} -enable_query_log; - -select count(*) from t1; - -select * from t1 order by a limit 2; - -truncate table t1; - -select count(*) from t1; - -insert into t1 values(NULL,1,1),(NULL,2,2); - -select * from t1 order by a; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_types.test b/mysql-test/suite/ndb/t/ndb_types.test deleted file mode 100644 index ab18817132e..00000000000 --- a/mysql-test/suite/ndb/t/ndb_types.test +++ /dev/null @@ -1,85 +0,0 @@ ---source include/have_ndb.inc ---source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Test creation of different column types in NDB -# -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10) default "hello", - vstring varchar(10) default "hello", - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('one','two','tree') not null, - flags set('one','two','tree') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - PRIMARY KEY (auto), - KEY (utiny), - KEY (tiny), - KEY (short), - KEY any_name (medium), - KEY (longlong), - KEY (real_float), - KEY (ushort), - KEY (umedium), - KEY (ulong), - KEY (ulonglong,ulong), - KEY (options,flags) -); - -set @now = now(); ---sleep 1.5 -insert into t1 -(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time) -values -("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, - b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); - -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time -from t1; -select time_stamp>@now from t1; - -set @now = now(); ---sleep 1.5 -update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, -tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, -real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, -ulonglong=2, bits=b'010', -options='one',flags='one', date_field='1902-02-02',year_field='1902', -time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; - -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time -from t1; -select time_stamp>@now from t1; - -drop table t1; - ---echo End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_update.test b/mysql-test/suite/ndb/t/ndb_update.test deleted file mode 100644 index ab0fbee171e..00000000000 --- a/mysql-test/suite/ndb/t/ndb_update.test +++ /dev/null @@ -1,94 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; ---enable_warnings - -# -# Basic test of UPDATE in NDB -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2); -UPDATE t1 set b = c; -select * from t1 order by pk1; -UPDATE t1 set pk1 = 4 where pk1 = 1; -select * from t1 order by pk1; ---error ER_DUP_ENTRY -UPDATE t1 set pk1 = 4 where pk1 = 2; -UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; -select * from t1 order by pk1; ---error ER_DUP_ENTRY -UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; -UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; -select * from t1 order by pk1; -UPDATE t1 set pk1 = pk1 + 10; -select * from t1 order by pk1; -# bug#25817 -create unique index ib on t1(b); -update t1 set c = 4 where pk1 = 12; -update ignore t1 set b = 55 where pk1 = 14; -select * from t1 order by pk1; - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# End of 4.1 tests - -# -# Bug#28158: table->read_set is set incorrectly, -# causing wrong error message in Falcon -# -CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster; -CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster; -CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b)) ENGINE=ndbcluster; -# -INSERT INTO t1 VALUES (1, 2); -INSERT INTO t1 VALUES (2, 2); -# -INSERT INTO t2 VALUES (1, 2); -INSERT INTO t2 VALUES (2, 2); -# -INSERT INTO t3 VALUES (1, 2); -INSERT INTO t3 VALUES (2, 2); -# -UPDATE t1 SET a = 1; -UPDATE t1 SET a = 1 ORDER BY a; -# ---error ER_DUP_ENTRY -UPDATE t2 SET a = 1; ---error ER_DUP_ENTRY -UPDATE t2 SET a = 1 ORDER BY a; -# ---error ER_DUP_ENTRY -UPDATE t3 SET a = 1; ---error ER_DUP_ENTRY -UPDATE t3 SET a = 1 ORDER BY a; -# -SELECT count(*) FROM t1; -SELECT count(*) FROM t2; -SELECT count(*) FROM t3; -SELECT * FROM t1 ORDER by a; -SELECT * FROM t2 ORDER by a; -SELECT * FROM t3 ORDER by a; -# ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; ---enable_warnings - ---echo End of 5.1 tests - diff --git a/mysql-test/suite/ndb/t/ndb_update_no_read.test b/mysql-test/suite/ndb/t/ndb_update_no_read.test deleted file mode 100644 index 60bea53b7b5..00000000000 --- a/mysql-test/suite/ndb/t/ndb_update_no_read.test +++ /dev/null @@ -1,79 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# New test case for WL 3686 (which is not until CGE-6.3) -# but test is committed in 5.1 to verify consistant results. -# -# When only constant expressions in update statements and -# only PK or UK in WHERE clause. No extra WHERE parts are -# allowed. WL #3687 takes of more advanced variants of -# avoiding the read before the update/delete - -create table t1 (a int not null primary key, b int not null, c int, - unique index_b (b) using hash) -engine ndb; - -insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2), - (9,2,2),(10,1,2); - -# These ones should use optimisation - -update t1 set c = 111, b = 20 where a = 1; - -select * from t1 where a = 1 order by a; - -delete from t1 where a = 1; - -select * from t1 where a = 1 order by a; - -update t1 set c = 12, b = 19 where b = 2; - -select * from t1 where b = 2 order by a; - -delete from t1 where b = 19; - -select * from t1 where b = 19 order by a; - -update t1 set c = 22 where a = 10 or a >= 10; - -select * from t1 order by a; - -update t1 set c = 23 where a in (8,10); - -select * from t1 order by a; - -update t1 set c = 23 where a in (7,8) or a >= 10; - -select * from t1 order by a; - -# These ones should not use optimisation - -update t1 set c = 11 where a = 3 or b = 7; - -select * from t1 where a = 3 or b = 7 order by a; - -update t1 set a = 13, b = 20 where a = 3; - -select * from t1 where a = 13 order by a; - -update t1 set a = 12, b = 19 where b = 7; - -select * from t1 where b = 19 order by a; - -select * from t1 where b = 7 order by a; - -update t1 set c = 12, b = 29 where a = 5 and b = 6; - -select * from t1 where b = 19 order by a; - -delete from t1 where b = 6 and c = 12; - -select * from t1 where b = 6 order by a; - -drop table t1; - diff --git a/mysql-test/suite/ndb/t/ndb_view.test b/mysql-test/suite/ndb/t/ndb_view.test deleted file mode 100644 index 3b8fc330b40..00000000000 --- a/mysql-test/suite/ndb/t/ndb_view.test +++ /dev/null @@ -1,29 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; -DROP VIEW IF EXISTS v1,v2,v3; ---enable_warnings - -# -# simple operations via view -# - -create table t1 (a int, b int, c int, d int) engine=ndb; -insert into t1 values (1,2,3,4),(5,6,7,8); - -create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1; -select * from v1 order by a,b,c; - -update v1 set a=a+100 where b=1; -select * from v1 order by a,b,c; - -drop view v1; - -create view v1 as select t1.c as a from t1; -insert into v1 values (200); -select * from t1 order by a,b,c,d; - -drop view v1; -drop table t1; diff --git a/mysql-test/suite/ndb/t/ndbapi.test b/mysql-test/suite/ndb/t/ndbapi.test deleted file mode 100644 index 398a2cbfbfa..00000000000 --- a/mysql-test/suite/ndb/t/ndbapi.test +++ /dev/null @@ -1,44 +0,0 @@ --- source include/have_ndb.inc --- source include/have_ndbapi_examples.inc - ---disable_warnings -DROP TABLE IF EXISTS t0; -drop database if exists mysqltest; ---enable_warnings - ---exec echo Running ndbapi_simple ---exec $NDB_EXAMPLES_DIR/ndbapi_simple/ndbapi_simple $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_simple_index ---exec $NDB_EXAMPLES_DIR/ndbapi_simple_index/ndbapi_simple_index $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_scan ---exec $NDB_EXAMPLES_DIR/ndbapi_scan/ndbapi_scan $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_retries ---exec $NDB_EXAMPLES_DIR/ndbapi_retries/ndbapi_retries $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_async ---exec $NDB_EXAMPLES_DIR/ndbapi_async/ndbapi_async $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_async1 ---exec $NDB_EXAMPLES_DIR/ndbapi_async1/ndbapi_async1 $MASTER_MYSOCK "$NDB_CONNECTSTRING" >> $NDB_EXAMPLES_OUTPUT - -use TEST_DB; -create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text, - primary key(c0, c2)) engine ndb charset latin1; -#--exec echo Running ndbapi_event -#--exec $NDB_EXAMPLES_DIR/ndbapi_event/ndbapi_event "$NDB_CONNECTSTRING" 1 >> $NDB_EXAMPLES_OUTPUT -insert into t0 values (1, 2, 'a', 'b', null); -insert into t0 values (3, 4, 'c', 'd', null); -update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -- use pk -update t0 set c3 = 'f'; -- use scan -update t0 set c3 = 'F'; -- use scan update to 'same' -update t0 set c2 = 'g' where c0 = 1; -- update pk part -update t0 set c2 = 'G' where c0 = 1; -- update pk part to 'same' -update t0 set c0 = 5, c2 = 'H' where c0 = 3; -- update full PK -delete from t0; -drop table t0; - ---exec echo Running mgmapi_logevent ---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "$NDB_CONNECTSTRING" 1 >> $NDB_EXAMPLES_OUTPUT diff --git a/mysql-test/suite/ndb/t/ps_7ndb.test b/mysql-test/suite/ndb/t/ps_7ndb.test deleted file mode 100644 index e3f65ec2c4e..00000000000 --- a/mysql-test/suite/ndb/t/ps_7ndb.test +++ /dev/null @@ -1,25 +0,0 @@ -############################################### -# # -# Prepared Statements test on NDB tables # -# # -############################################### - -# -# NOTE: PLEASE SEE ps_1general.test (bottom) -# BEFORE ADDING NEW TEST CASES HERE !!! - -use test; - --- source include/have_ndb.inc -let $type= 'NDB' ; --- source include/ps_create.inc --- source include/ps_renew.inc - --- source include/ps_query.inc --- source include/ps_modify.inc --- source include/ps_modify1.inc --- source include/ps_conv.inc - -drop table t1, t9; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test b/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test deleted file mode 100644 index 9e2090fddef..00000000000 --- a/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test +++ /dev/null @@ -1,10 +0,0 @@ --- source include/have_ndb.inc - -# -# Bug#20573 Strict mode auto-increment -# - -let $type= 'NDB' ; ---source include/strict_autoinc.inc - -# end of test diff --git a/mysql-test/suite/ndb_team/r/ndb_autodiscover.result b/mysql-test/suite/ndb_team/r/ndb_autodiscover.result deleted file mode 100644 index 487f52f6427..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_autodiscover.result +++ /dev/null @@ -1,397 +0,0 @@ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -flush status; -create table t1( -id int not null primary key, -name char(20) -) engine=ndb; -insert into t1 values(1, "Autodiscover"); -flush tables; -select * from t1; -id name -1 Autodiscover -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -flush tables; -insert into t1 values (2, "Auto 2"); -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -insert into t1 values (3, "Discover 3"); -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -flush tables; -select * from t1 order by id; -id name -1 Autodiscover -2 Auto 2 -3 Discover 3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 3 -flush tables; -update t1 set name="Autodiscover" where id = 2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 4 -select * from t1 order by id; -id name -1 Autodiscover -2 Autodiscover -3 Discover 3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 4 -flush tables; -delete from t1 where id = 3; -select * from t1 order by id; -id name -1 Autodiscover -2 Autodiscover -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 5 -drop table t1; -flush status; -create table t2( -id int not null primary key, -name char(22) -) engine=ndb; -insert into t2 values (1, "Discoverer"); -select * from t2; -id name -1 Discoverer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -select * from t2; -id name -1 Discoverer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -drop table t2; -flush status; -create table t3( -id int not null primary key, -name char(255) -) engine=ndb; -insert into t3 values (1, "Explorer"); -select * from t3; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -create table t3( -id int not null primary key, -name char(20), a int, b float, c char(24) -) engine=ndb; -ERROR 42S01: Table 't3' already exists -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table IF NOT EXISTS t3( -id int not null primary key, -id2 int not null, -name char(20) -) engine=ndb; -Warnings: -Note 1050 Table 't3' already exists -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -SHOW CREATE TABLE t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL, - `name` char(255) default NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () -select * from t3; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -drop table t3; -flush status; -create table t7( -id int not null primary key, -name char(255) -) engine=ndb; -create table t6( -id int not null primary key, -name char(255) -) engine=MyISAM; -insert into t7 values (1, "Explorer"); -insert into t6 values (2, "MyISAM table"); -select * from t7; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -show tables from test; -Tables_in_test -t6 -t7 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -flush tables; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t6 MyISAM 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # -t7 NDBCLUSTER 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t6, t7; -flush status; -create table t4( -id int not null primary key, -name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; -id name -1 Automatic -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t4; -ERROR 42S02: Unknown table 't4' -create table t4( -id int not null primary key, -name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; -id name -1 Automatic -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -drop table if exists t4; -Warnings: -Error 155 Table 'test.t4' doesn't exist -drop table t5; -ERROR 42S02: Unknown table 't5' -drop table if exists t5; -Warnings: -Note 1051 Unknown table 't5' -flush status; -create table t4( -id int not null primary key, -id2 int, -name char(27) -) engine=ndb; -insert into t4 values (1, 76, "Automatic2"); -select * from t4; -id id2 name -1 76 Automatic2 -flush tables; -SHOW TABLES; -Tables_in_test -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); -SHOW TABLES; -Tables_in_test -t1 -t2 -t4 -t8 -t9 -t7 -t6 -select * from t6; -id -6 -select * from t7; -id -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t1, t2, t4, t6, t7, t8, t9; -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); -SHOW TABLES LIKE 't6'; -Tables_in_test (t6) -t6 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -create table t3(a int); -ERROR 42S01: Table 't3' already exists -create table t5(a int); -ERROR 42S01: Table 't5' already exists -SHOW TABLES LIKE 't%'; -Tables_in_test (t%) -t1 -t2 -t4 -t6 -t8 -t9 -t7 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t1, t2, t4, t6, t7, t8, t9; -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=ndbcluster; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -insert into t1 values (1); -insert into t2 values (2, "table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t4 values (4); -flush tables; -select * from t1, t2, t3, t4; -id id b id c id -1 2 table 2 3 ndb table 3 4 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 3 -drop table t1, t2, t3, t4; -flush status; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t5( -id int not null primary key, -name char(200) -) engine=ndb; -insert into t5 values (1, "Magnus"); -select * from t5; -id name -1 Magnus -ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; -select * from t5; -adress id name -NULL 1 Magnus -insert into t5 values -("Adress for record 2", 2, "Carl-Gustav"), -("Adress for record 3", 3, "Karl-Emil"); -update t5 set name="Bertil" where id = 2; -select * from t5 order by id; -adress id name -NULL 1 Magnus -Adress for record 2 2 Bertil -Adress for record 3 3 Karl-Emil -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t5; -flush status; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t6( -id int not null primary key, -name char(20) -) engine=ndb; -insert into t6 values (1, "Magnus"); -select * from t6; -id name -1 Magnus -ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; -select * from t6; -adress id name -NULL 1 Magnus -insert into t6 values -("Adress for record 2", 2, "Carl-Gustav"), -("Adress for record 3", 3, "Karl-Emil"); -update t6 set name="Bertil" where id = 2; -select * from t6 order by id; -adress id name -NULL 1 Magnus -Adress for record 2 2 Bertil -Adress for record 3 3 Karl-Emil -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t6; -show tables; -Tables_in_test -create table t1 (a int,b longblob) engine=ndb; -show tables; -Tables_in_test -t1 -create database test2; -use test2; -show tables; -Tables_in_test2 -select * from t1; -ERROR 42S02: Table 'test2.t1' doesn't exist -create table t2 (b int,c longblob) engine=ndb; -use test; -select * from t1; -a b -show tables; -Tables_in_test -t1 -drop table t1; -use test2; -drop table t2; -drop database test2; -use test; -drop database if exists test_only_ndb_tables; -create database test_only_ndb_tables; -use test_only_ndb_tables; -create table t1 (a int primary key) engine=ndb; -select * from t1; -a -select * from t1; -ERROR HY000: Can't lock file (errno: 157) -use test; -drop database test_only_ndb_tables; -CREATE TABLE t9 ( -a int NOT NULL PRIMARY KEY, -b int -) engine=ndb; -insert t9 values(1, 2), (2,3), (3, 4), (4, 5); -create table t10 ( -a int not null primary key, -b blob -) engine=ndb; -insert into t10 values (1, 'kalle'); diff --git a/mysql-test/suite/ndb_team/r/ndb_autodiscover2.result b/mysql-test/suite/ndb_team/r/ndb_autodiscover2.result deleted file mode 100644 index 269888e0820..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_autodiscover2.result +++ /dev/null @@ -1,13 +0,0 @@ -select * from t9 order by a; -a b -1 2 -2 3 -3 4 -4 5 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t9; -select * from t10; -ERROR HY000: Got error 4263 'Invalid blob attributes or invalid blob parts table' from NDBCLUSTER -drop table t10; diff --git a/mysql-test/suite/ndb_team/r/ndb_autodiscover3.result b/mysql-test/suite/ndb_team/r/ndb_autodiscover3.result deleted file mode 100644 index 86495ebb3eb..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_autodiscover3.result +++ /dev/null @@ -1,53 +0,0 @@ -drop table if exists t1, t2; -create table t1 (a int key) engine=ndbcluster; -begin; -insert into t1 values (1); -insert into t1 values (2); -ERROR HY000: Got temporary error 4025 'Node failure caused abort of transaction' from NDBCLUSTER -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -drop table t1; -create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; -insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); -select * from t2 order by a limit 3; -a b -1 1 -2 1 -3 1 -select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist -show tables like 't2'; -Tables_in_test (t2) -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; -a -1 -2 -3 -select * from t2 order by a limit 3; -a -1 -2 -3 -reset master; -select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist -show tables like 't2'; -Tables_in_test (t2) -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; -a -1 -2 -3 -select * from t2 order by a limit 3; -a -1 -2 -3 -reset master; -drop table t2; diff --git a/mysql-test/suite/ndb_team/r/ndb_backup_print.result b/mysql-test/suite/ndb_team/r/ndb_backup_print.result deleted file mode 100644 index 7fa073bafb5..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_backup_print.result +++ /dev/null @@ -1,65 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -Connected to Management Server at: : -Waiting for completed, this may take several minutes -Node : Backup started from node -Node : Backup started from node completed - StartGCP: StopGCP: - #Records: #LogRecords: - Data: bytes Log: bytes -create table t1 -(pk int key -,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) -,b1 TINYINT, b2 TINYINT UNSIGNED -,c1 SMALLINT, c2 SMALLINT UNSIGNED -,d1 INT, d2 INT UNSIGNED -,e1 BIGINT, e2 BIGINT UNSIGNED -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine ndb; -insert into t1 values -(1 -,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 -,127, 255 -,32767, 65535 -,2147483647, 4294967295 -,9223372036854775807, 18446744073709551615 -,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 -,0x12,0x123456789abcdef0, 0x00123450 -); -insert into t1 values -(2 -,0, 0, 0, 0, 0 -,-128, 0 -,-32768, 0 -,-2147483648, 0 -,-9223372036854775808, 0 -,'','','' - ,'','','' - ,0x0,0x0,0x0 -,0x0,0x0,0x0 -); -insert into t1 values -(3 -,NULL,NULL,NULL,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -); -Connected to Management Server at: : -Waiting for completed, this may take several minutes -Node : Backup started from node -Node : Backup started from node completed - StartGCP: StopGCP: - #Records: #LogRecords: - Data: bytes Log: bytes -drop table t1; diff --git a/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result b/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result deleted file mode 100644 index 12a65a433a3..00000000000 --- a/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result +++ /dev/null @@ -1,512 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; -**** Test 1 Simple DD backup and restore **** -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -**** Test 2 Mixed Cluster Test backup and restore **** -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -**** Test 3 Adding partition Test backup and restore **** -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP TABLESPACE table_space2 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; -DROP TABLESPACE table_space1 ENGINE = NDB; -DROP TABLESPACE table_space2 ENGINE = NDB; -DROP LOGFILE GROUP log_group1 ENGINE = NDB; diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result b/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result deleted file mode 100644 index 37188aeb1ca..00000000000 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result +++ /dev/null @@ -1,323 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS t1, t2, t3; -***** Test 1 RPL of CDD and Alter ***** -***** Test 1 setup ***** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; -CREATE TABLE t1 -(c1 INT NOT NULL PRIMARY KEY, -c2 INT NOT NULL, -c3 INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -***** insert some data ***** -***** Select from Master ***** -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 -1 2 4 -2 4 5 -3 6 6 -4 8 7 -5 10 8 -***** Select from Slave ***** -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 -1 2 4 -2 4 5 -3 6 6 -4 8 7 -5 10 8 -FILE_NAME FILE_TYPE TABLESPACE_NAME LOGFILE_GROUP_NAME -NULL UNDO LOG NULL lg1 -datafile.dat DATAFILE ts1 lg1 -datafile02.dat DATAFILE ts1 lg1 -undofile.dat UNDO LOG NULL lg1 -undofile02.dat UNDO LOG NULL lg1 -**** Do First Set of ALTERs in the master table **** -CREATE INDEX t1_i ON t1(c2, c3); -CREATE UNIQUE INDEX t1_i2 ON t1(c2); -ALTER TABLE t1 ADD c4 TIMESTAMP; -ALTER TABLE t1 ADD c5 DOUBLE; -ALTER TABLE t1 ADD INDEX (c5); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`), - KEY `c5` (`c5`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Show first set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`), - KEY `c5` (`c5`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Second set of alters test 1 **** -ALTER TABLE t1 RENAME t2; -ALTER TABLE t2 DROP INDEX c5; -CREATE TABLE t1(c1 INT)ENGINE=NDB; -INSERT INTO t1 VALUES(1); -DROP TABLE t1; -ALTER TABLE t2 RENAME t1; -**** Show second set of ALTERs on MASTER **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Show second set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`,`c3`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Third and last set of alters for test1 **** -ALTER TABLE t1 CHANGE c1 c1 DOUBLE; -ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); -ALTER TABLE t1 DROP COLUMN c3; -ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c4 c4 BLOB; -ALTER TABLE t1 CHANGE c4 c3 BLOB; -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -UPDATE t1 SET c3=@b1 where c1 = 1; -UPDATE t1 SET c3=@b1 where c1 = 2; -**** Show last set of ALTERs on MASTER **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` double NOT NULL DEFAULT '0', - `c2` decimal(10,2) DEFAULT NULL, - `c3` blob, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -2 4.00 b1b1b1b1b1b1b1b1b1b1 NULL -3 6.00 0000-00-00 00:00:00 NULL -4 8.00 0000-00-00 00:00:00 NULL -5 10.00 0000-00-00 00:00:00 NULL -**** Show last set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` double NOT NULL DEFAULT '0', - `c2` decimal(10,2) DEFAULT NULL, - `c3` blob, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - UNIQUE KEY `t1_i2` (`c2`), - KEY `t1_i` (`c2`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -2 4.00 b1b1b1b1b1b1b1b1b1b1 NULL -3 6.00 0000-00-00 00:00:00 NULL -4 8.00 0000-00-00 00:00:00 NULL -5 10.00 0000-00-00 00:00:00 NULL -SELECT * FROM t1 where c1 = 1; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -DROP TABLE t1; -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; -******** Create additional TABLESPACE test 2 ************** -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile03.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 10M -ENGINE=NDB; -ALTER TABLESPACE ts2 -ADD DATAFILE 'datafile04.dat' -INITIAL_SIZE 5M -ENGINE=NDB; -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; - -CREATE TABLE tpcb.account -(id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - -CREATE TABLE tpcb.branch -(bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid))TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - -CREATE TABLE tpcb.teller -(tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)) TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - -CREATE TABLE tpcb.history -(id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDBCLUSTER; - ---- Create stored procedures & functions --- - - -*** Stored Procedures Created *** - -****** TEST 2 test time ********************************* -USE tpcb; -*********** Load up the database ****************** -CALL tpcb.load(); -********** Check load master and slave ************** -SELECT COUNT(*) FROM account; -COUNT(*) -1000 -USE tpcb; -SELECT COUNT(*) FROM account; -COUNT(*) -1000 -******** Run in some transactions *************** -***** Time to try slave sync *********** -**** Must make sure slave is clean ***** -STOP SLAVE; -RESET SLAVE; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE IF EXISTS tpcb.account; -DROP TABLE IF EXISTS tpcb.teller; -DROP TABLE IF EXISTS tpcb.branch; -DROP TABLE IF EXISTS tpcb.history; -DROP DATABASE tpcb; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -********** Take a backup of the Master ************* -SELECT COUNT(*) FROM history; -COUNT(*) -100 -SELECT COUNT(*) FROM history; -COUNT(*) -200 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -************ Restore the slave ************************ -CREATE DATABASE tpcb; -***** Check a few slave restore values *************** -USE tpcb; -SELECT COUNT(*) FROM account; -COUNT(*) -1000 -***** Add some more records to master ********* -***** Finsh the slave sync process ******* -@the_epoch:=MAX(epoch) - -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -* 4. * -* 5. * -START SLAVE; -**** We should be ready to continue on ************* -****** Let's make sure we match ******* -***** MASTER ******* -USE tpcb; -SELECT COUNT(*) FROM history; -COUNT(*) -400 -****** SLAVE ******** -USE tpcb; -SELECT COUNT(*) FROM history; -COUNT(*) -400 -*** DUMP MASTER & SLAVE FOR COMPARE ******** -*************** TEST 2 CLEANUP SECTION ******************** -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE tpcb.account; -DROP TABLE tpcb.teller; -DROP TABLE tpcb.branch; -DROP TABLE tpcb.history; -DROP DATABASE tpcb; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -****** Do dumps compare ************ diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result b/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result deleted file mode 100644 index 55a95605839..00000000000 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result +++ /dev/null @@ -1,1752 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -set binlog_format=row; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format ROW and engine == 'NDB' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='NDB'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='NDB'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='NDB'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='NDB'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 1054 *** -******************************************** - -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - -set binlog_format=mixed; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format MIXED and engine == 'NDB' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='NDB'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='NDB'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='NDB'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='NDB'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='NDB'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='NDB'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 1054 *** -******************************************** - -Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result b/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result deleted file mode 100644 index 203a59b4613..00000000000 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result +++ /dev/null @@ -1,143 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -*** Test 1 *** - -create table t1 (a int key, b int) engine innodb; -create table t2 (a int key, b int) engine innodb; - -alter table t1 engine ndb; -alter table t2 engine ndb; - -insert into t1 values (1,2); - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -# Now check that that is in the apply_status table is consistant -# with what is in the binlog - -# since insert is done with transactional engine, expect a BEGIN -# at - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -# Now the insert, one step after - -show binlog events from limit 1,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (1,2) - -# and the COMMIT should be at - -show binlog events from limit 2,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -begin; -insert into t1 values (2,3); -insert into t2 values (3,4); -commit; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -show binlog events from limit 1,2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (2,3) -master-bin.000001 # Query # # use `test`; insert into t2 values (3,4) - -show binlog events from limit 3,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -DROP TABLE test.t1, test.t2; -SHOW TABLES; -Tables_in_test - -*** Test 2 *** - -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; - -CREATE TABLE tpcb.account (id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)); - -CREATE TABLE tpcb.branch (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid)); - -CREATE TABLE tpcb.teller (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)); - -CREATE TABLE tpcb.history (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)); - ---- Create stored procedures & functions --- - - -*** Stored Procedures Created *** - -USE tpcb; -ALTER TABLE account ENGINE NDB; -ALTER TABLE branch ENGINE NDB; -ALTER TABLE teller ENGINE NDB; -ALTER TABLE history ENGINE NDB; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -** Test 3 ** - -FLUSH LOGS; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000002' from limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Xid 1 COMMIT /* XID */ - -** Test 4 ** - -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -*** DUMP MASTER & SLAVE FOR COMPARE ******** -DROP DATABASE tpcb; -****** Do dumps compare ************ diff --git a/mysql-test/suite/ndb_team/t/disabled.def b/mysql-test/suite/ndb_team/t/disabled.def deleted file mode 100644 index 714f1014a10..00000000000 --- a/mysql-test/suite/ndb_team/t/disabled.def +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# : BUG# -# -# Do not use any TAB characters for whitespace. -# -############################################################################## -ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog -ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog - -# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open -#ndb_autodiscover3 : bug#21806 -#ndb_autodiscover3 : Bug#20872 2007-07-15 ingo master*.err: miscellaneous error messages -#rpl_ndb_extraColMaster : BUG#30854 : Tables name show as binary in slave err msg on vm-win2003-64-b and Solaris -#rpl_ndb_mix_innodb : Bug #32720 Test rpl_ndb_mix_innodb fails on SPARC and PowerPC -#rpl_ndb_dd_advance : Bug #30222 rpl_ndb_dd_advance.test fails diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover.test b/mysql-test/suite/ndb_team/t/ndb_autodiscover.test deleted file mode 100644 index 9ded27cea31..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover.test +++ /dev/null @@ -1,555 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# Bug#41308: Test main.ndb_autodiscover.test doesn't work on Windows due -# to 'grep' calls -# Test is currently disabled on Windows via the next line until this bug -# can be resolved. ---source include/not_windows.inc - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -################################################ -# Test that a table that does not exist as a -# frm file on disk can be "discovered" from a -# connected NDB Cluster -# - -flush status; - -# -# Test discover + SELECT -# - -create table t1( - id int not null primary key, - name char(20) -) engine=ndb; - -insert into t1 values(1, "Autodiscover"); -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1; -show status like 'handler_discover%'; - -# -# Test discover + INSERT -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -insert into t1 values (2, "Auto 2"); -show status like 'handler_discover%'; -insert into t1 values (3, "Discover 3"); -show status like 'handler_discover%'; -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + UPDATE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -update t1 set name="Autodiscover" where id = 2; -show status like 'handler_discover%'; -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + DELETE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -delete from t1 where id = 3; -select * from t1 order by id; -show status like 'handler_discover%'; - -drop table t1; - - - -###################################################### -# Test that a table that is outdated on disk -# can be "discovered" from a connected NDB Cluster -# - -flush status; - -create table t2( - id int not null primary key, - name char(22) -) engine=ndb; -insert into t2 values (1, "Discoverer"); -select * from t2; -show status like 'handler_discover%'; -flush tables; - -# Modify the frm file on disk -system echo "blaj" >> $MYSQLTEST_VARDIR/master-data/test/t2.frm ; -select * from t2; - -show status like 'handler_discover%'; - -drop table t2; - - -################################################## -# Test that a table that already exists in NDB -# is only discovered if CREATE TABLE IF NOT EXISTS -# is used -# - -flush status; - -create table t3( - id int not null primary key, - name char(255) -) engine=ndb; -insert into t3 values (1, "Explorer"); -select * from t3; -show status like 'handler_discover%'; -flush tables; - -# Remove the frm file from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm - ---error ER_TABLE_EXISTS_ERROR -create table t3( - id int not null primary key, - name char(20), a int, b float, c char(24) -) engine=ndb; - -# The table shall not have been discovered since -# IF NOT EXISTS wasn't specified - -show status like 'handler_discover%'; - -# now it should be discovered -create table IF NOT EXISTS t3( - id int not null primary key, - id2 int not null, - name char(20) -) engine=ndb; - -# NOTE! the table called t3 have now been updated to -# use the same frm as in NDB, thus it's not certain that -# the table schema is the same as was stated in the -# CREATE TABLE statement above - -show status like 'handler_discover%'; - -SHOW CREATE TABLE t3; - -select * from t3; -show status like 'handler_discover%'; - -drop table t3; - -################################################## -# Test that a table that already exists in NDB -# is discovered when SHOW TABLES -# is used -# - -flush status; - -create table t7( - id int not null primary key, - name char(255) -) engine=ndb; -create table t6( - id int not null primary key, - name char(255) -) engine=MyISAM; -insert into t7 values (1, "Explorer"); -insert into t6 values (2, "MyISAM table"); -select * from t7; -show status like 'handler_discover%'; - -# Remove the frm file from disk -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -show tables from test; -show status like 'handler_discover%'; - -# Remove the frm file from disk again -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - ---replace_column 6 # 7 # 8 # 9 # 12 # 13 # 15 # 18 # -show table status; -show status like 'handler_discover%'; - -drop table t6, t7; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk, get a consistent error message -# saying "No such table existed" -# - -flush status; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -# -# Test that correct error is returned ---error ER_NO_SUCH_TABLE -select * from t4; ---error ER_NO_SUCH_TABLE -select * from t4; - -show status like 'handler_discover%'; ---error ER_BAD_TABLE_ERROR -drop table t4; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - ---error ER_NO_SUCH_TABLE -select * from t4; - -drop table if exists t4; - -# Test that dropping a table that does not exists -# on disk or in NDB gives same result as above ---error ER_BAD_TABLE_ERROR -drop table t5; -drop table if exists t5; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk is deleted from disk -# when SHOW TABLES is called -# - -flush status; - -create table t4( - id int not null primary key, - id2 int, - name char(27) -) engine=ndb; -insert into t4 values (1, 76, "Automatic2"); -select * from t4; -flush tables; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -SHOW TABLES; - ---error ER_NO_SUCH_TABLE -select * from t4; - -####################################################### -# Test SHOW TABLES ability to detect new and delete old -# tables. Test all at once using many tables -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 >> $NDB_TOOLS_OUTPUT ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 >> $NDB_TOOLS_OUTPUT ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -SHOW TABLES; - -select * from t6; -select * from t7; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - -####################################################### -# Test SHOW TABLES LIKE ability to detect new and delete old -# tables. Test all at once using many tables. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 > /dev/null ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 > /dev/null ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - - -SHOW TABLES LIKE 't6'; - -show status like 'handler_discover%'; - -# Check that t3 or t5 can't be created -# frm files for these tables is stilll on disk ---error ER_TABLE_EXISTS_ERROR -create table t3(a int); ---error ER_TABLE_EXISTS_ERROR -create table t5(a int); - -SHOW TABLES LIKE 't%'; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - - - -###################################################### -# Test that several tables can be discovered when -# one statement access several table at once. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=ndbcluster; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; - -# Populate tables -insert into t1 values (1); -insert into t2 values (2, "table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t4 values (4); - -# Remove t1, t2, t3 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t2.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm -flush tables; - -# Select from the table which only exists in NDB. -select * from t1, t2, t3, t4; - -# 3 table should have been discovered -show status like 'handler_discover%'; - -drop table t1, t2, t3, t4; - - -######################################################### -# Test that a table that has been changed in NDB -# since it's been opened will be refreshed and discovered -# again -# - -flush status; - -show status like 'handler_discover%'; - -create table t5( - id int not null primary key, - name char(200) -) engine=ndb; -insert into t5 values (1, "Magnus"); -select * from t5; - -ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; - -select * from t5; - -insert into t5 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t5 set name="Bertil" where id = 2; -select * from t5 order by id; - -show status like 'handler_discover%'; - -drop table t5; - - -################################################################ -# Test that a table that has been changed with ALTER TABLE -# can be used from the same thread -# - -flush status; - -show status like 'handler_discover%'; - -create table t6( - id int not null primary key, - name char(20) -) engine=ndb; -insert into t6 values (1, "Magnus"); -select * from t6; - -ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; - -select * from t6; -insert into t6 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t6 set name="Bertil" where id = 2; -select * from t6 order by id; - -show status like 'handler_discover%'; - -drop table t6; - -##################################################### -# Test that only tables in the current database shows -# up in SHOW TABLES -# - -show tables; - -create table t1 (a int,b longblob) engine=ndb; -show tables; -create database test2; -use test2; -show tables; ---error ER_NO_SUCH_TABLE -select * from t1; -create table t2 (b int,c longblob) engine=ndb; -use test; -select * from t1; -show tables; -drop table t1; -use test2; -drop table t2; -drop database test2; -use test; - -######################################################### -# Bug#8035 -# mysqld would segfault on second select * before bug was fixed -# ---disable_warnings -drop database if exists test_only_ndb_tables; ---enable_warnings -create database test_only_ndb_tables; -use test_only_ndb_tables; -create table t1 (a int primary key) engine=ndb; -select * from t1; ---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null ---error ER_CANT_LOCK -select * from t1; ---exec $NDB_MGM --no-defaults -e "all start" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null ---source include/ndb_wait_connected.inc -use test; -drop database test_only_ndb_tables; - -##################################################### -# Test that it's not possible to create tables -# with same name as NDB internal tables -# This will also test that it's not possible to create -# a table with tha same name as a table that can't be -# discovered( for example a table created via NDBAPI) - -# Test disabled since it doesn't work on case insensitive systems -#--error ER_TABLE_EXISTS_ERROR -#CREATE TABLE sys.SYSTAB_0 (a int); -#--error ER_UNKNOWN_ERROR -#select * from sys.SYSTAB_0; - -#CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int); -#show warnings; -#--error ER_UNKNOWN_ERROR -#select * from sys.SYSTAB_0; - -#--error ER_BAD_TABLE_ERROR -#drop table sys.SYSTAB_0; -#drop table IF EXISTS sys.SYSTAB_0; - -###################################################### -# Note! This should always be the last step in this -# file, the table t9 will be used and dropped -# by ndb_autodiscover2 -# - -CREATE TABLE t9 ( - a int NOT NULL PRIMARY KEY, - b int -) engine=ndb; - -insert t9 values(1, 2), (2,3), (3, 4), (4, 5); - -#Don't drop the table, instead remove the frm file ---remove_file $MYSQLTEST_VARDIR/master-data/test/t9.frm - -# Now leave test case, when ndb_autodiscover2 will run, this -# MySQL Server will have been restarted because it has a -# ndb_autodiscover2-master.opt file. - -create table t10 ( - a int not null primary key, - b blob -) engine=ndb; - -insert into t10 values (1, 'kalle'); - ---exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test `$NDB_TOOLS_DIR/ndb_show_tables --no-defaults | grep BLOB | while read a b c d e f g; do echo $g; done` >> $NDB_TOOLS_OUTPUT 2>&1 || true - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt b/mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover2.test b/mysql-test/suite/ndb_team/t/ndb_autodiscover2.test deleted file mode 100644 index ebe14696cd2..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover2.test +++ /dev/null @@ -1,21 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# -# Simple test to show use of discover when the server has been restarted -# The previous step has simply removed the frm file -# from disk, but left the table in NDB -# ---sleep 3 -select * from t9 order by a; - -# handler_discover should be 1 -show status like 'handler_discover%'; - -drop table t9; - ---error 1296 -select * from t10; -drop table t10; - -# End of 4.1 tests diff --git a/mysql-test/suite/ndb_team/t/ndb_autodiscover3.test b/mysql-test/suite/ndb_team/t/ndb_autodiscover3.test deleted file mode 100644 index 10416aee11f..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_autodiscover3.test +++ /dev/null @@ -1,104 +0,0 @@ --- source include/have_multi_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# see bug#21563 --- source include/have_binlog_format_mixed_or_row.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (con2,127.0.0.1,root,,test,$MASTER_MYPORT1,); - -# Workaround for Bug#27644 -# ndb: connecting api node/mysqld may "steal" node_id from running mysqld -# - let ndb_waiter use a fixed node id so "steal" cannot happen ---let connect_str = "nodeid=6;$NDB_CONNECTSTRING" - -# -# Transaction ongoing while cluster is restarted -# ---connection server1 -create table t1 (a int key) engine=ndbcluster; - -begin; -insert into t1 values (1); - ---exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# Wait for mysqld to reconnect and exit from readonly mode ---disable_query_log ---connection con1 ---source include/ndb_not_readonly.inc ---connection con2 ---source include/ndb_not_readonly.inc ---enable_query_log - ---connection server1 ---error 1297 -insert into t1 values (2); ---error 1296 -commit; - -drop table t1; - -# -# Stale cache after restart -i -# ---connection server1 -create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; -insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); -select * from t2 order by a limit 3; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---disable_query_log ---connection con1 ---source include/ndb_not_readonly.inc ---connection con2 ---source include/ndb_not_readonly.inc ---enable_query_log - ---connection server2 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 1 should have a stale cache, and in this case wrong frm, transaction must be retried ---connection server1 -select * from t2 order by a limit 3; -reset master; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---disable_query_log ---connection con1 ---source include/ndb_not_readonly.inc ---connection con2 ---source include/ndb_not_readonly.inc ---enable_query_log - ---connection server1 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 2 should have a stale cache, but with right frm, transaction need not be retried ---connection server2 -select * from t2 order by a limit 3; -reset master; - -drop table t2; -# End of 4.1 tests diff --git a/mysql-test/suite/ndb_team/t/ndb_backup_print.test b/mysql-test/suite/ndb_team/t/ndb_backup_print.test deleted file mode 100644 index cf869fd56f5..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_backup_print.test +++ /dev/null @@ -1,68 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -#NO.1 test output of backup ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' - -create table t1 - (pk int key - ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) - ,b1 TINYINT, b2 TINYINT UNSIGNED - ,c1 SMALLINT, c2 SMALLINT UNSIGNED - ,d1 INT, d2 INT UNSIGNED - ,e1 BIGINT, e2 BIGINT UNSIGNED - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine ndb; - -insert into t1 values - (1 - ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 - ,127, 255 - ,32767, 65535 - ,2147483647, 4294967295 - ,9223372036854775807, 18446744073709551615 - ,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 - ,0x12,0x123456789abcdef0, 0x00123450 - ); - -insert into t1 values - (2 - ,0, 0, 0, 0, 0 - ,-128, 0 - ,-32768, 0 - ,-2147483648, 0 - ,-9223372036854775808, 0 - ,'','','' - ,'','','' - ,0x0,0x0,0x0 - ,0x0,0x0,0x0 - ); - -insert into t1 values - (3 - ,NULL,NULL,NULL,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ); - -#NO.2 test output of backup after some simple SQL operations ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' - -drop table t1; diff --git a/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test b/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test deleted file mode 100644 index 48db8ec3e0b..00000000000 --- a/mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test +++ /dev/null @@ -1,349 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-24 -# Purpose: Test CDD backup and restore -######################################## - --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; ---enable_warnings - -############ Test 1 Simple DD backup and restore ############# --- echo **** Test 1 Simple DD backup and restore **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden", $j, b'1'); - dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -################# Mixed Cluster Test ############################ --- echo **** Test 2 Mixed Cluster Test backup and restore **** - -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; -} ---enable_query_log - -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; - -let $j= 50; ---disable_query_log -while ($j) -{ - INSERT INTO test.t3 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t3 VALUES (NULL, repeat('b',16*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('b',16*1024)); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -###################### Adding partition ################################# --- echo **** Test 3 Adding partition Test backup and restore **** - -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; - -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; - -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); - -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden, Texas", $j, b'0'); - eval INSERT INTO test.t4 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t5 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - dec $j; - eval INSERT INTO test.t3 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t6 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); } --enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP TABLESPACE table_space2 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - -# Cleanup - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; - -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; - -DROP TABLESPACE table_space1 ENGINE = NDB; - -DROP TABLESPACE table_space2 ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 ENGINE = NDB; - -#End 5.1 test case - - diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test b/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test deleted file mode 100644 index 5d6c915307a..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test +++ /dev/null @@ -1,404 +0,0 @@ -############################################### -# Purpose: To test advance DD and replication # -############################################### - -#### Include Section #### ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_default_cluster.inc ---source include/not_embedded.inc ---source include/ndb_master-slave.inc - -###################################################### -# Requirment: Cluster DD and replication must be able# -# to handle ALTER tables and indexes and must rpl # -# to the slave correctly # -###################################################### - -## Test #1 replication of CDD and Alter Tables ##### ---echo ***** Test 1 RPL of CDD and Alter ***** ---echo ***** Test 1 setup ***** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLE t1 - (c1 INT NOT NULL PRIMARY KEY, - c2 INT NOT NULL, - c3 INT NOT NULL) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB; - ---echo ***** insert some data ***** - -let $j= 900; ---disable_query_log -while ($j) -{ - eval INSERT INTO t1 VALUES($j,$j*2,$j+3); - dec $j; -} ---enable_query_log - ---echo ***** Select from Master ***** - -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo ***** Select from Slave ***** ---sync_slave_with_master -connection slave; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - -################################### -# Just to some File Schema check # -################################### - ---disable_query_log -SELECT DISTINCT FILE_NAME, FILE_TYPE, TABLESPACE_NAME, LOGFILE_GROUP_NAME - FROM INFORMATION_SCHEMA.FILES - WHERE ENGINE="ndbcluster" ORDER BY FILE_NAME; ---enable_query_log - ---echo **** Do First Set of ALTERs in the master table **** -################################################### -# On this first set of alters I expect: -# 1. To be able to create and index on 2 columns -# 2. To be able to create a unique index -# 3. To be able to add two columns and have -# it all replicated correctly to the slave cluster. -################################################### -connection master; -CREATE INDEX t1_i ON t1(c2, c3); -#Bug 18039 -CREATE UNIQUE INDEX t1_i2 ON t1(c2); -ALTER TABLE t1 ADD c4 TIMESTAMP; -ALTER TABLE t1 ADD c5 DOUBLE; -ALTER TABLE t1 ADD INDEX (c5); -SHOW CREATE TABLE t1; - ---echo **** Show first set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Second set of alters test 1 **** -############################################ -# With this next set of alters we have had -# Some issues with renames of tables. So this -# test renames our main table, drop and index off -# of it, creates another table with then name -# of the orginal table, inserts a row, drops -# the table and renames the orginal table back. -# I want to make sure that 1) the cluster does -# okay with this and 2) that it is replicated -# correctly. -############################################# -connection master; -ALTER TABLE t1 RENAME t2; -ALTER TABLE t2 DROP INDEX c5; -CREATE TABLE t1(c1 INT)ENGINE=NDB; -INSERT INTO t1 VALUES(1); -DROP TABLE t1; -ALTER TABLE t2 RENAME t1; - ---echo **** Show second set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; - ---echo **** Show second set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Third and last set of alters for test1 **** -######################################################### -# In this last set of alters, we are messing with the -# cluster ability to rebuild indexes, drop a column that make up -# an index with another column and change types several times in -# a row. I have choosen the BLOB as it seems to have had many -# issues in this release. I want to make sure that the cluster -# deals with these radical changes and that the replication to -# the slave cluster is dones correctly. -########################################################### -connection master; -ALTER TABLE t1 CHANGE c1 c1 DOUBLE; -ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); -ALTER TABLE t1 DROP COLUMN c3; -ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c4 c4 BLOB; -ALTER TABLE t1 CHANGE c4 c3 BLOB; -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -UPDATE t1 SET c3=@b1 where c1 = 1; -UPDATE t1 SET c3=@b1 where c1 = 2; - ---echo **** Show last set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo **** Show last set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; -# Bug 18094 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -SELECT * FROM t1 where c1 = 1; - -connection master; -DROP TABLE t1; ---sync_slave_with_master -connection slave; -STOP SLAVE; -RESET SLAVE; -connection master; -RESET MASTER; -connection slave; -START SLAVE; - -################### TEST 2 TPCB for disk data ########################### -# Requirement: To have Stored Procedures and Functions that are used to # -# populate and post transactions to the data base using CDD that span # -# 2 tables spaces and also use a memory only cluster tables. In addition# -# The slave is to be stopped, cleaned and restored and synced with the # -# Master cluster # -######################################################################### - ---echo ******** Create additional TABLESPACE test 2 ************** - -connection master; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile03.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 10M -ENGINE=NDB; - -ALTER TABLESPACE ts2 -ADD DATAFILE 'datafile04.dat' -INITIAL_SIZE 5M -ENGINE=NDB; - -let engine_type=NDBCLUSTER; -let table_space=ts2; -let format='RBR'; - ---source include/tpcb_disk_data.inc - ---echo ****** TEST 2 test time ********************************* -USE tpcb; - ---echo *********** Load up the database ****************** -CALL tpcb.load(); - ---echo ********** Check load master and slave ************** -SELECT COUNT(*) FROM account; ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ******** Run in some transactions *************** - -connection master; -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - - ---echo ***** Time to try slave sync *********** ---echo **** Must make sure slave is clean ***** ---connection slave -STOP SLAVE; -RESET SLAVE; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE IF EXISTS tpcb.account; -DROP TABLE IF EXISTS tpcb.teller; -DROP TABLE IF EXISTS tpcb.branch; -DROP TABLE IF EXISTS tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---echo ********** Take a backup of the Master ************* -connection master; - -SELECT COUNT(*) FROM history; - -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM history; - ---source include/ndb_backup.inc - ---echo ************ Restore the slave ************************ -connection slave; -CREATE DATABASE tpcb; ---source include/ndb_restore_slave_eoption.inc - ---echo ***** Check a few slave restore values *************** -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ***** Add some more records to master ********* -connection master; -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - -# -# now setup replication to continue from last epoch -# 1. get apply_status epoch from slave -# 2. get corresponding _next_ binlog postition from master -# 3. change master on slave -# 4. add some transaction for slave to process -# 5. start the replication - ---echo ***** Finsh the slave sync process ******* ---disable_query_log -# 1. 2. 3. ---sync_slave_with_master ---source include/ndb_setup_slave.inc ---enable_query_log - -# 4. ---echo * 4. * -connection master; -let $j= 100; ---disable_query_log -while ($j) -{ - eval CALL tpcb.trans($format); - dec $j; -} ---enable_query_log - -# 5. ---echo * 5. * -connection slave; -START SLAVE; - ---echo **** We should be ready to continue on ************* - -connection master; ---echo ****** Let's make sure we match ******* ---echo ***** MASTER ******* -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo ****** SLAVE ******** ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo *** DUMP MASTER & SLAVE FOR COMPARE ******** - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql - ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql - ---echo *************** TEST 2 CLEANUP SECTION ******************** -connection master; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE tpcb.account; -DROP TABLE tpcb.teller; -DROP TABLE tpcb.branch; -DROP TABLE tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---sync_slave_with_master - -connection master; - ---echo ****** Do dumps compare ************ - -diff_files $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; - -## Note: Ths files should only get removed, if the above diff succeeds. - -remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql; -remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; - -# End 5.1 test case ---source include/rpl_end.inc diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test b/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test deleted file mode 100644 index f5625f841b0..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test +++ /dev/null @@ -1,16 +0,0 @@ -############################################################# -# Purpose: To test having extra columns on the master WL#3915 -############################################################# --- source include/have_ndb.inc --- source include/ndb_master-slave.inc --- source include/have_binlog_format_mixed_or_row.inc - -let $engine_type = 'NDB'; - -set binlog_format=row; --- source extra/rpl_tests/rpl_extraMaster_Col.test - -set binlog_format=mixed; --- source extra/rpl_tests/rpl_extraMaster_Col.test - ---source include/rpl_end.inc diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt deleted file mode 100644 index 3596fc4d3bd..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test deleted file mode 100644 index 87bd1aecd30..00000000000 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test +++ /dev/null @@ -1,35 +0,0 @@ -############################################# -#Purpose: Generic replication to cluster -# and ensuring that the ndb_apply_status -# table is updated. -############################################# -# Notes: -# include/select_ndb_apply_status.inc -# Selects out the log name, start & end pos -# from the ndb_apply_status table -# -# include/show_binlog_using_logname.inc -# To select out 1 row from offset 1 -# from the start position in the binlog whose -# name is = log_name -# -# include/tpcb.inc -# Creates DATABASE tpcb, the tables and -# stored procedures for loading the DB -# and for running transactions against DB. -############################################## - - -## Includes ## - ---disable_query_log ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/have_binlog_format_mixed.inc ---source include/ndb_master-slave.inc ---enable_query_log -let $off_set = 9; -let $rpl_format = 'MIX'; ---source extra/rpl_tests/rpl_ndb_apply_status.test - ---source include/rpl_end.inc diff --git a/mysql-test/suite/parts/r/ndb_dd_backuprestore.result b/mysql-test/suite/parts/r/ndb_dd_backuprestore.result deleted file mode 100644 index 12a65a433a3..00000000000 --- a/mysql-test/suite/parts/r/ndb_dd_backuprestore.result +++ /dev/null @@ -1,512 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; -**** Test 1 Simple DD backup and restore **** -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -**** Test 2 Mixed Cluster Test backup and restore **** -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -**** Test 3 Adding partition Test backup and restore **** -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP TABLESPACE table_space2 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c3) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (c3) -(PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c3) -PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (pk1) -(PARTITION p0 ENGINE = ndbcluster, - PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (pk1) -(PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, - PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; -DROP TABLESPACE table_space1 ENGINE = NDB; -DROP TABLESPACE table_space2 ENGINE = NDB; -DROP LOGFILE GROUP log_group1 ENGINE = NDB; diff --git a/mysql-test/suite/parts/r/part_supported_sql_func_ndb.result b/mysql-test/suite/parts/r/part_supported_sql_func_ndb.result deleted file mode 100644 index a1e10ee4a9c..00000000000 --- a/mysql-test/suite/parts/r/part_supported_sql_func_ndb.result +++ /dev/null @@ -1,9918 +0,0 @@ -------------------------------------------------------------------------- ---- abs(col1) in partition with coltype int -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with abs(col1) -------------------------------------------------------------------------- -create table t1 (col1 int) engine='NDB' -partition by range(abs(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 int) engine='NDB' -partition by list(abs(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 int) engine='NDB' -partition by hash(abs(col1)); -create table t4 (colint int, col1 int) engine='NDB' -partition by range(colint) -subpartition by hash(abs(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 int) engine='NDB' -partition by list(colint) -subpartition by hash(abs(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 int) engine='NDB' -partition by range(colint) -(partition p0 values less than (abs(15)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with abs(col1) -------------------------------------------------------------------------- -insert into t1 values (5 ); -insert into t1 values (13 ); -insert into t2 values (5 ); -insert into t2 values (13 ); -insert into t2 values (17 ); -insert into t3 values (5 ); -insert into t3 values (13 ); -insert into t3 values (17 ); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t6; -select abs(col1) from t1 order by col1; -abs(col1) -5 -13 -select * from t1 order by col1; -col1 -5 -13 -select * from t2 order by col1; -col1 -5 -13 -17 -select * from t3 order by col1; -col1 -5 -13 -17 -select * from t4 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t6 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -update t1 set col1=15 where col1=5 ; -update t2 set col1=15 where col1=5 ; -update t3 set col1=15 where col1=5 ; -update t4 set col1=15 where col1=5 ; -update t5 set col1=15 where col1=5 ; -update t6 set col1=15 where col1=5 ; -select * from t1 order by col1; -col1 -13 -15 -select * from t2 order by col1; -col1 -13 -15 -17 -select * from t3 order by col1; -col1 -13 -15 -17 -select * from t4 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t6 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -------------------------------------------------------------------------- ---- Alter tables with abs(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(abs(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(abs(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(abs(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(abs(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(abs(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (abs(15)), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13 -15 -select * from t22 order by col1; -col1 -13 -15 -17 -select * from t33 order by col1; -col1 -13 -15 -17 -select * from t44 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t66 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(abs(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (abs(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with abs(col1) -------------------------------------------------------------------------- -delete from t1 where col1=13 ; -delete from t2 where col1=13 ; -delete from t3 where col1=13 ; -delete from t4 where col1=13 ; -delete from t5 where col1=13 ; -delete from t6 where col1=13 ; -select * from t1 order by col1; -col1 -15 -select * from t2 order by col1; -col1 -15 -17 -select * from t3 order by col1; -col1 -15 -17 -select * from t4 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -insert into t1 values (13 ); -insert into t2 values (13 ); -insert into t3 values (13 ); -insert into t4 values (60,13 ); -insert into t5 values (60,13 ); -insert into t6 values (60,13 ); -select * from t1 order by col1; -col1 -13 -15 -select * from t2 order by col1; -col1 -13 -15 -17 -select * from t3 order by col1; -col1 -13 -15 -17 -select * from t4 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -select * from t5 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -select * from t6 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with abs(col1) -------------------------------------------------------------------------- -delete from t11 where col1=13 ; -delete from t22 where col1=13 ; -delete from t33 where col1=13 ; -delete from t44 where col1=13 ; -delete from t55 where col1=13 ; -delete from t66 where col1=13 ; -select * from t11 order by col1; -col1 -15 -select * from t22 order by col1; -col1 -15 -17 -select * from t33 order by col1; -col1 -15 -17 -select * from t44 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t55 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -insert into t11 values (13 ); -insert into t22 values (13 ); -insert into t33 values (13 ); -insert into t44 values (60,13 ); -insert into t55 values (60,13 ); -insert into t66 values (60,13 ); -select * from t11 order by col1; -col1 -13 -15 -select * from t22 order by col1; -col1 -13 -15 -17 -select * from t33 order by col1; -col1 -13 -15 -17 -select * from t44 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -select * from t55 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -select * from t66 order by colint; -colint col1 -1 15 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 13 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- mod(col1,10) in partition with coltype int -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with mod(col1,10) -------------------------------------------------------------------------- -create table t1 (col1 int) engine='NDB' -partition by range(mod(col1,10)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 int) engine='NDB' -partition by list(mod(col1,10)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 int) engine='NDB' -partition by hash(mod(col1,10)); -create table t4 (colint int, col1 int) engine='NDB' -partition by range(colint) -subpartition by hash(mod(col1,10)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 int) engine='NDB' -partition by list(colint) -subpartition by hash(mod(col1,10)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 int) engine='NDB' -partition by range(colint) -(partition p0 values less than (mod(15,10)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with mod(col1,10) -------------------------------------------------------------------------- -insert into t1 values (5); -insert into t1 values (19); -insert into t2 values (5); -insert into t2 values (19); -insert into t2 values (17); -insert into t3 values (5); -insert into t3 values (19); -insert into t3 values (17); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_int.inc' into table t6; -select mod(col1,10) from t1 order by col1; -mod(col1,10) -5 -9 -select * from t1 order by col1; -col1 -5 -19 -select * from t2 order by col1; -col1 -5 -17 -19 -select * from t3 order by col1; -col1 -5 -17 -19 -select * from t4 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t6 order by colint; -colint col1 -1 5 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 5 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -update t1 set col1=15 where col1=5; -update t2 set col1=15 where col1=5; -update t3 set col1=15 where col1=5; -update t4 set col1=15 where col1=5; -update t5 set col1=15 where col1=5; -update t6 set col1=15 where col1=5; -select * from t1 order by col1; -col1 -15 -19 -select * from t2 order by col1; -col1 -15 -17 -19 -select * from t3 order by col1; -col1 -15 -17 -19 -select * from t4 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t6 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -------------------------------------------------------------------------- ---- Alter tables with mod(col1,10) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(mod(col1,10)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(mod(col1,10)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(mod(col1,10)); -alter table t44 -partition by range(colint) -subpartition by hash(mod(col1,10)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(mod(col1,10)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (mod(15,10)), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -15 -19 -select * from t22 order by col1; -col1 -15 -17 -19 -select * from t33 order by col1; -col1 -15 -17 -19 -select * from t44 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t66 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(mod(col1,10)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (mod(col1,10)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with mod(col1,10) -------------------------------------------------------------------------- -delete from t1 where col1=19; -delete from t2 where col1=19; -delete from t3 where col1=19; -delete from t4 where col1=19; -delete from t5 where col1=19; -delete from t6 where col1=19; -select * from t1 order by col1; -col1 -15 -select * from t2 order by col1; -col1 -15 -17 -select * from t3 order by col1; -col1 -15 -17 -select * from t4 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t5 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -insert into t1 values (19); -insert into t2 values (19); -insert into t3 values (19); -insert into t4 values (60,19); -insert into t5 values (60,19); -insert into t6 values (60,19); -select * from t1 order by col1; -col1 -15 -19 -select * from t2 order by col1; -col1 -15 -17 -19 -select * from t3 order by col1; -col1 -15 -17 -19 -select * from t4 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -select * from t5 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -select * from t6 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with mod(col1,10) -------------------------------------------------------------------------- -delete from t11 where col1=19; -delete from t22 where col1=19; -delete from t33 where col1=19; -delete from t44 where col1=19; -delete from t55 where col1=19; -delete from t66 where col1=19; -select * from t11 order by col1; -col1 -15 -select * from t22 order by col1; -col1 -15 -17 -select * from t33 order by col1; -col1 -15 -17 -select * from t44 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -insert into t11 values (19); -insert into t22 values (19); -insert into t33 values (19); -insert into t44 values (60,19); -insert into t55 values (60,19); -insert into t66 values (60,19); -select * from t11 order by col1; -col1 -15 -19 -select * from t22 order by col1; -col1 -15 -17 -19 -select * from t33 order by col1; -col1 -15 -17 -19 -select * from t44 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -select * from t55 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -select * from t66 order by colint; -colint col1 -1 15 -2 13 -3 15 -4 17 -5 23 -6 34 -7 56 -8 56 -9 45 -10 34 -11 78 -12 89 -13 67 -14 46 -15 34 -16 324 -17 345 -18 34 -19 78 -20 567 -21 4 -22 435 -23 34 -24 45 -25 4565 -26 4 -27 3 -28 2 -29 3 -30 15 -31 6 -32 8 -33 9 -34 745 -35 34 -36 34 -37 324 -38 67 -39 78 -40 89 -41 90 -42 78967 -50 56 -51 34 -55 123 -60 19 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- day(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with day(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(day(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(day(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(day(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(day(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(day(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (day('2006-12-21')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with day(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select day(col1) from t1 order by col1; -day(col1) -17 -3 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-02-03'; -update t2 set col1='2006-02-05' where col1='2006-02-03'; -update t3 set col1='2006-02-05' where col1='2006-02-03'; -update t4 set col1='2006-02-05' where col1='2006-02-03'; -update t5 set col1='2006-02-05' where col1='2006-02-03'; -update t6 set col1='2006-02-05' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with day(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(day(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(day(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(day(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(day(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(day(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (day('2006-12-21')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(day(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (day(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with day(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with day(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- dayofmonth(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with dayofmonth(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(dayofmonth(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(dayofmonth(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(dayofmonth(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (dayofmonth('2006-12-24')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with dayofmonth(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofmonth(col1) from t1 order by col1; -dayofmonth(col1) -17 -3 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-02-03'; -update t2 set col1='2006-02-05' where col1='2006-02-03'; -update t3 set col1='2006-02-05' where col1='2006-02-03'; -update t4 set col1='2006-02-05' where col1='2006-02-03'; -update t5 set col1='2006-02-05' where col1='2006-02-03'; -update t6 set col1='2006-02-05' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with dayofmonth(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(dayofmonth(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(dayofmonth(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(dayofmonth(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (dayofmonth('2006-12-24')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(dayofmonth(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofmonth(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-05 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofmonth(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofmonth(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-05 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- dayofweek(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with dayofweek(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(dayofweek(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(dayofweek(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(dayofweek(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(dayofweek(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(dayofweek(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (dayofweek('2006-12-24')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with dayofweek(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-02-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-02-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofweek(col1) from t1 order by col1; -dayofweek(col1) -3 -6 -select * from t1 order by col1; -col1 -2006-01-03 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-01-25 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-01-25 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with dayofweek(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(dayofweek(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(dayofweek(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(dayofweek(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(dayofweek(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(dayofweek(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (dayofweek('2006-12-24')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(dayofweek(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofweek(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofweek(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-02-17'; -delete from t2 where col1='2006-02-17'; -delete from t3 where col1='2006-02-17'; -delete from t4 where col1='2006-02-17'; -delete from t5 where col1='2006-02-17'; -delete from t6 where col1='2006-02-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-02-17'); -insert into t3 values ('2006-02-17'); -insert into t4 values (60,'2006-02-17'); -insert into t5 values (60,'2006-02-17'); -insert into t6 values (60,'2006-02-17'); -select * from t1 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofweek(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-02-17'; -delete from t22 where col1='2006-02-17'; -delete from t33 where col1='2006-02-17'; -delete from t44 where col1='2006-02-17'; -delete from t55 where col1='2006-02-17'; -delete from t66 where col1='2006-02-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-02-17'); -insert into t22 values ('2006-02-17'); -insert into t33 values ('2006-02-17'); -insert into t44 values (60,'2006-02-17'); -insert into t55 values (60,'2006-02-17'); -insert into t66 values (60,'2006-02-17'); -select * from t11 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- dayofyear(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with dayofyear(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(dayofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(dayofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(dayofyear(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with dayofyear(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-02-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-02-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofyear(col1) from t1 order by col1; -dayofyear(col1) -3 -17 -select * from t1 order by col1; -col1 -2006-01-03 -2006-01-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-01-17 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-03 -2006-01-17 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with dayofyear(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(dayofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(dayofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(dayofyear(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofyear(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- dayofyear(col1) in partition with coltype char(30) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with dayofyear(col1) -------------------------------------------------------------------------- -create table t1 (col1 char(30)) engine='NDB' -partition by range(dayofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 char(30)) engine='NDB' -partition by list(dayofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 char(30)) engine='NDB' -partition by hash(dayofyear(col1)); -create table t4 (colint int, col1 char(30)) engine='NDB' -partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(30)) engine='NDB' -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 char(30)) engine='NDB' -partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with dayofyear(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-02-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-02-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofyear(col1) from t1 order by col1; -dayofyear(col1) -3 -17 -select * from t1 order by col1; -col1 -2006-01-03 -2006-01-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-01-17 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-03 -2006-01-17 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with dayofyear(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(dayofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(dayofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(dayofyear(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` char(30) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofyear(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t3 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t33 order by col1; -col1 -2006-01-17 -2006-02-05 -2006-02-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- extract(month from col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with extract(month from col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(extract(month from col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(extract(month from col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(extract(month from col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (extract(year from '1998-11-23')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with extract(month from col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-02-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-02-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select extract(month from col1) from t1 order by col1; -extract(month from col1) -1 -2 -select * from t1 order by col1; -col1 -2006-01-03 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-01-25 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-01-25 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with extract(month from col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(extract(month from col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(extract(month from col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(extract(month from col1)); -alter table t44 -partition by range(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (extract(year from '1998-11-23')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (extract(month from col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with extract(month from col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-02-17'; -delete from t2 where col1='2006-02-17'; -delete from t3 where col1='2006-02-17'; -delete from t4 where col1='2006-02-17'; -delete from t5 where col1='2006-02-17'; -delete from t6 where col1='2006-02-17'; -select * from t1 order by col1; -col1 -2006-02-05 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-02-17'); -insert into t3 values ('2006-02-17'); -insert into t4 values (60,'2006-02-17'); -insert into t5 values (60,'2006-02-17'); -insert into t6 values (60,'2006-02-17'); -select * from t1 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with extract(month from col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-02-17'; -delete from t22 where col1='2006-02-17'; -delete from t33 where col1='2006-02-17'; -delete from t44 where col1='2006-02-17'; -delete from t55 where col1='2006-02-17'; -delete from t66 where col1='2006-02-17'; -select * from t11 order by col1; -col1 -2006-02-05 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-02-17'); -insert into t22 values ('2006-02-17'); -insert into t33 values ('2006-02-17'); -insert into t44 values (60,'2006-02-17'); -insert into t55 values (60,'2006-02-17'); -insert into t66 values (60,'2006-02-17'); -select * from t11 order by col1; -col1 -2006-02-05 -2006-02-17 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-05 -2006-02-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- hour(col1) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with hour(col1) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(hour(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(hour(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(hour(col1)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(hour(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (hour('18:30')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with hour(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09'); -insert into t1 values ('14:30'); -insert into t2 values ('09:09'); -insert into t2 values ('14:30'); -insert into t2 values ('21:59'); -insert into t3 values ('09:09'); -insert into t3 values ('14:30'); -insert into t3 values ('21:59'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select hour(col1) from t1 order by col1; -hour(col1) -9 -14 -select * from t1 order by col1; -col1 -09:09:00 -14:30:00 -select * from t2 order by col1; -col1 -09:09:00 -14:30:00 -21:59:00 -select * from t3 order by col1; -col1 -09:09:00 -14:30:00 -21:59:00 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:30' where col1='09:09'; -update t2 set col1='10:30' where col1='09:09'; -update t3 set col1='10:30' where col1='09:09'; -update t4 set col1='10:30' where col1='09:09'; -update t5 set col1='10:30' where col1='09:09'; -update t6 set col1='10:30' where col1='09:09'; -select * from t1 order by col1; -col1 -10:30:00 -14:30:00 -select * from t2 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t3 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with hour(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(hour(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(hour(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(hour(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(hour(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (hour('18:30')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:30:00 -14:30:00 -select * from t22 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t33 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (hour(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with hour(col1) -------------------------------------------------------------------------- -delete from t1 where col1='14:30'; -delete from t2 where col1='14:30'; -delete from t3 where col1='14:30'; -delete from t4 where col1='14:30'; -delete from t5 where col1='14:30'; -delete from t6 where col1='14:30'; -select * from t1 order by col1; -col1 -10:30:00 -select * from t2 order by col1; -col1 -10:30:00 -21:59:00 -select * from t3 order by col1; -col1 -10:30:00 -21:59:00 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30'); -insert into t2 values ('14:30'); -insert into t3 values ('14:30'); -insert into t4 values (60,'14:30'); -insert into t5 values (60,'14:30'); -insert into t6 values (60,'14:30'); -select * from t1 order by col1; -col1 -10:30:00 -14:30:00 -select * from t2 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t3 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with hour(col1) -------------------------------------------------------------------------- -delete from t11 where col1='14:30'; -delete from t22 where col1='14:30'; -delete from t33 where col1='14:30'; -delete from t44 where col1='14:30'; -delete from t55 where col1='14:30'; -delete from t66 where col1='14:30'; -select * from t11 order by col1; -col1 -10:30:00 -select * from t22 order by col1; -col1 -10:30:00 -21:59:00 -select * from t33 order by col1; -col1 -10:30:00 -21:59:00 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30'); -insert into t22 values ('14:30'); -insert into t33 values ('14:30'); -insert into t44 values (60,'14:30'); -insert into t55 values (60,'14:30'); -insert into t66 values (60,'14:30'); -select * from t11 order by col1; -col1 -10:30:00 -14:30:00 -select * from t22 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t33 order by col1; -col1 -10:30:00 -14:30:00 -21:59:00 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -select * from t66 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:00 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- microsecond(col1) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with microsecond(col1) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(microsecond(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(microsecond(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(microsecond(col1)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (microsecond('10:30:10.000010')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with microsecond(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09:15.000002'); -insert into t1 values ('04:30:01.000018'); -insert into t2 values ('09:09:15.000002'); -insert into t2 values ('04:30:01.000018'); -insert into t2 values ('00:59:22.000024'); -insert into t3 values ('09:09:15.000002'); -insert into t3 values ('04:30:01.000018'); -insert into t3 values ('00:59:22.000024'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select microsecond(col1) from t1 order by col1; -microsecond(col1) -0 -0 -select * from t1 order by col1; -col1 -04:30:01 -09:09:15 -select * from t2 order by col1; -col1 -00:59:22 -04:30:01 -09:09:15 -select * from t3 order by col1; -col1 -00:59:22 -04:30:01 -09:09:15 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t2 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t3 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t4 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t5 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t6 set col1='05:30:34.000037' where col1='09:09:15.000002'; -select * from t1 order by col1; -col1 -04:30:01 -05:30:34 -select * from t2 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t3 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t4 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with microsecond(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(microsecond(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(microsecond(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(microsecond(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (microsecond('10:30:10.000010')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -04:30:01 -05:30:34 -select * from t22 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t33 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t44 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (microsecond(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 05:30:34 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with microsecond(col1) -------------------------------------------------------------------------- -delete from t1 where col1='04:30:01.000018'; -delete from t2 where col1='04:30:01.000018'; -delete from t3 where col1='04:30:01.000018'; -delete from t4 where col1='04:30:01.000018'; -delete from t5 where col1='04:30:01.000018'; -delete from t6 where col1='04:30:01.000018'; -select * from t1 order by col1; -col1 -05:30:34 -select * from t2 order by col1; -col1 -00:59:22 -05:30:34 -select * from t3 order by col1; -col1 -00:59:22 -05:30:34 -select * from t4 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -insert into t1 values ('04:30:01.000018'); -insert into t2 values ('04:30:01.000018'); -insert into t3 values ('04:30:01.000018'); -insert into t4 values (60,'04:30:01.000018'); -insert into t5 values (60,'04:30:01.000018'); -insert into t6 values (60,'04:30:01.000018'); -select * from t1 order by col1; -col1 -04:30:01 -05:30:34 -select * from t2 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t3 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t4 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -select * from t5 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -select * from t6 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with microsecond(col1) -------------------------------------------------------------------------- -delete from t11 where col1='04:30:01.000018'; -delete from t22 where col1='04:30:01.000018'; -delete from t33 where col1='04:30:01.000018'; -delete from t44 where col1='04:30:01.000018'; -delete from t55 where col1='04:30:01.000018'; -delete from t66 where col1='04:30:01.000018'; -select * from t11 order by col1; -col1 -05:30:34 -select * from t22 order by col1; -col1 -00:59:22 -05:30:34 -select * from t33 order by col1; -col1 -00:59:22 -05:30:34 -select * from t44 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -insert into t11 values ('04:30:01.000018'); -insert into t22 values ('04:30:01.000018'); -insert into t33 values ('04:30:01.000018'); -insert into t44 values (60,'04:30:01.000018'); -insert into t55 values (60,'04:30:01.000018'); -insert into t66 values (60,'04:30:01.000018'); -select * from t11 order by col1; -col1 -04:30:01 -05:30:34 -select * from t22 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t33 order by col1; -col1 -00:59:22 -04:30:01 -05:30:34 -select * from t44 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -select * from t55 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -select * from t66 order by colint; -colint col1 -1 05:30:34 -3 00:59:22 -4 05:30:34 -60 04:30:01 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- minute(col1) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with minute(col1) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(minute(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(minute(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(minute(col1)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(minute(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (minute('18:30')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with minute(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09:15'); -insert into t1 values ('14:30:45'); -insert into t2 values ('09:09:15'); -insert into t2 values ('14:30:45'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:15'); -insert into t3 values ('14:30:45'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select minute(col1) from t1 order by col1; -minute(col1) -9 -30 -select * from t1 order by col1; -col1 -09:09:15 -14:30:45 -select * from t2 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:24:23' where col1='09:09:15'; -update t2 set col1='10:24:23' where col1='09:09:15'; -update t3 set col1='10:24:23' where col1='09:09:15'; -update t4 set col1='10:24:23' where col1='09:09:15'; -update t5 set col1='10:24:23' where col1='09:09:15'; -update t6 set col1='10:24:23' where col1='09:09:15'; -select * from t1 order by col1; -col1 -10:24:23 -14:30:45 -select * from t2 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with minute(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(minute(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(minute(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(minute(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(minute(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (minute('18:30')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:24:23 -14:30:45 -select * from t22 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (minute(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with minute(col1) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:45'; -delete from t2 where col1='14:30:45'; -delete from t3 where col1='14:30:45'; -delete from t4 where col1='14:30:45'; -delete from t5 where col1='14:30:45'; -delete from t6 where col1='14:30:45'; -select * from t1 order by col1; -col1 -10:24:23 -select * from t2 order by col1; -col1 -10:24:23 -21:59:22 -select * from t3 order by col1; -col1 -10:24:23 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:45'); -insert into t2 values ('14:30:45'); -insert into t3 values ('14:30:45'); -insert into t4 values (60,'14:30:45'); -insert into t5 values (60,'14:30:45'); -insert into t6 values (60,'14:30:45'); -select * from t1 order by col1; -col1 -10:24:23 -14:30:45 -select * from t2 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t5 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t6 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with minute(col1) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:45'; -delete from t22 where col1='14:30:45'; -delete from t33 where col1='14:30:45'; -delete from t44 where col1='14:30:45'; -delete from t55 where col1='14:30:45'; -delete from t66 where col1='14:30:45'; -select * from t11 order by col1; -col1 -10:24:23 -select * from t22 order by col1; -col1 -10:24:23 -21:59:22 -select * from t33 order by col1; -col1 -10:24:23 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:45'); -insert into t22 values ('14:30:45'); -insert into t33 values ('14:30:45'); -insert into t44 values (60,'14:30:45'); -insert into t55 values (60,'14:30:45'); -insert into t66 values (60,'14:30:45'); -select * from t11 order by col1; -col1 -10:24:23 -14:30:45 -select * from t22 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:24:23 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t55 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t66 order by colint; -colint col1 -1 10:24:23 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- second(col1) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with second(col1) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(second(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(second(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(second(col1)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (second('18:30:14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with second(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09:09'); -insert into t1 values ('14:30:20'); -insert into t2 values ('09:09:09'); -insert into t2 values ('14:30:20'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:09'); -insert into t3 values ('14:30:20'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select second(col1) from t1 order by col1; -second(col1) -9 -20 -select * from t1 order by col1; -col1 -09:09:09 -14:30:20 -select * from t2 order by col1; -col1 -09:09:09 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -09:09:09 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:22:33' where col1='09:09:09'; -update t2 set col1='10:22:33' where col1='09:09:09'; -update t3 set col1='10:22:33' where col1='09:09:09'; -update t4 set col1='10:22:33' where col1='09:09:09'; -update t5 set col1='10:22:33' where col1='09:09:09'; -update t6 set col1='10:22:33' where col1='09:09:09'; -select * from t1 order by col1; -col1 -10:22:33 -14:30:20 -select * from t2 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with second(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(second(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(second(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(second(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (second('18:30:14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:22:33 -14:30:20 -select * from t22 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (second(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:20'; -delete from t2 where col1='14:30:20'; -delete from t3 where col1='14:30:20'; -delete from t4 where col1='14:30:20'; -delete from t5 where col1='14:30:20'; -delete from t6 where col1='14:30:20'; -select * from t1 order by col1; -col1 -10:22:33 -select * from t2 order by col1; -col1 -10:22:33 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:20'); -insert into t2 values ('14:30:20'); -insert into t3 values ('14:30:20'); -insert into t4 values (60,'14:30:20'); -insert into t5 values (60,'14:30:20'); -insert into t6 values (60,'14:30:20'); -select * from t1 order by col1; -col1 -10:22:33 -14:30:20 -select * from t2 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:20'; -delete from t22 where col1='14:30:20'; -delete from t33 where col1='14:30:20'; -delete from t44 where col1='14:30:20'; -delete from t55 where col1='14:30:20'; -delete from t66 where col1='14:30:20'; -select * from t11 order by col1; -col1 -10:22:33 -select * from t22 order by col1; -col1 -10:22:33 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:20'); -insert into t22 values ('14:30:20'); -insert into t33 values ('14:30:20'); -insert into t44 values (60,'14:30:20'); -insert into t55 values (60,'14:30:20'); -insert into t66 values (60,'14:30:20'); -select * from t11 order by col1; -col1 -10:22:33 -14:30:20 -select * from t22 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -select * from t55 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -select * from t66 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- second(col1) in partition with coltype char(30) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with second(col1) -------------------------------------------------------------------------- -create table t1 (col1 char(30)) engine='NDB' -partition by range(second(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 char(30)) engine='NDB' -partition by list(second(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 char(30)) engine='NDB' -partition by hash(second(col1)); -create table t4 (colint int, col1 char(30)) engine='NDB' -partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(30)) engine='NDB' -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 char(30)) engine='NDB' -partition by range(colint) -(partition p0 values less than (second('18:30:14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with second(col1) -------------------------------------------------------------------------- -insert into t1 values ('09:09:09'); -insert into t1 values ('14:30:20'); -insert into t2 values ('09:09:09'); -insert into t2 values ('14:30:20'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:09'); -insert into t3 values ('14:30:20'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select second(col1) from t1 order by col1; -second(col1) -9 -20 -select * from t1 order by col1; -col1 -09:09:09 -14:30:20 -select * from t2 order by col1; -col1 -09:09:09 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -09:09:09 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t5 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t6 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -update t1 set col1='10:22:33' where col1='09:09:09'; -update t2 set col1='10:22:33' where col1='09:09:09'; -update t3 set col1='10:22:33' where col1='09:09:09'; -update t4 set col1='10:22:33' where col1='09:09:09'; -update t5 set col1='10:22:33' where col1='09:09:09'; -update t6 set col1='10:22:33' where col1='09:09:09'; -select * from t1 order by col1; -col1 -10:22:33 -14:30:20 -select * from t2 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t5 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t6 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -------------------------------------------------------------------------- ---- Alter tables with second(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(second(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(second(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(second(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (second('18:30:14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:22:33 -14:30:20 -select * from t22 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t55 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t66 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(second(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` char(30) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (second(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:20'; -delete from t2 where col1='14:30:20'; -delete from t3 where col1='14:30:20'; -delete from t4 where col1='14:30:20'; -delete from t5 where col1='14:30:20'; -delete from t6 where col1='14:30:20'; -select * from t1 order by col1; -col1 -10:22:33 -select * from t2 order by col1; -col1 -10:22:33 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t5 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -insert into t1 values ('14:30:20'); -insert into t2 values ('14:30:20'); -insert into t3 values ('14:30:20'); -insert into t4 values (60,'14:30:20'); -insert into t5 values (60,'14:30:20'); -insert into t6 values (60,'14:30:20'); -select * from t1 order by col1; -col1 -10:22:33 -14:30:20 -select * from t2 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t3 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -select * from t5 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -select * from t6 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:20'; -delete from t22 where col1='14:30:20'; -delete from t33 where col1='14:30:20'; -delete from t44 where col1='14:30:20'; -delete from t55 where col1='14:30:20'; -delete from t66 where col1='14:30:20'; -select * from t11 order by col1; -col1 -10:22:33 -select * from t22 order by col1; -col1 -10:22:33 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -select * from t55 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -insert into t11 values ('14:30:20'); -insert into t22 values ('14:30:20'); -insert into t33 values ('14:30:20'); -insert into t44 values (60,'14:30:20'); -insert into t55 values (60,'14:30:20'); -insert into t66 values (60,'14:30:20'); -select * from t11 order by col1; -col1 -10:22:33 -14:30:20 -select * from t22 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 -select * from t44 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -select * from t55 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -select * from t66 order by colint; -colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- month(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with month(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(month(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(month(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(month(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(month(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(month(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (month('2006-10-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with month(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-12-17'); -insert into t2 values ('2006-05-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-12-17'); -insert into t3 values ('2006-05-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select month(col1) from t1 order by col1; -month(col1) -1 -12 -select * from t1 order by col1; -col1 -2006-01-03 -2006-12-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-05-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-05-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-11-06' where col1='2006-01-03'; -update t2 set col1='2006-11-06' where col1='2006-01-03'; -update t3 set col1='2006-11-06' where col1='2006-01-03'; -update t4 set col1='2006-11-06' where col1='2006-01-03'; -update t5 set col1='2006-11-06' where col1='2006-01-03'; -update t6 set col1='2006-11-06' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with month(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(month(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(month(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(month(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(month(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(month(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (month('2006-10-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(month(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (month(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with month(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-12-17'; -delete from t2 where col1='2006-12-17'; -delete from t3 where col1='2006-12-17'; -delete from t4 where col1='2006-12-17'; -delete from t5 where col1='2006-12-17'; -delete from t6 where col1='2006-12-17'; -select * from t1 order by col1; -col1 -2006-11-06 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-12-17'); -insert into t3 values ('2006-12-17'); -insert into t4 values (60,'2006-12-17'); -insert into t5 values (60,'2006-12-17'); -insert into t6 values (60,'2006-12-17'); -select * from t1 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with month(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-12-17'; -delete from t22 where col1='2006-12-17'; -delete from t33 where col1='2006-12-17'; -delete from t44 where col1='2006-12-17'; -delete from t55 where col1='2006-12-17'; -delete from t66 where col1='2006-12-17'; -select * from t11 order by col1; -col1 -2006-11-06 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-12-17'); -insert into t22 values ('2006-12-17'); -insert into t33 values ('2006-12-17'); -insert into t44 values (60,'2006-12-17'); -insert into t55 values (60,'2006-12-17'); -insert into t66 values (60,'2006-12-17'); -select * from t11 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- quarter(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with quarter(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(quarter(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(quarter(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(quarter(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with quarter(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-12-17'); -insert into t2 values ('2006-09-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-12-17'); -insert into t3 values ('2006-09-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select quarter(col1) from t1 order by col1; -quarter(col1) -1 -4 -select * from t1 order by col1; -col1 -2006-01-03 -2006-12-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-07-30' where col1='2006-01-03'; -update t2 set col1='2006-07-30' where col1='2006-01-03'; -update t3 set col1='2006-07-30' where col1='2006-01-03'; -update t4 set col1='2006-07-30' where col1='2006-01-03'; -update t5 set col1='2006-07-30' where col1='2006-01-03'; -update t6 set col1='2006-07-30' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with quarter(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(quarter(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(quarter(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(quarter(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (quarter(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with quarter(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-12-17'; -delete from t2 where col1='2006-12-17'; -delete from t3 where col1='2006-12-17'; -delete from t4 where col1='2006-12-17'; -delete from t5 where col1='2006-12-17'; -delete from t6 where col1='2006-12-17'; -select * from t1 order by col1; -col1 -2006-07-30 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-12-17'); -insert into t3 values ('2006-12-17'); -insert into t4 values (60,'2006-12-17'); -insert into t5 values (60,'2006-12-17'); -insert into t6 values (60,'2006-12-17'); -select * from t1 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with quarter(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-12-17'; -delete from t22 where col1='2006-12-17'; -delete from t33 where col1='2006-12-17'; -delete from t44 where col1='2006-12-17'; -delete from t55 where col1='2006-12-17'; -delete from t66 where col1='2006-12-17'; -select * from t11 order by col1; -col1 -2006-07-30 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-12-17'); -insert into t22 values ('2006-12-17'); -insert into t33 values ('2006-12-17'); -insert into t44 values (60,'2006-12-17'); -insert into t55 values (60,'2006-12-17'); -insert into t66 values (60,'2006-12-17'); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- time_to_sec(col1)-(time_to_sec(col1)-20) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='NDB' -partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='NDB' -partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='NDB' -partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); -create table t4 (colint int, col1 time) engine='NDB' -partition by range(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='NDB' -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='NDB' -partition by range(colint) -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -insert into t1 values ('09:09:15'); -insert into t1 values ('14:30:45'); -insert into t2 values ('09:09:15'); -insert into t2 values ('14:30:45'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:15'); -insert into t3 values ('14:30:45'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select time_to_sec(col1)-(time_to_sec(col1)-20) from t1 order by col1; -time_to_sec(col1)-(time_to_sec(col1)-20) -20 -20 -select * from t1 order by col1; -col1 -09:09:15 -14:30:45 -select * from t2 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:33:11' where col1='09:09:15'; -update t2 set col1='10:33:11' where col1='09:09:15'; -update t3 set col1='10:33:11' where col1='09:09:15'; -update t4 set col1='10:33:11' where col1='09:09:15'; -update t5 set col1='10:33:11' where col1='09:09:15'; -update t6 set col1='10:33:11' where col1='09:09:15'; -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); -alter table t44 -partition by range(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (time_to_sec(col1)-(time_to_sec(col1)-20)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:45'; -delete from t2 where col1='14:30:45'; -delete from t3 where col1='14:30:45'; -delete from t4 where col1='14:30:45'; -delete from t5 where col1='14:30:45'; -delete from t6 where col1='14:30:45'; -select * from t1 order by col1; -col1 -10:33:11 -select * from t2 order by col1; -col1 -10:33:11 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:45'); -insert into t2 values ('14:30:45'); -insert into t3 values ('14:30:45'); -insert into t4 values (60,'14:30:45'); -insert into t5 values (60,'14:30:45'); -insert into t6 values (60,'14:30:45'); -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t6 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:45'; -delete from t22 where col1='14:30:45'; -delete from t33 where col1='14:30:45'; -delete from t44 where col1='14:30:45'; -delete from t55 where col1='14:30:45'; -delete from t66 where col1='14:30:45'; -select * from t11 order by col1; -col1 -10:33:11 -select * from t22 order by col1; -col1 -10:33:11 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:45'); -insert into t22 values ('14:30:45'); -insert into t33 values ('14:30:45'); -insert into t44 values (60,'14:30:45'); -insert into t55 values (60,'14:30:45'); -insert into t66 values (60,'14:30:45'); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- to_days(col1)-to_days('2006-01-01') in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(to_days(col1)-to_days('2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(to_days(col1)-to_days('2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(to_days(col1)-to_days('2006-01-01')); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select to_days(col1)-to_days('2006-01-01') from t1 order by col1; -to_days(col1)-to_days('2006-01-01') -16 -33 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-02-03'; -update t2 set col1='2006-02-06' where col1='2006-02-03'; -update t3 set col1='2006-02-06' where col1='2006-02-03'; -update t4 set col1='2006-02-06' where col1='2006-02-03'; -update t5 set col1='2006-02-06' where col1='2006-02-03'; -update t6 set col1='2006-02-06' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(to_days(col1)-to_days('2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(to_days(col1)-to_days('2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(to_days(col1)-to_days('2006-01-01')); -alter table t44 -partition by range(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (to_days(col1)-to_days('2006-01-01')) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- datediff(col1, '2006-01-01') in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(datediff(col1, '2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(datediff(col1, '2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(datediff(col1, '2006-01-01')); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select datediff(col1, '2006-01-01') from t1 order by col1; -datediff(col1, '2006-01-01') -16 -33 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-02-03'; -update t2 set col1='2006-02-06' where col1='2006-02-03'; -update t3 set col1='2006-02-06' where col1='2006-02-03'; -update t4 set col1='2006-02-06' where col1='2006-02-03'; -update t5 set col1='2006-02-06' where col1='2006-02-03'; -update t6 set col1='2006-02-06' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(datediff(col1, '2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(datediff(col1, '2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(datediff(col1, '2006-01-01')); -alter table t44 -partition by range(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (datediff(col1, '2006-01-01')) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- weekday(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with weekday(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(weekday(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(weekday(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(weekday(col1)); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(weekday(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(weekday(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (weekday('2006-10-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with weekday(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-12-03'); -insert into t1 values ('2006-11-17'); -insert into t2 values ('2006-12-03'); -insert into t2 values ('2006-11-17'); -insert into t2 values ('2006-05-25'); -insert into t3 values ('2006-12-03'); -insert into t3 values ('2006-11-17'); -insert into t3 values ('2006-05-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select weekday(col1) from t1 order by col1; -weekday(col1) -4 -6 -select * from t1 order by col1; -col1 -2006-11-17 -2006-12-03 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-17 -2006-12-03 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-17 -2006-12-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-12-03'; -update t2 set col1='2006-02-06' where col1='2006-12-03'; -update t3 set col1='2006-02-06' where col1='2006-12-03'; -update t4 set col1='2006-02-06' where col1='2006-12-03'; -update t5 set col1='2006-02-06' where col1='2006-12-03'; -update t6 set col1='2006-02-06' where col1='2006-12-03'; -select * from t1 order by col1; -col1 -2006-02-06 -2006-11-17 -select * from t2 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t3 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with weekday(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(weekday(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(weekday(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(weekday(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(weekday(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(weekday(col1)) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (weekday('2006-10-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-02-06 -2006-11-17 -select * from t22 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t33 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(weekday(col1)) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (weekday(col1)) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with weekday(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-11-17'; -delete from t2 where col1='2006-11-17'; -delete from t3 where col1='2006-11-17'; -delete from t4 where col1='2006-11-17'; -delete from t5 where col1='2006-11-17'; -delete from t6 where col1='2006-11-17'; -select * from t1 order by col1; -col1 -2006-02-06 -select * from t2 order by col1; -col1 -2006-02-06 -2006-05-25 -select * from t3 order by col1; -col1 -2006-02-06 -2006-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-11-17'); -insert into t2 values ('2006-11-17'); -insert into t3 values ('2006-11-17'); -insert into t4 values (60,'2006-11-17'); -insert into t5 values (60,'2006-11-17'); -insert into t6 values (60,'2006-11-17'); -select * from t1 order by col1; -col1 -2006-02-06 -2006-11-17 -select * from t2 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t3 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with weekday(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-11-17'; -delete from t22 where col1='2006-11-17'; -delete from t33 where col1='2006-11-17'; -delete from t44 where col1='2006-11-17'; -delete from t55 where col1='2006-11-17'; -delete from t66 where col1='2006-11-17'; -select * from t11 order by col1; -col1 -2006-02-06 -select * from t22 order by col1; -col1 -2006-02-06 -2006-05-25 -select * from t33 order by col1; -col1 -2006-02-06 -2006-05-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-11-17'); -insert into t22 values ('2006-11-17'); -insert into t33 values ('2006-11-17'); -insert into t44 values (60,'2006-11-17'); -insert into t55 values (60,'2006-11-17'); -insert into t66 values (60,'2006-11-17'); -select * from t11 order by col1; -col1 -2006-02-06 -2006-11-17 -select * from t22 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t33 order by col1; -col1 -2006-02-06 -2006-05-25 -2006-11-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-11-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- year(col1)-1990 in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with year(col1)-1990 -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(year(col1)-1990) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(year(col1)-1990) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(year(col1)-1990); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(year(col1)-1990) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(year(col1)-1990) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (year('2005-10-14')-1990), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with year(col1)-1990 -------------------------------------------------------------------------- -insert into t1 values ('1996-01-03'); -insert into t1 values ('2000-02-17'); -insert into t2 values ('1996-01-03'); -insert into t2 values ('2000-02-17'); -insert into t2 values ('2004-05-25'); -insert into t3 values ('1996-01-03'); -insert into t3 values ('2000-02-17'); -insert into t3 values ('2004-05-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select year(col1)-1990 from t1 order by col1; -year(col1)-1990 -6 -10 -select * from t1 order by col1; -col1 -1996-01-03 -2000-02-17 -select * from t2 order by col1; -col1 -1996-01-03 -2000-02-17 -2004-05-25 -select * from t3 order by col1; -col1 -1996-01-03 -2000-02-17 -2004-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2002-02-15' where col1='1996-01-03'; -update t2 set col1='2002-02-15' where col1='1996-01-03'; -update t3 set col1='2002-02-15' where col1='1996-01-03'; -update t4 set col1='2002-02-15' where col1='1996-01-03'; -update t5 set col1='2002-02-15' where col1='1996-01-03'; -update t6 set col1='2002-02-15' where col1='1996-01-03'; -select * from t1 order by col1; -col1 -2000-02-17 -2002-02-15 -select * from t2 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t3 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with year(col1)-1990 -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(year(col1)-1990) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(year(col1)-1990) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(year(col1)-1990); -alter table t44 -partition by range(colint) -subpartition by hash(year(col1)-1990) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(year(col1)-1990) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (year('2005-10-14')-1990), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2000-02-17 -2002-02-15 -select * from t22 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t33 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(year(col1)-1990) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (year(col1)-1990) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with year(col1)-1990 -------------------------------------------------------------------------- -delete from t1 where col1='2000-02-17'; -delete from t2 where col1='2000-02-17'; -delete from t3 where col1='2000-02-17'; -delete from t4 where col1='2000-02-17'; -delete from t5 where col1='2000-02-17'; -delete from t6 where col1='2000-02-17'; -select * from t1 order by col1; -col1 -2002-02-15 -select * from t2 order by col1; -col1 -2002-02-15 -2004-05-25 -select * from t3 order by col1; -col1 -2002-02-15 -2004-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2000-02-17'); -insert into t2 values ('2000-02-17'); -insert into t3 values ('2000-02-17'); -insert into t4 values (60,'2000-02-17'); -insert into t5 values (60,'2000-02-17'); -insert into t6 values (60,'2000-02-17'); -select * from t1 order by col1; -col1 -2000-02-17 -2002-02-15 -select * from t2 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t3 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with year(col1)-1990 -------------------------------------------------------------------------- -delete from t11 where col1='2000-02-17'; -delete from t22 where col1='2000-02-17'; -delete from t33 where col1='2000-02-17'; -delete from t44 where col1='2000-02-17'; -delete from t55 where col1='2000-02-17'; -delete from t66 where col1='2000-02-17'; -select * from t11 order by col1; -col1 -2002-02-15 -select * from t22 order by col1; -col1 -2002-02-15 -2004-05-25 -select * from t33 order by col1; -col1 -2002-02-15 -2004-05-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2000-02-17'); -insert into t22 values ('2000-02-17'); -insert into t33 values ('2000-02-17'); -insert into t44 values (60,'2000-02-17'); -insert into t55 values (60,'2000-02-17'); -insert into t66 values (60,'2000-02-17'); -select * from t11 order by col1; -col1 -2000-02-17 -2002-02-15 -select * from t22 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t33 order by col1; -col1 -2000-02-17 -2002-02-15 -2004-05-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2000-02-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- yearweek(col1)-200600 in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -create table t1 (col1 date) engine='NDB' -partition by range(yearweek(col1)-200600) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='NDB' -partition by list(yearweek(col1)-200600) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='NDB' -partition by hash(yearweek(col1)-200600); -create table t4 (colint int, col1 date) engine='NDB' -partition by range(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='NDB' -partition by list(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='NDB' -partition by range(colint) -(partition p0 values less than (yearweek('2006-10-14')-200600), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-08-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-08-17'); -insert into t2 values ('2006-03-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-08-17'); -insert into t3 values ('2006-03-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select yearweek(col1)-200600 from t1 order by col1; -yearweek(col1)-200600 -1 -33 -select * from t1 order by col1; -col1 -2006-01-03 -2006-08-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-03-25 -2006-08-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-03-25 -2006-08-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-11-15' where col1='2006-01-03'; -update t2 set col1='2006-11-15' where col1='2006-01-03'; -update t3 set col1='2006-11-15' where col1='2006-01-03'; -update t4 set col1='2006-11-15' where col1='2006-01-03'; -update t5 set col1='2006-11-15' where col1='2006-01-03'; -update t6 set col1='2006-11-15' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-08-17 -2006-11-15 -select * from t2 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t3 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='NDB' as select * from t1; -create table t22 engine='NDB' as select * from t2; -create table t33 engine='NDB' as select * from t3; -create table t44 engine='NDB' as select * from t4; -create table t55 engine='NDB' as select * from t5; -create table t66 engine='NDB' as select * from t6; -alter table t11 -partition by range(yearweek(col1)-200600) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(yearweek(col1)-200600) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(yearweek(col1)-200600); -alter table t44 -partition by range(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 2 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), -partition p1 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p2 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45), -partition p3 values in (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (yearweek('2006-10-14')-200600), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-08-17 -2006-11-15 -select * from t22 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t33 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t55 -partition by list(colint) -subpartition by hash(yearweek(col1)-200600) subpartitions 4 -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), -partition p1 values in (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (yearweek(col1)-200600) -SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = ndbcluster) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -delete from t1 where col1='2006-08-17'; -delete from t2 where col1='2006-08-17'; -delete from t3 where col1='2006-08-17'; -delete from t4 where col1='2006-08-17'; -delete from t5 where col1='2006-08-17'; -delete from t6 where col1='2006-08-17'; -select * from t1 order by col1; -col1 -2006-11-15 -select * from t2 order by col1; -col1 -2006-03-25 -2006-11-15 -select * from t3 order by col1; -col1 -2006-03-25 -2006-11-15 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-08-17'); -insert into t2 values ('2006-08-17'); -insert into t3 values ('2006-08-17'); -insert into t4 values (60,'2006-08-17'); -insert into t5 values (60,'2006-08-17'); -insert into t6 values (60,'2006-08-17'); -select * from t1 order by col1; -col1 -2006-08-17 -2006-11-15 -select * from t2 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t3 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with yearweek(col1)-200600 -------------------------------------------------------------------------- -delete from t11 where col1='2006-08-17'; -delete from t22 where col1='2006-08-17'; -delete from t33 where col1='2006-08-17'; -delete from t44 where col1='2006-08-17'; -delete from t55 where col1='2006-08-17'; -delete from t66 where col1='2006-08-17'; -select * from t11 order by col1; -col1 -2006-11-15 -select * from t22 order by col1; -col1 -2006-03-25 -2006-11-15 -select * from t33 order by col1; -col1 -2006-03-25 -2006-11-15 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-08-17'); -insert into t22 values ('2006-08-17'); -insert into t33 values ('2006-08-17'); -insert into t44 values (60,'2006-08-17'); -insert into t55 values (60,'2006-08-17'); -insert into t66 values (60,'2006-08-17'); -select * from t11 order by col1; -col1 -2006-08-17 -2006-11-15 -select * from t22 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t33 order by col1; -col1 -2006-03-25 -2006-08-17 -2006-11-15 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-08-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_ndb.result b/mysql-test/suite/parts/r/partition_alter1_1_2_ndb.result deleted file mode 100644 index c2095bffd5e..00000000000 --- a/mysql-test/suite/parts/r/partition_alter1_1_2_ndb.result +++ /dev/null @@ -1,27726 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(10000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# 1. ALTER TABLE ADD PRIMARY KEY and/or UNIQUE INDEX -#======================================================================== -#------------------------------------------------------------------------ -# 1.2 ADD PRIMARY KEY or UNIQUE INDEX to table with two columns -# (f_int1 and f_int2) within the partitioning function -#------------------------------------------------------------------------ -# 1.2.1 PRIMARY KEY consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 1.2.2 UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 1.2.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`), - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1), ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`), - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_alter1_1_ndb.result b/mysql-test/suite/parts/r/partition_alter1_1_ndb.result deleted file mode 100644 index 86608ece057..00000000000 --- a/mysql-test/suite/parts/r/partition_alter1_1_ndb.result +++ /dev/null @@ -1,24316 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(10000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# 1. ALTER TABLE ADD PRIMARY KEY and/or UNIQUE INDEX -#======================================================================== -#------------------------------------------------------------------------ -# 1.1 ADD PRIMARY KEY or UNIQUE INDEX to table with one column (f_int1) -# within the partitioning function -#------------------------------------------------------------------------ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-2-a success: 1 - -# check unique-2-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 1.1.3 PRIMARY KEY consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD PRIMARY KEY(f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - PRIMARY KEY (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 1.1.4 UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int2,f_int1); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL, - UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -ERROR 23000: Can't write; duplicate key in table 't1' -# check prerequisites-3 success: 1 -# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR), -CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT COUNT(*) INTO @try_count FROM t0_template -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT COUNT(*) INTO @clash_count -FROM t1 INNER JOIN t0_template USING(f_int1) -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row; -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 -AND f_int1 BETWEEN @max_row_div2 AND @max_row -ON DUPLICATE KEY -UPDATE f_int1 = 2 * @max_row + source_tab.f_int1, -f_int2 = 2 * @max_row + source_tab.f_int1, -f_charbig = 'was updated'; - -# check unique-1-a success: 1 - -# check unique-1-b success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'===') -WHERE f_charbig = 'was updated'; -REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, - f_int1, '', '', 'was inserted or replaced' - FROM t0_template source_tab -WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; - -# check replace success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4; -DELETE FROM t1 -WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND -f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row; -UPDATE t1 SET f_int2 = f_int1, -f_char1 = CAST(f_int1 AS CHAR), -f_char2 = CAST(f_int1 AS CHAR), -f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===') -WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_alter1_2_ndb.result b/mysql-test/suite/parts/r/partition_alter1_2_ndb.result deleted file mode 100644 index e3f3f6f41c1..00000000000 --- a/mysql-test/suite/parts/r/partition_alter1_2_ndb.result +++ /dev/null @@ -1,35540 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(10000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# 2 DROP PRIMARY KEY or UNIQUE INDEX -#======================================================================== -#------------------------------------------------------------------------ -# 2.1 Partitioning function contains one column(f_int1) -#------------------------------------------------------------------------ -# 2.1.5 DROP PRIMARY KEY + UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 2.2 Partitioning function contains two columns (f_int1,f_int2) -#------------------------------------------------------------------------ -# 2.2.1 DROP PRIMARY KEY consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 2.2.2 DROP UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 2.2.3 DROP PRIMARY KEY + UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP PRIMARY KEY, DROP INDEX uidx1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) NOT NULL DEFAULT '0', - `f_int2` int(11) NOT NULL DEFAULT '0', - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -ERROR 23000: Column 'f_int1' cannot be null -# check null success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1; -ALTER TABLE t1 DROP INDEX uidx1, DROP INDEX uidx2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 AND @max_row; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result b/mysql-test/suite/parts/r/partition_auto_increment_ndb.result deleted file mode 100644 index 40387b9777a..00000000000 --- a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result +++ /dev/null @@ -1,1047 +0,0 @@ -SET new=on; -DROP TABLE IF EXISTS t1; -# test without partitioning for reference -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB'; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -1 -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (NULL); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -6 -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -6 -INSERT INTO t1 VALUES (0); -INSERT INTO t1 VALUES (5), (16); -INSERT INTO t1 VALUES (17); -INSERT INTO t1 VALUES (19), (NULL); -INSERT INTO t1 VALUES (NULL), (10), (NULL); -INSERT INTO t1 VALUES (NULL); -SET INSERT_ID = 30; -INSERT INTO t1 VALUES (NULL); -SET INSERT_ID = 29; -INSERT INTO t1 VALUES (NULL), (NULL), (NULL); -INSERT INTO t1 VALUES (NULL); -UPDATE t1 SET c1 = 50 WHERE c1 = 17; -UPDATE t1 SET c1 = 51 WHERE c1 = 19; -FLUSH TABLES; -UPDATE t1 SET c1 = 40 WHERE c1 = 50; -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' - AND TABLE_NAME='t1'; -AUTO_INCREMENT -52 -UPDATE t1 SET c1 = NULL WHERE c1 = 4; -Warnings: -Warning 1048 Column 'c1' cannot be null -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -0 -2 -5 -6 -10 -20 -21 -22 -23 -24 -30 -40 -51 -52 -53 -DROP TABLE t1; -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB'; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (4); -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (NULL); -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -DELETE FROM t1; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1; -c1 -6 -TRUNCATE TABLE t1; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1; -c1 -1 -INSERT INTO t1 VALUES (100); -INSERT INTO t1 VALUES (NULL); -DELETE FROM t1 WHERE c1 >= 100; -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -DROP TABLE t1; -# Simple test with NULL -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1; -c1 -1 -DROP TABLE t1; -# Test with sql_mode and first insert as 0 -CREATE TABLE t1 ( -c1 INT, -c2 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c2)) -ENGINE='NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (1, 1), (99, 99); -INSERT INTO t1 VALUES (1, NULL); -SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; -INSERT INTO t1 VALUES (1, 0); -SELECT * FROM t1 ORDER BY c1, c2; -c1 c2 -1 0 -1 1 -1 100 -DROP TABLE t1; -CREATE TABLE t1 ( -c1 INT, -c2 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c2)) -ENGINE='NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, 0); -INSERT INTO t1 VALUES (1, 1), (1, NULL); -INSERT INTO t1 VALUES (2, NULL), (4, 7); -INSERT INTO t1 VALUES (1, NULL); -SELECT * FROM t1 ORDER BY c1, c2; -c1 c2 -1 0 -1 1 -1 2 -1 8 -2 3 -4 7 -SET @@session.sql_mode = ''; -DROP TABLE t1; -# Simple test with NULL, 0 and explicit values both incr. and desc. -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -INSERT INTO t1 VALUES (2), (4), (NULL); -INSERT INTO t1 VALUES (0); -INSERT INTO t1 VALUES (5), (16); -INSERT INTO t1 VALUES (17), (19), (NULL); -INSERT INTO t1 VALUES (NULL), (10), (NULL); -INSERT INTO t1 VALUES (NULL), (9); -INSERT INTO t1 VALUES (59), (55); -INSERT INTO t1 VALUES (NULL), (90); -INSERT INTO t1 VALUES (NULL); -UPDATE t1 SET c1 = 150 WHERE c1 = 17; -UPDATE t1 SET c1 = 151 WHERE c1 = 19; -FLUSH TABLES; -UPDATE t1 SET c1 = 140 WHERE c1 = 150; -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' - AND TABLE_NAME='t1'; -AUTO_INCREMENT -152 -UPDATE t1 SET c1 = NULL WHERE c1 = 4; -Warnings: -Warning 1048 Column 'c1' cannot be null -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -0 -2 -5 -6 -9 -10 -20 -21 -22 -23 -55 -59 -60 -90 -91 -140 -151 -152 -153 -DROP TABLE t1; -# Test with auto_increment_increment and auto_increment_offset. -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -SET @@session.auto_increment_increment = 10; -SET @@session.auto_increment_offset = 5; -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (NULL), (NULL), (NULL); -SET @@session.auto_increment_increment = 5; -SET @@session.auto_increment_offset = 3; -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (33 + 1); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (38 + 2); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (43 + 3); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (48 + 4); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (53 + 5); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (63 + 6); -INSERT INTO t1 VALUES (NULL); -SET @@session.auto_increment_increment = 1; -SET @@session.auto_increment_offset = 1; -SELECT * FROM t1 ORDER BY c1; -c1 -1 -5 -15 -25 -33 -34 -38 -40 -43 -46 -48 -52 -53 -58 -63 -69 -73 -DROP TABLE t1; -# Test reported auto_increment value -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH (c1) -PARTITIONS 2; -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -1 -INSERT INTO t1 VALUES (2); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -3 -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (NULL); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -6 -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (17); -INSERT INTO t1 VALUES (19); -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (NULL); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -22 -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -22 -INSERT INTO t1 VALUES (10); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -6 -10 -17 -19 -20 -21 -INSERT INTO t1 VALUES (NULL); -SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' -AND TABLE_NAME='t1'; -AUTO_INCREMENT -23 -INSERT INTO t1 VALUES (NULL); -INSERT INTO t1 VALUES (15); -INSERT INTO t1 VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -6 -10 -15 -17 -19 -20 -21 -22 -23 -24 -INSERT INTO t1 VALUES (NULL); -DELETE FROM t1; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -26 -TRUNCATE TABLE t1; -INSERT INTO t1 VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -1 -INSERT INTO t1 VALUES (100); -INSERT INTO t1 VALUES (NULL); -DELETE FROM t1 WHERE c1 >= 100; -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -DROP TABLE t1; -# Test with two threads -# con default -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -INSERT INTO t1 (c1) VALUES (2); -INSERT INTO t1 (c1) VALUES (4); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (10); -# con default -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (19); -INSERT INTO t1 (c1) VALUES (21); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -# con default -INSERT INTO t1 (c1) VALUES (16); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -# con default -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -DROP TABLE t1; -# Test with two threads + start transaction NO PARTITIONING -# con default -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB'; -START TRANSACTION; -INSERT INTO t1 (c1) VALUES (2); -INSERT INTO t1 (c1) VALUES (4); -# con1 -START TRANSACTION; -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (10); -# con default -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (NULL); -INSERT INTO t1 (c1) VALUES (19); -INSERT INTO t1 (c1) VALUES (21); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -# con default -INSERT INTO t1 (c1) VALUES (16); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -5 -10 -22 -23 -COMMIT; -SELECT * FROM t1 ORDER BY c1; -c1 -5 -10 -22 -23 -# con default -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -COMMIT; -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -DROP TABLE t1; -# Test with two threads + start transaction -# con default -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -START TRANSACTION; -INSERT INTO t1 (c1) VALUES (2); -INSERT INTO t1 (c1) VALUES (4); -# con1 -START TRANSACTION; -INSERT INTO t1 (c1) VALUES (NULL), (10); -# con default -INSERT INTO t1 (c1) VALUES (NULL), (NULL), (19); -INSERT INTO t1 (c1) VALUES (21); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -# con default -INSERT INTO t1 (c1) VALUES (16); -# con1 -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -5 -10 -22 -23 -COMMIT; -SELECT * FROM t1 ORDER BY c1; -c1 -5 -10 -22 -23 -# con default -INSERT INTO t1 (c1) VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -COMMIT; -SELECT * FROM t1 ORDER BY c1; -c1 -2 -4 -5 -10 -11 -12 -16 -19 -21 -22 -23 -24 -DROP TABLE t1; -# Test with another column after -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -c2 INT, -PRIMARY KEY (c1,c2)) -ENGINE = 'NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, 0); -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (NULL, 1), (NULL, 2), (NULL, 3); -INSERT INTO t1 VALUES (NULL, 3); -INSERT INTO t1 VALUES (2, 0), (NULL, 2); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t1 VALUES (2, 22); -INSERT INTO t1 VALUES (NULL, 2); -SELECT * FROM t1 ORDER BY c1,c2; -c1 c2 -1 0 -1 1 -2 0 -2 1 -2 2 -2 22 -3 2 -4 3 -5 3 -6 2 -7 2 -DROP TABLE t1; -# Test with another column before -CREATE TABLE t1 ( -c1 INT, -c2 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c2)) -ENGINE = 'NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, 0); -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (2, NULL), (3, 11), (3, NULL), (2, 0); -INSERT INTO t1 VALUES (2, NULL); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t1 VALUES (2, 22); -INSERT INTO t1 VALUES (2, NULL); -SELECT * FROM t1 ORDER BY c1,c2; -c1 c2 -1 1 -1 2 -2 3 -2 13 -2 14 -2 22 -2 23 -3 11 -3 12 -DROP TABLE t1; -# Test with auto_increment on secondary column in multi-column-index -CREATE TABLE t1 ( -c1 INT, -c2 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1,c2)) -ENGINE = 'NDB' -PARTITION BY HASH(c2) -PARTITIONS 2; -INSERT INTO t1 VALUES (1, 0); -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (2, NULL); -INSERT INTO t1 VALUES (3, NULL); -INSERT INTO t1 VALUES (3, NULL), (2, 0), (2, NULL); -INSERT INTO t1 VALUES (2, 2); -# ERROR (only OK if Blackhole/NDB) should give ER_DUP_KEY or ER_DUP_ENTRY -# mysql_errno: 0 -INSERT INTO t1 VALUES (2, 22), (2, NULL); -SELECT * FROM t1 ORDER BY c1,c2; -c1 c2 -1 1 -1 2 -2 2 -2 3 -2 6 -2 7 -2 22 -2 23 -3 4 -3 5 -DROP TABLE t1; -# Test AUTO_INCREMENT in CREATE -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB' -AUTO_INCREMENT = 15 -PARTITION BY HASH(c1) -PARTITIONS 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (4); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (0); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -4 -15 -16 -# Test sql_mode 'NO_AUTO_VALUE_ON_ZERO' -SET @@session.sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; -INSERT INTO t1 (c1) VALUES (300); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (0); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -0 -4 -15 -16 -300 -301 -SET @@session.sql_mode = ''; -DROP TABLE t1; -# Test SET INSERT_ID -CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (c1)) -ENGINE = 'NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1; -c1 -1 -SET INSERT_ID = 23; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 (c1) VALUES (NULL); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SET INSERT_ID = 22; -INSERT INTO t1 VALUES (NULL), (NULL), (NULL); -INSERT INTO t1 VALUES (NULL); -SELECT * FROM t1 ORDER BY c1; -c1 -1 -2 -23 -DROP TABLE t1; -# Testing with FLUSH TABLE -CREATE TABLE t1 ( -c1 INT NOT NULL AUTO_INCREMENT, -PRIMARY KEY (c1)) -ENGINE='NDB' -PARTITION BY HASH(c1) -PARTITIONS 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 VALUES (4); -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -INSERT INTO t1 VALUES (NULL); -FLUSH TABLE; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (c1) -PARTITIONS 2 */ -SELECT * FROM t1 ORDER BY c1; -c1 -4 -5 -DROP TABLE t1; -############################################################################# -# Bug #45823 - Assertion failure in file row/row0mysql.c line 1386 -# Bug #43988 - AUTO_INCREMENT errors with partitioned InnoDB tables in 5.1.31 -############################################################################## -# Inserting negative autoincrement values into a partition table (partitions >= 4) -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-1,-10); -INSERT INTO t(c2) VALUES (30); -INSERT INTO t(c2) VALUES (40); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --1 -10 -1 10 -2 20 -3 30 -4 40 -DROP TABLE t; -# Reading from a partition table (partitions >= 2 ) after inserting a negative -# value into the auto increment column -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 2; -INSERT INTO t VALUES (-2,-20); -INSERT INTO t(c2) VALUES (30); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --2 -20 -1 30 -DROP TABLE t; -# Inserting negative auto increment value into a partition table (partitions >= 2) -# auto increment value > 2. -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 2; -INSERT INTO t VALUES (-4,-20); -INSERT INTO t(c2) VALUES (30); -INSERT INTO t(c2) VALUES (40); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --4 -20 -1 30 -2 40 -DROP TABLE t; -# Inserting -1 into autoincrement column of a partition table (partition >= 4) -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-1,-10); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --1 -10 -1 10 -2 20 -INSERT INTO t(c2) VALUES (30); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --1 -10 -1 10 -2 20 -3 30 -DROP TABLE t; -# Deleting from an auto increment table after inserting negative values -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-1,-10); -INSERT INTO t(c2) VALUES (30); -INSERT INTO t VALUES (-3,-20); -INSERT INTO t(c2) VALUES (40); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --3 -20 --1 -10 -1 10 -2 20 -3 30 -4 40 -DELETE FROM t WHERE c1 > 1; -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --3 -20 --1 -10 -1 10 -DROP TABLE t; -# Inserting a positive value that exceeds maximum allowed value for an -# Auto Increment column (positive maximum) -CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (126,30); -INSERT INTO t VALUES (127,40); -INSERT INTO t VALUES (128,50); -ERROR 23000: Duplicate entry '127' for key 'PRIMARY' -INSERT INTO t VALUES (129,60); -ERROR 23000: Duplicate entry '127' for key 'PRIMARY' -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 -1 10 -2 20 -126 30 -127 40 -DROP TABLE t; -# Inserting a negative value that goes below minimum allowed value for an -# Auto Increment column (negative minimum) -CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-127,30); -INSERT INTO t VALUES (-128,40); -INSERT INTO t VALUES (-129,50); -ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' -INSERT INTO t VALUES (-130,60); -ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --128 40 --127 30 -1 10 -2 20 -DROP TABLE t; -# Updating the partition table with a negative Auto Increment value -CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (-1,-10); -INSERT INTO t(c2) VALUES (30); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --1 -10 -1 10 -2 20 -3 30 -UPDATE t SET c1 = -6 WHERE c1 = 2; -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --6 20 --1 -10 -1 10 -3 30 -INSERT INTO t(c2) VALUES (40); -INSERT INTO t(c2) VALUES (50); -UPDATE t SET c1 = -6 WHERE c1 = 2; -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --6 20 --1 -10 -1 10 -3 30 -4 40 -5 50 -DROP TABLE t; -# Updating the partition table with a value that crosses the upper limits -# on both the positive and the negative side. -CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), -c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; -INSERT INTO t(c2) VALUES (10); -INSERT INTO t(c2) VALUES (20); -INSERT INTO t VALUES (126,30); -INSERT INTO t VALUES (127,40); -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 -1 10 -2 20 -126 30 -127 40 -UPDATE t SET c1 = 130 where c1 = 127; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 -1 10 -2 20 -126 30 -127 40 -UPDATE t SET c1 = -140 where c1 = 126; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -SELECT * FROM t ORDER BY c1 ASC; -c1 c2 --128 30 -1 10 -2 20 -127 40 -DROP TABLE t; -############################################################################## diff --git a/mysql-test/suite/parts/r/partition_engine_ndb.result b/mysql-test/suite/parts/r/partition_engine_ndb.result deleted file mode 100644 index 6662032ef53..00000000000 --- a/mysql-test/suite/parts/r/partition_engine_ndb.result +++ /dev/null @@ -1,5203 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(10000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# Checks where the engine is assigned on all supported (CREATE TABLE -# statement) positions + basic operations on the tables -# Storage engine mixups are currently (2005-12-23) not supported -#======================================================================== -DROP TABLE IF EXISTS t1; -#------------------------------------------------------------------------ -# 1 Assignment of storage engine just after column list only -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) ENGINE = 'ndbcluster' -PARTITION BY HASH(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 2 Assignment of storage engine just after partition or subpartition -# name only -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) -( PARTITION part1 STORAGE ENGINE = 'ndbcluster', -PARTITION part2 STORAGE ENGINE = 'ndbcluster' -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -(PARTITION part1 ENGINE = ndbcluster, - PARTITION part2 ENGINE = ndbcluster) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 3 Some but not all named partitions or subpartitions get a storage -# engine assigned -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) -( PARTITION part1 STORAGE ENGINE = 'ndbcluster', -PARTITION part2 -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) -( PARTITION part1 , -PARTITION part2 STORAGE ENGINE = 'ndbcluster' -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11, -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, -SUBPARTITION subpart22 ) -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -ENGINE = 'ndbcluster' -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, -SUBPARTITION subpart22 ) -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 4 Storage engine assignment after partition name + after name of -# subpartitions belonging to another partition -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11, -SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -ENGINE = 'ndbcluster' -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) ENGINE = 'ndbcluster' -(SUBPARTITION subpart11, -SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) ENGINE = 'ndbcluster' -(SUBPARTITION subpart11, -SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'ndbcluster' -(SUBPARTITION subpart21 ENGINE = 'ndbcluster', -SUBPARTITION subpart22) -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 5 Precedence of storage engine assignments (if there is any) -#------------------------------------------------------------------------ -# 5.1 Storage engine assignment after column list + after partition -# or subpartition name -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) ENGINE = 'ndbcluster' -PARTITION BY HASH(f_int1) -( PARTITION part1 STORAGE ENGINE = 'ndbcluster', -PARTITION part2 STORAGE ENGINE = 'ndbcluster' -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -(PARTITION part1 ENGINE = ndbcluster, - PARTITION part2 ENGINE = ndbcluster) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -# 6.2 Storage engine assignment after partition name + after -# subpartition name -# in partition part + in sub partition part -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (10) STORAGE ENGINE = 'ndbcluster' -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster'), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart22 STORAGE ENGINE = 'ndbcluster') -); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (10) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster), - PARTITION part2 VALUES LESS THAN (2147483646) - (SUBPARTITION subpart21 ENGINE = ndbcluster, - SUBPARTITION subpart22 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; -ERROR HY000: Table has no partition for value 2147483647 -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -#------------------------------------------------------------------------ -# 6 Session default engine differs from engine used within create table -#------------------------------------------------------------------------ -SET SESSION storage_engine='MEMORY'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) ( PARTITION part1 ENGINE = 'ndbcluster'); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -(PARTITION part1 ENGINE = ndbcluster) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be not transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 STORAGE ENGINE = 'ndbcluster', -SUBPARTITION subpart12 STORAGE ENGINE = 'ndbcluster')); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) -SUBPARTITION BY HASH (f_int1) -(PARTITION part1 VALUES LESS THAN (1000) - (SUBPARTITION subpart11 ENGINE = ndbcluster, - SUBPARTITION subpart12 ENGINE = ndbcluster)) */ - -# check prerequisites-1 success: 1 -# check COUNT(*) success: 1 -# check MIN/MAX(f_int1) success: 1 -# check MIN/MAX(f_int2) success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'delete me' FROM t0_template -WHERE f_int1 IN (2,3); -# check prerequisites-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'delete me'; -# INFO: Neither f_int1 nor f_int2 nor (f_int1,f_int2) is UNIQUE -# check read via f_int1 success: 1 -# check read via f_int2 success: 1 - -# check multiple-1 success: 1 -DELETE FROM t1 WHERE MOD(f_int1,3) = 0; - -# check multiple-2 success: 1 -INSERT INTO t1 SELECT * FROM t0_template -WHERE MOD(f_int1,3) = 0; - -# check multiple-3 success: 1 -UPDATE t1 SET f_int1 = f_int1 + @max_row -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 -AND @max_row_div2 + @max_row_div4; - -# check multiple-4 success: 1 -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row -AND @max_row_div2 + @max_row_div4 + @max_row; - -# check multiple-5 success: 1 -SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-1 success: 1 -SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; -INSERT INTO t1 -SET f_int1 = @cur_value , f_int2 = @cur_value, -f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), -f_charbig = '#SINGLE#'; - -# check single-2 success: 1 -SELECT MIN(f_int1) INTO @cur_value1 FROM t1; -SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value2 -WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; - -# check single-3 success: 1 -SET @cur_value1= -1; -SELECT MAX(f_int1) INTO @cur_value2 FROM t1; -UPDATE t1 SET f_int1 = @cur_value1 -WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; - -# check single-4 success: 1 -SELECT MAX(f_int1) INTO @cur_value FROM t1; -DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; - -# check single-5 success: 1 -DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#'; - -# check single-6 success: 1 -INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##'; - -# check single-7 success: 1 -DELETE FROM t1 WHERE f_charbig = '#2147483647##'; -DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0; -INSERT t1 SET f_int1 = 0 , f_int2 = 0, -f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR), -f_charbig = '#NULL#'; -INSERT INTO t1 -SET f_int1 = NULL , f_int2 = -@max_row, -f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR), -f_charbig = '#NULL#'; -# check null success: 1 - -# check null-1 success: 1 -UPDATE t1 SET f_int1 = -@max_row -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-2 success: 1 -UPDATE t1 SET f_int1 = NULL -WHERE f_int1 = -@max_row AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-3 success: 1 -DELETE FROM t1 -WHERE f_int1 IS NULL AND f_int2 = -@max_row AND f_char1 = CAST(-@max_row AS CHAR) -AND f_char2 = CAST(-@max_row AS CHAR) AND f_charbig = '#NULL#'; - -# check null-4 success: 1 -DELETE FROM t1 -WHERE f_int1 = 0 AND f_int2 = 0 -AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR) -AND f_charbig = '#NULL#'; -SET AUTOCOMMIT= 0; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-1 success: 1 -COMMIT WORK; - -# check transactions-2 success: 1 -ROLLBACK WORK; - -# check transactions-3 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -ROLLBACK WORK; - -# check transactions-4 success: 1 -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, '', '', 'was inserted' -FROM t0_template source_tab -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; - -# check transactions-5 success: 1 -ROLLBACK WORK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back - -# check transactions-6 success: 1 -# INFO: Storage engine used for t1 seems to be not transactional. -COMMIT; - -# check transactions-7 success: 1 -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -SET @@session.sql_mode = 'traditional'; -SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1, -'', '', 'was inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; -ERROR 22012: Division by 0 -COMMIT; - -# check transactions-8 success: 1 -# INFO: Storage engine used for t1 seems to be unable to revert -# changes made by the failing statement. -SET @@session.sql_mode = ''; -SET AUTOCOMMIT= 1; -DELETE FROM t1 WHERE f_charbig = 'was inserted'; -COMMIT WORK; -UPDATE t1 SET f_charbig = REPEAT('b', 1000); - -# check special-1 success: 1 -UPDATE t1 SET f_charbig = ''; - -# check special-2 success: 1 -UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'==='); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-1 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; - -# check trigger-2 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-3 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-4 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = new.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-5 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2 -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-6 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-7 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR), -'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW -BEGIN -UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2, -f_charbig = 'updated by trigger' - WHERE f_int1 = - old.f_int1; -END| -DELETE FROM t0_aux -WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1)); - -# check trigger-8 success: 1 -DROP TRIGGER trg_1; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = 'just inserted' - WHERE f_int1 <> CAST(f_char1 AS SIGNED INT); -DELETE FROM t0_aux -WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -DELETE FROM t1 -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1; -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = old.f_int1 + @max_row, -new.f_int2 = old.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-9 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = new.f_int1 + @max_row, -new.f_int2 = new.f_int2 - @max_row, -new.f_charbig = '####updated per update trigger####'; -END| -UPDATE t1 -SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row, -f_charbig = '####updated per update statement itself####'; - -# check trigger-10 success: 1 -DROP TRIGGER trg_2; -UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT), -f_int2 = CAST(f_char1 AS SIGNED INT), -f_charbig = CONCAT('===',f_char1,'==='); -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) -SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-11 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -SET new.f_int1 = @my_max1 + @counter, -new.f_int2 = @my_min2 - @counter, -new.f_charbig = '####updated per insert trigger####'; -SET @counter = @counter + 1; -END| -SET @counter = 1; -SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; -INSERT INTO t1 (f_char1, f_char2, f_charbig) -SELECT CAST(f_int1 AS CHAR), -CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template -WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1 -ORDER BY f_int1; -DROP TRIGGER trg_3; - -# check trigger-12 success: 1 -DELETE FROM t1 -WHERE f_int1 <> CAST(f_char1 AS SIGNED INT) -AND f_int2 <> CAST(f_char1 AS SIGNED INT) -AND f_charbig = '####updated per insert trigger####'; -ANALYZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 analyze note The storage engine for the table doesn't support analyze -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check note The storage engine for the table doesn't support check -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize note The storage engine for the table doesn't support optimize -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -SET SESSION storage_engine='ndbcluster'; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_int_ndb.result b/mysql-test/suite/parts/r/partition_int_ndb.result deleted file mode 100644 index d3c2d80d6b4..00000000000 --- a/mysql-test/suite/parts/r/partition_int_ndb.result +++ /dev/null @@ -1,557 +0,0 @@ -create table t1 (a tinyint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` tinyint(3) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (255), (254), (253), (252), (1), (2), (128); -select * from t1; -a -1 -128 -2 -252 -253 -254 -255 -select * from t1 where a=253; -a -253 -delete from t1 where a=253; -select * from t1; -a -1 -128 -2 -252 -254 -255 -drop table t1; -create table t2 (a tinyint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` tinyint(3) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (255), (254), (253), (252); -select * from t2; -a -252 -253 -254 -255 -select * from t2 where a=253; -a -253 -delete from t2 where a=253; -select * from t2; -a -252 -254 -255 -delete from t2; -255 inserts; -select count(*) from t2; -count(*) -255 -drop table t2; -create table t3 (a tinyint not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` tinyint(4) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (127), (126), (125), (124), (-128), (-127), (1), (-1), (0); -select * from t3; -a --1 --127 --128 -0 -1 -124 -125 -126 -127 -select * from t3 where a=125; -a -125 -delete from t3 where a=125; -select * from t3; -a --1 --127 --128 -0 -1 -124 -126 -127 -drop table t3; -create table t1 (a smallint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` smallint(5) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256); -select * from t1; -a -1 -2 -256 -65532 -65533 -65534 -65535 -select * from t1 where a=65533; -a -65533 -delete from t1 where a=65533; -select * from t1; -a -1 -2 -256 -65532 -65534 -65535 -drop table t1; -create table t2 (a smallint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` smallint(5) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (65535), (65534), (65533), (65532); -select * from t2; -a -65532 -65533 -65534 -65535 -select * from t2 where a=65533; -a -65533 -delete from t2 where a=65533; -select * from t2; -a -65532 -65534 -65535 -delete from t2; -1024 inserts; -select count(*) from t2; -count(*) -1024 -drop table t2; -create table t3 (a smallint not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` smallint(6) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (32767), (32766), (32765), (32764), (-32768), (-32767), (1), (-1), (0); -select * from t3; -a --1 --32767 --32768 -0 -1 -32764 -32765 -32766 -32767 -select * from t3 where a=32765; -a -32765 -delete from t3 where a=32765; -select * from t3; -a --1 --32767 --32768 -0 -1 -32764 -32766 -32767 -drop table t3; -create table t1 (a int unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(10) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535); -select * from t1; -a -1 -2 -4294967292 -4294967293 -4294967294 -4294967295 -65535 -select * from t1 where a=4294967293; -a -4294967293 -delete from t1 where a=4294967293; -select * from t1; -a -1 -2 -4294967292 -4294967294 -4294967295 -65535 -drop table t1; -create table t2 (a int unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` int(10) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (4294967295), (4294967294), (4294967293), (4294967292); -select * from t2; -a -4294967292 -4294967293 -4294967294 -4294967295 -select * from t2 where a=4294967293; -a -4294967293 -delete from t2 where a=4294967293; -select * from t2; -a -4294967292 -4294967294 -4294967295 -delete from t2; -1024 inserts; -select count(*) from t2; -count(*) -1024 -drop table t2; -create table t3 (a int not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` int(11) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (2147483647), (2147483646), (2147483645), (2147483644), (-2147483648), (-2147483647), (1), (-1), (0); -select * from t3; -a --1 --2147483647 --2147483648 -0 -1 -2147483644 -2147483645 -2147483646 -2147483647 -select * from t3 where a=2147483645; -a -2147483645 -delete from t3 where a=2147483645; -select * from t3; -a --1 --2147483647 --2147483648 -0 -1 -2147483644 -2147483646 -2147483647 -drop table t3; -create table t1 (a mediumint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` mediumint(8) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535); -select * from t1; -a -1 -16777212 -16777213 -16777214 -16777215 -2 -65535 -select * from t1 where a=16777213; -a -16777213 -delete from t1 where a=16777213; -select * from t1; -a -1 -16777212 -16777214 -16777215 -2 -65535 -drop table t1; -create table t2 (a mediumint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` mediumint(8) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (16777215), (16777214), (16777213), (16777212); -select * from t2; -a -16777212 -16777213 -16777214 -16777215 -select * from t2 where a=16777213; -a -16777213 -delete from t2 where a=16777213; -select * from t2; -a -16777212 -16777214 -16777215 -delete from t2; -1024 inserts; -select count(*) from t2; -count(*) -1024 -drop table t2; -create table t3 (a mediumint not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` mediumint(9) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0); -select * from t3; -a --1 --8388607 --8388608 -0 -1 -8388604 -8388605 -8388606 -8388607 -select * from t3 where a=8388605; -a -8388605 -delete from t3 where a=8388605; -select * from t3; -a --1 --8388607 --8388608 -0 -1 -8388604 -8388606 -8388607 -drop table t3; -create table t1 (a bigint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) ( -partition pa1 max_rows=20 min_rows=2, -partition pa2 max_rows=30 min_rows=3, -partition pa3 max_rows=30 min_rows=4, -partition pa4 max_rows=40 min_rows=2); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` bigint(20) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = ndbcluster, - PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = ndbcluster, - PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = ndbcluster, - PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = ndbcluster) */ -insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535); -select * from t1; -a -1 -18446744073709551612 -18446744073709551613 -18446744073709551614 -18446744073709551615 -2 -65535 -select * from t1 where a=-2; -a -delete from t1 where a=-2; -select * from t1; -a -1 -18446744073709551612 -18446744073709551613 -18446744073709551614 -18446744073709551615 -2 -65535 -select * from t1 where a=18446744073709551615; -a -18446744073709551615 -delete from t1 where a=18446744073709551615; -select * from t1; -a -1 -18446744073709551612 -18446744073709551613 -18446744073709551614 -2 -65535 -drop table t1; -create table t2 (a bigint unsigned not null, primary key(a)) engine='NDB' -partition by key (a) partitions 8; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` bigint(20) unsigned NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 8 */ -insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612); -select * from t2; -a -18446744073709551612 -18446744073709551613 -18446744073709551614 -18446744073709551615 -select * from t2 where a=18446744073709551615; -a -18446744073709551615 -delete from t2 where a=18446744073709551615; -select * from t2; -a -18446744073709551612 -18446744073709551613 -18446744073709551614 -delete from t2; -1024 inserts; -select count(*) from t2; -count(*) -1024 -drop table t2; -create table t3 (a bigint not null, primary key(a)) engine='NDB' -partition by key (a) partitions 7; -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` bigint(20) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -PARTITIONS 7 */ -insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0); -select * from t3; -a --1 --9223372036854775807 --9223372036854775808 -0 -1 -9223372036854775804 -9223372036854775805 -9223372036854775806 -9223372036854775807 -select * from t3 where a=9223372036854775806; -a -9223372036854775806 -delete from t3 where a=9223372036854775806; -select * from t3; -a --1 --9223372036854775807 --9223372036854775808 -0 -1 -9223372036854775804 -9223372036854775805 -9223372036854775807 -drop table t3; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result b/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result deleted file mode 100644 index 15b3f424527..00000000000 --- a/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result +++ /dev/null @@ -1,198 +0,0 @@ -# Creating database MySQL_TEST_DB -CREATE DATABASE MySQL_Test_DB; -USE MySQL_Test_DB; -# 1.0 KEY partitioning mgm -# Creating KEY partitioned table -CREATE TABLE TableA (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10); -INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Test of ADD/COALESCE PARTITIONS -# expecting duplicate partition name -ALTER TABLE TableA ADD PARTITION -(PARTITION partA, -PARTITION Parta, -PARTITION PartA); -ERROR HY000: Duplicate partition name parta -ALTER TABLE TableA ADD PARTITION -(PARTITION partE, -PARTITION Partf, -PARTITION PartG); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster, - PARTITION PartD ENGINE = ndbcluster, - PARTITION partE ENGINE = ndbcluster, - PARTITION Partf ENGINE = ndbcluster, - PARTITION PartG ENGINE = ndbcluster) */ -ALTER TABLE TableA COALESCE PARTITION 4; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REORGANIZE PARTITIONS -# Should not work on HASH/KEY -ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO -(PARTITION PARTA , -PARTITION partc ); -ERROR HY000: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers -ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO -(PARTITION partB , -PARTITION parta ); -ERROR HY000: When reorganizing a set of partitions they must be in consecutive order -ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO -(PARTITION partB COMMENT="Previusly named parta", -PARTITION parta COMMENT="Previusly named partB"); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of RENAME TABLE -RENAME TABLE TableA to TableB; -SELECT * FROM TableB; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -RENAME TABLE TableB to TableA; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Checking name comparision Upper vs Lower case -# Error if lower_case_table_names != 0 -# lower_case_table_names: 0 -# Test of REMOVE PARTITIONING -ALTER TABLE TableA REMOVE PARTITIONING; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -# Cleaning up after KEY PARTITIONING test -DROP TABLE TableA; -# Verify that TRUNCATE PARTITION gives error -CREATE TABLE t1 -(a BIGINT AUTO_INCREMENT PRIMARY KEY, -b VARCHAR(255)) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION LT1000, -PARTITION LT2000, -PARTITION MAX); -INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); -ALTER TABLE t1 TRUNCATE PARTITION MAX; -Got one of the listed errors -# Cleaning up before exit -USE test; -DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result b/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result deleted file mode 100644 index 1d221caa163..00000000000 --- a/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result +++ /dev/null @@ -1,236 +0,0 @@ -# Creating database MySQL_TEST_DB -CREATE DATABASE MySQL_Test_DB; -USE MySQL_Test_DB; -# 1.0 KEY partitioning mgm -# Creating KEY partitioned table -CREATE TABLE TableA (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10); -INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Test of ADD/COALESCE PARTITIONS -# expecting duplicate partition name -ALTER TABLE TableA ADD PARTITION -(PARTITION partA, -PARTITION Parta, -PARTITION PartA); -ERROR HY000: Duplicate partition name parta -ALTER TABLE TableA ADD PARTITION -(PARTITION partE, -PARTITION Partf, -PARTITION PartG); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster, - PARTITION PartD ENGINE = ndbcluster, - PARTITION partE ENGINE = ndbcluster, - PARTITION Partf ENGINE = ndbcluster, - PARTITION PartG ENGINE = ndbcluster) */ -ALTER TABLE TableA COALESCE PARTITION 4; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REORGANIZE PARTITIONS -# Should not work on HASH/KEY -ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO -(PARTITION PARTA , -PARTITION partc ); -ERROR HY000: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers -ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO -(PARTITION partB , -PARTITION parta ); -ERROR HY000: When reorganizing a set of partitions they must be in consecutive order -ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO -(PARTITION partB COMMENT="Previusly named parta", -PARTITION parta COMMENT="Previusly named partB"); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of RENAME TABLE -RENAME TABLE TableA to TableB; -SELECT * FROM TableB; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -RENAME TABLE TableB to TableA; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Checking name comparision Upper vs Lower case -# Error if lower_case_table_names != 0 -# lower_case_table_names: 1 -CREATE TABLE tablea (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -ERROR 42S01: Table 'tablea' already exists -SHOW TABLES; -Tables_in_mysql_test_db -tablea -RENAME TABLE TableA to tablea; -ERROR 42S01: Table 'tablea' already exists -RENAME TABLE tablea to TableA; -ERROR 42S01: Table 'tablea' already exists -SELECT * FROM tablea; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE tablea; -Table Create Table -tablea CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REMOVE PARTITIONING -ALTER TABLE TableA REMOVE PARTITIONING; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -# Cleaning up after KEY PARTITIONING test -DROP TABLE TableA; -# Verify that TRUNCATE PARTITION gives error -CREATE TABLE t1 -(a BIGINT AUTO_INCREMENT PRIMARY KEY, -b VARCHAR(255)) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION LT1000, -PARTITION LT2000, -PARTITION MAX); -INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); -ALTER TABLE t1 TRUNCATE PARTITION MAX; -Got one of the listed errors -# Cleaning up before exit -USE test; -DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result b/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result deleted file mode 100644 index 2f5dfe5e08e..00000000000 --- a/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result +++ /dev/null @@ -1,236 +0,0 @@ -# Creating database MySQL_TEST_DB -CREATE DATABASE MySQL_Test_DB; -USE MySQL_Test_DB; -# 1.0 KEY partitioning mgm -# Creating KEY partitioned table -CREATE TABLE TableA (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10); -INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Test of ADD/COALESCE PARTITIONS -# expecting duplicate partition name -ALTER TABLE TableA ADD PARTITION -(PARTITION partA, -PARTITION Parta, -PARTITION PartA); -ERROR HY000: Duplicate partition name parta -ALTER TABLE TableA ADD PARTITION -(PARTITION partE, -PARTITION Partf, -PARTITION PartG); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster, - PARTITION PartD ENGINE = ndbcluster, - PARTITION partE ENGINE = ndbcluster, - PARTITION Partf ENGINE = ndbcluster, - PARTITION PartG ENGINE = ndbcluster) */ -ALTER TABLE TableA COALESCE PARTITION 4; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION parta ENGINE = ndbcluster, - PARTITION partB ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REORGANIZE PARTITIONS -# Should not work on HASH/KEY -ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO -(PARTITION PARTA , -PARTITION partc ); -ERROR HY000: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers -ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO -(PARTITION partB , -PARTITION parta ); -ERROR HY000: When reorganizing a set of partitions they must be in consecutive order -ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO -(PARTITION partB COMMENT="Previusly named parta", -PARTITION parta COMMENT="Previusly named partB"); -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of RENAME TABLE -RENAME TABLE TableA to TableB; -SELECT * FROM TableB; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -RENAME TABLE TableB to TableA; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -# Checking name comparision Upper vs Lower case -# Error if lower_case_table_names != 0 -# lower_case_table_names: 2 -CREATE TABLE tablea (a INT) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION parta , -PARTITION partB , -PARTITION Partc , -PARTITION PartD ); -ERROR 42S01: Table 'tablea' already exists -SHOW TABLES; -Tables_in_mysql_test_db -TableA -RENAME TABLE TableA to tablea; -ERROR 42S01: Table 'tablea' already exists -RENAME TABLE tablea to TableA; -ERROR 42S01: Table 'TableA' already exists -SELECT * FROM tablea; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE tablea; -Table Create Table -tablea CREATE TABLE `tablea` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (a) -(PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, - PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, - PARTITION Partc ENGINE = ndbcluster) */ -# Test of REMOVE PARTITIONING -ALTER TABLE TableA REMOVE PARTITIONING; -SELECT * FROM TableA; -a -1 -10 -11 -12 -2 -3 -4 -5 -6 -7 -8 -9 -SHOW CREATE TABLE TableA; -Table Create Table -TableA CREATE TABLE `TableA` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -# Cleaning up after KEY PARTITIONING test -DROP TABLE TableA; -# Verify that TRUNCATE PARTITION gives error -CREATE TABLE t1 -(a BIGINT AUTO_INCREMENT PRIMARY KEY, -b VARCHAR(255)) -ENGINE = 'NDBCluster' -PARTITION BY KEY (a) -(PARTITION LT1000, -PARTITION LT2000, -PARTITION MAX); -INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); -ALTER TABLE t1 TRUNCATE PARTITION MAX; -Got one of the listed errors -# Cleaning up before exit -USE test; -DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_syntax_ndb.result b/mysql-test/suite/parts/r/partition_syntax_ndb.result deleted file mode 100644 index 2b0899fe53a..00000000000 --- a/mysql-test/suite/parts/r/partition_syntax_ndb.result +++ /dev/null @@ -1,1820 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# There are several testcases disabled because of the open bugs -# #15890 -# #18730, Bug#18735 -# The expected results suffer from the following bugs -# harmless #17455, #19305 -# which cannot be suppressed because of technical reasons. -#------------------------------------------------------------------------ - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(5000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# 1. Any PRIMARY KEYs or UNIQUE INDEXes must contain the columns used -# within the partitioning functions -#======================================================================== -DROP TABLE IF EXISTS t1; -#------------------------------------------------------------------------ -# 1.1 column of partitioning function not included in PRIMARY KEY -# PARTITION BY HASH/KEY/LIST/RANGE -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY KEY(f_int1) PARTITIONS 2; -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 2; -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY LIST(f_int1) -(PARTITION part1 VALUES IN (1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY LIST(f_int1 + f_int2) -(PARTITION part1 VALUES IN (1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY RANGE(f_int1) -(PARTITION part1 VALUES LESS THAN (1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY RANGE(f_int1 + f_int2) -(PARTITION part1 VALUES LESS THAN (1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -#------------------------------------------------------------------------ -# 1.2 column of partitioning function not included in UNIQUE INDEX -# PARTITION BY HASH/KEY/LIST/RANGE -# Variant a) Without additional PRIMARY KEY -# Variant b) With correct additional PRIMARY KEY -# Variant 1) one column in partitioning function -# Variant 2) two columns in partitioning function -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY KEY(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY KEY(f_int1) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int1,3)) -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int1,3)) -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int1 + f_int2,3)) -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int1 + f_int2,3)) -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int1) -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int1) -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int1 + f_int2) -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int1 + f_int2) -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -#------------------------------------------------------------------------ -# 1.3 column of subpartitioning function not included in PRIMARY KEY -# PARTITION BY RANGE/LIST -- SUBPARTITION BY HASH/KEY -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY RANGE(f_int2) SUBPARTITION BY HASH(f_int1) -(PARTITION part1 VALUES LESS THAN (1) -(SUBPARTITION subpart1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY RANGE(f_int2) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (1) -(SUBPARTITION subpart1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY LIST(f_int2) SUBPARTITION BY HASH(f_int1) -(PARTITION part1 VALUES IN (1) -(SUBPARTITION subpart1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int2) -) -PARTITION BY LIST(f_int2) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES IN (1) -(SUBPARTITION subpart1)); -ERROR HY000: A PRIMARY KEY need to include all fields in the partition function -#------------------------------------------------------------------------ -# 1.4 column of subpartitioning function not included in UNIQUE INDEX -# PARTITION BY RANGE/LIST -- SUBPARTITION BY HASH/KEY -# Variant a) Without additional PRIMARY KEY -# Variant b) With correct additional PRIMARY KEY -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int2) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int2) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int2) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY RANGE(f_int2) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES LESS THAN (1), -PARTITION part2 VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int2,3)) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int2,3)) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int2,3)) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2 -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY(f_int1,f_int2), UNIQUE INDEX (f_int2) -) -PARTITION BY LIST(MOD(f_int2,3)) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 2 -(PARTITION partN VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -DROP TABLE t1; - -#======================================================================== -# 2 Some properties around subpartitioning -#======================================================================== -#------------------------------------------------------------------------ -# 2.1 Subpartioned table without subpartitioning rule must be rejected -#------------------------------------------------------------------------ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11)); -ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning -#------------------------------------------------------------------------ -# 2.2 Every partition must have the same number of subpartitions. -# This is a limitation of MySQL 5.1, which could be removed in -# later releases. -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000), -PRIMARY KEY (f_int1) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -( -PARTITION part1 VALUES LESS THAN (0) -(SUBPARTITION subpart1), -PARTITION part2 VALUES LESS THAN (5) -(SUBPARTITION subpart1, SUBPARTITION subpart2)); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 14 - -#======================================================================== -# 3 VALUES clauses -#======================================================================== -#------------------------------------------------------------------------ -# 3.1 The constants in VALUES IN clauses must differ -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (-1), -PARTITION part2 VALUES IN (0), -PARTITION part3 VALUES IN (-1)); -ERROR HY000: Multiple definition of same constant in list partitioning -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT) -PARTITION BY RANGE(f1) -(PARTITION part1 VALUES LESS THAN (0), -PARTITION part2 VALUES LESS THAN (0), -PARTITION part3 VALUES LESS THAN (10000)); -ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition -#------------------------------------------------------------------------ -# 3.2 The constants in VALUES LESS must be in increasing order -#------------------------------------------------------------------------ -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT) -PARTITION BY RANGE(f1) -(PARTITION part1 VALUES LESS THAN (0), -PARTITION part2 VALUES LESS THAN (-1), -PARTITION part3 VALUES LESS THAN (10000)); -ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition -#------------------------------------------------------------------------ -# 3.3 LIST partitions must be defined with VALUES IN -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES LESS THAN (-1), -PARTITION part2 VALUES LESS THAN (0), -PARTITION part3 VALUES LESS THAN (1000)); -ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition -#------------------------------------------------------------------------ -# 3.4 RANGE partitions must be defined with VALUES LESS THAN -#------------------------------------------------------------------------ -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES IN (-1), -PARTITION part2 VALUES IN (0), -PARTITION part3 VALUES IN (1000)); -ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition -#------------------------------------------------------------------------ -# 3.5 Use of NULL in VALUES clauses -#------------------------------------------------------------------------ -# 3.5.1 NULL in RANGE partitioning clause -# 3.5.1.1 VALUE LESS THAN (NULL) is not allowed -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES LESS THAN (NULL), -PARTITION part2 VALUES LESS THAN (1000)); -ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), -PARTITION part2 VALUES LESS THAN (1000))' at line 9 -# 3.5.1.2 VALUE LESS THAN (CAST(NULL AS SIGNED INTEGER)) is not allowed -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES LESS THAN (CAST(NULL AS SIGNED INTEGER)), -PARTITION part2 VALUES LESS THAN (1000)); -ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), -PARTITION part2 VALUES LESS THAN (1000))' at line 9 -# 3.5.2 NULL in LIST partitioning clause -# 3.5.2.1 VALUE IN (NULL) -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (NULL), -PARTITION part2 VALUES IN (0), -PARTITION part3 VALUES IN (1)); -DROP TABLE t1; -# 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER)) -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), -PARTITION part3 VALUES IN (1)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (MOD(f_int1,2)) (PARTITION part1 VALUES IN (NULL) ENGINE = ndbcluster, PARTITION part3 VALUES IN (1) ENGINE = ndbcluster) - -DROP TABLE t1; -# 3.5.3 Reveal that IN (...NULL) is not mapped to IN(0) -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), -PARTITION part2 VALUES IN (0), -PARTITION part3 VALUES IN (1)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (MOD(f_int1,2)) (PARTITION part1 VALUES IN (NULL) ENGINE = ndbcluster, PARTITION part2 VALUES IN (0) ENGINE = ndbcluster, PARTITION part3 VALUES IN (1) ENGINE = ndbcluster) - -DROP TABLE t1; - -#======================================================================== -# 4. Check assigning the number of partitions and subpartitions -# with and without named partitions/subpartitions -#======================================================================== -DROP TABLE IF EXISTS t1; -#------------------------------------------------------------------------ -# 4.1 (positive) without partition/subpartition number assignment -#------------------------------------------------------------------------ -# 4.1.1 no partition number, no named partitions -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) - -DROP TABLE t1; -# 4.1.2 no partition number, named partitions -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) (PARTITION part1, PARTITION part2); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) - -DROP TABLE t1; -# 4.1.3 variations on no partition/subpartition number, named partitions, -# different subpartitions are/are not named -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646)) ; -DROP TABLE t1; -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646))' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPA' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646)) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ' PARTITION part3 VALUES LESS THAN (2147483646))' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ' PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPART' at line 7 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ')' at line 8 -CREATE TABLE t1 ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10) -(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 ENGINE = ndbcluster, SUBPARTITION subpart32 ENGINE = ndbcluster)) - -DROP TABLE t1; -#------------------------------------------------------------------------ -# 4.2 partition/subpartition numbers good and bad values and notations -#------------------------------------------------------------------------ -DROP TABLE IF EXISTS t1; -# 4.2.1 partition/subpartition numbers INTEGER notation -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) PARTITIONS 2 - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 2 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (10) , PARTITION part2 VALUES LESS THAN (2147483646) ) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 1; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) PARTITIONS 1 - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 1 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (10) , PARTITION part2 VALUES LESS THAN (2147483646) ) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 0; -ERROR HY000: Number of partitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Number of subpartitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS -1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS -1 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 1000000; -ERROR HY000: Too many partitions (including subpartitions) were defined -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 1000000 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Too many partitions (including subpartitions) were defined -# 4.2.2 partition/subpartition numbers DECIMAL notation -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2.0; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) PARTITIONS 2 - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 2.0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (10) , PARTITION part2 VALUES LESS THAN (2147483646) ) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS -2.0; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS -2.0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 0.0; -ERROR HY000: Number of partitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 0.0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Number of subpartitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 999999999999999999999999999999.999999999999999999999999999999; -ERROR HY000: Too many partitions (including subpartitions) were defined -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 999999999999999999999999999999.999999999999999999999999999999 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Too many partitions (including subpartitions) were defined -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 0.000000000000000000000000000001; -ERROR HY000: Number of partitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 0.000000000000000000000000000001 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Number of subpartitions = 0 is not an allowed value -# 4.2.3 partition/subpartition numbers FLOAT notation -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2.0E+0; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) PARTITIONS 2 - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 2.0E+0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (10) , PARTITION part2 VALUES LESS THAN (2147483646) ) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS -2.0E+0; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0E+0' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS -2.0E+0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2.0E+0 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 0.0E+300; -ERROR HY000: Number of partitions = 0 is not an allowed value -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 0.0E+300 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR HY000: Number of subpartitions = 0 is not an allowed value -# 4.2.4 partition/subpartition numbers STRING notation -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS '2'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '2' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS '2.0'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2.0'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '2.0' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2.0' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS '0.2E+1'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0.2E+1'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '0.2E+1' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0.2E+1' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS '2A'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2A'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '2A' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2A' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 'A2'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''A2'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 'A2' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''A2' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS ''; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS '' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 'GARBAGE'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''GARBAGE'' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 'GARBAGE' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''GARBAGE' -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 -# 4.2.5 partition/subpartition numbers other notations -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2A; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2A' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS 2A -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2A -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS A2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A2' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS A2 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A2 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS GARBAGE; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS GARBAGE -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS "2"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2"' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS "2" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS "2A"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2A"' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS "2A" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2A" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS "A2"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"A2"' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS "A2" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"A2" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS "GARBAGE"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GARBAGE"' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS "GARBAGE" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GARBAGE" -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 -# 4.2.6 (negative) partition/subpartition numbers per @variables -SET @aux = 5; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS @aux; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@aux' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) -SUBPARTITIONS @aux = 5 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2147483646)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@aux = 5 -(PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 -#------------------------------------------------------------------------ -# 4.3 Mixups of assigned partition/subpartition numbers and names -#------------------------------------------------------------------------ -# 4.3.1 (positive) number of partition/subpartition -# = number of named partition/subpartition -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ; -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) - -DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) PARTITIONS 2 -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -create_command -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f_int1` int(11) DEFAULT NULL, - `f_int2` int(11) DEFAULT NULL, - `f_char1` char(20) DEFAULT NULL, - `f_char2` char(20) DEFAULT NULL, - `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) - -DROP TABLE t1; -# 4.3.2 (positive) number of partition/subpartition , -# 0 (= no) named partition/subpartition -# already checked above -# 4.3.3 (negative) number of partitions/subpartitions -# > number of named partitions/subpartitions -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 2 ( PARTITION part1 ) ; -ERROR 42000: Wrong number of partitions defined, mismatch with previous setting near ')' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 ), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ), -PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31, SUBPARTITION subpart32) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31, SUBPAR' at line 13 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) PARTITIONS 2 -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21 ) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ') -)' at line 13 -# 4.3.4 (negative) number of partitions < number of named partitions -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) PARTITIONS 1 ( PARTITION part1, PARTITION part2 ) ; -ERROR 42000: Wrong number of partitions defined, mismatch with previous setting near ')' at line 8 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 1 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 1 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ), -PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31, SUBPARTITION subpart32) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ' at line 11 -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 1 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 - -#======================================================================== -# 5. Checks of logical partition/subpartition name -# file name clashes during CREATE TABLE -#======================================================================== -DROP TABLE IF EXISTS t1; -#------------------------------------------------------------------------ -# 5.1 (negative) A partition/subpartition name used more than once -#------------------------------------------------------------------------ -# 5.1.1 duplicate partition name -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(f_int1) (PARTITION part1, PARTITION part1); -ERROR HY000: Duplicate partition name part1 -# 5.1.2 duplicate subpartition name -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(f_int1) -SUBPARTITION BY HASH(f_int1) -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart11) -); -ERROR HY000: Duplicate partition name subpart11 -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/r/partition_value_ndb.result b/mysql-test/suite/parts/r/partition_value_ndb.result deleted file mode 100644 index 0787df5f5ac..00000000000 --- a/mysql-test/suite/parts/r/partition_value_ndb.result +++ /dev/null @@ -1,189 +0,0 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'ndbcluster'; - -#------------------------------------------------------------------------ -# There are several testcases disabled because of the open bugs -# #15890 -# #18730, Bug#18735 -# The expected results suffer from the following bugs -# harmless #17455, #19305 -# which cannot be suppressed because of technical reasons. -#------------------------------------------------------------------------ - -#------------------------------------------------------------------------ -# 0. Setting of auxiliary variables + Creation of an auxiliary tables -# needed in many testcases -#------------------------------------------------------------------------ -SELECT @max_row DIV 2 INTO @max_row_div2; -SELECT @max_row DIV 3 INTO @max_row_div3; -SELECT @max_row DIV 4 INTO @max_row_div4; -SET @max_int_4 = 2147483647; -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) , -PRIMARY KEY(f_int1)) -ENGINE = MEMORY; -# Logging of INSERTs into t0_template suppressed -DROP TABLE IF EXISTS t0_definition; -CREATE TABLE t0_definition ( -state CHAR(3), -create_command VARBINARY(5000), -file_list VARBINARY(5000), -PRIMARY KEY (state) -) ENGINE = MEMORY; -DROP TABLE IF EXISTS t0_aux; -CREATE TABLE t0_aux ( f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) ) -ENGINE = MEMORY; -SET AUTOCOMMIT= 1; -SET @@session.sql_mode= ''; -# End of basic preparations needed for all tests -#----------------------------------------------- - -#======================================================================== -# Calculation of "exotic" results within the partition function -# outside of SIGNED BIGINT value range, 0, NULL -# column used in partitioning function has type CHAR -#======================================================================== -# 1. HASH() -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY HASH(CAST(f_char1 AS SIGNED INTEGER) * CAST(5.0E+18 AS SIGNED INTEGER)) PARTITIONS 8; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(2147483646,2147483646,'2147483646','2147483646','#2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(-2147483646,-2147483646,'-2147483646','-2147483646','#-2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '-2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(0,0,'0','0','#0#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '0'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(NULL,NULL,NULL,NULL,NULL); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 IS NULL; -COUNT(*) = 1 -1 -DROP TABLE t1; -# 2. RANGE() -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(CAST(f_char1 AS SIGNED INTEGER) * CAST(5.0E+18 AS SIGNED INTEGER)) -(PARTITION p0 VALUES LESS THAN (0), -PARTITION p1 VALUES LESS THAN (1000000), -PARTITION p2 VALUES LESS THAN MAXVALUE); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(2147483646,2147483646,'2147483646','2147483646','#2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(-2147483646,-2147483646,'-2147483646','-2147483646','#-2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '-2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(0,0,'0','0','#0#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 = '0'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(NULL,NULL,NULL,NULL,NULL); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char1 IS NULL; -COUNT(*) = 1 -1 -DROP TABLE t1; -# 4. Partition by RANGE(...) subpartition by HASH() -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY RANGE(CAST(f_char1 AS SIGNED INTEGER)) -SUBPARTITION BY HASH(CAST(f_char2 AS SIGNED INTEGER) * CAST(5.0E+18 AS SIGNED INTEGER)) SUBPARTITIONS 4 -(PARTITION p0 VALUES LESS THAN (0), -PARTITION p1 VALUES LESS THAN MAXVALUE); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(2147483646,2147483646,'1','2147483646','#2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(-2147483646,-2147483646,'-1','-2147483646','#-2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '-2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(0,0,'0','0','#0#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '0'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(NULL,NULL,NULL,NULL,NULL); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 IS NULL; -COUNT(*) = 1 -1 -DROP TABLE t1; -# 5. Partition by LIST(...) subpartition by HASH() -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -) -PARTITION BY LIST(CAST(f_char1 AS SIGNED INTEGER)) -SUBPARTITION BY HASH(CAST(f_char2 AS SIGNED INTEGER) * CAST(5.0E+18 AS SIGNED INTEGER)) SUBPARTITIONS 4 -(PARTITION p0 VALUES IN (NULL), -PARTITION p1 VALUES IN (1)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(2147483646,2147483646,'1','2147483646','#2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(-2147483646,-2147483646,'1','-2147483646','#-2147483646#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '-2147483646'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(0,0,'1','0','#0#'); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 = '0'; -COUNT(*) = 1 -1 -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -VALUES(NULL,NULL,NULL,NULL,NULL); -SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 IS NULL; -COUNT(*) = 1 -1 -DROP TABLE t1; -DROP VIEW IF EXISTS v1; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t0_aux; -DROP TABLE IF EXISTS t0_definition; -DROP TABLE IF EXISTS t0_template; diff --git a/mysql-test/suite/parts/t/ndb_dd_backuprestore.test b/mysql-test/suite/parts/t/ndb_dd_backuprestore.test deleted file mode 100644 index d2f79028c3f..00000000000 --- a/mysql-test/suite/parts/t/ndb_dd_backuprestore.test +++ /dev/null @@ -1,347 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-24 -# Purpose: Test CDD backup and restore -######################################## - --- source include/have_ndb.inc -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; ---enable_warnings - -############ Test 1 Simple DD backup and restore ############# --- echo **** Test 1 Simple DD backup and restore **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden", $j, b'1'); - dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -################# Mixed Cluster Test ############################ --- echo **** Test 2 Mixed Cluster Test backup and restore **** - -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; -} ---enable_query_log - -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; - -let $j= 50; ---disable_query_log -while ($j) -{ - INSERT INTO test.t3 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t3 VALUES (NULL, repeat('b',16*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('b',16*1024)); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -###################### Adding partition ################################# --- echo **** Test 3 Adding partition Test backup and restore **** - -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; - -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; - -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); - -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden, Texas", $j, b'0'); - eval INSERT INTO test.t4 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t5 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - dec $j; - eval INSERT INTO test.t3 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t6 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); } --enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP TABLESPACE table_space2 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - -# Cleanup - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; - -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; - -DROP TABLESPACE table_space1 ENGINE = NDB; - -DROP TABLESPACE table_space2 ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 ENGINE = NDB; - -#End 5.1 test case - - diff --git a/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test b/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test deleted file mode 100644 index 5ac6b2a504f..00000000000 --- a/mysql-test/suite/parts/t/part_supported_sql_func_ndb.test +++ /dev/null @@ -1,46 +0,0 @@ -################################################################################ -# t/part_supported_sql_funcs_ndb.test # -# # -# Purpose: # -# Tests which SQL functions are allowed in partinioning clauses with # -# NDB. # -# # -#------------------------------------------------------------------------------# -# Original Author: HH # -# Original Date: 2006-11-22 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; -let $do_long_tests= 1; - -# The server must support partitioning. ---source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'NDB'; -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -let $max_8_partitions= 1; -let $no_reorg_partition= 1; -let $drop_partition_not_supported= 1; -#------------------------------------------------------------------------------# ---source suite/parts/inc/part_supported_sql_funcs_main.inc diff --git a/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test b/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test deleted file mode 100644 index 1a8f1f311b6..00000000000 --- a/mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test +++ /dev/null @@ -1,88 +0,0 @@ -################################################################################ -# t/partition_alter1_1_2_ndb.test # -# # -# Purpose: # -# Tests around ADD/DROP PRIMARY KEY and/or UNIQUE INDEX # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: pcrews # -# Change Date: 2008-05-05 # -# Change: Split up original partition_alter1.test file to better accommodate # -# PushBuild machines' workloads. Total run time for all components # -# is essentially the same, but max. single run time is significantly # -# reduced # -################################################################################ -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/big_test.inc - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_alter1_1_2.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_alter1_1_ndb.test b/mysql-test/suite/parts/t/partition_alter1_1_ndb.test deleted file mode 100644 index 1a031f0ef79..00000000000 --- a/mysql-test/suite/parts/t/partition_alter1_1_ndb.test +++ /dev/null @@ -1,88 +0,0 @@ -################################################################################ -# t/partition_alter1_1_ndb.test # -# # -# Purpose: # -# Tests around ADD/DROP PRIMARY KEY and/or UNIQUE INDEX # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: pcrews # -# Change Date: 2008-05-05 # -# Change: Split up original partition_alter1.test file to better accommodate # -# PushBuild machines' workloads. Total run time for all components # -# is essentially the same, but max. single run time is significantly # -# reduced # -################################################################################ -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/big_test.inc - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_alter1_1.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_alter1_2_ndb.test b/mysql-test/suite/parts/t/partition_alter1_2_ndb.test deleted file mode 100644 index 497898fb089..00000000000 --- a/mysql-test/suite/parts/t/partition_alter1_2_ndb.test +++ /dev/null @@ -1,89 +0,0 @@ -################################################################################ -# t/partition_alter1_2_ndb.test # -# # -# Purpose: # -# Tests around ADD/DROP PRIMARY KEY and/or UNIQUE INDEX # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: pcrews # -# Change Date: 2008-05-05 # -# Change: Split up original partition_alter1.test file to better accommodate # -# PushBuild machines' workloads. Total run time for all components # -# is essentially the same, but max. single run time is significantly # -# reduced # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/big_test.inc - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_alter1_2.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_auto_increment_ndb.test b/mysql-test/suite/parts/t/partition_auto_increment_ndb.test deleted file mode 100644 index 7aa3839762d..00000000000 --- a/mysql-test/suite/parts/t/partition_auto_increment_ndb.test +++ /dev/null @@ -1,41 +0,0 @@ -################################################################################ -# t/partition_auto_increment_ndb.test # -# # -# Purpose: # -# Tests around auto increment column # -# NDB branch # -# # -# Note: NDB behavior for auto_increment on secondary column in # -# multi-column-index is NOT like MyISAM, instead it uses the same # -# behavior as if it was the primary column. # -#------------------------------------------------------------------------------# -# Original Author: MattiasJ # -# Original Date: 2008-09-02 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# - -# The server must support partitioning. ---source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements ---source include/have_ndb.inc - -##### Storage engine to be tested -let $engine= 'NDB'; -connection default; -#enable hash partitioning -SET new=on; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_auto_increment.inc - diff --git a/mysql-test/suite/parts/t/partition_basic_ndb.test b/mysql-test/suite/parts/t/partition_basic_ndb.test deleted file mode 100644 index 48e569006de..00000000000 --- a/mysql-test/suite/parts/t/partition_basic_ndb.test +++ /dev/null @@ -1,92 +0,0 @@ -################################################################################ -# t/partition_basic_ndb.test # -# # -# Purpose: # -# Tests around Create Partitioned table # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; -let $with_partitioning= 1; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18730 Partitions: NDB, crash on SELECT MIN() -let $fixed_bug18730= 1; -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 0; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_basic.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_engine_ndb.test b/mysql-test/suite/parts/t/partition_engine_ndb.test deleted file mode 100644 index 40d031eab69..00000000000 --- a/mysql-test/suite/parts/t/partition_engine_ndb.test +++ /dev/null @@ -1,88 +0,0 @@ -################################################################################ -# t/partition_engine_ndb.test # -# # -# Purpose: # -# Tests around Create/Alter partitioned tables and storage engine settings # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested -let $engine= 'ndbcluster'; ---source include/have_ndb.inc -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# none - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_engine.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_int_ndb.test b/mysql-test/suite/parts/t/partition_int_ndb.test deleted file mode 100644 index 5e464ff75b5..00000000000 --- a/mysql-test/suite/parts/t/partition_int_ndb.test +++ /dev/null @@ -1,54 +0,0 @@ -################################################################################ -# t/partition_int_ndb.test # -# # -# Purpose: # -# Tests around integer type # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: HH # -# Original Date: 2006-08-01 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; - -# The server must support partitioning. ---source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'NDB'; -connection default; - -##### max rows to be inserted -let $maxrows=1024; -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_tinyint.inc ---source suite/parts/inc/partition_smallint.inc ---source suite/parts/inc/partition_int.inc ---source suite/parts/inc/partition_mediumint.inc ---source suite/parts/inc/partition_bigint.inc diff --git a/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test b/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test deleted file mode 100644 index 736e45067bc..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################ -# t/partition_mgm_lc0_ndb.test # -# # -# Purpose: # -# Test of partitioning management functions (incl upper/lower case names): # -# NDB branch + lower_case_table_names = 0 # -# (usually Unix like, apart from Mac OS X) # -# Also requires lower_case_file_system OFF # -# # -#------------------------------------------------------------------------------# -# Original Author: mattiasj # -# Original Date: 2008-06-27 # -################################################################################ - -# The server must support partitioning. ---source include/have_partition.inc - -# -# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/have_lowercase0.inc ---source include/have_case_sensitive_file_system.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements -let $have_bug33158= 1; - -##### Storage engine to be tested ---source include/have_ndb.inc -connection default; -# Use either $can_only_key or new=on option to run test. -let $can_only_key= 1; -# Allow hash/list/range partitioning with ndb -#SET new=on; -let $engine= 'NDBCluster'; -# NDB does not yet support TRUNCATE PARTITION -let $no_truncate= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_mgm.inc diff --git a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt b/mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt deleted file mode 100644 index 62ab6dad1e0..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---lower_case_table_names=1 diff --git a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test b/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test deleted file mode 100644 index ac425eb84ff..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test +++ /dev/null @@ -1,46 +0,0 @@ -################################################################################ -# t/partition_mgm_lc1_ndb.test # -# # -# Purpose: # -# Test of partitioning management functions (incl upper/lower case names): # -# NDB branch + lower_case_table_names = 1 (usually Windows) # -# # -#------------------------------------------------------------------------------# -# Original Author: mattiasj # -# Original Date: 2008-06-27 # -################################################################################ - -# The server must support partitioning. ---source include/have_partition.inc - -# -# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/have_lowercase1.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements -let $have_bug33158= 1; - -##### Storage engine to be tested ---source include/have_ndb.inc -connection default; -# Use either $can_only_key or new=on option to run test. -let $can_only_key= 1; -# Allow hash/list/range partitioning with ndb -#SET new=on; -let $engine= 'NDBCluster'; -# NDB does not yet support TRUNCATE PARTITION -let $no_truncate= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_mgm.inc diff --git a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt b/mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt deleted file mode 100644 index f18979f5a6a..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---lower_case_table_names=2 diff --git a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test b/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test deleted file mode 100644 index 725ba3b5e74..00000000000 --- a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test +++ /dev/null @@ -1,45 +0,0 @@ -################################################################################ -# t/partition_mgm_lc2_ndb.test # -# # -# Purpose: # -# Test of partitioning management functions (incl upper/lower case names): # -# NDB branch + lower_case_table_names = 2 (usually Mac OS X) # -# # -#------------------------------------------------------------------------------# -# Original Author: mattiasj # -# Original Date: 2008-06-27 # -################################################################################ - -# The server must support partitioning. ---source include/have_partition.inc - -# -# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source include/have_lowercase2.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -connection default; -# Use either $can_only_key or new=on option to run test. -let $can_only_key= 1; -# Allow hash/list/range partitioning with ndb -#SET new=on; -let $engine= 'NDBCluster'; -# NDB does not yet support TRUNCATE PARTITION -let $no_truncate= 1; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_mgm.inc diff --git a/mysql-test/suite/parts/t/partition_syntax_ndb.test b/mysql-test/suite/parts/t/partition_syntax_ndb.test deleted file mode 100644 index c783e9f602e..00000000000 --- a/mysql-test/suite/parts/t/partition_syntax_ndb.test +++ /dev/null @@ -1,89 +0,0 @@ -################################################################################ -# t/partition_syntax_ndb.test # -# # -# Purpose: # -# Tests around Create Partitioned table syntax # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-03-05 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response -let $fixed_bug18735= 0; - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_syntax.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/parts/t/partition_value_ndb.test b/mysql-test/suite/parts/t/partition_value_ndb.test deleted file mode 100644 index 80b4ba6fb64..00000000000 --- a/mysql-test/suite/parts/t/partition_value_ndb.test +++ /dev/null @@ -1,94 +0,0 @@ -################################################################################ -# t/partition_value_ndb.test # -# # -# Purpose: # -# Tests around "exotic" values calculated by the partitioning function # -# NDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: mleich # -# Original Date: 2006-04-11 # -# Change Author: mleich # -# Change Date: 2008-12-08 # -# Change: Remove test from disabled.def + change test that it gets skipped # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# -# Please read the README at the end of inc/partition.pre before changing -# any of the variables. -# - -# -# CAST() within the partitioning function si no more supported, but we get -# this functionality probably soon again. Therefor we do not delete this test. ---skip # CAST() in partitioning function is currently not supported. - - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements - -##### Options, for debugging support ##### -let $debug= 0; - -##### Option, for displaying files ##### -let $ls= 1; - -##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments ##### -# on partioned tables -SET @max_row = 20; - -##### Execute more tests ##### -let $more_trigger_tests= 0; -let $more_pk_ui_tests= 0; - -# The server must support partitioning. But NDB is partitioned from the start. -# Thats why the next line is set to comment. -# --source include/have_partition.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested ---source include/have_ndb.inc -let $engine= 'ndbcluster'; -connection default; - -# range, list and hash partitioning in ndb requires new_mode ---disable_query_log -set new=on; ---enable_query_log -##### Execute the test of "table" files -# NDB has no files per PK, UI, ... -let $do_file_tests= 0; - -##### Execute PRIMARY KEY tests ##### -# AFAIK NDB is always partitioned using the explicit defined PRIMARY KEY -# or uses an internal one. -let $do_pk_tests= 1; - -##### Assign a big number smaller than the maximum value for partitions ##### -# and smaller than the maximum value of SIGNED INTEGER -# The NDB handler only supports 32 bit integers in VALUES -# 2147483647 seems to be too big. -let $MAX_VALUE= (2147483646); - -# Generate the prerequisites ($variables, @variables, tables) needed ---source suite/parts/inc/partition.pre - -##### Workarounds for known open engine specific bugs -# none - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/parts/inc/partition_value.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/parts/inc/partition_cleanup.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result deleted file mode 100644 index 5876a0e1b65..00000000000 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result +++ /dev/null @@ -1,288 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -STOP SLAVE; -SET @my_sql_mode= @@global.sql_mode; -SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; -START SLAVE; -CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t4 (a INT) ENGINE='NDB'; -CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='NDB'; -CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='NDB'; -CREATE TABLE t9 (a INT) ENGINE='NDB'; -ALTER TABLE t1_int ADD x INT DEFAULT 42; -ALTER TABLE t1_bit -ADD x BIT(3) DEFAULT b'011', -ADD y BIT(5) DEFAULT b'10101', -ADD z BIT(2) DEFAULT b'10'; -ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; -ALTER TABLE t1_nodef ADD x INT NOT NULL; -ALTER TABLE t2 DROP b; -ALTER TABLE t4 MODIFY a FLOAT; -ALTER TABLE t5 MODIFY b FLOAT; -ALTER TABLE t6 MODIFY c FLOAT; -INSERT INTO t1_int VALUES (2, 4, 4711); -INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); -INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); -**** On Master **** -INSERT INTO t1_int VALUES (1,2); -INSERT INTO t1_int VALUES (2,5); -INSERT INTO t1_bit VALUES (1,2); -INSERT INTO t1_bit VALUES (2,5); -INSERT INTO t1_char VALUES (1,2); -INSERT INTO t1_char VALUES (2,5); -SELECT * FROM t1_int; -a b -1 2 -2 5 -SELECT * FROM t1_bit; -a b -1 2 -2 5 -SELECT * FROM t1_char; -a b -1 2 -2 5 -**** On Slave **** -SELECT a,b,x FROM t1_int; -a b x -1 2 42 -2 5 42 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 5 3 15 2 -SELECT a,b,x FROM t1_char; -a b x -1 2 Just a test -2 5 Just a test -**** On Master **** -UPDATE t1_int SET b=2*b WHERE a=2; -UPDATE t1_char SET b=2*b WHERE a=2; -UPDATE t1_bit SET b=2*b WHERE a=2; -SELECT * FROM t1_int; -a b -1 2 -2 10 -SELECT * FROM t1_bit; -a b -1 2 -2 10 -SELECT * FROM t1_char; -a b -1 2 -2 10 -**** On Slave **** -SELECT a,b,x FROM t1_int; -a b x -1 2 42 -2 10 42 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 10 3 15 2 -SELECT a,b,x FROM t1_char; -a b x -1 2 Just a test -2 10 Just a test -INSERT INTO t9 VALUES (2); -INSERT INTO t1_nodef VALUES (1,2); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1364 -Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (2); -INSERT INTO t2 VALUES (2,4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (4); -INSERT INTO t4 VALUES (4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (5); -INSERT INTO t5 VALUES (5,10,25); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (6); -INSERT INTO t6 VALUES (6,12,36); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; -DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9; -SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/suite/rpl_ndb/combinations b/mysql-test/suite/rpl_ndb/combinations deleted file mode 100644 index 75712d234e1..00000000000 --- a/mysql-test/suite/rpl_ndb/combinations +++ /dev/null @@ -1,5 +0,0 @@ -[row] -binlog-format=row - -[mix] -binlog-format=mixed diff --git a/mysql-test/suite/rpl_ndb/my.cnf b/mysql-test/suite/rpl_ndb/my.cnf deleted file mode 100644 index 0c62988b220..00000000000 --- a/mysql-test/suite/rpl_ndb/my.cnf +++ /dev/null @@ -1,70 +0,0 @@ -!include include/default_mysqld.cnf -!include include/default_ndbd.cnf -!include include/default_client.cnf - -[cluster_config.1] -NoOfReplicas= 2 -ndbd=, -ndb_mgmd= -mysqld=, - -[cluster_config.slave] -NoOfReplicas= 1 -ndbd= -ndb_mgmd= -mysqld= - -[mysqld] -# Make all mysqlds use cluster -ndbcluster -# Turn on bin logging -log-bin= master-bin -# Cluster only supports row format -binlog-format= row - -[mysqld.1.1] - -[mysqld.1.1] - -[mysqld.1.slave] - -# Append -slave.opt file to the list of argument used when -# starting the mysqld -#!use-slave-opt - -log-bin= slave-bin -relay-log= slave-relay-bin -# Cluster only supports row format -binlog-format= row - -init-rpl-role= slave -log-slave-updates -master-retry-count= 10 - -# Values reported by slave when it connect to master -# and shows up in SHOW SLAVE STATUS; -report-host= 127.0.0.1 -report-port= @mysqld.1.slave.port -report-user= root - -loose-skip-innodb -skip-slave-start - -# Directory where slaves find the dumps generated by "load data" -# on the server. The path need to have constant length otherwise -# test results will vary, thus a relative path is used. -slave-load-tmpdir= ../../../tmp - -rpl-recovery-rank= @mysqld.1.slave.server-id - - -[ENV] -NDB_CONNECTSTRING= @mysql_cluster.1.ndb_connectstring -MASTER_MYPORT= @mysqld.1.1.port -MASTER_MYPORT1= @mysqld.2.1.port - -NDB_CONNECTSTRING_SLAVE= @mysql_cluster.slave.ndb_connectstring -SLAVE_MYPORT= @mysqld.1.slave.port -SLAVE_MYSOCK= @mysqld.1.slave.socket - -NDB_BACKUP_DIR= @cluster_config.ndbd.1.1.BackupDataDir diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result deleted file mode 100644 index b4e6c7c77b5..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result +++ /dev/null @@ -1,928 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status -( server_id INT UNSIGNED NOT NULL, -epoch BIGINT UNSIGNED NOT NULL, -log_name VARCHAR(255) BINARY NOT NULL, -start_pos BIGINT UNSIGNED NOT NULL, -end_pos BIGINT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (server_id)) ENGINE=INNODB; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, - PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, - PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, - PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, - PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; -set @@global.slave_exec_mode= DEFAULT; -drop table mysql.ndb_apply_status; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result deleted file mode 100644 index 935a7d61dfa..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result +++ /dev/null @@ -1,928 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status -( server_id INT UNSIGNED NOT NULL, -epoch BIGINT UNSIGNED NOT NULL, -log_name VARCHAR(255) BINARY NOT NULL, -start_pos BIGINT UNSIGNED NOT NULL, -end_pos BIGINT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, - PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, - PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, - PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, - PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; -set @@global.slave_exec_mode= DEFAULT; -drop table mysql.ndb_apply_status; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result deleted file mode 100644 index 12882b28254..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result +++ /dev/null @@ -1,400 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -SET storage_engine=ndb; - -=== NDB -> NDB === - ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, -b1 INT, -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE, -PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY; -ALTER TABLE t1 MODIFY vc char(32); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that replication works when slave has more columns than master -ALTER TABLE t1 ADD PRIMARY KEY(id,total); -ALTER TABLE t1 MODIFY vc TEXT; -INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1905-11-14"); -INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1965-11-14"); -INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1985-11-14"); ---- Add columns on slave --- -ALTER TABLE t1 ADD (u int, v char(16) default 'default'); -UPDATE t1 SET u=7 WHERE id < 50; -UPDATE t1 SET v='explicit' WHERE id >10; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - `u` int(11) DEFAULT NULL, - `v` char(16) DEFAULT 'default', - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * -FROM t1 -ORDER BY id; -id b1 vc bc d f total y t u v -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t u v -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 NULL NULL -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL NULL -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 NULL NULL -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 NULL NULL -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 NULL NULL ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t u v -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL NULL -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 default -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL NULL -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 explicit -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL NULL -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL explicit ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Check that replication works when master has more columns than slave ---- Remove columns on slave --- -ALTER TABLE t1 DROP COLUMN v; -ALTER TABLE t1 DROP COLUMN u; -ALTER TABLE t1 DROP COLUMN t; -ALTER TABLE t1 DROP COLUMN y; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result deleted file mode 100644 index eae70ca5a69..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result +++ /dev/null @@ -1,804 +0,0 @@ -include/master-slave.inc -[connection master] -SET storage_engine=ndb; - -=== NDB -> MYISAM === - -set @old_slave_exec_mode= @@global.slave_exec_mode; -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status -( server_id INT UNSIGNED NOT NULL, -epoch BIGINT UNSIGNED NOT NULL, -log_name VARCHAR(255) BINARY NOT NULL, -start_pos BIGINT UNSIGNED NOT NULL, -end_pos BIGINT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM; -SET storage_engine=myisam; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, -b1 INT, -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE, -PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY; -ALTER TABLE t1 MODIFY vc char(32); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that replication works when slave has more columns than master -ALTER TABLE t1 ADD PRIMARY KEY(id,total); -ALTER TABLE t1 MODIFY vc TEXT; -INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1905-11-14"); -INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1965-11-14"); -INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1985-11-14"); ---- Add columns on slave --- -ALTER TABLE t1 ADD (u int, v char(16) default 'default'); -UPDATE t1 SET u=7 WHERE id < 50; -UPDATE t1 SET v='explicit' WHERE id >10; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - `u` int(11) DEFAULT NULL, - `v` char(16) DEFAULT 'default', - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SELECT * -FROM t1 -ORDER BY id; -id b1 vc bc d f total y t u v -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t u v -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 NULL default -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 NULL default -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 NULL default -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 NULL default ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t u v -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 default -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 explicit -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL explicit ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Check that replication works when master has more columns than slave ---- Remove columns on slave --- -ALTER TABLE t1 DROP COLUMN v; -ALTER TABLE t1 DROP COLUMN u; -ALTER TABLE t1 DROP COLUMN t; -ALTER TABLE t1 DROP COLUMN y; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; - -=== NDB -> INNODB === - -alter table mysql.ndb_apply_status engine=innodb; -SET storage_engine=innodb; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, -b1 INT, -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE, -PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY; -ALTER TABLE t1 MODIFY vc char(32); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` char(32) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a coo Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a coo updated 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; ---- Check that replication works when slave has more columns than master -ALTER TABLE t1 ADD PRIMARY KEY(id,total); -ALTER TABLE t1 MODIFY vc TEXT; -INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1905-11-14"); -INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1965-11-14"); -INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ', -'Must make it bug free for the customer', -654321.4321,15.21,0,1965,"1985-11-14"); ---- Add columns on slave --- -ALTER TABLE t1 ADD (u int, v char(16) default 'default'); -UPDATE t1 SET u=7 WHERE id < 50; -UPDATE t1 SET v='explicit' WHERE id >10; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - `u` int(11) DEFAULT NULL, - `v` char(16) DEFAULT 'default', - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SELECT * -FROM t1 -ORDER BY id; -id b1 vc bc d f total y t u v -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total y t u v -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 NULL default -3 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 7 default -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL default -20 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 7 explicit -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 NULL default -50 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 NULL explicit -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 NULL default -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 NULL default ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t u v -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -3 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 default -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -20 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 7 explicit -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL default -50 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 NULL explicit ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -7 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Check that replication works when master has more columns than slave ---- Remove columns on slave --- -ALTER TABLE t1 DROP COLUMN v; -ALTER TABLE t1 DROP COLUMN u; -ALTER TABLE t1 DROP COLUMN t; -ALTER TABLE t1 DROP COLUMN y; ---- Show changed table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` int(11) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; ---- Populate t1 with data --- ---- Select from t1 on master --- -select * -from t1 -order by id; -id b1 vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select * -from t1 -order by id; -id b1 vc bc d f total -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, bc='updated', t="2006-02-22" -WHERE id < 100 -ORDER BY id; ---- Check the update on master --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total y t -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT * -FROM t1 -WHERE id < 100 -ORDER BY id; -id b1 vc bc d f total -2 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -4 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 -42 0 Testing MySQL databases is a cool updated 654321.4321 15.21 0 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 412; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -TRUNCATE TABLE t1; -TRUNCATE TABLE t1; ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; -drop table mysql.ndb_apply_status; -set @@global.slave_exec_mode= @old_slave_exec_mode; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result deleted file mode 100644 index 136aee25fe2..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result +++ /dev/null @@ -1,37 +0,0 @@ -include/master-slave.inc -[connection master] -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=NDB; -INSERT INTO test.t1 VALUES(1,UUID(),UUID()); -create procedure test.p1() -begin -INSERT INTO test.t1 VALUES(2,UUID(),UUID()); -INSERT INTO test.t1 VALUES(3,UUID(),UUID()); -end| -CALL test.p1(); -create function test.fn1(x int) -returns int -begin -insert into t1 values (4+x,UUID(),UUID()); -insert into t1 values (5+x,UUID(),UUID()); -return 0; -end| -select fn1(0); -fn1(0) -0 -create table t2 (a int) engine=NDB; -insert into t2 values(fn1(2)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL DEFAULT '0', - `blob_column` longblob, - `vchar_column` varchar(100) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -DROP PROCEDURE test.p1; -DROP FUNCTION test.fn1; -DROP TABLE test.t1; -DROP TABLE test.t2; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result deleted file mode 100644 index 5e44591f87e..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result +++ /dev/null @@ -1,17 +0,0 @@ -include/master-slave.inc -[connection master] -*** on slave there should be zero rows *** -select count(*) from mysql.ndb_apply_status; -count(*) -0 -create table t1 (a int key, b int) engine ndb; -insert into t1 values (1,1); -*** on master it should be empty *** -select * from mysql.ndb_apply_status; -server_id epoch log_name start_pos end_pos -*** on slave there should be one row *** -select count(*) from mysql.ndb_apply_status; -count(*) -1 -drop table t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result deleted file mode 100644 index c537fb85ad2..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result +++ /dev/null @@ -1,167 +0,0 @@ -include/master-slave.inc -[connection master] -***************** Test 1 ************************ - -CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; -insert into t1 values (NULL,1),(NULL,2),(NULL,3); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a b -3 1 -4 2 -5 3 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a b -3 1 -4 2 -5 3 -drop table t1; -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=NDB; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where b=4; -insert into t1 values (NULL,5),(NULL,6); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -5 5 -6 6 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -5 5 -6 6 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -insert into t1 values (NULL),(5),(NULL); -insert into t1 values (250),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -250 -251 -insert into t1 values (1000); -set @@insert_id=400; -insert into t1 values(NULL),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -250 -251 -400 -401 -1000 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -250 -251 -400 -401 -1000 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -insert into t1 values (NULL),(5),(NULL),(NULL); -insert into t1 values (500),(NULL),(502),(NULL),(600); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -7 -500 -501 -502 -503 -600 -set @@insert_id=600; -insert into t1 values(600),(NULL),(NULL); -ERROR 23000: Can't write; duplicate key in table 't1' -set @@insert_id=600; -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -7 -500 -501 -502 -503 -600 -610 -611 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -7 -500 -501 -502 -503 -600 -610 -611 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -insert into t1 values(2),(12),(22),(32),(42); -insert into t1 values (NULL),(NULL); -insert into t1 values (3),(NULL),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -2 -3 -4 -5 -******* Select from Slave ************* - -** Slave should have 2, 12, 22, 32, 42 ** -** Master will have 2 but not 12, 22, 32, 42 ** - -select * from t1 ORDER BY a; -a -1 -2 -3 -4 -5 -12 -22 -32 -42 -drop table t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result deleted file mode 100644 index 06c005427d1..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result +++ /dev/null @@ -1,120 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; -USE BANK; -CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, -ACCOUNT_TYPE INT UNSIGNED NOT NULL, -BALANCE INT UNSIGNED NOT NULL, -DEPOSIT_COUNT INT UNSIGNED NOT NULL, -DEPOSIT_SUM INT UNSIGNED NOT NULL, -WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, -WITHDRAWAL_SUM INT UNSIGNED NOT NULL, -PURGED INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) -ENGINE = NDB; -CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, -OWNER INT UNSIGNED NOT NULL, -BALANCE INT UNSIGNED NOT NULL, -ACCOUNT_TYPE INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (ACCOUNT_ID)) -ENGINE = NDB; -CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, -ACCOUNT INT UNSIGNED NOT NULL, -ACCOUNT_TYPE INT UNSIGNED NOT NULL, -OTHER_ACCOUNT INT UNSIGNED NOT NULL, -TRANSACTION_TYPE INT UNSIGNED NOT NULL, -TIME BIGINT UNSIGNED NOT NULL, -AMOUNT INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) -ENGINE = NDB; -CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, -VALUE BIGINT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) -ENGINE = NDB; -CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, -DESCRIPTION CHAR(64) NOT NULL, -PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) -ENGINE = NDB; -STOP SLAVE; -RESET SLAVE; -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK; -RESET MASTER; -CREATE TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM mysql.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; -@the_backup_id:=backup_id - -SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status; -@the_epoch:=MAX(epoch) - -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.binlog_index WHERE epoch > ORDER BY epoch ASC LIMIT 1; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -CHANGE MASTER TO -master_log_file = 'master-bin.000001', -master_log_pos = ; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (1); -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result deleted file mode 100644 index deb5d9ecb1a..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result +++ /dev/null @@ -1,194 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL, -PRIMARY KEY (`nid`)) -ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -delete from t1; -INSERT INTO t1 VALUES(1,"XYZ2","ABC2"); -select * from t1 order by nid; -nid nom prenom -1 XYZ2 ABC2 -select * from t1 order by nid; -nid nom prenom -1 XYZ2 ABC2 -delete from t1; -insert into t1 values(1,"AA", "AA"); -insert into t1 values(2,"BB", "BB"); -insert into t1 values(3,"CC", "CC"); -insert into t1 values(4,"DD", "DD"); -begin; -delete from t1 where nid = 1; -insert into t1 values (1,"A2", "A2"); -update t1 set nom="B2" where nid = 2; -delete from t1 where nid = 2; -update t1 set nom = "D2" where nid = 4; -delete from t1 where nid = 4; -insert into t1 values (4, "D3", "D3"); -update t1 set nom = "D4" where nid = 4; -insert into t1 values (5, "EE", "EE"); -delete from t1 where nid = 5; -commit; -select * from t1 order by 1; -nid nom prenom -1 A2 A2 -3 CC CC -4 D4 D3 -select * from t1 order by 1; -nid nom prenom -1 A2 A2 -3 CC CC -4 D4 D3 -DROP table t1; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL) -ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -2 AAA BBB -3 CCC DDD -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -2 AAA BBB -3 CCC DDD -delete from t1 where nid = 2; -INSERT INTO t1 VALUES(4,"EEE","FFF"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -3 CCC DDD -4 EEE FFF -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -3 CCC DDD -4 EEE FFF -UPDATE t1 set nid=nid+1; -UPDATE t1 set nom="CCP" where nid = 4; -select * from t1 order by nid; -nid nom prenom -2 XYZ1 ABC1 -4 CCP DDD -5 EEE FFF -select * from t1 order by nid; -nid nom prenom -2 XYZ1 ABC1 -4 CCP DDD -5 EEE FFF -DROP table t1; -CREATE TABLE `t1` ( -`prid` int(10) unsigned NOT NULL, -`id_type` enum('IMSI','SIP') NOT NULL, -`fkimssub` varchar(50) NOT NULL, -`user_id` varchar(20) DEFAULT NULL, -`password` varchar(20) DEFAULT NULL, -`ptg_nbr` varchar(20) DEFAULT NULL, -`old_tmsi` int(10) unsigned DEFAULT NULL, -`new_tmsi` int(10) unsigned DEFAULT NULL, -`dev_capability` int(10) unsigned DEFAULT NULL, -`dev_oid` bigint(20) unsigned DEFAULT NULL, -`lac_cell_id` bigint(20) unsigned DEFAULT NULL, -`ms_classmark1` int(10) unsigned DEFAULT NULL, -`cipher_key` int(10) unsigned DEFAULT NULL, -`priid_master` int(10) unsigned DEFAULT NULL, -PRIMARY KEY (`prid`), -UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -Warnings: -Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan -INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL); -select count(*) from t1; -count(*) -12 -select count(*) from t1; -count(*) -12 -update t1 set dev_oid=dev_oid+1; -select count(*) from t1; -count(*) -12 -select count(*) from t1; -count(*) -12 -DROP table t1; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL, -PRIMARY KEY USING HASH (`nid`)) -ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -**** On Slave **** -BEGIN; -UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; -set GLOBAL slave_transaction_retries=1; -**** On Master **** -UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; -**** On Slave **** -include/wait_for_slave_sql_error.inc [errno=1205 ] -<<<<<<< TREE -======= -Last_SQL_Error = 'Could not execute Write_rows event on table test.t1; Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB, Error_code: 1297; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log master-bin.000001, end_log_pos 6834' ->>>>>>> MERGE-SOURCE -set GLOBAL slave_transaction_retries=10; -include/start_slave.inc -select * from t1 order by nid; -nid nom prenom -1 LOCK ABC1 -COMMIT; -select * from t1 order by nid; -nid nom prenom -1 DEAD ABC1 -DROP TABLE t1; -CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB; -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -ALTER TABLE t1 ADD c2 INT; -SELECT * FROM t1 ORDER BY c1; -c1 c2 -1 NULL -2 NULL -3 NULL -4 NULL -5 NULL -6 NULL -7 NULL -8 NULL -9 NULL -10 NULL -ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c2 c2 BLOB; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 -1 NULL -2 NULL -3 NULL -4 NULL -5 NULL -TRUNCATE t1; -SELECT count(*) FROM t1; -count(*) -0 -INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL); -SELECT count(*) FROM t1; -count(*) -10 -SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; -c1 -101 -102 -103 -104 -105 -DROP TABLE t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result deleted file mode 100644 index 64ab9a6d637..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result +++ /dev/null @@ -1,174 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -==== Initialize ==== -[on slave] -SET @old_binlog_format= @@global.binlog_format; -INSTALL PLUGIN example SONAME 'ha_example.so'; -[on master] -SET @old_binlog_format= @@global.binlog_format; -INSTALL PLUGIN example SONAME 'ha_example.so'; -CREATE TABLE t (a VARCHAR(100)) ENGINE = MYISAM; -CREATE TABLE t_self_logging (a VARCHAR(100)) ENGINE = NDB; -CREATE TABLE t_row (a VARCHAR(100)) ENGINE = INNODB; -CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE; -CREATE TABLE t_slave_stmt (a VARCHAR(100)) ENGINE = MYISAM; -CREATE TABLE t_autoinc (a INT KEY AUTO_INCREMENT) ENGINE = MYISAM; -CREATE TABLE t_double_autoinc (a INT KEY AUTO_INCREMENT) ENGINE = MYISAM; -CREATE TRIGGER trig_autoinc BEFORE INSERT ON t_autoinc FOR EACH ROW BEGIN INSERT INTO t_stmt VALUES ('x'); END; -CREATE TRIGGER trig_double_autoinc BEFORE INSERT ON t_double_autoinc FOR EACH ROW BEGIN INSERT INTO t_autoinc VALUES (NULL); END; -CREATE DATABASE other; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -[on slave] -DROP TABLE t_slave_stmt; -CREATE TABLE t_slave_stmt (a INT) ENGINE = EXAMPLE; -[on master] -BINLOG ' -1gRVSg8BAAAAZgAAAGoAAAABAAQANS4xLjM2LWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAADWBFVKEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC -'; -==== Test ==== ----- binlog_format=row ---- -* Modify tables of more than one engine, one of which is self-logging -CREATE TRIGGER trig_1 AFTER INSERT ON t_self_logging FOR EACH ROW BEGIN INSERT INTO t VALUES (1); END; -INSERT INTO t_self_logging VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging. -DROP trigger trig_1; -SELECT * FROM t_self_logging /* Should be empty */; -a -SELECT * FROM t /* Should be empty */; -a -* Modify both row-only and stmt-only table -CREATE TRIGGER trig_2 AFTER INSERT ON t_stmt FOR EACH ROW BEGIN INSERT INTO t_row VALUES(1); END; -INSERT INTO t_stmt VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved. -SELECT * FROM t_stmt /* should be empty */; -a -DROP TRIGGER trig_2; -* Stmt-only table and binlog_format=row -INSERT INTO t_stmt VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging. -SELECT * FROM t_stmt /* should be empty */; -a -* Row injection and stmt-only table: in slave sql thread -INSERT INTO t_slave_stmt VALUES (1); -[on slave] ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error executing row event: 'Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging.' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc -SELECT * FROM t_slave_stmt /* should be empty */; -a -[on master] -* Row injection and stmt-only table: use BINLOG statement -BINLOG ' -1gRVShMBAAAALwAAAEABAAAAABcAAAAAAAAABHRlc3QABnRfc3RtdAABDwJkAAE= -1gRVShcBAAAAIAAAAGABAAAQABcAAAAAAAEAAf/+ATE= -'; -ERROR HY000: Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging. -SELECT * FROM t_stmt /* should be empty */; -a ----- binlog_format=mixed ---- -[on slave] -include/stop_slave.inc -SET @@global.binlog_format = MIXED; -include/start_slave.inc -[on master] -SET @@global.binlog_format = MIXED; -SET @@session.binlog_format = MIXED; -* Unsafe statement and stmt-only engine -INSERT INTO t_stmt VALUES (UUID()); -ERROR HY000: Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOG_FORMAT = MIXED. Statement is unsafe because it uses a system function that may return a different value on the slave. -* Multi-unsafe statement and stmt-only engine -INSERT DELAYED INTO t_double_autoinc SELECT CONCAT(UUID(), @@hostname, NULL) FROM mysql.general_log LIMIT 1; -ERROR HY000: Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOG_FORMAT = MIXED. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. ----- binlog_format=statement ---- -[on slave] -include/stop_slave.inc -SET @@global.binlog_format = STATEMENT; -include/start_slave.inc -[on master] -SET @@global.binlog_format = STATEMENT; -SET @@session.binlog_format = STATEMENT; -* Row-only engine and binlog_format=statement: innodb-specific message -INSERT INTO t_row VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED. -SELECT * FROM t_row /* should be empty */; -a -* Row-only engine and binlog_format=statement: generic message -SET @@session.debug= '+d,no_innodb_binlog_errors'; -INSERT INTO t_row VALUES (1); -ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. -SELECT * FROM t_row /* should be empty */; -a -* Same statement, but db filtered out - no error -USE other; -INSERT INTO test.t_row VALUES (1); -USE test; -SET @@session.debug= ''; -SELECT * FROM t_row /* should contain the value 1 */; -a -1 -* Row injection and binlog_format=statement: BINLOG statement -BINLOG ' -cNpVShMBAAAAKgAAADYBAAAAABcAAAAAAAAABHRlc3QAAXQAAQ8CZAAB -cNpVShcBAAAAIAAAAFYBAAAQABcAAAAAAAEAAf/+ATE= -'; -ERROR HY000: Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT. -SELECT * FROM t /* should be empty */; -a -* Same statement, but db filtered out - no error -USE other; -BINLOG ' -cNpVShMBAAAAKgAAADYBAAAAABcAAAAAAAAABHRlc3QAAXQAAQ8CZAAB -cNpVShcBAAAAIAAAAFYBAAAQABcAAAAAAAEAAf/+ATE= -'; -USE test; -SELECT * FROM t /* should contain the value 1 */; -a -1 -DELETE FROM t; -* Unsafe statement and binlog_format=statement -INSERT INTO t VALUES (COALESCE(1, UUID())); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. -SELECT * FROM t /* should contain the value 1 */; -a -1 -DELETE FROM t; -* Same statement, but db filtered out - no message -USE other; -INSERT INTO test.t VALUES (COALESCE(1, UUID())); -USE test; -SELECT * FROM t /* should contain the value 1 */; -a -1 -DELETE FROM t; ----- master: binlog_format=mixed, slave: binlog_format=statement ---- -SET @@global.binlog_format = MIXED; -SET @@session.binlog_format = MIXED; -* Row injection and binlog_format=statement: in slave sql thread -INSERT INTO t VALUES (COALESCE(1, UUID())); -[on slave] ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error executing row event: 'Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc -SELECT * FROM t /* should be empty */; -a -[on master] -==== Clean up ==== -DROP TRIGGER trig_autoinc; -DROP TRIGGER trig_double_autoinc; -DROP TABLE t, t_self_logging, t_row, t_stmt, t_slave_stmt, t_autoinc, t_double_autoinc; -DROP DATABASE other; -SET @@global.binlog_format = @old_binlog_format; -SET @@session.binlog_format = @old_binlog_format; -UNINSTALL PLUGIN example; -[on slave] -SET @@global.binlog_format = @old_binlog_format; -SET @@session.binlog_format = @old_binlog_format; -UNINSTALL PLUGIN example; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result deleted file mode 100644 index 537af85d766..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result +++ /dev/null @@ -1,132 +0,0 @@ -include/master-slave.inc -[connection master] -create table t1 ( -a int not null primary key, -b text not null -) engine=ndb; -insert into t1 values(1, repeat('abc',10)); -insert into t1 values(2, repeat('def',200)); -insert into t1 values(3, repeat('ghi',3000)); -select 'M', a, sha1(b) from t1 -order by a; -M a sha1(b) -M 1 8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d -M 2 0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa -M 3 75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e -select 'S', a, sha1(b) from t1 -order by a; -S a sha1(b) -S 1 8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d -S 2 0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa -S 3 75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e -drop table t1; -create table t1 ( -a int not null primary key, -b text not null, -c int, -d longblob, -e tinyblob -) engine=ndbcluster; -insert into t1 values ( -0, repeat(@s2,454), 100, repeat(@s2,345), NULL); -insert into t1 values ( -1, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1)); -insert into t1 values ( -2, '', 102, '', repeat(@s2,1)); -insert into t1 values ( -3, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1)); -insert into t1 values ( -4, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1)); -insert into t1 values ( -5, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1)); -insert into t1 values ( -6, repeat(@s1,242), 106, NULL, repeat(@s1,1)); -insert into t1 values ( -7, repeat(@s1,30), 107, repeat(@s0,161), ''); -insert into t1 values ( -8, repeat(@s1,719), 108, repeat(@s2,104), NULL); -insert into t1 values ( -9, repeat(@s2,427), NULL, NULL, NULL); -select 'M', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; -M a sha1(b) c sha1(d) sha1(e) -M 0 9538f61e649383c0d1054de2a2f0171188129f33 100 2b6515f29c20b8e9e17cc597527e516c0de8d612 NULL -M 1 dcb9a12ca86e718ff2564be041b7c1b3ff5ea559 NULL f23e7439d9a73c3954979b85a7ef6ef35faf4e9d abfe8ae5212b22d023aa6de84beeb1344ac5668a -M 2 da39a3ee5e6b4b0d3255bfef95601890afd80709 102 da39a3ee5e6b4b0d3255bfef95601890afd80709 33deebe47470a40e960834bffa4cdc66790845a6 -M 3 ec8e06d9ac4695d6a898b519ba840590263a9bff 103 278629ad080c3c4377978c006c2e54d0992e43cc 700915801f853603510aeb67b331866d996fdbda -M 4 0392fa8c425d293c79291f0f34779d1101d13fcb 104 5084b602c7203e0e9590a163415ac605da17ac32 700915801f853603510aeb67b331866d996fdbda -M 5 0f9653f0c7a69cd1c617792d546582e974a7a24d 105 566588a04ff26d05160d61c83435292bfda2978e abfe8ae5212b22d023aa6de84beeb1344ac5668a -M 6 a37e8b0ff4fc13a42be02cdecb36186436959bae 106 NULL abfe8ae5212b22d023aa6de84beeb1344ac5668a -M 7 a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f 107 39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8 da39a3ee5e6b4b0d3255bfef95601890afd80709 -M 8 e139adcb7b2974ee7ff227fd405709e5cb7c896c 108 ba8073b0e1a281d4111bd2d82c7722b01574c00b NULL -M 9 1fc5168fe4be566b17b658d94e7813f0b5032cdb NULL NULL NULL -select 'S', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; -S a sha1(b) c sha1(d) sha1(e) -S 0 9538f61e649383c0d1054de2a2f0171188129f33 100 2b6515f29c20b8e9e17cc597527e516c0de8d612 NULL -S 1 dcb9a12ca86e718ff2564be041b7c1b3ff5ea559 NULL f23e7439d9a73c3954979b85a7ef6ef35faf4e9d abfe8ae5212b22d023aa6de84beeb1344ac5668a -S 2 da39a3ee5e6b4b0d3255bfef95601890afd80709 102 da39a3ee5e6b4b0d3255bfef95601890afd80709 33deebe47470a40e960834bffa4cdc66790845a6 -S 3 ec8e06d9ac4695d6a898b519ba840590263a9bff 103 278629ad080c3c4377978c006c2e54d0992e43cc 700915801f853603510aeb67b331866d996fdbda -S 4 0392fa8c425d293c79291f0f34779d1101d13fcb 104 5084b602c7203e0e9590a163415ac605da17ac32 700915801f853603510aeb67b331866d996fdbda -S 5 0f9653f0c7a69cd1c617792d546582e974a7a24d 105 566588a04ff26d05160d61c83435292bfda2978e abfe8ae5212b22d023aa6de84beeb1344ac5668a -S 6 a37e8b0ff4fc13a42be02cdecb36186436959bae 106 NULL abfe8ae5212b22d023aa6de84beeb1344ac5668a -S 7 a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f 107 39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8 da39a3ee5e6b4b0d3255bfef95601890afd80709 -S 8 e139adcb7b2974ee7ff227fd405709e5cb7c896c 108 ba8073b0e1a281d4111bd2d82c7722b01574c00b NULL -S 9 1fc5168fe4be566b17b658d94e7813f0b5032cdb NULL NULL NULL -drop table t1; -CREATE TABLE IF NOT EXISTS t1 ( -db VARBINARY(63) NOT NULL, -name VARBINARY(63) NOT NULL, -slock BINARY(32) NOT NULL, -query BLOB NOT NULL, -node_id INT UNSIGNED NOT NULL, -epoch BIGINT UNSIGNED NOT NULL, -id INT UNSIGNED NOT NULL, -version INT UNSIGNED NOT NULL, -type INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (db,name)) -ENGINE=NDB; -insert into t1 values ('test','t1', -'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('test','t2', -'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('test','t3', -'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('testtttttttttt','t1', -'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('testttttttttttt','t1', -'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('testtttttttttttt','t1', -'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('t','t11111111111', -'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('t','t111111111111', -'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('t','t1111111111111', -'ghi',repeat(@s2,1000),31,32,33,34,35); -select 'M', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; -M db name sha1(query) node_id epoch id version type -M t t11111111111 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -M t t111111111111 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -M t t1111111111111 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -M test t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -M test t2 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -M test t3 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -M testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -M testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -M testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -select 'S', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; -S db name sha1(query) node_id epoch id version type -S t t11111111111 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -S t t111111111111 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -S t t1111111111111 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -S test t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -S test t2 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -S test t3 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -S testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -S testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -S testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -drop table t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result deleted file mode 100644 index 4fb33dc4b6b..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result +++ /dev/null @@ -1,153 +0,0 @@ -include/master-slave.inc -[connection master] -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -***** Table Create Section **** - -CREATE TABLE test.t1 (c1 int not null auto_increment, -data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; - -**** Data Insert Section test.t1 ***** - -INSERT INTO test.t1 VALUES (NULL, NULL); -INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); -INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); - -**** Data Insert Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Insert Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Update Section test.t1 **** - -UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; -UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; - -**** Data Update Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** Data Update Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** End Test Section test.t1 **** - -**** Create Table test.t2 **** - -CREATE TABLE test.t2 ( -c1 INT NOT NULL PRIMARY KEY, -c2 TEXT, -c3 INT, -c4 LONGBLOB, -KEY(c3))ENGINE=#; - -*** Setup Values For test.t2 *** -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -**** Data Insert Section test.t2 ***** - -INSERT INTO test.t2 VALUES(1,@b1,111,@d1); -INSERT INTO test.t2 VALUES(2,@b2,222,@d2); - -**** Data Insert Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Insert Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Update Section test.t2 **** - -UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; -UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; - -**** Data Update Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -**** Data Update Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result deleted file mode 100644 index 7ff7830449f..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result +++ /dev/null @@ -1,22 +0,0 @@ -include/rpl_init.inc [topology=1->2->1] -include/rpl_connect.inc [creating master] -include/rpl_connect.inc [creating slave] -CREATE TABLE t1 (a int key, b int) ENGINE=ndb; -SHOW TABLES; -Tables_in_test -t1 -INSERT INTO t1 VALUES (1,2); -INSERT INTO t1 VALUES (2,3); -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -include/check_slave_is_running.inc -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -include/check_slave_is_running.inc -STOP SLAVE; -DROP TABLE t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result deleted file mode 100644 index 75aa37f99f3..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result +++ /dev/null @@ -1,51 +0,0 @@ -include/rpl_init.inc [topology=1->2,4->3] -include/rpl_connect.inc [creating master] -include/rpl_connect.inc [creating master1] -include/rpl_connect.inc [creating slave] -include/rpl_connect.inc [creating slave1] - -*** Check server_id of mysqld servers *** -SHOW VARIABLES LIKE "server_id"; -Variable_name Value -server_id 1 -SET auto_increment_offset = 1; -SET auto_increment_increment = 2; -SHOW VARIABLES LIKE "server_id"; -Variable_name Value -server_id 1 -SET auto_increment_offset = 1; -SET auto_increment_increment = 2; -SHOW VARIABLES LIKE "server_id"; -Variable_name Value -server_id 2 -SET auto_increment_offset = 2; -SET auto_increment_increment = 2; -SHOW VARIABLES LIKE "server_id"; -Variable_name Value -server_id 2 -SET auto_increment_offset = 2; -SET auto_increment_increment = 2; - -*** Preparing data *** -CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=ndb; - -*** Basic testing *** -Insert rows via all hosts -Check data on both clusters -include/diff_tables.inc [master:t1, slave:t1] -*** Transaction testing *** -BEGIN; -BEGIN; -COMMIT; -COMMIT; -Check data on both clusters -include/diff_tables.inc [master:t1, slave:t1] -BEGIN; -BEGIN; -ROLLBACK; -ROLLBACK; -Check data on both clusters -include/diff_tables.inc [master:t1, slave:t1] -DROP TABLE IF EXISTS t1; - -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result deleted file mode 100644 index f3a4c132ee3..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result +++ /dev/null @@ -1,26 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE t1 (a int key, b int) ENGINE=NDB; -SHOW TABLES; -Tables_in_test -t1 -RESET MASTER; -INSERT INTO t1 VALUES (1,2); -INSERT INTO t1 VALUES (2,3); -STOP SLAVE; -include/rpl_change_topology.inc [new topology=1->2->1] -START SLAVE; -include/check_slave_is_running.inc -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -STOP SLAVE; -START SLAVE; -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -include/check_slave_is_running.inc -DROP TABLE t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result deleted file mode 100644 index 21546ed6524..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result +++ /dev/null @@ -1,10 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE t1 (a INT) ENGINE=NDB; -begin; -insert into t1 values(1); -flush tables with read lock; -commit; -unlock tables; -drop table t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result deleted file mode 100644 index aa67c678773..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result +++ /dev/null @@ -1,24 +0,0 @@ -include/master-slave.inc -[connection master] -show variables like 'collation_server'; -Variable_name Value -collation_server ucs2_unicode_ci -show variables like "%character_set_ser%"; -Variable_name Value -character_set_server ucs2 -DROP TABLE IF EXISTS t1; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL, -PRIMARY KEY (`nid`)) -ENGINE=ndbcluster; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -==== clean up ==== -DROP TABLE t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result deleted file mode 100644 index 8db2c07364c..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result +++ /dev/null @@ -1,69 +0,0 @@ -include/master-slave.inc -[connection master] -DROP TABLE IF EXISTS t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb; -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb; -insert into t1 values (1,2,3); -select * from t1 order by pk1; -pk1 b c -1 2 3 -select * from t1 order by pk1; -pk1 b c -1 2 3 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ -master-bin.000001 # Query 1 # use `test`; CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB -master-bin.000001 # Query 1 # use `test`; alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb -master-bin.000001 # Query 1 # use `test`; CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB -master-bin.000001 # Query 1 # use `test`; alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb -master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb -master-bin.000001 # Query 1 # BEGIN -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # COMMIT -drop table t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result deleted file mode 100644 index acead977487..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result +++ /dev/null @@ -1,787 +0,0 @@ -include/master-slave.inc -[connection master] ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result deleted file mode 100644 index cc0845e39ed..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result +++ /dev/null @@ -1,1625 +0,0 @@ -include/master-slave.inc -[connection master] - --------- switch to master ------- -SET AUTOCOMMIT = 1; -DROP DATABASE IF EXISTS mysqltest1; -DROP DATABASE IF EXISTS mysqltest2; -DROP DATABASE IF EXISTS mysqltest3; -CREATE DATABASE mysqltest1; -CREATE DATABASE mysqltest2; -CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=NDB; -INSERT INTO mysqltest1.t1 SET f1= 0; -CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE=NDB; -CREATE INDEX my_idx6 ON mysqltest1.t6(f1); -CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE=NDB; -INSERT INTO mysqltest1.t7 SET f1= 0; -CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE=NDB; -CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=MEMORY; -SET AUTOCOMMIT = 0; -use mysqltest1; - --------- switch to slave -------- -SET AUTOCOMMIT = 1; -use mysqltest1; - --------- switch to master ------- - -######## SELECT 1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -SELECT 1; -1 -1 -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## SELECT COUNT(*) FROM t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -SELECT COUNT(*) FROM t1; -COUNT(*) -2 -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## COMMIT ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -COMMIT; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## ROLLBACK ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 1 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## SET AUTOCOMMIT=1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 1 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -SET AUTOCOMMIT=1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SET AUTOCOMMIT=0; - -######## START TRANSACTION ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 2 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to master ------- -START TRANSACTION; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## BEGIN ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 3 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to master ------- -BEGIN; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## DROP TABLE mysqltest1.t2 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 4 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to master ------- -DROP TABLE mysqltest1.t2; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't2'; -Tables_in_mysqltest1 (t2) - --------- switch to slave -------- -SHOW TABLES LIKE 't2'; -Tables_in_mysqltest1 (t2) - --------- switch to master ------- - -######## DROP TEMPORARY TABLE mysqltest1.t23 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 5 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -DROP TEMPORARY TABLE mysqltest1.t23; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't23'; -Tables_in_mysqltest1 (t23) - --------- switch to slave -------- -SHOW TABLES LIKE 't23'; -Tables_in_mysqltest1 (t23) - --------- switch to master ------- - -######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 5 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -RENAME TABLE mysqltest1.t3 to mysqltest1.t20; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't20'; -Tables_in_mysqltest1 (t20) -t20 - --------- switch to slave -------- -SHOW TABLES LIKE 't20'; -Tables_in_mysqltest1 (t20) -t20 - --------- switch to master ------- - -######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 6 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to master ------- -ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -describe mysqltest1.t4; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 bigint(20) YES NULL - --------- switch to slave -------- -describe mysqltest1.t4; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 bigint(20) YES NULL - --------- switch to master ------- - -######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= NDB ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 7 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to master ------- -CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= NDB; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 8 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## TRUNCATE TABLE mysqltest1.t7 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 8 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -TRUNCATE TABLE mysqltest1.t7; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT * FROM mysqltest1.t7; -f1 - --------- switch to slave -------- -SELECT * FROM mysqltest1.t7; -f1 - --------- switch to master ------- - -######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 9 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -UNLOCK TABLES; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 READ; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -ERROR HY000: Table 't1' was locked with a READ lock and can't be updated -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## DROP INDEX my_idx6 ON mysqltest1.t6 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 11 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to master ------- -DROP INDEX my_idx6 ON mysqltest1.t6; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW INDEX FROM mysqltest1.t6; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment - --------- switch to slave -------- -SHOW INDEX FROM mysqltest1.t6; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment - --------- switch to master ------- - -######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 12 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to master ------- -CREATE INDEX my_idx5 ON mysqltest1.t5(f1); -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW INDEX FROM mysqltest1.t5; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE - --------- switch to slave -------- -SHOW INDEX FROM mysqltest1.t5; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE - --------- switch to master ------- - -######## DROP DATABASE mysqltest2 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 13 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to master ------- -DROP DATABASE mysqltest2; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW DATABASES LIKE "mysqltest2"; -Database (mysqltest2) - --------- switch to slave -------- -SHOW DATABASES LIKE "mysqltest2"; -Database (mysqltest2) - --------- switch to master ------- - -######## CREATE DATABASE mysqltest3 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 14 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to master ------- -CREATE DATABASE mysqltest3; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW DATABASES LIKE "mysqltest3"; -Database (mysqltest3) -mysqltest3 - --------- switch to slave -------- -SHOW DATABASES LIKE "mysqltest3"; -Database (mysqltest3) -mysqltest3 - --------- switch to master ------- - -######## CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1" ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 15 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to master ------- -CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1"; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - --------- switch to master ------- - -######## ALTER PROCEDURE p1 COMMENT "I have been altered" ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 16 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to master ------- -ALTER PROCEDURE p1 COMMENT "I have been altered"; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment I have been altered -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment I have been altered -character_set_client latin1 -collation_connection latin1_swedish_ci -Database Collation latin1_swedish_ci - --------- switch to master ------- - -######## DROP PROCEDURE p1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 17 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to master ------- -DROP PROCEDURE p1; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; - --------- switch to master ------- - -######## CREATE OR REPLACE VIEW v1 as select * from t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 18 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to master ------- -CREATE OR REPLACE VIEW v1 as select * from t1; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci - --------- switch to slave -------- -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci - --------- switch to master ------- - -######## ALTER VIEW v1 AS select f1 from t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 19 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to master ------- -ALTER VIEW v1 AS select f1 from t1; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci - --------- switch to slave -------- -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci - --------- switch to master ------- - -######## DROP VIEW IF EXISTS v1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 20 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to master ------- -DROP VIEW IF EXISTS v1; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -ERROR 42S02: Table 'mysqltest1.v1' doesn't exist - --------- switch to slave -------- -SHOW CREATE VIEW v1; -ERROR 42S02: Table 'mysqltest1.v1' doesn't exist - --------- switch to master ------- - -######## CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 21 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to master ------- -CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci - --------- switch to slave -------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci - --------- switch to master ------- - -######## DROP TRIGGER trg1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 22 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to master ------- -DROP TRIGGER trg1; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation - --------- switch to slave -------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation - --------- switch to master ------- - -######## CREATE USER user1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 23 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to master ------- -CREATE USER user1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'user1'; -user -user1 - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'user1'; -user -user1 - --------- switch to master ------- - -######## RENAME USER user1@localhost TO rename1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 24 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to master ------- -RENAME USER user1@localhost TO rename1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -rename1 - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -rename1 - --------- switch to master ------- - -######## DROP USER rename1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 25 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to master ------- -DROP USER rename1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -use test; - --------- switch to master ------- -DROP DATABASE mysqltest1; -DROP DATABASE mysqltest3; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result deleted file mode 100644 index 5f61e4d7803..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result +++ /dev/null @@ -1,12 +0,0 @@ -include/master-slave.inc -[connection master] -create table t1 (a int, b int) engine=NDB; -insert into t1 values(1,1); -select * from t1; -a b -1 1 -delete from t1; -select * from t1; -a b -drop table t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result deleted file mode 100644 index 6171d10657f..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result +++ /dev/null @@ -1,55 +0,0 @@ -include/master-slave.inc -[connection master] -DROP DATABASE IF EXISTS replica; -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -Tables_in_test -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -Tables_in_replica -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -SHOW TABLES; -Tables_in_test -USE replica; -SHOW TABLES; -Tables_in_replica -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE test; -SHOW TABLES; -Tables_in_test -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result deleted file mode 100644 index 6ac55944e33..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result +++ /dev/null @@ -1,23 +0,0 @@ -include/master-slave.inc -[connection master] -DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t1 VALUES(2, repeat('def',200)); -INSERT INTO t1 VALUES(3, repeat('ghi',3000)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(2, repeat('def',200)); -INSERT INTO t2 VALUES(3, repeat('ghi',3000)); -SHOW TABLES; -Tables_in_test -t1 -SELECT COUNT(*) FROM t1; -COUNT(*) -3 -INSERT INTO t1 VALUES (3, repeat('bad',1)); -ERROR 23000: Duplicate entry '3' for key 'PRIMARY' -INSERT INTO t1 VALUES (3, repeat('bad too',1)); -ERROR 23000: Duplicate entry '3' for key 'PRIMARY' -DROP TABLE IF EXISTS t1, t2; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result deleted file mode 100644 index 8be25557a26..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result +++ /dev/null @@ -1,612 +0,0 @@ -include/master-slave.inc -<<<<<<< TREE -Warnings: -Error 1036 Table 'ndb_apply_status' is read only -======= ->>>>>>> MERGE-SOURCE -[connection master] -call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); -**** Diff Table Def Start **** -*** On Slave *** -STOP SLAVE; -RESET SLAVE; -SET @saved_slave_type_conversions = @@slave_type_conversions; -SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; -CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(4) DEFAULT 'TEST') -ENGINE='NDB'; -*** Create t1 on Master *** -CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); -SELECT * FROM t1 ORDER BY a; -a b c -1 2 TEXAS -2 1 AUSTIN -3 4 QA -*** Select from slave *** -SELECT * FROM t1 ORDER BY a; -a b c d e -1 2 TEXAS NULL NULL -2 1 AUSTIN NULL NULL -3 4 QA NULL NULL -SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; -*** Drop t1 *** -DROP TABLE t1; -*** Create t2 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t2 on Master *** -CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='NDB'; -RESET MASTER; -*** Master Data Insert *** -INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING'); -SELECT * FROM t2 ORDER BY a; -a b c -1 2 Kyle, TEX -2 1 JOE AUSTIN -3 4 QA TESTING -*** Start Slave *** -START SLAVE; -<<<<<<< TREE -include/wait_for_slave_sql_error.inc [errno=1677] -Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'' -======= -include/wait_for_slave_sql_error.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.' ->>>>>>> MERGE-SOURCE -STOP SLAVE; -RESET SLAVE; -SELECT * FROM t2 ORDER BY a; -a b c d e -RESET MASTER; -START SLAVE; -*** Drop t2 *** -DROP TABLE t2; -*** Create t3 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t3 on Master *** -CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** -<<<<<<< TREE -include/wait_for_slave_sql_error_and_skip.inc [errno=1677] -Last_SQL_Error = 'Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'' -======= -include/wait_for_slave_sql_error_and_skip.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3' ->>>>>>> MERGE-SOURCE -*** Drop t3 *** -DROP TABLE t3; -*** Create t4 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t4 on Master *** -CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), -(30000.22,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** -<<<<<<< TREE -include/wait_for_slave_sql_error_and_skip.inc [errno=1677] -Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'' -======= -include/wait_for_slave_sql_error_and_skip.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3' ->>>>>>> MERGE-SOURCE -*** Drop t4 *** -DROP TABLE t4; -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT, e DOUBLE, -f DECIMAL(8,2))ENGINE='NDB'; -*** Create t5 on Master *** -CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT, e BLOB, -f FLOAT) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), -(2,'JOE',300.01,0,'b2b2',1.0000009); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** -<<<<<<< TREE -include/wait_for_slave_sql_error_and_skip.inc [errno=1677] -Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'' -======= -include/wait_for_slave_sql_error_and_skip.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246' ->>>>>>> MERGE-SOURCE -*** Drop t5 *** -DROP TABLE t5; -*** Create t6 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT)ENGINE='NDB'; -*** Create t6 on Master *** -CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), -(2,'JOE',300.01,0); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** -<<<<<<< TREE -include/wait_for_slave_sql_error.inc [errno=1677] -Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'' -======= -include/wait_for_slave_sql_error.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3' ->>>>>>> MERGE-SOURCE -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; -*** Drop t6 *** -DROP TABLE t6; -DROP TABLE t6; -START SLAVE; -**** Diff Table Def End **** -**** Extra Colums Start **** -*** Create t7 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e CHAR(20) DEFAULT 'Extra Column Testing') -ENGINE='NDB'; -*** Create t7 on Master *** -CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t7 ORDER BY a; -a b c -1 b1b1 Kyle -2 b1b1 JOE -3 b1b1 QA -*** Select from slave *** -SELECT * FROM t7 ORDER BY a; -a b c d e -1 b1b1 Kyle NULL NULL -2 b1b1 JOE NULL NULL -3 b1b1 QA NULL NULL -*** Drop t7 *** -DROP TABLE t7; -*** Create t8 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e INT)ENGINE='NDB'; -*** Create t8 on Master *** -CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -*** Drop t8 *** -DROP TABLE t8; -*** Create t10 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; -*** Create t10 on Master *** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** -<<<<<<< TREE -include/wait_for_slave_sql_error_and_skip.inc [errno=1677] -Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'' -======= -include/wait_for_slave_sql_error_and_skip.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5' ->>>>>>> MERGE-SOURCE -*** Drop t10 *** -DROP TABLE t10; -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT KEY, b BLOB, f INT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -*** Create t11 on Master *** -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** -<<<<<<< TREE -include/wait_for_slave_sql_error_and_skip.inc [errno=1677] -Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'' -======= -include/wait_for_slave_sql_error_and_skip.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252' ->>>>>>> MERGE-SOURCE -*** Drop t11 *** -DROP TABLE t11; -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -*** Create t12 on Master *** -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t12 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave *** -SELECT * FROM t12 ORDER BY a; -a b f c e -1 b1b1b1b1b1b1b1b1 Kyle NULL NULL -2 b1b1b1b1b1b1b1b1 JOE NULL NULL -3 b1b1b1b1b1b1b1b1 QA NULL NULL -*** Drop t12 *** -DROP TABLE t12; -**** Extra Colums End **** -*** BUG 22177 Start *** -*** Create t13 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), -d INT DEFAULT '1', -e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t13 on Master *** -CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t13 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t13 ORDER BY a; -a b c d e -1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -*** Drop t13 *** -DROP TABLE t13; -*** 22117 END *** -*** Alter Master Table Testing Start *** -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -*** Create t14a on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t14a on Master *** -CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14a () VALUES(1,@b1,'Kyle'), -(2,@b1,'JOE'), -(3,@b1,'QA'); -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 c6 c7 -1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -STOP SLAVE; -RESET SLAVE; -*** Master Drop c5 *** -ALTER TABLE t14a DROP COLUMN c5; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14a () VALUES(4,@b1), -(5,@b1), -(6,@b1); -SELECT * FROM t14a ORDER BY c1; -c1 c4 -1 b1b1b1b1b1b1b1b1 -2 b1b1b1b1b1b1b1b1 -3 b1b1b1b1b1b1b1b1 -4 b1b1b1b1b1b1b1b1 -5 b1b1b1b1b1b1b1b1 -6 b1b1b1b1b1b1b1b1 -*** Select on Slave **** -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 c6 c7 -1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -4 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP -5 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP -6 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c4; -*** Select from Master *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 -1 Replication Testing Extra Col Kyle -2 This Test Should work JOE -3 If is does not, I will open a bug QA -*** Select from Slave *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 c6 c7 -1 Replication Testing Extra Col Kyle NULL CURRENT_TIMESTAMP -2 This Test Should work JOE NULL CURRENT_TIMESTAMP -3 If is does not, I will open a bug QA NULL CURRENT_TIMESTAMP -*** Drop t14 *** -DROP TABLE t14; -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5)) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -*** Add column on master that is a Extra on Slave *** -ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; -******************************************** -*** Expect slave to fail with Error 1060 *** -******************************************** -include/wait_for_slave_sql_error_and_skip.inc [errno=1060] -Last_SQL_Error = 'Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'' -*** Try to insert in master **** -INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 -*** Try to select from slave **** -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP -*** DROP TABLE t15 *** -DROP TABLE t15; -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5))ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -*** Add Partition on master *** -ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; -INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c1) -PARTITIONS 4 */ -*** Show table on Slave **** -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - `c6` int(11) DEFAULT '1', - `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c1) -PARTITIONS 4 */ -*** DROP TABLE t16 *** -DROP TABLE t16; -*** Alter Master End *** -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t17 on Master *** -CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); -******************************************** -*** Expect slave to fail with Error 1677 *** -******************************************** -<<<<<<< TREE -include/wait_for_slave_sql_error_and_skip.inc [errno=1677] -Last_SQL_Error = 'Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'' -======= -include/wait_for_slave_sql_error_and_skip.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2' ->>>>>>> MERGE-SOURCE -** DROP table t17 *** -DROP TABLE t17; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result deleted file mode 100644 index 3829d1468fd..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result +++ /dev/null @@ -1,27 +0,0 @@ -include/master-slave.inc -[connection master] -CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); -DROP FUNCTION IF EXISTS test.f1; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB; -create function test.f1() RETURNS CHAR(16) -BEGIN -DECLARE tmp CHAR(16); -DECLARE var_name FLOAT; -SET var_name = RAND(); -IF var_name > .6 -THEN SET tmp = 'Texas'; -ELSE SET tmp = 'MySQL'; -END IF; -RETURN tmp; -END| -INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -SET AUTOCOMMIT=0; -START TRANSACTION; -INSERT INTO test.t1 VALUES (null,test.f1()); -ROLLBACK; -SET AUTOCOMMIT=1; -DROP FUNCTION test.f1; -DROP TABLE test.t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result deleted file mode 100644 index 019b8bc4cf0..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result +++ /dev/null @@ -1,64 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -@the_epoch:=MAX(epoch) - -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.ndb_binlog_index WHERE epoch = ; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -include/check_slave_is_running.inc -STOP SLAVE; -CHANGE MASTER TO -master_log_file = 'master-bin.000001', -master_log_pos = ; -include/check_slave_no_error.inc -START SLAVE; -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -STOP SLAVE; -DROP TABLE t1; -RESET master; -DROP TABLE t1; -RESET slave; -START SLAVE; -CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","remove on slave",1); -DELETE FROM t1; -BEGIN; -UPDATE t1 SET c2="does not exist" WHERE c3=1; -INSERT INTO t1 VALUES ("row2","new on slave",2); -COMMIT; -SELECT * FROM t1; -c1 c2 c3 -row2 new on slave 2 -include/check_slave_is_running.inc -DROP TABLE IF EXISTS t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result deleted file mode 100644 index 9fb019bf6e5..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result +++ /dev/null @@ -1,916 +0,0 @@ -include/master-slave.inc -[connection master] -SET storage_engine=innodb; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, - PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, - PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, - PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, - PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result deleted file mode 100644 index a01841af003..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result +++ /dev/null @@ -1,100 +0,0 @@ -include/master-slave.inc -[connection master] -create table t1 (a int, unique(a)) engine=ndbcluster; -create table t2 (a int, unique(a)) engine=innodb; -begin; -insert into t1 values(1); -insert into t2 values(1); -rollback; -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -begin; -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -delete from t1; -delete from t2; -begin; -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -delete from t1; -delete from t2; -begin; -insert into t2 values(3),(4); -insert into t1 values(3),(4); -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -4 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -4 -select count(*) from t2; -count(*) -0 -drop table t1,t2; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result deleted file mode 100644 index 195392ae0c5..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result +++ /dev/null @@ -1,67 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned, -unique (b) -) ENGINE=NDB; -CREATE TABLE t2 ( -a int unsigned, # to force INSERT SELECT to have a certain order -b int unsigned -) ENGINE=NDB; -INSERT INTO t1 VALUES (NULL, 1); -INSERT INTO t1 VALUES (NULL, 2); -INSERT INTO t1 VALUES (NULL, 3); -INSERT INTO t1 VALUES (NULL, 4); -INSERT INTO t2 VALUES (1, 1); -INSERT INTO t2 VALUES (2, 2); -INSERT INTO t2 VALUES (3, 5); -INSERT INTO t2 VALUES (4, 3); -INSERT INTO t2 VALUES (5, 4); -INSERT INTO t2 VALUES (6, 6); -INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -drop table t1; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned, -unique (b) -) ENGINE=myisam; -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t1 VALUES (3, 3); -INSERT INTO t1 VALUES (4, 4); -INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -drop table t1, t2; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result deleted file mode 100644 index e51f0096557..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result +++ /dev/null @@ -1,42 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP DATABASE IF EXISTS TEST_DB; -CREATE DATABASE TEST_DB; -USE TEST_DB; -CREATE TABLE SUBSCRIBER -( NUMBER CHAR(12) BINARY NOT NULL, -NAME CHAR(32) BINARY NOT NULL, -GROUP_ID INT UNSIGNED NOT NULL, -LOCATION INT UNSIGNED NOT NULL, -SESSIONS INT UNSIGNED NOT NULL, -CHANGED_BY CHAR(32) BINARY NOT NULL, -CHANGED_TIME CHAR(32) BINARY NOT NULL, -PRIMARY KEY USING HASH (NUMBER)) -ENGINE = NDB; -CREATE TABLE GROUP2 -( GROUP_ID INT UNSIGNED NOT NULL, -GROUP_NAME CHAR(32) BINARY NOT NULL, -ALLOW_READ CHAR(1) BINARY NOT NULL, -ALLOW_INSERT INT UNSIGNED NOT NULL, -ALLOW_DELETE INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (GROUP_ID)) -ENGINE = NDB; -CREATE TABLE SESSION -( NUMBER CHAR(12) BINARY NOT NULL, -SERVER_ID INT UNSIGNED NOT NULL, -DATA BINARY(2000) NOT NULL, -PRIMARY KEY USING HASH (NUMBER,SERVER_ID)) -ENGINE = NDB; -CREATE TABLE SERVER -( SUFFIX CHAR(2) BINARY NOT NULL, -SERVER_ID INT UNSIGNED NOT NULL, -NAME CHAR(32) BINARY NOT NULL, -NO_OF_READ INT UNSIGNED NOT NULL, -NO_OF_INSERT INT UNSIGNED NOT NULL, -NO_OF_DELETE INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (SUFFIX, SERVER_ID)) -ENGINE = NDB; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result deleted file mode 100644 index 3391a688e80..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result +++ /dev/null @@ -1,290 +0,0 @@ -include/master-slave.inc -[connection master] -include/stop_slave.inc -reset master; -reset slave; -<<<<<<< TREE -start slave; -======= -include/start_slave.inc ->>>>>>> MERGE-SOURCE -create table t1(n int not null auto_increment primary key)ENGINE=NDB; -insert into t1 values (NULL); -drop table t1; -create table t1 (word char(20) not null)ENGINE=NDB; -load data infile 'LOAD_FILE' into table t1 ignore 1 lines; -select count(*) from t1; -count(*) -69 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -show binlog events from limit 2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -show binlog events from limit 1,4; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -flush logs; -create table t3 (a int)ENGINE=NDB; -select * from t1 order by 1 asc; -word -Aarhus -Aaron -Aaron -Ababa -Ababa -aback -aback -abaft -abaft -abandon -abandon -abandoned -abandoned -abandoning -abandoning -abandonment -abandonment -abandons -abandons -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration -select * from t1 order by 1 asc; -word -Aarhus -Aaron -Aaron -Ababa -Ababa -aback -aback -abaft -abaft -abandon -abandon -abandoned -abandoned -abandoning -abandoning -abandonment -abandonment -abandons -abandons -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration -flush logs; -include/stop_slave.inc -include/start_slave.inc -create table t2 (n int)ENGINE=NDB; -insert into t2 values (1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Rotate # # master-bin.000002;pos=4 -show binlog events in 'master-bin.000002' from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=NDB -master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=NDB -master-bin.000002 # Query # # BEGIN -master-bin.000002 # Table_map # # table_id: # (test.t2) -master-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000002 # Write_rows # # table_id: # -master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000002 # Query # # COMMIT -show binary logs; -Log_name File_size -master-bin.000001 # -master-bin.000002 # -show binary logs; -Log_name File_size -slave-bin.000001 # -slave-bin.000002 # -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -slave-bin.000001 # Query # # BEGIN -slave-bin.000001 # Table_map # # table_id: # (test.t1) -slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -slave-bin.000001 # Write_rows # # table_id: # -slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -slave-bin.000001 # Query # # COMMIT -slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB -slave-bin.000001 # Query # # BEGIN -slave-bin.000001 # Table_map # # table_id: # (test.t1) -slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -slave-bin.000001 # Write_rows # # table_id: # -slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -slave-bin.000001 # Query # # COMMIT -slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=NDB -slave-bin.000001 # Rotate # # slave-bin.000002;pos=4 -show binlog events in 'slave-bin.000002' from ; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=NDB -slave-bin.000002 # Query # # BEGIN -slave-bin.000002 # Table_map # # table_id: # (test.t2) -slave-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status) -slave-bin.000002 # Write_rows # # table_id: # -slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F -slave-bin.000002 # Query # # COMMIT -include/check_slave_is_running.inc -show binlog events in 'slave-bin.000005' from 4; -ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -include/rpl_reset.inc -create table t1(a int auto_increment primary key, b int); -insert into t1 values (NULL, 1); -set insert_id=5; -insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -select * from t1; -a b -1 1 -5 1 -6 1 -drop table t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result deleted file mode 100644 index d8b01dc1f5b..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result +++ /dev/null @@ -1,483 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE tmyisam (a int) ENGINE = MYISAM; -CREATE TABLE tinnodb (a int) ENGINE = INNODB; -CREATE TABLE tndb (a int) ENGINE = NDB; -SHOW CREATE TABLE tmyisam; -Table Create Table -tmyisam CREATE TABLE `tmyisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE tinnodb; -Table Create Table -tinnodb CREATE TABLE `tinnodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SHOW CREATE TABLE tndb; -Table Create Table -tndb CREATE TABLE `tndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -[on master] -==== Single-engine transactions ==== ----- autocommitted ---- -SET AUTOCOMMIT = 1; -INSERT INTO tmyisam VALUES (0); -INSERT INTO tinnodb VALUES (1); -INSERT INTO tndb VALUES (2); ----- committed with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (3); -INSERT INTO tmyisam VALUES (4); -COMMIT; -BEGIN; -INSERT INTO tinnodb VALUES (5); -INSERT INTO tinnodb VALUES (6); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (7); -INSERT INTO tndb VALUES (8); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (9); -INSERT INTO tmyisam VALUES (10); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tinnodb VALUES (11); -INSERT INTO tinnodb VALUES (12); -ROLLBACK; -BEGIN; -INSERT INTO tndb VALUES (13); -INSERT INTO tndb VALUES (14); -ROLLBACK; ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tmyisam VALUES (15); -INSERT INTO tmyisam VALUES (16); -COMMIT; -INSERT INTO tinnodb VALUES (17); -INSERT INTO tinnodb VALUES (18); -COMMIT; -INSERT INTO tndb VALUES (19); -INSERT INTO tndb VALUES (20); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tmyisam VALUES (21); -INSERT INTO tmyisam VALUES (22); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tinnodb VALUES (23); -INSERT INTO tinnodb VALUES (24); -ROLLBACK; -INSERT INTO tndb VALUES (25); -INSERT INTO tndb VALUES (26); -ROLLBACK; -SET AUTOCOMMIT = 1; -==== MyISAM + InnoDB ==== ----- committed with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (27); -INSERT INTO tinnodb VALUES (28); -COMMIT; -BEGIN; -INSERT INTO tinnodb VALUES (29); -INSERT INTO tmyisam VALUES (30); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (31); -INSERT INTO tinnodb VALUES (32); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tinnodb VALUES (33); -INSERT INTO tmyisam VALUES (34); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tmyisam VALUES (35); -INSERT INTO tinnodb VALUES (36); -COMMIT; -INSERT INTO tinnodb VALUES (37); -INSERT INTO tmyisam VALUES (38); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tmyisam VALUES (39); -INSERT INTO tinnodb VALUES (40); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tinnodb VALUES (41); -INSERT INTO tmyisam VALUES (42); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SET AUTOCOMMIT = 1; -==== MyISAM + NDB ==== ----- committed with BEGIN---- -BEGIN; -INSERT INTO tmyisam VALUES (43); -INSERT INTO tndb VALUES (44); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (45); -INSERT INTO tmyisam VALUES (46); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (47); -INSERT INTO tndb VALUES (48); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tndb VALUES (49); -INSERT INTO tmyisam VALUES (50); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tmyisam VALUES (51); -INSERT INTO tndb VALUES (52); -COMMIT; -INSERT INTO tndb VALUES (53); -INSERT INTO tmyisam VALUES (54); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tmyisam VALUES (55); -INSERT INTO tndb VALUES (56); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tndb VALUES (57); -INSERT INTO tmyisam VALUES (58); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SET AUTOCOMMIT = 1; -==== InnoDB + NDB ==== ----- committed with BEGIN ---- -BEGIN; -INSERT INTO tinnodb VALUES (59); -INSERT INTO tndb VALUES (60); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (61); -INSERT INTO tinnodb VALUES (62); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tinnodb VALUES (63); -INSERT INTO tndb VALUES (64); -ROLLBACK; -BEGIN; -INSERT INTO tndb VALUES (65); -INSERT INTO tinnodb VALUES (66); -ROLLBACK; ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tinnodb VALUES (67); -INSERT INTO tndb VALUES (68); -COMMIT; -INSERT INTO tndb VALUES (69); -INSERT INTO tinnodb VALUES (70); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tinnodb VALUES (71); -INSERT INTO tndb VALUES (72); -ROLLBACK; -INSERT INTO tndb VALUES (73); -INSERT INTO tinnodb VALUES (74); -ROLLBACK; -SET AUTOCOMMIT = 1; -==== MyISAM + InnoDB + NDB ==== ----- committed with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (75); -INSERT INTO tinnodb VALUES (76); -INSERT INTO tndb VALUES (77); -COMMIT; -BEGIN; -INSERT INTO tmyisam VALUES (78); -INSERT INTO tndb VALUES (79); -INSERT INTO tinnodb VALUES (80); -COMMIT; -BEGIN; -INSERT INTO tinnodb VALUES (81); -INSERT INTO tmyisam VALUES (82); -INSERT INTO tndb VALUES (83); -COMMIT; -BEGIN; -INSERT INTO tinnodb VALUES (84); -INSERT INTO tndb VALUES (85); -INSERT INTO tmyisam VALUES (86); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (87); -INSERT INTO tmyisam VALUES (88); -INSERT INTO tinnodb VALUES (89); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (90); -INSERT INTO tinnodb VALUES (91); -INSERT INTO tmyisam VALUES (92); -COMMIT; ----- rolled back with BEGIN ---- -BEGIN; -INSERT INTO tmyisam VALUES (93); -INSERT INTO tinnodb VALUES (94); -INSERT INTO tndb VALUES (95); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tmyisam VALUES (96); -INSERT INTO tndb VALUES (97); -INSERT INTO tinnodb VALUES (98); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tinnodb VALUES (99); -INSERT INTO tmyisam VALUES (100); -INSERT INTO tndb VALUES (101); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tinnodb VALUES (102); -INSERT INTO tndb VALUES (103); -INSERT INTO tmyisam VALUES (104); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tndb VALUES (105); -INSERT INTO tmyisam VALUES (106); -INSERT INTO tinnodb VALUES (107); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; -INSERT INTO tndb VALUES (108); -INSERT INTO tinnodb VALUES (109); -INSERT INTO tmyisam VALUES (110); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back ----- committed with AUTOCOMMIT = 0 ---- -SET AUTOCOMMIT = 0; -INSERT INTO tmyisam VALUES (111); -INSERT INTO tinnodb VALUES (112); -INSERT INTO tndb VALUES (113); -COMMIT; -INSERT INTO tmyisam VALUES (114); -INSERT INTO tndb VALUES (115); -INSERT INTO tinnodb VALUES (116); -COMMIT; -INSERT INTO tinnodb VALUES (117); -INSERT INTO tmyisam VALUES (118); -INSERT INTO tndb VALUES (119); -COMMIT; -INSERT INTO tinnodb VALUES (120); -INSERT INTO tndb VALUES (121); -INSERT INTO tmyisam VALUES (122); -COMMIT; -INSERT INTO tndb VALUES (123); -INSERT INTO tmyisam VALUES (124); -INSERT INTO tinnodb VALUES (125); -COMMIT; -INSERT INTO tndb VALUES (126); -INSERT INTO tinnodb VALUES (127); -INSERT INTO tmyisam VALUES (128); -COMMIT; ----- rolled back with AUTOCOMMIT = 0 ---- -INSERT INTO tmyisam VALUES (129); -INSERT INTO tinnodb VALUES (130); -INSERT INTO tndb VALUES (131); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tmyisam VALUES (132); -INSERT INTO tndb VALUES (133); -INSERT INTO tinnodb VALUES (134); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tinnodb VALUES (135); -INSERT INTO tmyisam VALUES (136); -INSERT INTO tndb VALUES (137); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tinnodb VALUES (138); -INSERT INTO tndb VALUES (139); -INSERT INTO tmyisam VALUES (140); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tndb VALUES (141); -INSERT INTO tmyisam VALUES (142); -INSERT INTO tinnodb VALUES (143); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO tndb VALUES (144); -INSERT INTO tinnodb VALUES (145); -INSERT INTO tmyisam VALUES (146); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SET AUTOCOMMIT = 1; ----- Mixed statements Innodb ---- -BEGIN; -INSERT INTO tndb VALUES (147); -INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -COMMIT; -INSERT INTO tndb VALUES (148); -BEGIN; -INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -INSERT INTO tndb VALUES (149); -COMMIT; -BEGIN; -INSERT INTO tndb VALUES (150); -INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -COMMIT; -INSERT INTO tndb VALUES (151); -BEGIN; -INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -INSERT INTO tndb VALUES (152); -COMMIT; -==== Verify the result ==== -SELECT * FROM tmyisam ORDER BY a; -a -0 -3 -4 -9 -10 -15 -16 -21 -22 -27 -30 -31 -34 -35 -38 -39 -42 -43 -46 -47 -50 -51 -54 -55 -58 -75 -78 -82 -86 -88 -92 -93 -96 -100 -104 -106 -110 -111 -114 -118 -122 -124 -128 -129 -132 -136 -140 -142 -146 -150 -151 -SELECT * FROM tinnodb ORDER BY a; -a -1 -5 -6 -17 -18 -28 -29 -36 -37 -59 -62 -67 -70 -76 -80 -81 -84 -89 -91 -112 -116 -117 -120 -125 -127 -147 -148 -SELECT * FROM tndb ORDER BY a; -a -2 -7 -8 -19 -20 -44 -45 -52 -53 -60 -61 -68 -69 -77 -79 -83 -85 -87 -90 -113 -115 -119 -121 -123 -126 -147 -148 -149 -150 -151 -152 -[on slave] -include/diff_tables.inc [master:tmyisam, slave:tmyisam] -include/diff_tables.inc [master:tinnodb, slave:tinnodb] -include/diff_tables.inc [master:tndb, slave:tndb] -==== Clean up ==== -[on master] -DROP TABLE tmyisam, tinnodb, tndb; -[on slave] -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result deleted file mode 100644 index 65e5469c9eb..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_implicit_commit_binlog.result +++ /dev/null @@ -1,660 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -######################################################################### -# CONFIGURATION -######################################################################### -CREATE TABLE tt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = NDB; -CREATE TABLE tt_2 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = NDB; -CREATE TABLE nt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = MyIsam; -INSERT INTO tt_1(ddl_case) VALUES(0); -INSERT INTO tt_2(ddl_case) VALUES(0); -######################################################################### -# CHECK IMPLICT COMMIT -######################################################################### -SET AUTOCOMMIT= 0; --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (41); -LOAD INDEX INTO CACHE nt_1 IGNORE LEAVES; -Table Op Msg_type Msg_text -test.nt_1 preload_keys status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (test.tt_2) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (40); -LOAD INDEX INTO CACHE tt_1, tt_2 IGNORE LEAVES; -Table Op Msg_type Msg_text -test.tt_1 preload_keys note The storage engine for the table doesn't support preload_keys -test.tt_2 preload_keys note The storage engine for the table doesn't support preload_keys --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (39); -ANALYZE TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 analyze status Table is already up to date --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ANALYZE TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (38); -CHECK TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 check status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (37); -OPTIMIZE TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 optimize status Table is already up to date --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; OPTIMIZE TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (36); -REPAIR TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 repair status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; REPAIR TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (35); -LOCK TABLES tt_1 WRITE; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (34); -UNLOCK TABLES; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (33); -CREATE USER 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE USER 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (32); -GRANT ALL ON *.* TO 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; GRANT ALL ON *.* TO 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (31); -SET PASSWORD FOR 'user'@'localhost' = PASSWORD('newpass'); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; SET PASSWORD FOR 'user'@'localhost'='*D8DECEC305209EEFEC43008E1D420E1AA06B19E0' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (30); -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (29); -RENAME USER 'user'@'localhost' TO 'user_new'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; RENAME USER 'user'@'localhost' TO 'user_new'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (28); -DROP USER 'user_new'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP USER 'user_new'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (27); -CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (26); -ALTER EVENT evt COMMENT 'evt'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER EVENT evt COMMENT 'evt' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (25); -DROP EVENT evt; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP EVENT evt -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (24); -CREATE TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (23); -DROP TRIGGER tr; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP TRIGGER tr -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (22); -CREATE FUNCTION fc () RETURNS VARCHAR(64) RETURN "fc"; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `fc`() RETURNS varchar(64) CHARSET latin1 -RETURN "fc" -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (21); -ALTER FUNCTION fc COMMENT 'fc'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER FUNCTION fc COMMENT 'fc' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (20); -DROP FUNCTION fc; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP FUNCTION fc -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (19); -CREATE PROCEDURE pc () UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `pc`() -UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (18); -ALTER PROCEDURE pc COMMENT 'pc'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER PROCEDURE pc COMMENT 'pc' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (17); -DROP PROCEDURE pc; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP PROCEDURE pc -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (16); -CREATE VIEW v AS SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (15); -ALTER VIEW v AS SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (14); -DROP VIEW v; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP VIEW v -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (13); -CREATE INDEX ix ON tt_1(ddl_case); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; CREATE INDEX ix ON tt_1(ddl_case) --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (12); -DROP INDEX ix ON tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; DROP INDEX ix ON tt_1 --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (11); -CREATE TEMPORARY TABLE tt_xx (a int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx (a int) -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (10); -ALTER TABLE tt_xx ADD COLUMN (b int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (9); -ALTER TABLE tt_xx RENAME new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (8); -DROP TEMPORARY TABLE IF EXISTS new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `new_tt_xx` /* generated by server */ -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (7); -CREATE TABLE tt_xx (a int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE tt_xx (a int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (6); -ALTER TABLE tt_xx ADD COLUMN (b int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER TABLE tt_xx ADD COLUMN (b int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (5); -RENAME TABLE tt_xx TO new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; RENAME TABLE tt_xx TO new_tt_xx -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (4); -TRUNCATE TABLE new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE new_tt_xx -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (3); -DROP TABLE IF EXISTS tt_xx, new_tt_xx; -Warnings: -Note 1051 Unknown table 'tt_xx' --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `tt_xx`,`new_tt_xx` /* generated by server */ -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (2); -CREATE DATABASE db; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # CREATE DATABASE db --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (1); -DROP DATABASE IF EXISTS db; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # DROP DATABASE IF EXISTS db --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - -################################################################################### -# CHECK CONSISTENCY -################################################################################### -Comparing tables master:test.tt_1 and slave:test.tt_1 -################################################################################### -# CLEAN -################################################################################### -DROP TABLE tt_1; -DROP TABLE tt_2; -DROP TABLE nt_1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result deleted file mode 100644 index 43f6152b4db..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result +++ /dev/null @@ -1,243 +0,0 @@ -==== Initialization ==== -include/master-slave.inc -[connection master] ----- setup master ---- -CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM; -CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB; -CREATE TABLE myisam_ndb (a INT) ENGINE=MYISAM; -CREATE TABLE ndb_myisam (a INT) ENGINE=NDB; -CREATE TABLE innodb_ndb (a INT) ENGINE=INNODB; -CREATE TABLE ndb_innodb (a INT) ENGINE=NDB; -SHOW CREATE TABLE myisam_innodb; -Table Create Table -myisam_innodb CREATE TABLE `myisam_innodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE innodb_myisam; -Table Create Table -innodb_myisam CREATE TABLE `innodb_myisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SHOW CREATE TABLE myisam_ndb; -Table Create Table -myisam_ndb CREATE TABLE `myisam_ndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE ndb_myisam; -Table Create Table -ndb_myisam CREATE TABLE `ndb_myisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE innodb_ndb; -Table Create Table -innodb_ndb CREATE TABLE `innodb_ndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SHOW CREATE TABLE ndb_innodb; -Table Create Table -ndb_innodb CREATE TABLE `ndb_innodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ----- setup slave with different engines ---- -DROP TABLE myisam_innodb, innodb_myisam; -DROP TABLE myisam_ndb, ndb_myisam; -DROP TABLE innodb_ndb, ndb_innodb; -CREATE TABLE myisam_innodb (a INT) ENGINE=INNODB; -CREATE TABLE innodb_myisam (a INT) ENGINE=MYISAM; -CREATE TABLE myisam_ndb (a INT) ENGINE=NDB; -CREATE TABLE ndb_myisam (a INT) ENGINE=MYISAM; -CREATE TABLE innodb_ndb (a INT) ENGINE=NDB; -CREATE TABLE ndb_innodb (a INT) ENGINE=INNODB; -SHOW CREATE TABLE myisam_innodb; -Table Create Table -myisam_innodb CREATE TABLE `myisam_innodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SHOW CREATE TABLE innodb_myisam; -Table Create Table -innodb_myisam CREATE TABLE `innodb_myisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE myisam_ndb; -Table Create Table -myisam_ndb CREATE TABLE `myisam_ndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE ndb_myisam; -Table Create Table -ndb_myisam CREATE TABLE `ndb_myisam` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE innodb_ndb; -Table Create Table -innodb_ndb CREATE TABLE `innodb_ndb` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE ndb_innodb; -Table Create Table -ndb_innodb CREATE TABLE `ndb_innodb` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -==== AUTOCOMMIT=0, transactions ==== ----- COMMIT ---- -SET AUTOCOMMIT = 0; -BEGIN; -INSERT INTO myisam_innodb VALUES (1); -INSERT INTO myisam_innodb VALUES (2); -COMMIT; -BEGIN; -INSERT INTO innodb_myisam VALUES (3); -INSERT INTO innodb_myisam VALUES (4); -COMMIT; -BEGIN; -INSERT INTO myisam_ndb VALUES (5); -INSERT INTO myisam_ndb VALUES (6); -COMMIT; -BEGIN; -INSERT INTO ndb_myisam VALUES (7); -INSERT INTO ndb_myisam VALUES (8); -COMMIT; -BEGIN; -INSERT INTO ndb_innodb VALUES (9); -INSERT INTO ndb_innodb VALUES (10); -COMMIT; -BEGIN; -INSERT INTO innodb_ndb VALUES (11); -INSERT INTO innodb_ndb VALUES (12); -COMMIT; ----- ROLLBACK ---- -BEGIN; -INSERT INTO innodb_myisam VALUES (15); -INSERT INTO innodb_myisam VALUES (16); -ROLLBACK; -BEGIN; -INSERT INTO ndb_myisam VALUES (19); -INSERT INTO ndb_myisam VALUES (20); -ROLLBACK; -BEGIN; -INSERT INTO ndb_innodb VALUES (21); -INSERT INTO ndb_innodb VALUES (22); -ROLLBACK; -BEGIN; -INSERT INTO innodb_ndb VALUES (23); -INSERT INTO innodb_ndb VALUES (24); -ROLLBACK; -==== AUTOCOMMIT=1, transactions ==== ----- COMMIT ---- -SET AUTOCOMMIT = 1; -BEGIN; -INSERT INTO myisam_innodb VALUES (25); -INSERT INTO myisam_innodb VALUES (26); -COMMIT; -BEGIN; -INSERT INTO innodb_myisam VALUES (27); -INSERT INTO innodb_myisam VALUES (28); -COMMIT; -BEGIN; -INSERT INTO myisam_ndb VALUES (29); -INSERT INTO myisam_ndb VALUES (30); -COMMIT; -BEGIN; -INSERT INTO ndb_myisam VALUES (31); -INSERT INTO ndb_myisam VALUES (32); -COMMIT; -BEGIN; -INSERT INTO ndb_innodb VALUES (33); -INSERT INTO ndb_innodb VALUES (34); -COMMIT; -BEGIN; -INSERT INTO innodb_ndb VALUES (35); -INSERT INTO innodb_ndb VALUES (36); -COMMIT; ----- ROLLBACK ---- -BEGIN; -INSERT INTO innodb_myisam VALUES (39); -INSERT INTO innodb_myisam VALUES (40); -ROLLBACK; -BEGIN; -INSERT INTO ndb_myisam VALUES (43); -INSERT INTO ndb_myisam VALUES (44); -ROLLBACK; -BEGIN; -INSERT INTO ndb_innodb VALUES (45); -INSERT INTO ndb_innodb VALUES (46); -ROLLBACK; -BEGIN; -INSERT INTO innodb_ndb VALUES (47); -INSERT INTO innodb_ndb VALUES (48); -ROLLBACK; -==== AUTOCOMMIT=1, single statements ==== -INSERT INTO myisam_innodb VALUES (49); -INSERT INTO myisam_innodb VALUES (50); -INSERT INTO innodb_myisam VALUES (51); -INSERT INTO innodb_myisam VALUES (52); -INSERT INTO myisam_ndb VALUES (53); -INSERT INTO myisam_ndb VALUES (54); -INSERT INTO ndb_myisam VALUES (55); -INSERT INTO ndb_myisam VALUES (56); -INSERT INTO ndb_innodb VALUES (57); -INSERT INTO ndb_innodb VALUES (58); -INSERT INTO innodb_ndb VALUES (59); -INSERT INTO innodb_ndb VALUES (60); -==== AUTOCOMMIT=0, single statements, myisam on master ==== -SET AUTOCOMMIT = 0; -==== Show results ==== -SELECT * FROM myisam_innodb ORDER BY a; -a -1 -2 -25 -26 -49 -50 -SELECT * FROM innodb_myisam ORDER BY a; -a -3 -4 -27 -28 -51 -52 -SELECT * FROM myisam_ndb ORDER BY a; -a -5 -6 -29 -30 -53 -54 -SELECT * FROM ndb_myisam ORDER BY a; -a -7 -8 -31 -32 -55 -56 -SELECT * FROM innodb_ndb ORDER BY a; -a -11 -12 -35 -36 -59 -60 -SELECT * FROM ndb_innodb ORDER BY a; -a -9 -10 -33 -34 -57 -58 -include/diff_tables.inc [master:myisam_innodb, slave:myisam_innodb] -include/diff_tables.inc [master:innodb_myisam, slave:innodb_myisam] -include/diff_tables.inc [master:myisam_ndb, slave:myisam_ndb] -include/diff_tables.inc [master:ndb_myisam, slave:ndb_myisam] -include/diff_tables.inc [master:innodb_ndb, slave:innodb_ndb] -include/diff_tables.inc [master:ndb_innodb, slave:ndb_innodb] -==== Clean up ==== -drop table myisam_innodb, innodb_myisam; -drop table myisam_ndb, ndb_myisam; -drop table innodb_ndb, ndb_innodb; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result deleted file mode 100644 index d048161a392..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result +++ /dev/null @@ -1,54 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -reset master; -SHOW TABLES; -Tables_in_test -t1 -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -@the_epoch:=MAX(epoch) - -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -stop slave; -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.ndb_binlog_index WHERE epoch = ; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) -<<<<<<< TREE -107 master-bin.000001 -======= -106 master-bin.000001 ->>>>>>> MERGE-SOURCE -include/rpl_change_topology.inc [new topology=3->2] -include/start_slave.inc -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -INSERT INTO t1 VALUES ("row5","E",5); -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -row5 E 5 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -row5 E 5 -==== clean up ==== -DROP TABLE t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result deleted file mode 100644 index f3142678ff8..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result +++ /dev/null @@ -1,52 +0,0 @@ -include/master-slave.inc -[connection master] -drop table if exists t1,t2; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -CREATE TABLE t2 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -INSERT INTO t1 VALUES (NULL, 0); -INSERT INTO t1 SELECT NULL, 0 FROM t1; -INSERT INTO t2 VALUES (NULL, 0), (NULL,1); -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 4 -2 5 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -SELECT * FROM t1 ORDER BY a; -a b -1 4 -2 5 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -drop table t1,t2; -reset master; -CREATE TABLE t1 ( a INT ); -INSERT INTO t1 VALUES (0); -UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b; -select * from t1; -a -3 -select * from t1; -a -3 -drop table t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result deleted file mode 100644 index d1cc10a930c..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result +++ /dev/null @@ -1,194 +0,0 @@ -include/master-slave.inc -[connection master] - --------- Test for BUG#9361 -------- -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -CREATE TABLE t2 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -INSERT INTO t1 VALUES (NULL, 0); -INSERT INTO t1 SELECT NULL, 0 FROM t1; -INSERT INTO t2 VALUES (NULL, 0), (NULL,1); -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -UPDATE t2, (SELECT a FROM t1 ORDER BY a) AS t SET t2.b = t.a+5 ; -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 6 -2 6 -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 6 -2 6 -drop table t1,t2; - --------- Test 1 for BUG#9361 -------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -CREATE TABLE t1 ( -a1 char(30), -a2 int, -a3 int, -a4 char(30), -a5 char(30) -); -CREATE TABLE t2 ( -b1 int, -b2 char(30) -); -INSERT INTO t1 VALUES ('Yes', 1, NULL, 'foo', 'bar'); -INSERT INTO t2 VALUES (1, 'baz'); -UPDATE t1 a, t2 -SET a.a1 = 'No' -WHERE a.a2 = -(SELECT b1 -FROM t2 -WHERE b2 = 'baz') -AND a.a3 IS NULL -AND a.a4 = 'foo' -AND a.a5 = 'bar'; -SELECT * FROM t1; -a1 a2 a3 a4 a5 -No 1 NULL foo bar -SELECT * FROM t2; -b1 b2 -1 baz -DROP TABLE t1, t2; - --------- Test 2 for BUG#9361 -------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; -CREATE TABLE t1 ( -i INT, -j INT, -x INT, -y INT, -z INT -); -CREATE TABLE t2 ( -i INT, -k INT, -x INT, -y INT, -z INT -); -CREATE TABLE t3 ( -j INT, -k INT, -x INT, -y INT, -z INT -); -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); -UPDATE t1 AS a -INNER JOIN t2 AS b -ON a.i = b.i -INNER JOIN t3 AS c -ON a.j = c.j AND b.k = c.k -SET a.x = b.x, -a.y = b.y, -a.z = ( -SELECT sum(z) -FROM t3 -WHERE y = 34 -) -WHERE b.x = 23; -SELECT * FROM t1; -i j x y z -1 2 23 24 71 -DROP TABLE t1, t2, t3; -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 't1' -DROP TABLE IF EXISTS t2; -Warnings: -Note 1051 Unknown table 't2' -CREATE TABLE t1 ( -idp int(11) NOT NULL default '0', -idpro int(11) default NULL, -price decimal(19,4) default NULL, -PRIMARY KEY (idp) -); -CREATE TABLE t2 ( -idpro int(11) NOT NULL default '0', -price decimal(19,4) default NULL, -nbprice int(11) default NULL, -PRIMARY KEY (idpro) -); -INSERT INTO t1 VALUES -(1,1,'3.0000'), -(2,2,'1.0000'), -(3,1,'1.0000'), -(4,1,'4.0000'), -(5,3,'2.0000'), -(6,2,'4.0000'); -INSERT INTO t2 VALUES -(1,'0.0000',0), -(2,'0.0000',0), -(3,'0.0000',0); -update -t2 -join -( select idpro, min(price) as min_price, count(*) as nbr_price -from t1 -where idpro>0 and price>0 -group by idpro -) as table_price -on t2.idpro = table_price.idpro -set t2.price = table_price.min_price, -t2.nbprice = table_price.nbr_price; -select "-- MASTER AFTER JOIN --" as ""; - --- MASTER AFTER JOIN -- -select * from t1; -idp idpro price -1 1 3.0000 -2 2 1.0000 -3 1 1.0000 -4 1 4.0000 -5 3 2.0000 -6 2 4.0000 -select * from t2; -idpro price nbprice -1 1.0000 3 -2 1.0000 2 -3 2.0000 1 -select "-- SLAVE AFTER JOIN --" as ""; - --- SLAVE AFTER JOIN -- -select * from t1; -idp idpro price -1 1 3.0000 -2 2 1.0000 -3 1 1.0000 -4 1 4.0000 -5 3 2.0000 -6 2 4.0000 -select * from t2; -idpro price nbprice -1 1.0000 3 -2 1.0000 2 -3 2.0000 1 -DROP TABLE t1, t2; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result deleted file mode 100644 index d167a85bb8b..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result +++ /dev/null @@ -1,916 +0,0 @@ -include/master-slave.inc -[connection master] -SET storage_engine=myisam; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, - PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, - PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, - PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, - PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, - PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, - PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, - PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, - PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, - PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (id) -(PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, - PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, - PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH ( YEAR(t)) -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY () -PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result deleted file mode 100644 index 6aa64973611..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result +++ /dev/null @@ -1,16 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -create table t1 (a int) engine=NDB; -reset slave; -start slave; -stop slave; -start slave; -select max(a) from t1; -max(a) -8000 -drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result deleted file mode 100644 index 801e1c0a9f2..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result +++ /dev/null @@ -1,51 +0,0 @@ -include/master-slave.inc -[connection master] -DROP DATABASE IF EXISTS replica; -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -Tables_in_test -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -Tables_in_replica -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -SHOW TABLES; -Tables_in_test -USE replica; -SHOW TABLES; -Tables_in_replica -t2 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE test; -SHOW TABLES; -Tables_in_test -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result deleted file mode 100644 index 333e943d3ca..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result +++ /dev/null @@ -1,52 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE t1 (word CHAR(20) NOT NULL); -LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; -LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; -SELECT * FROM t1 ORDER BY word LIMIT 10; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aaron -Aaron -Aaron -Aaron -Ababa -Ababa -STOP SLAVE; -SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); -START SLAVE; -SET PASSWORD FOR root@"localhost" = PASSWORD(''); -CREATE TABLE t3(n INT); -INSERT INTO t3 VALUES(1),(2); -SELECT * FROM t3 ORDER BY n; -n -1 -2 -SELECT SUM(LENGTH(word)) FROM t1; -SUM(LENGTH(word)) -1022 -DROP TABLE t1,t3; -CREATE TABLE t1 (n INT) ENGINE=NDB; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -LOCK TABLES t1 READ; -START SLAVE; -UNLOCK TABLES; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -DROP TABLE t1; -CREATE TABLE t1 (n INT); -INSERT INTO t1 VALUES(3456); -SELECT n FROM t1; -n -3456 -DROP TABLE t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result deleted file mode 100644 index 0f2732069ec..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result +++ /dev/null @@ -1,661 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -######################################################################### -# CONFIGURATION -######################################################################### -CREATE TABLE tt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = NDB; -CREATE TABLE tt_2 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = NDB; -CREATE TABLE nt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = MyIsam; -INSERT INTO tt_1(ddl_case) VALUES(0); -INSERT INTO tt_2(ddl_case) VALUES(0); -######################################################################### -# CHECK IMPLICT COMMIT -######################################################################### -SET AUTOCOMMIT= 0; --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (41); -LOAD INDEX INTO CACHE nt_1 IGNORE LEAVES; -Table Op Msg_type Msg_text -test.nt_1 preload_keys status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (test.tt_2) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (40); -LOAD INDEX INTO CACHE tt_1, tt_2 IGNORE LEAVES; -Table Op Msg_type Msg_text -test.tt_1 preload_keys note The storage engine for the table doesn't support preload_keys -test.tt_2 preload_keys note The storage engine for the table doesn't support preload_keys --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (39); -ANALYZE TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 analyze status Table is already up to date --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ANALYZE TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (38); -CHECK TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 check status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (37); -OPTIMIZE TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 optimize status Table is already up to date --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; OPTIMIZE TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (36); -REPAIR TABLE nt_1; -Table Op Msg_type Msg_text -test.nt_1 repair status OK --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; REPAIR TABLE nt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (35); -LOCK TABLES tt_1 WRITE; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (34); -UNLOCK TABLES; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (33); -CREATE USER 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE USER 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (32); -GRANT ALL ON *.* TO 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; GRANT ALL ON *.* TO 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (31); -SET PASSWORD FOR 'user'@'localhost' = PASSWORD('newpass'); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; SET PASSWORD FOR 'user'@'localhost'='*D8DECEC305209EEFEC43008E1D420E1AA06B19E0' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (mysql.user) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (30); -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (29); -RENAME USER 'user'@'localhost' TO 'user_new'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; RENAME USER 'user'@'localhost' TO 'user_new'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (28); -DROP USER 'user_new'@'localhost'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP USER 'user_new'@'localhost' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (27); -CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (26); -ALTER EVENT evt COMMENT 'evt'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER EVENT evt COMMENT 'evt' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (25); -DROP EVENT evt; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP EVENT evt -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (24); -CREATE TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (23); -DROP TRIGGER tr; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP TRIGGER tr -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (22); -CREATE FUNCTION fc () RETURNS VARCHAR(64) RETURN "fc"; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `fc`() RETURNS varchar(64) CHARSET latin1 -RETURN "fc" -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (21); -ALTER FUNCTION fc COMMENT 'fc'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER FUNCTION fc COMMENT 'fc' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (20); -DROP FUNCTION fc; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP FUNCTION fc -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (19); -CREATE PROCEDURE pc () UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `pc`() -UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (18); -ALTER PROCEDURE pc COMMENT 'pc'; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER PROCEDURE pc COMMENT 'pc' -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (17); -DROP PROCEDURE pc; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP PROCEDURE pc -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (16); -CREATE VIEW v AS SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (15); -ALTER VIEW v AS SELECT * FROM tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS SELECT * FROM tt_1 -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (14); -DROP VIEW v; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP VIEW v -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (13); -CREATE INDEX ix ON tt_1(ddl_case); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; CREATE INDEX ix ON tt_1(ddl_case) --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (12); -DROP INDEX ix ON tt_1; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; DROP INDEX ix ON tt_1 --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (11); -CREATE TEMPORARY TABLE tt_xx (a int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (10); -ALTER TABLE tt_xx ADD COLUMN (b int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (9); -ALTER TABLE tt_xx RENAME new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (8); -DROP TEMPORARY TABLE IF EXISTS new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `new_tt_xx` /* generated by server */ -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (7); -CREATE TABLE tt_xx (a int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE tt_xx (a int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (6); -ALTER TABLE tt_xx ADD COLUMN (b int); --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; ALTER TABLE tt_xx ADD COLUMN (b int) -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (5); -RENAME TABLE tt_xx TO new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; RENAME TABLE tt_xx TO new_tt_xx -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (4); -TRUNCATE TABLE new_tt_xx; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE new_tt_xx -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (3); -DROP TABLE IF EXISTS tt_xx, new_tt_xx; -Warnings: -Note 1051 Unknown table 'tt_xx' --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `tt_xx`,`new_tt_xx` /* generated by server */ -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (2); -CREATE DATABASE db; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # CREATE DATABASE db --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -INSERT INTO tt_1(ddl_case) VALUES (1); -DROP DATABASE IF EXISTS db; --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- --b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b- -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.tt_1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # DROP DATABASE IF EXISTS db --e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e- - -################################################################################### -# CHECK CONSISTENCY -################################################################################### -Comparing tables master:test.tt_1 and slave:test.tt_1 -################################################################################### -# CLEAN -################################################################################### -DROP TABLE tt_1; -DROP TABLE tt_2; -DROP TABLE nt_1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result deleted file mode 100644 index b37f55b36a4..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result +++ /dev/null @@ -1,22 +0,0 @@ -include/master-slave.inc -[connection master] -include/rpl_reset.inc -CREATE TABLE t1 (c1 BIT, c2 INT) Engine=NDB; -INSERT INTO `t1` VALUES ( 1, 1 ); -UPDATE t1 SET c1=NULL where c2=1; -include/diff_tables.inc [master:t1, slave:t1] -DELETE FROM t1 WHERE c2=1 LIMIT 1; -include/diff_tables.inc [master:t1, slave:t1] -DROP TABLE t1; -include/rpl_reset.inc -CREATE TABLE t1 (c1 CHAR) Engine=NDB; -INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; -SELECT * FROM t1; -c1 -w -UPDATE t1 SET c1=NULL WHERE c1='w'; -include/diff_tables.inc [master:t1, slave:t1] -DELETE FROM t1 LIMIT 2; -include/diff_tables.inc [master:t1, slave:t1] -DROP TABLE t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result deleted file mode 100644 index e28e438610f..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result +++ /dev/null @@ -1,46 +0,0 @@ -include/master-slave.inc -[connection master] -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=NDBCLUSTER; -CREATE PROCEDURE test.p1() -BEGIN -INSERT INTO test.t1 VALUES (4); -SELECT get_lock("test", 100); -UPDATE test.t1 set a=a+4 WHERE a=4; -END| -CREATE PROCEDURE test.p2() -BEGIN -UPDATE test.t1 SET a=a+1; -END| -SELECT get_lock("test", 200); -get_lock("test", 200) -1 -CALL test.p1(); -CALL test.p2(); -SELECT release_lock("test"); -release_lock("test") -1 -SELECT * FROM test.t1; -a -5 -SELECT * FROM test.t1; -a -5 -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=NDBCLUSTER; -CALL test.p2(); -CALL test.p1(); -get_lock("test", 100) -0 -SELECT * FROM test.t1; -a -8 -SELECT * FROM test.t1; -a -8 -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result deleted file mode 100644 index b1e18088cf8..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result +++ /dev/null @@ -1,43 +0,0 @@ -include/master-slave.inc -[connection master] -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -CREATE TABLE IF NOT EXISTS t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=NDBCLUSTER; -CREATE TABLE IF NOT EXISTS t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=NDBCLUSTER; -CREATE PROCEDURE p1() -BEGIN -DECLARE done INT DEFAULT 0; -DECLARE spa CHAR(16); -DECLARE spb INT; -DECLARE cur1 CURSOR FOR SELECT name, -(YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5) - -# Now check that that is in the apply_status table is consistant -# with what is in the binlog - -# since insert is done with transactional engine, expect a BEGIN -# at - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -# Now the insert, one step after - -show binlog events from limit 1,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (1,2) - -# and the COMMIT should be at - -show binlog events from limit 2,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -begin; -insert into t1 values (2,3); -insert into t2 values (3,4); -commit; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # BEGIN - -show binlog events from limit 1,2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (2,3) -master-bin.000001 # Query # # use `test`; insert into t2 values (3,4) - -show binlog events from limit 3,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid # # COMMIT /* XID */ - -DROP TABLE test.t1, test.t2; -SHOW TABLES; -Tables_in_test - -*** Test 2 *** - -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; - -CREATE TABLE tpcb.account (id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)); - -CREATE TABLE tpcb.branch (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid)); - -CREATE TABLE tpcb.teller (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)); - -CREATE TABLE tpcb.history (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)); - ---- Create stored procedures & functions --- - - -*** Stored Procedures Created *** - -USE tpcb; -ALTER TABLE account ENGINE NDB; -ALTER TABLE branch ENGINE NDB; -ALTER TABLE teller ENGINE NDB; -ALTER TABLE history ENGINE NDB; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 6,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -** Test 3 ** - -FLUSH LOGS; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000002' from limit 6,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Xid 1 COMMIT /* XID */ - -** Test 4 ** - -include/rpl_reset.inc - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 6,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -*** DUMP MASTER & SLAVE FOR COMPARE ******** -DROP DATABASE tpcb; -****** Do dumps compare ************ -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result deleted file mode 100644 index 457933ae5f7..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result +++ /dev/null @@ -1,88 +0,0 @@ -include/master-slave.inc -[connection master] -STOP SLAVE; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4"); -CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ; -INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0); -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 1 row2 -1 0 row3 -0 0 row4 -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; -hex(c2) hex(c3) c1 -1 1 ABC -0 1 BCDEF -1 0 CD -0 0 DEFGHIJKL -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info -(id INT, backup_id INT) ENGINE = MEMORY; -LOAD DATA INFILE '/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -DROP TABLE test.backup_info; -UPDATE t1 SET c2=0 WHERE c3="row2"; -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 0 row2 -1 0 row3 -0 0 row4 -SHOW TABLES; -Tables_in_ndbsynctest -DROP DATABASE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -SHOW TABLES; -Tables_in_ndbsynctest -t1 -t2 -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 1 row2 -1 0 row3 -0 0 row4 -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; -hex(c2) hex(c3) c1 -1 1 ABC -0 1 BCDEF -1 0 CD -0 0 DEFGHIJKL -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -@the_epoch:=MAX(epoch) - -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.ndb_binlog_index WHERE epoch > ORDER BY epoch ASC LIMIT 1; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -CHANGE MASTER TO -master_log_file = 'master-bin.000001', -master_log_pos = ; -START SLAVE; -include/check_slave_is_running.inc -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 0 row2 -1 0 row3 -0 0 row4 -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; -hex(c2) hex(c3) c1 -1 1 ABC -0 1 BCDEF -1 0 CD -0 0 DEFGHIJKL -DROP DATABASE ndbsynctest; -STOP SLAVE; -reset master; -select * from mysql.ndb_binlog_index; -Position File epoch inserts updates deletes schemaops -reset slave; -select * from mysql.ndb_apply_status; -server_id epoch log_name start_pos end_pos -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result deleted file mode 100644 index c6d9e29183e..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result +++ /dev/null @@ -1,27 +0,0 @@ -include/master-slave.inc -[connection master] -DROP TRIGGER test.t1_bi_t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=NDB; -CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=NDB; -CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)// -INSERT INTO test.t2 VALUES (1, 0.0); -INSERT INTO test.t2 VALUES (1, 0.0); -Got one of the listed errors -select * from test.t1; -n d -1 1.234 -select * from test.t2; -n f -1 0 -select * from test.t1; -n d -1 1.234 -select * from test.t2; -n f -1 0 -DROP TRIGGER test.t1_bi_t2; -DROP TABLE test.t1; -DROP TABLE test.t2; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result b/mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result deleted file mode 100644 index 5de6914882d..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result +++ /dev/null @@ -1,8 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -Running ndbapi_simple_dual -Running mgmapi_logevent diff --git a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result deleted file mode 100644 index 7ea82056322..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result +++ /dev/null @@ -1,644 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'NDB' ; -SELECT * FROM t1; -C1 C2 -SELECT * FROM t1; -C1 C2 -INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); -INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -DELETE FROM t1 WHERE C1 = C2; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'NDB' ; -INSERT INTO t2 -VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), -(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -DELETE FROM t2 WHERE c1 % 4 = 0; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -UPDATE t2 SET c12='X'; -CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'NDB' ; -INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); -INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -DELETE FROM t3 WHERE C1 = C2; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'NDB' ; -INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -DELETE FROM t6 WHERE C1 = C2; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'NDB' ; -INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; -SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; -C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 -X Q 2 1 R 1 X Y 2 S 1 -X Q 2 1 R 1 X Z 2 S 2 -X Q 2 2 R 4 X Y 2 S 1 -X Q 2 2 R 4 X Z 2 S 2 -X Q 2 3 R 9 X Y 2 S 1 -X Q 2 3 R 9 X Z 2 S 2 -X Q 2 5 R 25 X Y 2 S 1 -X Q 2 5 R 25 X Z 2 S 2 -X Q 2 6 R 36 X Y 2 S 1 -X Q 2 6 R 36 X Z 2 S 2 -X Q 2 7 R 49 X Y 2 S 1 -X Q 2 7 R 49 X Z 2 S 2 -X Q 2 9 R 81 X Y 2 S 1 -X Q 2 9 R 81 X Z 2 S 2 -X Q 3 1 R 1 X Y 2 S 1 -X Q 3 1 R 1 X Z 2 S 2 -X Q 3 2 R 4 X Y 2 S 1 -X Q 3 2 R 4 X Z 2 S 2 -X Q 3 3 R 9 X Y 2 S 1 -X Q 3 3 R 9 X Z 2 S 2 -X Q 3 5 R 25 X Y 2 S 1 -X Q 3 5 R 25 X Z 2 S 2 -X Q 3 6 R 36 X Y 2 S 1 -X Q 3 6 R 36 X Z 2 S 2 -X Q 3 7 R 49 X Y 2 S 1 -X Q 3 7 R 49 X Z 2 S 2 -X Q 3 9 R 81 X Y 2 S 1 -X Q 3 9 R 81 X Z 2 S 2 -X Q 5 1 R 1 X Y 2 S 1 -X Q 5 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 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 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 -X Q 5 3 R 9 X Y 2 S 1 -X Q 5 3 R 9 X Z 2 S 2 -X Q 5 5 R 25 X Y 2 S 1 -X Q 5 5 R 25 X Z 2 S 2 -X Q 5 6 R 36 X Y 2 S 1 -X Q 5 6 R 36 X Z 2 S 2 -X Q 5 7 R 49 X Y 2 S 1 -X Q 5 7 R 49 X Z 2 S 2 -X Q 5 9 R 81 X Y 2 S 1 -X Q 5 9 R 81 X Z 2 S 2 -CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'NDB' ; -INSERT INTO t4 SET C1 = 1; -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'NDB' ; ---- on slave: original values --- -INSERT INTO t7 VALUES (1,3), (2,6), (3,9); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 3 -2 6 -3 9 -set @@global.slave_exec_mode= 'IDEMPOTENT'; ---- on master: new values inserted --- -INSERT INTO t7 VALUES (1,2), (2,4), (3,6); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 -set @@global.slave_exec_mode= default; ---- on slave: old values should be overwritten by replicated values --- -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 ---- on master --- -CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'NDB' ; -INSERT INTO t8 VALUES (99,99,99); -INSERT INTO t8 VALUES (99,22,33); -ERROR 23000: Duplicate entry '99' for key 'PRIMARY' -INSERT INTO t8 VALUES (11,99,33); -ERROR 23000: Duplicate entry '99' for key 'b' -INSERT INTO t8 VALUES (11,22,99); -ERROR 23000: Duplicate entry '99' for key 'c' -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 -INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 6 -3 6 9 -99 99 99 -set @@global.slave_exec_mode= 'IDEMPOTENT'; ---- on master --- -INSERT INTO t8 VALUES (2,4,8); -set @@global.slave_exec_mode= default; ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 8 -3 6 9 -99 99 99 -**** Test for BUG#31552 **** -**** On Master **** -DELETE FROM t1; -include/rpl_reset.inc -**** On Master **** -INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); -**** On Master **** -set @@global.slave_exec_mode= 'IDEMPOTENT'; -DELETE FROM t1 WHERE C1 = 'L'; -DELETE FROM t1; -SELECT COUNT(*) FROM t1 ORDER BY c1,c2; -COUNT(*) 0 -set @@global.slave_exec_mode= default; -include/check_slave_is_running.inc -SELECT COUNT(*) FROM t1 ORDER BY c1,c2; -COUNT(*) 0 -**** Test for BUG#37076 **** -**** On Master **** -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE); -INSERT INTO t1 VALUES( -'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14'); -**** On Slave **** -SELECT * FROM t1; -a b c -2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14 -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; -CREATE TABLE t1 (i INT NOT NULL, -c CHAR(16) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -CREATE TABLE t2 (i INT NOT NULL, -c CHAR(16) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL; -CREATE TABLE t3 (i INT NOT NULL, -c CHAR(128) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL; -CREATE TABLE t4 (i INT NOT NULL, -c CHAR(128) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -CREATE TABLE t5 (i INT NOT NULL, -c CHAR(255) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL; -CREATE TABLE t6 (i INT NOT NULL, -c CHAR(255) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL; -CREATE TABLE t7 (i INT NOT NULL, -c CHAR(255) CHARACTER SET utf8 NOT NULL, -j INT NOT NULL) ENGINE = 'NDB' ; -SET @saved_slave_type_conversions = @@slave_type_conversions; -SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; -[expecting slave to replicate correctly] -INSERT INTO t1 VALUES (1, "", 1); -INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -include/diff_tables.inc [master:t1, slave:t1] -[expecting slave to replicate correctly] -INSERT INTO t2 VALUES (1, "", 1); -INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -include/diff_tables.inc [master:t2, slave:t2] -<<<<<<< TREE -SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; -======= -[expecting slave to stop] -INSERT INTO t3 VALUES (1, "", 1); -INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); -include/wait_for_slave_sql_error.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.' ->>>>>>> MERGE-SOURCE -include/rpl_reset.inc -[expecting slave to replicate correctly] -INSERT INTO t4 VALUES (1, "", 1); -INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -include/diff_tables.inc [master:t4, slave:t4] -[expecting slave to stop] -INSERT INTO t5 VALUES (1, "", 1); -INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -<<<<<<< TREE -include/wait_for_slave_sql_error.inc [errno=1677 ] -Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)'' -======= -include/wait_for_slave_sql_error.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.' ->>>>>>> MERGE-SOURCE -include/rpl_reset.inc -[expecting slave to stop] -INSERT INTO t6 VALUES (1, "", 1); -INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -<<<<<<< TREE -include/wait_for_slave_sql_error.inc [errno=1677 ] -Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)'' -======= -include/wait_for_slave_sql_error.inc [errno=1535] -Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.' ->>>>>>> MERGE-SOURCE -include/rpl_reset.inc -[expecting slave to replicate correctly] -INSERT INTO t7 VALUES (1, "", 1); -INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -include/diff_tables.inc [master:t7, slave:t7] -drop table t1, t2, t3, t4, t5, t6, t7; -CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='NDB' ; -INSERT INTO t1 VALUES (1), (2), (3); -UPDATE t1 SET a = 10; -ERROR 23000: Duplicate entry '10' for key 'PRIMARY' -INSERT INTO t1 VALUES (4); -include/diff_tables.inc [master:t1, slave:t1] -drop table t1; -DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 ( -`pk` int(11) NOT NULL AUTO_INCREMENT, -`int_nokey` int(11) NOT NULL, -`int_key` int(11) NOT NULL, -`date_key` date NOT NULL, -`date_nokey` date NOT NULL, -`time_key` time NOT NULL, -`time_nokey` time NOT NULL, -`datetime_key` datetime NOT NULL, -`datetime_nokey` datetime NOT NULL, -`varchar_key` varchar(1) NOT NULL, -`varchar_nokey` varchar(1) NOT NULL, -PRIMARY KEY (`pk`), -KEY `int_key` (`int_key`), -KEY `date_key` (`date_key`), -KEY `time_key` (`time_key`), -KEY `datetime_key` (`datetime_key`), -KEY `varchar_key` (`varchar_key`) -) ENGINE='NDB' ; -INSERT INTO t1 VALUES (1,8,5,'0000-00-00','0000-00-00','10:37:38','10:37:38','0000-00-00 00:00:00','0000-00-00 00:00:00','p','p'),(2,0,9,'0000-00-00','0000-00-00','00:00:00','00:00:00','2007-10-14 00:00:00','2007-10-14 00:00:00','d','d'); -CREATE TABLE t2 ( -`pk` int(11) NOT NULL AUTO_INCREMENT, -`int_nokey` int(11) NOT NULL, -`int_key` int(11) NOT NULL, -`date_key` date NOT NULL, -`date_nokey` date NOT NULL, -`time_key` time NOT NULL, -`time_nokey` time NOT NULL, -`datetime_key` datetime NOT NULL, -`datetime_nokey` datetime NOT NULL, -`varchar_key` varchar(1) NOT NULL, -`varchar_nokey` varchar(1) NOT NULL, -PRIMARY KEY (`pk`), -KEY `int_key` (`int_key`), -KEY `date_key` (`date_key`), -KEY `time_key` (`time_key`), -KEY `datetime_key` (`datetime_key`), -KEY `varchar_key` (`varchar_key`) -) ENGINE='NDB' ; -INSERT INTO t2 VALUES (1,1,6,'2005-12-23','2005-12-23','02:24:28','02:24:28','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),(2,0,3,'2009-09-14','2009-09-14','00:00:00','00:00:00','2000-01-30 16:39:40','2000-01-30 16:39:40','q','q'),(3,0,3,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','c','c'),(4,1,6,'2007-03-29','2007-03-29','15:49:00','15:49:00','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(5,4,0,'2002-12-04','2002-12-04','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','o','o'),(6,9,0,'2005-01-28','2005-01-28','00:00:00','00:00:00','2001-05-18 00:00:00','2001-05-18 00:00:00','w','w'),(7,6,0,'0000-00-00','0000-00-00','06:57:25','06:57:25','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(8,0,0,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','z','z'),(9,4,6,'2006-08-15','2006-08-15','00:00:00','00:00:00','2002-04-12 14:44:25','2002-04-12 14:44:25','j','j'),(10,0,5,'2006-12-20','2006-12-20','10:13:53','10:13:53','2008-07-22 00:00:00','2008-07-22 00:00:00','y','y'),(11,9,7,'0000-00-00','0000-00-00','00:00:00','00:00:00','2004-07-05 00:00:00','2004-07-05 00:00:00','{','{'),(12,4,3,'2007-01-26','2007-01-26','23:00:51','23:00:51','2001-05-16 00:00:00','2001-05-16 00:00:00','f','f'),(13,7,0,'2004-03-27','2004-03-27','00:00:00','00:00:00','2005-01-24 03:30:37','2005-01-24 03:30:37','',''),(14,6,0,'2006-07-26','2006-07-26','18:43:57','18:43:57','0000-00-00 00:00:00','0000-00-00 00:00:00','{','{'),(15,0,6,'2000-01-14','2000-01-14','00:00:00','00:00:00','2000-09-21 00:00:00','2000-09-21 00:00:00','o','o'),(16,9,8,'0000-00-00','0000-00-00','21:15:08','21:15:08','0000-00-00 00:00:00','0000-00-00 00:00:00','a','a'),(17,2,0,'2004-10-27','2004-10-27','00:00:00','00:00:00','2004-03-24 22:13:43','2004-03-24 22:13:43','',''),(18,7,4,'0000-00-00','0000-00-00','08:38:27','08:38:27','2002-03-18 19:51:44','2002-03-18 19:51:44','t','t'),(19,5,3,'2008-03-07','2008-03-07','03:29:07','03:29:07','2007-12-01 18:44:44','2007-12-01 18:44:44','t','t'),(20,0,0,'2002-04-09','2002-04-09','16:06:03','16:06:03','2009-04-22 00:00:00','2009-04-22 00:00:00','n','n'); -DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1; -UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4; -DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1; -DELETE FROM t2 WHERE `pk` < 6 LIMIT 1; -UPDATE t1 SET `int_key` = 6 ORDER BY `pk` LIMIT 3; -DELETE FROM t2 WHERE `pk` < 6 LIMIT 1; -UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6; -ERROR 23000: Duplicate entry '6' for key 'PRIMARY' -DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; -UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; -*** results: t2 must be consistent **** -<<<<<<< TREE -include/diff_tables.inc [master:t2, slave:t2] -======= -include/diff_tables.inc [master:t2, master:t2] ->>>>>>> MERGE-SOURCE -DROP TABLE t1, t2; -EOF OF TESTS -CREATE TABLE t1 (a int) ENGINE='NDB' ; -INSERT IGNORE INTO t1 VALUES (NULL); -INSERT INTO t1 ( a ) VALUES ( 0 ); -INSERT INTO t1 ( a ) VALUES ( 9 ); -INSERT INTO t1 ( a ) VALUES ( 2 ); -INSERT INTO t1 ( a ) VALUES ( 9 ); -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 5 WHERE a = 9; -DELETE FROM t1 WHERE a < 6; -UPDATE t1 SET a = 9 WHERE a < 3; -INSERT INTO t1 ( a ) VALUES ( 3 ); -UPDATE t1 SET a = 0 WHERE a < 4; -UPDATE t1 SET a = 8 WHERE a < 5; -include/diff_tables.inc [master:t1, slave:t1] -drop table t1; -CREATE TABLE t1 (a bit) ENGINE='NDB' ; -INSERT IGNORE INTO t1 VALUES (NULL); -INSERT INTO t1 ( a ) VALUES ( 0 ); -UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; -INSERT INTO t1 ( a ) VALUES ( 5 ); -DELETE FROM t1 WHERE a < 2 LIMIT 4; -DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 9 ); -UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 8 ); -UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; -INSERT INTO t1 ( a ) VALUES ( 4 ); -INSERT INTO t1 ( a ) VALUES ( 3 ); -UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; -DELETE FROM t1 WHERE a = 4 LIMIT 7; -UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; -UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; -DELETE FROM t1 WHERE a < 0 LIMIT 5; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; -DELETE FROM t1 WHERE a < 8 LIMIT 8; -INSERT INTO t1 ( a ) VALUES ( 6 ); -DELETE FROM t1 WHERE a < 6 LIMIT 7; -UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; -UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 7 ); -DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 7 ); -INSERT INTO t1 ( a ) VALUES ( 6 ); -UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; -DELETE FROM t1 WHERE a = 2 LIMIT 9; -DELETE FROM t1 WHERE a = 1 LIMIT 4; -UPDATE t1 SET a = 4 WHERE a = 2 LIMIT 7; -INSERT INTO t1 ( a ) VALUES ( 0 ); -DELETE FROM t1 WHERE a < 3 LIMIT 0; -UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; -INSERT INTO t1 ( a ) VALUES ( 1 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; -include/diff_tables.inc [master:t1, slave:t1] -drop table t1; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result deleted file mode 100644 index 0e9c3c96a3f..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result +++ /dev/null @@ -1,90 +0,0 @@ -include/master-slave.inc -[connection master] -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -3 3 -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -<<<<<<< TREE -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -======= -master-bin.000001 # Query # # use `test`; DROP TABLE t1 ->>>>>>> MERGE-SOURCE -include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result deleted file mode 100644 index d6c57aed41b..00000000000 --- a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result +++ /dev/null @@ -1,91 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 330 table_id: # (test.t1) -master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status) -master-bin.000001 392 Write_rows 1 451 table_id: # -master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F -master-bin.000001 498 Query 1 563 COMMIT -master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1 -master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1 -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -3 3 -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 330 table_id: # (test.t1) -master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status) -master-bin.000001 392 Write_rows 1 451 table_id: # -master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F -master-bin.000001 498 Query 1 563 COMMIT -master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1 -master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1 -master-bin.000001 719 Query 1 836 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 836 Query 1 900 BEGIN -master-bin.000001 900 Table_map 1 943 table_id: # (test.t1) -master-bin.000001 943 Table_map 1 1005 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1005 Write_rows 1 1064 table_id: # -master-bin.000001 1064 Write_rows 1 1111 table_id: # flags: STMT_END_F -master-bin.000001 1111 Query 1 1176 COMMIT -master-bin.000001 1176 Query 1 1240 BEGIN -master-bin.000001 1240 Table_map 1 1283 table_id: # (test.t1) -master-bin.000001 1283 Table_map 1 1345 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1345 Write_rows 1 1404 table_id: # -master-bin.000001 1404 Delete_rows 1 1443 table_id: # flags: STMT_END_F -master-bin.000001 1443 Query 1 1508 COMMIT -master-bin.000001 1508 Query 1 1584 use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def deleted file mode 100644 index 3dca5048213..00000000000 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ /dev/null @@ -1,16 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# : BUG# -# -# Do not use any TAB characters for whitespace. -# -############################################################################## - -rpl_ndb_row_implicit_commit_binlog : Bug#55849 2010-08-09 alik rpl_ndb.rpl_ndb_row_implicit_commit_binlog fails - -# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open -rpl_ndb_2ndb : Bug#45974: rpl_ndb_2ndb fails sporadically diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt deleted file mode 100644 index 9a3f30e4bd0..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new --default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt deleted file mode 100644 index 0d3f1619f1e..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb --ndbcluster=0 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test deleted file mode 100644 index b7473917021..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test +++ /dev/null @@ -1,40 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/master-slave.inc - --- connection slave --- source include/have_innodb.inc - -# Remove any old ndb_apply_status from slaves datadir -let $datadir= `SELECT @@datadir`; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.frm; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.ndb; - -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status - ( server_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - log_name VARCHAR(255) BINARY NOT NULL, - start_pos BIGINT UNSIGNED NOT NULL, - end_pos BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (server_id)) ENGINE=INNODB; - ---source extra/rpl_tests/rpl_ndb_2multi_eng.test - -set @@global.slave_exec_mode= DEFAULT; ---connection slave -drop table mysql.ndb_apply_status; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt deleted file mode 100644 index b63ef44e8fc..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new --default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt deleted file mode 100644 index 9b5f524e131..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=myisam --ndbcluster=0 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test deleted file mode 100644 index e8af9b5b0d8..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test +++ /dev/null @@ -1,39 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/master-slave.inc - --- connection slave - -# Remove any old ndb_apply_status from slaves datadir -let $datadir= `SELECT @@datadir`; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.frm; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.ndb; - -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status - ( server_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - log_name VARCHAR(255) BINARY NOT NULL, - start_pos BIGINT UNSIGNED NOT NULL, - end_pos BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM; - ---source extra/rpl_tests/rpl_ndb_2multi_eng.test - -set @@global.slave_exec_mode= DEFAULT; ---connection slave -drop table mysql.ndb_apply_status; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt deleted file mode 100644 index 5304fd49b6b..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster --log-slave-updates=0 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test deleted file mode 100644 index 1d0ee48bd20..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test +++ /dev/null @@ -1,20 +0,0 @@ -############################################################# -# Author: Rafal Somla -# Date: 2006-08-20 -# Purpose: Trying to test ability to replicate from cluster -# to other engines (innodb, myisam), see also rpl_ndb_2other.test -############################################################## ---source include/have_binlog_format_mixed_or_row.inc ---source include/have_ndb.inc ---source include/ndb_master-slave.inc - -# On master use NDB as storage engine. -connection master; -SET storage_engine=ndb; - ---echo ---echo === NDB -> NDB === ---echo -connection slave; ---source extra/rpl_tests/rpl_ndb_2multi_basic.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt deleted file mode 100644 index 378a377e053..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --loose-ndbcluster=OFF --log-slave-updates=0 --default-storage-engine=MyISAM diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test deleted file mode 100644 index df751214b40..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test +++ /dev/null @@ -1,51 +0,0 @@ -############################################################# -# Author: Rafal Somla -# Date: 2006-08-20 -# Purpose: Trying to test ability to replicate from cluster -# to other engines (innodb, myisam). -############################################################## ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/master-slave.inc - -# On master use NDB as storage engine. -connection master; -SET storage_engine=ndb; - ---echo ---echo === NDB -> MYISAM === ---echo -connection slave; - -# Remove any old ndb_apply_status from slaves datadir -let $datadir= `SELECT @@datadir`; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.frm; ---error 0,1 -remove_file $datadir/mysql/ndb_apply_status.ndb; - -set @old_slave_exec_mode= @@global.slave_exec_mode; -set @@global.slave_exec_mode= 'IDEMPOTENT'; -CREATE TABLE mysql.ndb_apply_status - ( server_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - log_name VARCHAR(255) BINARY NOT NULL, - start_pos BIGINT UNSIGNED NOT NULL, - end_pos BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM; -SET storage_engine=myisam; ---source extra/rpl_tests/rpl_ndb_2multi_basic.test - ---echo ---echo === NDB -> INNODB === ---echo -connection slave; -alter table mysql.ndb_apply_status engine=innodb; -SET storage_engine=innodb; ---source extra/rpl_tests/rpl_ndb_2multi_basic.test - -connection slave; -drop table mysql.ndb_apply_status; -set @@global.slave_exec_mode= @old_slave_exec_mode; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test deleted file mode 100644 index e2bcb143ab0..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test +++ /dev/null @@ -1,9 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc -let $engine_type=NDB; ---source extra/rpl_tests/rpl_row_UUID.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt deleted file mode 100644 index 3f4aff8a321..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate_ignore_db=mysql diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test deleted file mode 100644 index 92f71e294b2..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test +++ /dev/null @@ -1,27 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc --- source include/ndb_master-slave.inc - -# -# Bug#28170 replicate-ignore-db=mysql should not ignore mysql.ndb_apply_status -# -# Slave is started with --replicate-ignore-db=mysql -# -sync_slave_with_master; -echo *** on slave there should be zero rows ***; -select count(*) from mysql.ndb_apply_status; - -connection master; -create table t1 (a int key, b int) engine ndb; -insert into t1 values (1,1); -echo *** on master it should be empty ***; -select * from mysql.ndb_apply_status; - -sync_slave_with_master; -echo *** on slave there should be one row ***; -select count(*) from mysql.ndb_apply_status; - -connection master; -drop table t1; -sync_slave_with_master; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test deleted file mode 100644 index d2921424d6a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test +++ /dev/null @@ -1,119 +0,0 @@ -# -# Test of auto_increment in CRBR -# -##################################### -# By: JBM -# Date: 2006-02-10 -# Change: Augmented test to use with cluster -##################################### ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---echo ***************** Test 1 ************************ ---echo -CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; -insert into t1 values (NULL,1),(NULL,2),(NULL,3); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=NDB; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where b=4; -insert into t1 values (NULL,5),(NULL,6); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; - -drop table t1; - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -# Insert with 2 insert statements to get better testing of logging -insert into t1 values (NULL),(5),(NULL); -insert into t1 values (250),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; -insert into t1 values (1000); -set @@insert_id=400; -insert into t1 values(NULL),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -# Insert with 2 insert statements to get better testing of logging -insert into t1 values (NULL),(5),(NULL),(NULL); -insert into t1 values (500),(NULL),(502),(NULL),(600); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; -set @@insert_id=600; -# We expect a duplicate key error that we will ignore below ---error 1022 -insert into t1 values(600),(NULL),(NULL); -set @@insert_id=600; -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -# -# Test that auto-increment works when slave has rows in the table -# - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; - -sync_slave_with_master; -insert into t1 values(2),(12),(22),(32),(42); -connection master; - -insert into t1 values (NULL),(NULL); -insert into t1 values (3),(NULL),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo ---echo ** Slave should have 2, 12, 22, 32, 42 ** ---echo ** Master will have 2 but not 12, 22, 32, 42 ** ---echo -select * from t1 ORDER BY a; -connection master; - -drop table t1; - -# End cleanup -sync_slave_with_master; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test deleted file mode 100644 index 12bd8d533c5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test +++ /dev/null @@ -1,182 +0,0 @@ -# -# Currently this test only runs in the source tree with the -# ndb/test programs compiled. -# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_bank -# -# 1. start a "bank" application running on the master cluster -# 2. perform online sync of slave -# 3. periodically check consistency of slave -# 4. stop the bank application -# 5. check that the slave and master BANK databases are the same -# - ---source include/have_ndb.inc ---source include/have_ndb_extra.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# kill any trailing processes ---system killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL || true - ---disable_warnings -# initialize master ---connection master -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; ---enable_warnings - -# -# These tables should correspond to the table definitions in -# storage/ndb/test/src/NDBT_Tables.cpp -# ---connection master -USE BANK; -CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - DEPOSIT_COUNT INT UNSIGNED NOT NULL, - DEPOSIT_SUM INT UNSIGNED NOT NULL, - WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, - WITHDRAWAL_SUM INT UNSIGNED NOT NULL, - PURGED INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) - ENGINE = NDB; - -CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, - OWNER INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_ID)) - ENGINE = NDB; - -CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, - ACCOUNT INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - OTHER_ACCOUNT INT UNSIGNED NOT NULL, - TRANSACTION_TYPE INT UNSIGNED NOT NULL, - TIME BIGINT UNSIGNED NOT NULL, - AMOUNT INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) - ENGINE = NDB; - -CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, - VALUE BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) - ENGINE = NDB; - -CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, - DESCRIPTION CHAR(64) NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) - ENGINE = NDB; - -# -# create "BANK" application -# ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/bank/bankCreator >> $NDB_TOOLS_OUTPUT - -# -# start main loop -# repeat backup-restore-check -# - -# set this high if testing to run many syncs in loop ---let $2=1 -while ($2) -{ - -# -# start "BANK" application -# ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/bank/bankTimer -w 5 >> $NDB_TOOLS_OUTPUT & ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/bank/bankMakeGL >> $NDB_TOOLS_OUTPUT & ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/bank/bankTransactionMaker >> $NDB_TOOLS_OUTPUT & - -# -# let the "BANK" run for a while -# ---sleep 5 - ---disable_warnings -# initialize slave for sync ---connection slave -STOP SLAVE; -RESET SLAVE; -# to make sure we drop any ndbcluster tables -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -# create database -CREATE DATABASE BANK; ---enable_warnings - -# -# Time to sync the slave: -# start by taking a backup on master ---connection master -RESET MASTER; ---exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "start backup" >> $NDB_TOOLS_OUTPUT - -# there is no neat way to find the backupid, this is a hack to find it... ---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="$NDB_CONNECTSTRING" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat -CREATE TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM mysql.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; ---exec rm $MYSQLTEST_VARDIR/tmp.dat || true ---replace_column 1 -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; -let the_backup_id=`select @the_backup_id`; - -# restore on slave, first check that nothing is there ---connection slave ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -p 8 -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# -# now setup replication to continue from last epoch ---source include/ndb_setup_slave.inc ---connection slave -START SLAVE; - - -# -# Now loop and check consistency every 2 seconds on slave -# ---connection slave ---let $1=10 -while ($1) -{ - --sleep 2 - --replace_result $MASTER_MYPORT MASTER_PORT - --replace_column 1 7 8 9 16 22 23 33 34 35 - SHOW SLAVE STATUS; - STOP SLAVE; - --exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING_SLAVE ../storage/ndb/test/ndbapi/bank/bankValidateAllGLs >> $NDB_TOOLS_OUTPUT - START SLAVE; - --dec $1 -} - -# -# Stop transactions -# ---exec killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL - -# -# Check that the databases are the same on slave and master -# 1. dump database BANK on both master and slave -# 2. compare, there should be no difference -# ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/master_BANK.sql ---connection master -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (1); ---sync_slave_with_master ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/slave_BANK.sql ---connection master -drop table t1; - -diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BANK.sql; - - --dec $2 -} ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test deleted file mode 100644 index d7594bd2ff7..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test +++ /dev/null @@ -1,263 +0,0 @@ ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - - - -# -# Bug #11087 -# -# connect to the master and create tabe t1 in gotoslave database ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY (`nid`)) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; - ---sync_slave_with_master -# connect to slave and ensure data it there. ---connection slave -select * from t1 order by nid; - ---connection master -delete from t1; -INSERT INTO t1 VALUES(1,"XYZ2","ABC2"); -# Make sure all rows are on the master -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -# Bug #11087 would have row with nid 2 missing -select * from t1 order by nid; - ---connection master -delete from t1; -insert into t1 values(1,"AA", "AA"); -insert into t1 values(2,"BB", "BB"); -insert into t1 values(3,"CC", "CC"); -insert into t1 values(4,"DD", "DD"); - -begin; -# delete+insert = update -delete from t1 where nid = 1; -insert into t1 values (1,"A2", "A2"); - -# update+delete = delete -update t1 set nom="B2" where nid = 2; -delete from t1 where nid = 2; - -# multi-update -update t1 set nom = "D2" where nid = 4; -delete from t1 where nid = 4; -insert into t1 values (4, "D3", "D3"); -update t1 set nom = "D4" where nid = 4; - -# insert+delete = nothing -insert into t1 values (5, "EE", "EE"); -delete from t1 where nid = 5; - -commit; -select * from t1 order by 1; ---sync_slave_with_master ---connection slave -select * from t1 order by 1; ---connection master -DROP table t1; - -# -# Test replication of table with no primary key -# ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD"); -select * from t1 order by nid; - ---sync_slave_with_master -# connect to slave and ensure data it there. ---connection slave -select * from t1 order by nid; - ---connection master -delete from t1 where nid = 2; -INSERT INTO t1 VALUES(4,"EEE","FFF"); -# Make sure all rows are on the master -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - ---connection master -UPDATE t1 set nid=nid+1; -UPDATE t1 set nom="CCP" where nid = 4; -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - ---connection master -DROP table t1; - -# -# Bug #27378 update becomes delete on slave -# - ---connection master -CREATE TABLE `t1` ( - `prid` int(10) unsigned NOT NULL, - `id_type` enum('IMSI','SIP') NOT NULL, - `fkimssub` varchar(50) NOT NULL, - `user_id` varchar(20) DEFAULT NULL, - `password` varchar(20) DEFAULT NULL, - `ptg_nbr` varchar(20) DEFAULT NULL, - `old_tmsi` int(10) unsigned DEFAULT NULL, - `new_tmsi` int(10) unsigned DEFAULT NULL, - `dev_capability` int(10) unsigned DEFAULT NULL, - `dev_oid` bigint(20) unsigned DEFAULT NULL, - `lac_cell_id` bigint(20) unsigned DEFAULT NULL, - `ms_classmark1` int(10) unsigned DEFAULT NULL, - `cipher_key` int(10) unsigned DEFAULT NULL, - `priid_master` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`prid`), - UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL); - -select count(*) from t1; - ---sync_slave_with_master ---connection slave -select count(*) from t1; - ---connection master -update t1 set dev_oid=dev_oid+1; -select count(*) from t1; - ---sync_slave_with_master ---connection slave -select count(*) from t1; - ---connection master -DROP table t1; - -################################################################## -# -# Check that retries are made on the slave on some temporary errors -# - -# -# 1. Deadlock -# ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY USING HASH (`nid`)) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); - -# cause a lock on that row on the slave ---sync_slave_with_master ---connection slave ---echo **** On Slave **** -BEGIN; -UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; - -# set number of retries low so we fail the retries -set GLOBAL slave_transaction_retries=1; - -# now do a change to this row on the master -# will deadlock on the slave because of lock above ---connection master ---echo **** On Master **** -UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; - ---echo **** On Slave **** -# Wait for deadlock to be detected. -# When detected, the slave will stop, so we just wait for it to stop. -connection slave; - -# Replication should have stopped, since max retries were not enough. -# verify with show slave status -# 1205 = ER_LOCK_WAIT_TIMEOUT ---let $slave_sql_errno= 1205 ---source include/wait_for_slave_sql_error.inc - -# now set max retries high enough to succeed, and start slave again -set GLOBAL slave_transaction_retries=10; -source include/start_slave.inc; -# Wait for deadlock to be detected and retried. -# We want to wait until at least one retry has been made, but before -# the slave stops. currently, there is no safe way to do that: we -# would need to access the retry counter, but that is not exposed. -# Failing that, we just wait sufficiently long that one but not all -# retries have been made. See BUG#35183. -sleep 5; - -# commit transaction to release lock on row and let replication succeed -select * from t1 order by nid; -COMMIT; - -# verify that the row succeded to be applied on the slave ---connection master ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - -# cleanup ---connection master -DROP TABLE t1; - - -# -# BUG#18094 -# Slave caches invalid table definition after atlters causes select failure -# ---connection master -CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB; - -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - -ALTER TABLE t1 ADD c2 INT; - ---sync_slave_with_master -connection slave; -SELECT * FROM t1 ORDER BY c1; - -connection master; -ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c2 c2 BLOB; - ---sync_slave_with_master -connection slave; -# here we would get error 1412 prior to bug -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---connection master -TRUNCATE t1; -SELECT count(*) FROM t1; -INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL); ---sync_slave_with_master -connection slave; -SELECT count(*) FROM t1; -SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; - -# cleanup ---connection master -DROP TABLE t1; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-master.opt deleted file mode 100644 index efea2bf1db5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb $EXAMPLE_PLUGIN_OPT --binlog-ignore-db=other diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-slave.opt deleted file mode 100644 index ffa981152ea..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb $EXAMPLE_PLUGIN_OPT diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test deleted file mode 100644 index f950441ddb7..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test +++ /dev/null @@ -1,264 +0,0 @@ -# ==== Purpose ==== -# -# Verify that errors or warnings are issued for all error conditions -# related to deciding the binlog format of a statement. The possible -# errors are listed in a comment above decide_logging_format() in -# sql_base.cc. -# -# ==== Method ==== -# -# Each error condition is executed; we verify that there is an error. -# -# ==== Related bugs ==== -# -# BUG#39934: Slave stops for engine that only support row-based logging -# BUG#42829: binlogging enabled for all schemas regardless of binlog-db-db / binlog-ignore-db -# -# ==== Related test cases ==== -# -# binlog.binlog_unsafe verifies more thoroughly that a warning is -# given for the case when an unsafe statement is executed and -# binlog_format = STATEMENT. - -# Need debug so that 'SET @@session.debug' works. ---source include/have_debug.inc -# Need example plugin because it is the only statement-only engine. ---source include/have_example_plugin.inc -# The test changes binlog_format, so there is no reason to run it -# under more than one binlog format. ---source include/have_binlog_format_row.inc ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/ndb_master-slave.inc - -disable_query_log; -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -call mtr.add_suppression("Slave: Cannot execute statement: impossible to write to binary log"); -enable_query_log; - ---echo ==== Initialize ==== - ---echo [on slave] ---connection slave - -SET @old_binlog_format= @@global.binlog_format; -INSTALL PLUGIN example SONAME 'ha_example.so'; - ---echo [on master] ---connection master - -SET @old_binlog_format= @@global.binlog_format; -INSTALL PLUGIN example SONAME 'ha_example.so'; - -CREATE TABLE t (a VARCHAR(100)) ENGINE = MYISAM; -CREATE TABLE t_self_logging (a VARCHAR(100)) ENGINE = NDB; -CREATE TABLE t_row (a VARCHAR(100)) ENGINE = INNODB; -CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE; -CREATE TABLE t_slave_stmt (a VARCHAR(100)) ENGINE = MYISAM; -CREATE TABLE t_autoinc (a INT KEY AUTO_INCREMENT) ENGINE = MYISAM; -CREATE TABLE t_double_autoinc (a INT KEY AUTO_INCREMENT) ENGINE = MYISAM; - ---eval CREATE TRIGGER trig_autoinc BEFORE INSERT ON t_autoinc FOR EACH ROW BEGIN INSERT INTO t_stmt VALUES ('x'); END ---eval CREATE TRIGGER trig_double_autoinc BEFORE INSERT ON t_double_autoinc FOR EACH ROW BEGIN INSERT INTO t_autoinc VALUES (NULL); END - -CREATE DATABASE other; - -# This makes the innodb table row-only -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; - ---echo [on slave] ---sync_slave_with_master - -DROP TABLE t_slave_stmt; -CREATE TABLE t_slave_stmt (a INT) ENGINE = EXAMPLE; - ---echo [on master] ---connection master - -# This is a format description event. It is needed because any BINLOG -# statement containing a row event must be preceded by a BINLOG -# statement containing a format description event. -BINLOG ' -1gRVSg8BAAAAZgAAAGoAAAABAAQANS4xLjM2LWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAADWBFVKEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC -'; - - ---echo ==== Test ==== - ---echo ---- binlog_format=row ---- - ---echo * Modify tables of more than one engine, one of which is self-logging ---eval CREATE TRIGGER trig_1 AFTER INSERT ON t_self_logging FOR EACH ROW BEGIN INSERT INTO t VALUES (1); END ---error ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE -INSERT INTO t_self_logging VALUES (1); -DROP trigger trig_1; -SELECT * FROM t_self_logging /* Should be empty */; -SELECT * FROM t /* Should be empty */; - ---echo * Modify both row-only and stmt-only table ---eval CREATE TRIGGER trig_2 AFTER INSERT ON t_stmt FOR EACH ROW BEGIN INSERT INTO t_row VALUES(1); END ---error ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE -INSERT INTO t_stmt VALUES (1); -SELECT * FROM t_stmt /* should be empty */; -DROP TRIGGER trig_2; - ---echo * Stmt-only table and binlog_format=row ---error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE -INSERT INTO t_stmt VALUES (1); -SELECT * FROM t_stmt /* should be empty */; - ---echo * Row injection and stmt-only table: in slave sql thread -INSERT INTO t_slave_stmt VALUES (1); ---echo [on slave] ---connection slave -# 1664 = ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE ---let $slave_sql_errno= 1664 ---let $show_slave_sql_error= 1 ---source include/wait_for_slave_sql_error_and_skip.inc ---connection slave -SELECT * FROM t_slave_stmt /* should be empty */; - ---echo [on master] ---connection master ---echo * Row injection and stmt-only table: use BINLOG statement -# This is a Table_map_event and a Write_rows_event. Together, they are -# equivalent to 'INSERT INTO t_stmt VALUES (1)' ---error ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE -BINLOG ' -1gRVShMBAAAALwAAAEABAAAAABcAAAAAAAAABHRlc3QABnRfc3RtdAABDwJkAAE= -1gRVShcBAAAAIAAAAGABAAAQABcAAAAAAAEAAf/+ATE= -'; -SELECT * FROM t_stmt /* should be empty */; - - ---echo ---- binlog_format=mixed ---- - ---echo [on slave] ---sync_slave_with_master ---source include/stop_slave.inc -SET @@global.binlog_format = MIXED; ---source include/start_slave.inc ---echo [on master] ---connection master -SET @@global.binlog_format = MIXED; -SET @@session.binlog_format = MIXED; - ---echo * Unsafe statement and stmt-only engine ---error ER_BINLOG_UNSAFE_AND_STMT_ENGINE -INSERT INTO t_stmt VALUES (UUID()); - -# Concatenate two unsafe values, and then concatenate NULL to -# that so that the result is NULL and we instead use autoinc. ---echo * Multi-unsafe statement and stmt-only engine ---error ER_BINLOG_UNSAFE_AND_STMT_ENGINE -INSERT DELAYED INTO t_double_autoinc SELECT CONCAT(UUID(), @@hostname, NULL) FROM mysql.general_log LIMIT 1; - - ---echo ---- binlog_format=statement ---- - ---echo [on slave] ---sync_slave_with_master ---source include/stop_slave.inc -SET @@global.binlog_format = STATEMENT; ---source include/start_slave.inc ---echo [on master] ---connection master -SET @@global.binlog_format = STATEMENT; -SET @@session.binlog_format = STATEMENT; - ---echo * Row-only engine and binlog_format=statement: innodb-specific message ---error ER_BINLOG_STMT_MODE_AND_ROW_ENGINE -INSERT INTO t_row VALUES (1); -SELECT * FROM t_row /* should be empty */; - -# Commented out since innodb gives an error (this is a bug) -#--echo * Same statement, but db filtered out - no error -#USE other; -#INSERT INTO test.t_row VALUES (1); -#USE test; - ---echo * Row-only engine and binlog_format=statement: generic message -SET @@session.debug= '+d,no_innodb_binlog_errors'; ---error ER_BINLOG_STMT_MODE_AND_ROW_ENGINE -INSERT INTO t_row VALUES (1); -SELECT * FROM t_row /* should be empty */; - ---echo * Same statement, but db filtered out - no error -USE other; -INSERT INTO test.t_row VALUES (1); -USE test; -SET @@session.debug= ''; -SELECT * FROM t_row /* should contain the value 1 */; - ---echo * Row injection and binlog_format=statement: BINLOG statement -# This is a Table_map_event and a Write_rows_event. Together, they are -# equivalent to 'INSERT INTO t VALUES (1)'. ---error ER_BINLOG_ROW_INJECTION_AND_STMT_MODE -BINLOG ' -cNpVShMBAAAAKgAAADYBAAAAABcAAAAAAAAABHRlc3QAAXQAAQ8CZAAB -cNpVShcBAAAAIAAAAFYBAAAQABcAAAAAAAEAAf/+ATE= -'; -SELECT * FROM t /* should be empty */; - ---echo * Same statement, but db filtered out - no error -# This is a Table_map_event and a Write_rows_event. Together, they are -# equivalent to 'INSERT INTO t VALUES (1)'. -USE other; -BINLOG ' -cNpVShMBAAAAKgAAADYBAAAAABcAAAAAAAAABHRlc3QAAXQAAQ8CZAAB -cNpVShcBAAAAIAAAAFYBAAAQABcAAAAAAAEAAf/+ATE= -'; -USE test; -SELECT * FROM t /* should contain the value 1 */; -DELETE FROM t; - ---echo * Unsafe statement and binlog_format=statement -# This will give a warning. -INSERT INTO t VALUES (COALESCE(1, UUID())); -SELECT * FROM t /* should contain the value 1 */; -DELETE FROM t; - ---echo * Same statement, but db filtered out - no message -USE other; -INSERT INTO test.t VALUES (COALESCE(1, UUID())); -USE test; -SELECT * FROM t /* should contain the value 1 */; -DELETE FROM t; - - ---echo ---- master: binlog_format=mixed, slave: binlog_format=statement ---- - -SET @@global.binlog_format = MIXED; -SET @@session.binlog_format = MIXED; - ---echo * Row injection and binlog_format=statement: in slave sql thread -INSERT INTO t VALUES (COALESCE(1, UUID())); ---echo [on slave] ---connection slave -# 1666 = ER_BINLOG_ROW_INJECTION_AND_STMT_MODE ---let $slave_sql_errno= 1666 ---let $show_sql_error= 1 ---source include/wait_for_slave_sql_error_and_skip.inc ---connection slave -SELECT * FROM t /* should be empty */; ---echo [on master] ---connection master - - ---echo ==== Clean up ==== - -DROP TRIGGER trig_autoinc; -DROP TRIGGER trig_double_autoinc; -DROP TABLE t, t_self_logging, t_row, t_stmt, t_slave_stmt, t_autoinc, t_double_autoinc; -DROP DATABASE other; -SET @@global.binlog_format = @old_binlog_format; -SET @@session.binlog_format = @old_binlog_format; -UNINSTALL PLUGIN example; ---echo [on slave] ---sync_slave_with_master -SET @@global.binlog_format = @old_binlog_format; -SET @@session.binlog_format = @old_binlog_format; -UNINSTALL PLUGIN example; - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test deleted file mode 100644 index c62097f616d..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test +++ /dev/null @@ -1,145 +0,0 @@ ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# -# basic test of blob replication for NDB -# - -# easy test - ---connection master -create table t1 ( - a int not null primary key, - b text not null -) engine=ndb; - -insert into t1 values(1, repeat('abc',10)); -insert into t1 values(2, repeat('def',200)); -insert into t1 values(3, repeat('ghi',3000)); - -select 'M', a, sha1(b) from t1 -order by a; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', a, sha1(b) from t1 -order by a; - ---connection master -drop table t1; ---sync_slave_with_master - -# hard test - ---connection master -create table t1 ( - a int not null primary key, - b text not null, - c int, - d longblob, - e tinyblob -) engine=ndbcluster; - ---disable_query_log -# length 61 -set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; ---enable_query_log - -insert into t1 values ( - 0, repeat(@s2,454), 100, repeat(@s2,345), NULL); -insert into t1 values ( - 1, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1)); -insert into t1 values ( - 2, '', 102, '', repeat(@s2,1)); -insert into t1 values ( - 3, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1)); -insert into t1 values ( - 4, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1)); -insert into t1 values ( - 5, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1)); -insert into t1 values ( - 6, repeat(@s1,242), 106, NULL, repeat(@s1,1)); -insert into t1 values ( - 7, repeat(@s1,30), 107, repeat(@s0,161), ''); -insert into t1 values ( - 8, repeat(@s1,719), 108, repeat(@s2,104), NULL); -insert into t1 values ( - 9, repeat(@s2,427), NULL, NULL, NULL); - -select 'M', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; - ---connection master -drop table t1; ---sync_slave_with_master - -# table with varsize key (future cluster/schema) - -# sql/ha_ndbcluster_binlog.cc ---connection master -CREATE TABLE IF NOT EXISTS t1 ( - db VARBINARY(63) NOT NULL, - name VARBINARY(63) NOT NULL, - slock BINARY(32) NOT NULL, - query BLOB NOT NULL, - node_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - id INT UNSIGNED NOT NULL, - version INT UNSIGNED NOT NULL, - type INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (db,name)) -ENGINE=NDB; - -insert into t1 values ('test','t1', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('test','t2', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('test','t3', - 'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('testtttttttttt','t1', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('testttttttttttt','t1', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('testtttttttttttt','t1', - 'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('t','t11111111111', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('t','t111111111111', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('t','t1111111111111', - 'ghi',repeat(@s2,1000),31,32,33,34,35); - -select 'M', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; - ---connection master -drop table t1; ---sync_slave_with_master - -# -# view the binlog - not deterministic (mats) -# - -#--connection master -#let $VERSION=`select version()`; -#--replace_result $VERSION VERSION -#show binlog events; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test deleted file mode 100644 index 647bd9b031f..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test +++ /dev/null @@ -1,16 +0,0 @@ -################################# -# Wrapper for rpl_row_blob.test # -# Using wrapper to share test # -# code between engine tests # -################################# -# -# Since the master generates row-based events, the slave may not be in -# STATEMENT mode to accept the events. -# --- source include/have_binlog_format_mixed_or_row.inc --- source include/have_ndb.inc --- source include/ndb_master-slave.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_blob.test - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test deleted file mode 100644 index 216cb31b7fb..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test +++ /dev/null @@ -1,61 +0,0 @@ ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# set up circular replication ---let $rpl_topology= 1->2->1 ---source include/rpl_init.inc - ---let $rpl_connection_name= master ---let $rpl_server_number= 1 ---source include/rpl_connect.inc - ---let $rpl_connection_name= slave ---let $rpl_server_number= 2 ---source include/rpl_connect.inc - - -# create the table on the "slave" ---connection slave -CREATE TABLE t1 (a int key, b int) ENGINE=ndb; -#CREATE TABLE t2 (a int key, b int) ENGINE=ndb; -sync_slave_with_master master; -# now we should have a table on the master as well -SHOW TABLES; - -# insert some values on the slave and master ---connection master -INSERT INTO t1 VALUES (1,2); ---connection slave -INSERT INTO t1 VALUES (2,3); - -# ensure data has propagated both ways ---connection slave -sync_slave_with_master master; ---sync_slave_with_master - -# connect to slave and ensure data it there. ---connection slave -SELECT * FROM t1 ORDER BY a; -#SELECT * FROM t2 ORDER BY a; -source include/check_slave_is_running.inc; -# connect to master and ensure data it there. ---connection master -SELECT * FROM t1 ORDER BY a; -#SELECT * FROM t2 ORDER BY a; -source include/check_slave_is_running.inc; - -# stop replication on "master" as not to replicate -# shutdown circularly, eg drop table ---connection master -STOP SLAVE; - -# cleanup ---connection master -DROP TABLE t1; --- sync_slave_with_master - ---let $rpl_only_running_threads= 1 ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf deleted file mode 100644 index b234f9a8c2c..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf +++ /dev/null @@ -1,24 +0,0 @@ -!include ../my.cnf - -[mysqld.1.1] -server-id= 1 -log-bin - -[mysqld.2.1] -server-id= 1 -log-bin - -[mysqld.1.slave] -server-id= 2 -log-bin -skip-slave-start - -[mysqld.2.slave] -server-id= 2 -log-bin -ndb_connectstring= @mysql_cluster.slave.ndb_connectstring - -[ENV] - -SLAVE_MYPORT1= @mysqld.2.slave.port -SLAVE_MYSOCK1= @mysqld.2.slave.socket diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test deleted file mode 100644 index 2d1f75f148d..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test +++ /dev/null @@ -1,167 +0,0 @@ -############################################################# -# Author: Serge Kozlov -# Date: 03/17/2008 -# Purpose: Testing cluster circular replication based on two -# independent channels between two clusters -############################################################# ---source include/have_ndb.inc ---source include/ndb_master-slave_2ch.inc ---source include/have_binlog_format_mixed_or_row.inc ---echo - -# Check server_id and set auto_increment_* variables ---echo *** Check server_id of mysqld servers *** ---connection master -SHOW VARIABLES LIKE "server_id"; -SET auto_increment_offset = 1; -SET auto_increment_increment = 2; ---connection master1 -SHOW VARIABLES LIKE "server_id"; -SET auto_increment_offset = 1; -SET auto_increment_increment = 2; ---connection slave -SHOW VARIABLES LIKE "server_id"; -SET auto_increment_offset = 2; -SET auto_increment_increment = 2; ---connection slave1 -SHOW VARIABLES LIKE "server_id"; -SET auto_increment_offset = 2; -SET auto_increment_increment = 2; ---echo - -# Preparing data. ---echo *** Preparing data *** ---connection master -CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=ndb; - -let $wait_binlog_event= CREATE TABLE t1; ---source include/wait_for_binlog_event.inc ---connection master1 ---source include/wait_for_binlog_event.inc ---connection slave ---source include/wait_for_binlog_event.inc ---connection slave1 ---source include/wait_for_binlog_event.inc ---echo - -# -# Testing -# - ---echo *** Basic testing *** -# insert data via all hosts ---echo Insert rows via all hosts ---disable_query_log -let $counter= 10; -while ($counter) { - --connection master - INSERT INTO t1(b,c) VALUES('master',1); - --connection master1 - INSERT INTO t1(b,c) VALUES('master1',1); - --connection slave - INSERT INTO t1(b,c) VALUES('slave',1); - --connection slave1 - INSERT INTO t1(b,c) VALUES('slave1',1); - dec $counter; -} ---connection master ---enable_query_log - -# Wait replication between clusters -let $wait_condition= SELECT COUNT(*)=40 FROM t1 WHERE c = 1; ---source include/wait_condition.inc ---connection slave ---source include/wait_condition.inc - -# Check data ---echo Check data on both clusters -let $diff_tables= master:t1, slave:t1; -source include/diff_tables.inc; - ---echo *** Transaction testing *** -# Start transaction for one mysqld and do mass of inserts for other. -# Do it for for both clusters - ---connection master -BEGIN; ---connection slave1 -BEGIN; -let $counter= 100; ---connection master ---disable_query_log -while ($counter) { - --connection master - INSERT INTO t1(b,c) VALUES('master',2); - --connection master1 - INSERT INTO t1(b,c) VALUES('master1',2); - --connection slave - INSERT INTO t1(b,c) VALUES('slave',2); - --connection slave1 - INSERT INTO t1(b,c) VALUES('slave1',2); - dec $counter; -} ---connection master ---enable_query_log -COMMIT; ---connection slave1 -COMMIT; - -# Wait replication between clusters ---connection master -let $wait_condition= SELECT COUNT(*)=400 FROM t1 WHERE c = 2; ---source include/wait_condition.inc ---connection slave ---source include/wait_condition.inc - ---echo Check data on both clusters -let $diff_tables= master:t1, slave:t1; -source include/diff_tables.inc; - -# Start transaction and then roll back - ---connection master -BEGIN; ---connection slave1 -BEGIN; -let $counter= 100; ---connection master ---disable_query_log -while ($counter) { - --connection master - INSERT INTO t1(b,c) VALUES('master',3); - --connection master1 - INSERT INTO t1(b,c) VALUES('master1',3); - --connection slave - INSERT INTO t1(b,c) VALUES('slave',3); - --connection slave1 - INSERT INTO t1(b,c) VALUES('slave1',3); - dec $counter; -} ---connection master ---enable_query_log -ROLLBACK; ---connection slave1 -ROLLBACK; - -# Wait replication between clusters ---connection master -let $wait_condition= SELECT COUNT(*)=200 FROM t1 WHERE c = 3; ---source include/wait_condition.inc ---connection slave ---source include/wait_condition.inc - ---echo Check data on both clusters -let $diff_tables= master:t1, slave:t1; -source include/diff_tables.inc; - -# Clean up ---connection master -DROP TABLE IF EXISTS t1; ---connection slave -# Wait until table is dropped on slave. ---let $query= SELECT COUNT(*) FROM t1 ---source include/wait_for_query_to_fail.inc ---echo - -# End of test 5.1 ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test deleted file mode 100644 index c91057279c4..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test +++ /dev/null @@ -1,82 +0,0 @@ ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -connection master; -CREATE TABLE t1 (a int key, b int) ENGINE=NDB; -sync_slave_with_master; -SHOW TABLES; - -# Lose the events from the slave binary log: there is no -# need to re-create the table on the master. -connection slave; -RESET MASTER; - -# Insert some values on the slave and master -connection master; -INSERT INTO t1 VALUES (1,2); -# Switch to slave once event is applied and insert a row -sync_slave_with_master; -connection slave; -INSERT INTO t1 VALUES (2,3); - -# ... it is now very probable that we have a mixed event in the binary -# log. If we don't, the test should still pass, but will not test the -# mixed event situation. - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# Replicate back to the master to test this mixed event on the master -STOP SLAVE; - ---let $rpl_topology= 1->2->1 ---source include/rpl_change_topology.inc -connection master; - -START SLAVE; - -connection slave; -sync_slave_with_master master; - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# Check that there is no error in replication -source include/check_slave_is_running.inc; - -# Check that we have the data on the master -SELECT * FROM t1 ORDER BY a; - -# We should now have another mixed event, likely with "slave" server -# id last, and with the STMT_END_F flag set. - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# now lets see that this data is applied correctly on the slave -STOP SLAVE; -save_master_pos; - -connection slave; -START SLAVE; - -# check that we have the data on the slave -sync_with_master; -SELECT * FROM t1 ORDER BY a; - -# Check that there is no error in replication -source include/check_slave_is_running.inc; - -connection master; -DROP TABLE t1; - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test deleted file mode 100644 index 28af75e7339..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test +++ /dev/null @@ -1,15 +0,0 @@ -##################################### -# Wrapper for rpl_commit_after_flush# -# Wrapped to reuse test code on # -# Different engines # -# By JBM 2004-02-15 # -##################################### - -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/have_ndb.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_commit_after_flush.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt deleted file mode 100644 index 711ec42bd8a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt +++ /dev/null @@ -1 +0,0 @@ ---collation-server=ucs2_unicode_ci --character-set-server=ucs2,latin1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test deleted file mode 100644 index 3d7b0b9b8ae..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test +++ /dev/null @@ -1,47 +0,0 @@ ---source include/have_ucs2.inc ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# -# MySQL Bug#15276: MySQL ignores collation-server -# -show variables like 'collation_server'; - -# -# Check that NDB replication doesn't explode with default charset -# being multibyte. -# -# Theorised that this could be a problem when dealing with: -# Bug #27404 util thd mysql_parse sig11 when mysqld default multibyte charset -# -# Sort of related to: -# Bug#18004 Connecting crashes server when default charset is UCS2 -# -# -show variables like "%character_set_ser%"; ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY (`nid`)) - ENGINE=ndbcluster; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; - -sync_slave_with_master; -# connect to slave and ensure data it there. -connection slave; -select * from t1 order by nid; - ---echo ==== clean up ==== -connection master; -DROP TABLE t1; -sync_slave_with_master; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test deleted file mode 100644 index dbe6929bbef..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test +++ /dev/null @@ -1,85 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of disk tables for NDB -# - -# -# Start by creating a logfile group -# - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb; - -# -# Create a tablespace connected to the logfile group -# - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb; - -# -# Create a table using this tablespace -# - -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb; - -# -# insert some data -# - -insert into t1 values (1,2,3); -select * from t1 order by pk1; - -# -# check that the data is also on the slave -# - ---sync_slave_with_master ---connection slave -select * from t1 order by pk1; - -# -# view the binlog -# - ---connection master --- source include/show_binlog_events2.inc - -# -# cleanup -# - -drop table t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-master.opt deleted file mode 100644 index 075c6392dde..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-slave.opt deleted file mode 100644 index 075c6392dde..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---new diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test deleted file mode 100644 index 373cc88fb00..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test +++ /dev/null @@ -1,311 +0,0 @@ -####################################### -# Author: JBM # -# Date: 2006-03-09 # -# Purpose: To test the replication of # -# Cluster Disk Data using partitions # -####################################### - ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---echo --- Doing pre test cleanup --- - -connection master; ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_query_log - - -# Start by creating a logfile group -################################## - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################### -# Create a tablespace connected to the logfile group -################################################### - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################################# - ---echo --- Start test 2 partition RANGE testing -- ---echo --- Do setup -- - - -################################################# -# Requirment: Create table that is partitioned # -# by range on year i.e. year(t) and replicate # -# basice operations such at insert, update # -# delete between 2 different storage engines # -# Alter table and ensure table is handled # -# Correctly on the slave # -################################################# - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - ---echo --- Show table on master --- - -SHOW CREATE TABLE t1; - ---echo --- Show table on slave -- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- ---enable_query_log - ---source include/rpl_multi_engine3.inc - ---echo --- End test 2 partition RANGE testing --- ---echo --- Do Cleanup --- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 3 partition LIST testing --- ---echo --- Do setup --- -################################################# - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); - ---echo --- Test 3 Alter to add partition --- - -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); - ---echo --- Show table on master --- - -SHOW CREATE TABLE t1; - ---echo --- Show table on slave --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 3 partition LIST testing --- ---echo --- Do Cleanup -- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 4 partition HASH testing --- ---echo --- Do setup --- -################################################# - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY HASH( YEAR(t) ) - PARTITIONS 4; - ---echo --- show that tables have been created correctly --- - -SHOW CREATE TABLE t1; -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 4 partition HASH testing --- ---echo --- Do Cleanup -- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 5 partition by key testing --- ---echo --- Create Table Section --- - -################################################# - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE,PRIMARY KEY(id)) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY KEY() - PARTITIONS 4; - ---echo --- Show that tables on master are ndbcluster tables --- - -SHOW CREATE TABLE t1; - ---echo --- Show that tables on slave --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - -# Okay lets see how it holds up to table changes ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still right type --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still same engine --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 5 key partition testing --- ---echo --- Do Cleanup --- - -DROP TABLE IF EXISTS t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; ---sync_slave_with_master - -# End of 5.1 test case ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test deleted file mode 100644 index 5798bff163a..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test +++ /dev/null @@ -1,34 +0,0 @@ -#################### rpl_ndb_ddl.test ######################## -# # -# DDL statements (sometimes with implicit COMMIT) executed # -# by the master and it's propagation into the slave # -# # -############################################################## - -# -# NOTE, PLEASE BE CAREFUL, WHEN MODIFYING THE TESTS !! -# -# 1. !All! objects to be dropped, renamed, altered ... must be created -# in AUTOCOMMIT= 1 mode before AUTOCOMMIT is set to 0 and the test -# sequences start. -# -# 2. Never use a test object, which was direct or indirect affected by a -# preceeding test sequence again. -# Except table d1.t1 where ONLY DML is allowed. -# -# If one preceeding test sequence hits a (sometimes not good visible, -# because the sql error code of the statement might be 0) bug -# and these rules are ignored, a following test sequence might earn ugly -# effects like failing 'sync_slave_with_master', crashes of the slave or -# abort of the test case etc.. -# - ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc -let $engine_type= NDB; -let $temp_engine_type= MEMORY; -let $show_binlog = 0; -let $manipulate = 0; --- source extra/rpl_tests/rpl_ddl.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test deleted file mode 100644 index 138eedc7e82..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test +++ /dev/null @@ -1,12 +0,0 @@ -######################################### -# By JBM 2006-02-14 Test wrapping to # -# Share test code between engine tests # -######################################### ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_delete_no_where.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt deleted file mode 100644 index fb5e378b65f..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-db=replica diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test deleted file mode 100644 index f2e8c74a3b9..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test +++ /dev/null @@ -1,60 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 14-12-2006 -# Purpose: To test --replicate-do-database=db_name -# using cluster. Only replica should replicate. -########################################################## - ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -DROP DATABASE IF EXISTS replica; ---enable_warnings - -# Create database and tables for the test. -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -# Insert data into db that should not be picked up by slave -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Insert data into db that should be replicated -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Check results on slave ---sync_slave_with_master -SHOW TABLES; -USE replica; -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -USE test; -SHOW TABLES; - -# Cleanup from testing -connection master; -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; ---sync_slave_with_master - -# End 5.1 test case ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt deleted file mode 100644 index da345474216..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-table=test.t1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test deleted file mode 100644 index a5c55469a00..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test +++ /dev/null @@ -1,49 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 14-12-2006 -# Purpose: To test --replicate-do-table=db_name.tbl_name -# using cluster. Only t1 should replicate. -########################################################## - ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; ---enable_warnings - -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t1 VALUES(2, repeat('def',200)); -INSERT INTO t1 VALUES(3, repeat('ghi',3000)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(2, repeat('def',200)); -INSERT INTO t2 VALUES(3, repeat('ghi',3000)); - ---sync_slave_with_master -SHOW TABLES; -SELECT COUNT(*) FROM t1; - -# -# Bug #27044 replicated with unique field ndb table allows dup key inserts -# -connection master; - ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (3, repeat('bad',1)); - -connection slave; ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (3, repeat('bad too',1)); - -# cleanup - -connection master; -DROP TABLE IF EXISTS t1, t2; ---sync_slave_with_master ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test deleted file mode 100644 index 67101c11d26..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test +++ /dev/null @@ -1,14 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-08 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using NDB -########################################### --- source include/have_binlog_format_mixed_or_row.inc --- source include/have_ndb.inc --- source include/ndb_master-slave.inc -let $engine_type = 'NDB'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test deleted file mode 100644 index a29fb270507..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test +++ /dev/null @@ -1,16 +0,0 @@ -################################### -# Wrapper for rpl_row_func003.test# -# This test was orginally designed# -# To test InnoDB using RBR, but # -# It can also be used to test NDB # -# So this wrapper is being used to# -# reduce test case code # -################################### --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_func003.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test deleted file mode 100644 index da22e0ae8f8..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test +++ /dev/null @@ -1,109 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# create a table with one row -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; - -# sync slave and retrieve epoch -sync_slave_with_master; ---replace_column 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -let $the_epoch= `select @the_epoch` ; -SELECT * FROM t1 ORDER BY c3; - -# get the master binlog pos from the epoch -connection master; ---replace_result $the_epoch ---replace_column 1 -eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) - FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; -let $the_pos= `SELECT @the_pos` ; -let $the_file= `SELECT @the_file` ; - -# insert some more values -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; - -SELECT * FROM t1 ORDER BY c3; - -# check that we have it on the slave ---sync_slave_with_master -SELECT * FROM t1 ORDER BY c3; - -source include/check_slave_is_running.inc; - -# stop slave and reset position to before the last changes -STOP SLAVE; ---replace_result $the_pos -eval CHANGE MASTER TO - master_log_file = '$the_file', - master_log_pos = $the_pos ; - -source include/check_slave_no_error.inc; - -# start the slave again -# -> same events should have been applied again -# e.g. inserting rows that already there -# deleting a row which is not there -# updating a row which is not there -START SLAVE; - ---connection master -SELECT * FROM t1 ORDER BY c3; ---sync_slave_with_master -SELECT * FROM t1 ORDER BY c3; - -STOP SLAVE; - -# -# cleanup -# ---connection master -DROP TABLE t1; -RESET master; ---connection slave -DROP TABLE t1; -RESET slave; - -START SLAVE; - -# -# Test that we can handle update of a row that does not exist on the slave -# will trigger usage of AO_IgnoreError on slave side so that the INSERT -# still succeeds even if the replication of the UPDATE generates an error. -# ---connection master -CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","remove on slave",1); - ---sync_slave_with_master ---connection slave -DELETE FROM t1; - ---connection master -BEGIN; -UPDATE t1 SET c2="does not exist" WHERE c3=1; -INSERT INTO t1 VALUES ("row2","new on slave",2); -COMMIT; - ---sync_slave_with_master ---connection slave -SELECT * FROM t1; -source include/check_slave_is_running.inc; - -connection master; -DROP TABLE IF EXISTS t1; - -# End of 5.1 Test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt deleted file mode 100644 index b63ef44e8fc..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---new --default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test deleted file mode 100644 index b9ad0f6375e..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test +++ /dev/null @@ -1,16 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_innodb.inc --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -SET storage_engine=innodb; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test deleted file mode 100644 index e8fb9128177..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test +++ /dev/null @@ -1,70 +0,0 @@ -# Test of a transaction mixing the two engines - --- source include/have_ndb.inc --- source include/have_innodb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc - -create table t1 (a int, unique(a)) engine=ndbcluster; -create table t2 (a int, unique(a)) engine=innodb; - - -begin; -insert into t1 values(1); -insert into t2 values(1); -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -begin; -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -delete from t1; -delete from t2; -begin; -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -delete from t1; -delete from t2; -begin; -insert into t2 values(3),(4); -insert into t1 values(3),(4); -load data infile '../../../std_data/rpl_loaddata.dat' into table t2; -load data infile '../../../std_data/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -drop table t1,t2; -sync_slave_with_master; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test deleted file mode 100644 index 0abfe84167f..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test +++ /dev/null @@ -1,12 +0,0 @@ -##################################### -# Wrapper for rpl_insert_ignore.test# -##################################### --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; -let $engine_type2=myisam; --- source extra/rpl_tests/rpl_insert_ignore.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test deleted file mode 100644 index 8411daa5e88..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test +++ /dev/null @@ -1,67 +0,0 @@ -# -# Currently this test only runs in the source tree with the -# ndb/test programs compiled. -# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_load -# - ---source include/have_ndb.inc ---source include/have_ndb_extra.inc ---source include/have_binlog_format_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -# reset master -connection master; -DROP DATABASE IF EXISTS TEST_DB; -CREATE DATABASE TEST_DB; ---enable_warnings - -# -# These tables should correspond to the table definitions in -# storage/ndb/test/ndbapi/bench/ -# -connection master; -USE TEST_DB; -CREATE TABLE SUBSCRIBER - ( NUMBER CHAR(12) BINARY NOT NULL, - NAME CHAR(32) BINARY NOT NULL, - GROUP_ID INT UNSIGNED NOT NULL, - LOCATION INT UNSIGNED NOT NULL, - SESSIONS INT UNSIGNED NOT NULL, - CHANGED_BY CHAR(32) BINARY NOT NULL, - CHANGED_TIME CHAR(32) BINARY NOT NULL, - PRIMARY KEY USING HASH (NUMBER)) - ENGINE = NDB; - -CREATE TABLE GROUP_T - ( GROUP_ID INT UNSIGNED NOT NULL, - GROUP_NAME CHAR(32) BINARY NOT NULL, - ALLOW_READ CHAR(1) BINARY NOT NULL, - ALLOW_INSERT INT UNSIGNED NOT NULL, - ALLOW_DELETE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (GROUP_ID)) - ENGINE = NDB; - -CREATE TABLE SESSION - ( NUMBER CHAR(12) BINARY NOT NULL, - SERVER_ID INT UNSIGNED NOT NULL, - DATA VARBINARY(1998) NOT NULL, - PRIMARY KEY USING HASH (NUMBER,SERVER_ID)) - ENGINE = NDB; - -CREATE TABLE SERVER - ( SUFFIX CHAR(2) BINARY NOT NULL, - SERVER_ID INT UNSIGNED NOT NULL, - NAME CHAR(32) BINARY NOT NULL, - NO_OF_READ INT UNSIGNED NOT NULL, - NO_OF_INSERT INT UNSIGNED NOT NULL, - NO_OF_DELETE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (SUFFIX, SERVER_ID)) - ENGINE = NDB; - -# -# start "load" application -# ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbCreate >> $NDB_TOOLS_OUTPUT ---exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbAsyncGenerator >> $NDB_TOOLS_OUTPUT ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test deleted file mode 100644 index 7ce9d17a0c9..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test +++ /dev/null @@ -1,14 +0,0 @@ -################################### -# Wrapper for rpl_row_log.test # -# Added wrapper so that MyISAM & # -# Innodb and NDB could all use the# -# Same test. NDB produced a diff # -# bin-log # -################################### --- source include/have_binlog_format_row.inc --- source include/have_ndb.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_log.test - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test deleted file mode 100644 index 37d63c2818b..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test +++ /dev/null @@ -1,473 +0,0 @@ -# ==== Purpose ==== -# -# Tests that transactions containing multiple table types are -# replicated correctly to the slave. -# -# This test was previously part of rpl_ndb_transactions. -# -# -# ==== Method ==== -# -# Try all combinations of the following: -# - Committed/rollback transactions. -# - Transactions started by AUTOCOMMIT = 0 or BEGIN. -# - Transactions using myisam, innodb, or ndb tables, or combinations -# of them. For combinations, we use the engines in all possible -# orders. -# For single-engine transactions, we also try with AUTOCOMMIT = 1. -# -# -# ==== Related bugs ==== -# -# BUG#26395: if crash during autocommit update to transactional table on master, slave fails - - -source include/have_ndb.inc; -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. -source include/have_binlog_format_mixed_or_row.inc; -source include/ndb_master-slave.inc; -source include/have_innodb.inc; - -CREATE TABLE tmyisam (a int) ENGINE = MYISAM; -CREATE TABLE tinnodb (a int) ENGINE = INNODB; -CREATE TABLE tndb (a int) ENGINE = NDB; - -SHOW CREATE TABLE tmyisam; -SHOW CREATE TABLE tinnodb; -SHOW CREATE TABLE tndb; - - ---echo [on master] - - ---echo ==== Single-engine transactions ==== - ---echo ---- autocommitted ---- - -SET AUTOCOMMIT = 1; - -INSERT INTO tmyisam VALUES (0); -INSERT INTO tinnodb VALUES (1); -INSERT INTO tndb VALUES (2); - ---echo ---- committed with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (3); -INSERT INTO tmyisam VALUES (4); -COMMIT; - -BEGIN; -INSERT INTO tinnodb VALUES (5); -INSERT INTO tinnodb VALUES (6); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (7); -INSERT INTO tndb VALUES (8); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (9); -INSERT INTO tmyisam VALUES (10); -ROLLBACK; - -BEGIN; -INSERT INTO tinnodb VALUES (11); -INSERT INTO tinnodb VALUES (12); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (13); -INSERT INTO tndb VALUES (14); -ROLLBACK; - - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tmyisam VALUES (15); -INSERT INTO tmyisam VALUES (16); -COMMIT; - -INSERT INTO tinnodb VALUES (17); -INSERT INTO tinnodb VALUES (18); -COMMIT; - -INSERT INTO tndb VALUES (19); -INSERT INTO tndb VALUES (20); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tmyisam VALUES (21); -INSERT INTO tmyisam VALUES (22); -ROLLBACK; - -INSERT INTO tinnodb VALUES (23); -INSERT INTO tinnodb VALUES (24); -ROLLBACK; - -INSERT INTO tndb VALUES (25); -INSERT INTO tndb VALUES (26); -ROLLBACK; - -SET AUTOCOMMIT = 1; - - ---echo ==== MyISAM + InnoDB ==== - ---echo ---- committed with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (27); -INSERT INTO tinnodb VALUES (28); -COMMIT; - -BEGIN; -INSERT INTO tinnodb VALUES (29); -INSERT INTO tmyisam VALUES (30); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (31); -INSERT INTO tinnodb VALUES (32); -ROLLBACK; - -BEGIN; -INSERT INTO tinnodb VALUES (33); -INSERT INTO tmyisam VALUES (34); -ROLLBACK; - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tmyisam VALUES (35); -INSERT INTO tinnodb VALUES (36); -COMMIT; - -INSERT INTO tinnodb VALUES (37); -INSERT INTO tmyisam VALUES (38); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tmyisam VALUES (39); -INSERT INTO tinnodb VALUES (40); -ROLLBACK; - -INSERT INTO tinnodb VALUES (41); -INSERT INTO tmyisam VALUES (42); -ROLLBACK; - -SET AUTOCOMMIT = 1; - - ---echo ==== MyISAM + NDB ==== - ---echo ---- committed with BEGIN---- - -BEGIN; -INSERT INTO tmyisam VALUES (43); -INSERT INTO tndb VALUES (44); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (45); -INSERT INTO tmyisam VALUES (46); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (47); -INSERT INTO tndb VALUES (48); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (49); -INSERT INTO tmyisam VALUES (50); -ROLLBACK; - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tmyisam VALUES (51); -INSERT INTO tndb VALUES (52); -COMMIT; - -INSERT INTO tndb VALUES (53); -INSERT INTO tmyisam VALUES (54); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tmyisam VALUES (55); -INSERT INTO tndb VALUES (56); -ROLLBACK; - -INSERT INTO tndb VALUES (57); -INSERT INTO tmyisam VALUES (58); -ROLLBACK; - -SET AUTOCOMMIT = 1; - - ---echo ==== InnoDB + NDB ==== - ---echo ---- committed with BEGIN ---- - -BEGIN; -INSERT INTO tinnodb VALUES (59); -INSERT INTO tndb VALUES (60); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (61); -INSERT INTO tinnodb VALUES (62); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tinnodb VALUES (63); -INSERT INTO tndb VALUES (64); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (65); -INSERT INTO tinnodb VALUES (66); -ROLLBACK; - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tinnodb VALUES (67); -INSERT INTO tndb VALUES (68); -COMMIT; - -INSERT INTO tndb VALUES (69); -INSERT INTO tinnodb VALUES (70); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tinnodb VALUES (71); -INSERT INTO tndb VALUES (72); -ROLLBACK; - -INSERT INTO tndb VALUES (73); -INSERT INTO tinnodb VALUES (74); -ROLLBACK; - -SET AUTOCOMMIT = 1; - - ---echo ==== MyISAM + InnoDB + NDB ==== - ---echo ---- committed with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (75); -INSERT INTO tinnodb VALUES (76); -INSERT INTO tndb VALUES (77); -COMMIT; - -BEGIN; -INSERT INTO tmyisam VALUES (78); -INSERT INTO tndb VALUES (79); -INSERT INTO tinnodb VALUES (80); -COMMIT; - -BEGIN; -INSERT INTO tinnodb VALUES (81); -INSERT INTO tmyisam VALUES (82); -INSERT INTO tndb VALUES (83); -COMMIT; - -BEGIN; -INSERT INTO tinnodb VALUES (84); -INSERT INTO tndb VALUES (85); -INSERT INTO tmyisam VALUES (86); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (87); -INSERT INTO tmyisam VALUES (88); -INSERT INTO tinnodb VALUES (89); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (90); -INSERT INTO tinnodb VALUES (91); -INSERT INTO tmyisam VALUES (92); -COMMIT; - ---echo ---- rolled back with BEGIN ---- - -BEGIN; -INSERT INTO tmyisam VALUES (93); -INSERT INTO tinnodb VALUES (94); -INSERT INTO tndb VALUES (95); -ROLLBACK; - -BEGIN; -INSERT INTO tmyisam VALUES (96); -INSERT INTO tndb VALUES (97); -INSERT INTO tinnodb VALUES (98); -ROLLBACK; - -BEGIN; -INSERT INTO tinnodb VALUES (99); -INSERT INTO tmyisam VALUES (100); -INSERT INTO tndb VALUES (101); -ROLLBACK; - -BEGIN; -INSERT INTO tinnodb VALUES (102); -INSERT INTO tndb VALUES (103); -INSERT INTO tmyisam VALUES (104); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (105); -INSERT INTO tmyisam VALUES (106); -INSERT INTO tinnodb VALUES (107); -ROLLBACK; - -BEGIN; -INSERT INTO tndb VALUES (108); -INSERT INTO tinnodb VALUES (109); -INSERT INTO tmyisam VALUES (110); -ROLLBACK; - ---echo ---- committed with AUTOCOMMIT = 0 ---- - -SET AUTOCOMMIT = 0; - -INSERT INTO tmyisam VALUES (111); -INSERT INTO tinnodb VALUES (112); -INSERT INTO tndb VALUES (113); -COMMIT; - -INSERT INTO tmyisam VALUES (114); -INSERT INTO tndb VALUES (115); -INSERT INTO tinnodb VALUES (116); -COMMIT; - -INSERT INTO tinnodb VALUES (117); -INSERT INTO tmyisam VALUES (118); -INSERT INTO tndb VALUES (119); -COMMIT; - -INSERT INTO tinnodb VALUES (120); -INSERT INTO tndb VALUES (121); -INSERT INTO tmyisam VALUES (122); -COMMIT; - -INSERT INTO tndb VALUES (123); -INSERT INTO tmyisam VALUES (124); -INSERT INTO tinnodb VALUES (125); -COMMIT; - -INSERT INTO tndb VALUES (126); -INSERT INTO tinnodb VALUES (127); -INSERT INTO tmyisam VALUES (128); -COMMIT; - ---echo ---- rolled back with AUTOCOMMIT = 0 ---- - -INSERT INTO tmyisam VALUES (129); -INSERT INTO tinnodb VALUES (130); -INSERT INTO tndb VALUES (131); -ROLLBACK; - -INSERT INTO tmyisam VALUES (132); -INSERT INTO tndb VALUES (133); -INSERT INTO tinnodb VALUES (134); -ROLLBACK; - -INSERT INTO tinnodb VALUES (135); -INSERT INTO tmyisam VALUES (136); -INSERT INTO tndb VALUES (137); -ROLLBACK; - -INSERT INTO tinnodb VALUES (138); -INSERT INTO tndb VALUES (139); -INSERT INTO tmyisam VALUES (140); -ROLLBACK; - -INSERT INTO tndb VALUES (141); -INSERT INTO tmyisam VALUES (142); -INSERT INTO tinnodb VALUES (143); -ROLLBACK; - -INSERT INTO tndb VALUES (144); -INSERT INTO tinnodb VALUES (145); -INSERT INTO tmyisam VALUES (146); -ROLLBACK; - -SET AUTOCOMMIT = 1; - ---echo ---- Mixed statements Innodb ---- - -BEGIN; -INSERT INTO tndb VALUES (147); -INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -COMMIT; - -INSERT INTO tndb VALUES (148); -BEGIN; -INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -INSERT INTO tndb VALUES (149); -COMMIT; - -BEGIN; -INSERT INTO tndb VALUES (150); -INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -COMMIT; - -INSERT INTO tndb VALUES (151); -BEGIN; -INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1; -INSERT INTO tndb VALUES (152); -COMMIT; - ---echo ==== Verify the result ==== - -SELECT * FROM tmyisam ORDER BY a; -SELECT * FROM tinnodb ORDER BY a; -SELECT * FROM tndb ORDER BY a; - ---echo [on slave] ---sync_slave_with_master - -let $diff_tables= master:tmyisam, slave:tmyisam; -source include/diff_tables.inc; - -let $diff_tables= master:tinnodb, slave:tinnodb; -source include/diff_tables.inc; - -let $diff_tables= master:tndb, slave:tndb; -source include/diff_tables.inc; - - ---echo ==== Clean up ==== - ---echo [on master] -connection master; -DROP TABLE tmyisam, tinnodb, tndb; - ---echo [on slave] -sync_slave_with_master; - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_implicit_commit_binlog.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_implicit_commit_binlog.test deleted file mode 100644 index b561503ef22..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_implicit_commit_binlog.test +++ /dev/null @@ -1,11 +0,0 @@ -################################################################################ -# Check file extra/rpl_tests/rpl_implicit_commit_binlog.test -################################################################################ ---source include/have_binlog_format_mixed.inc ---source include/have_ndb.inc ---source include/ndb_master-slave.inc - ---let $engine=NDB ---source extra/rpl_tests/rpl_implicit_commit_binlog.test - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt deleted file mode 100644 index b74354b22e1..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt deleted file mode 100644 index bbb86b2991b..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --ndbcluster --replicate-ignore-table=mysql.ndb_apply_status diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test deleted file mode 100644 index 0d9c201670b..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test +++ /dev/null @@ -1,369 +0,0 @@ -# ==== Purpose ==== -# -# Test replication of transactions on tables which have different -# engines on master and slave. This tests all combinations of innodb, -# myisam, and ndb. -# -# ==== Method ==== -# -# Set up six tables, each being innodb, myisam, or innodb on master, -# and another of innodb, myisam, or innodb on slave. For each table, -# do the following: -# -# - committed and rollback'ed transactions, with autocommit on and -# off -# - non-transactions with autocommit on -# - non-transactions with autocommit off, where the master table is -# myisam. -# -# Note: we are running the slave with -# --replicate-ignore-table=mysql.ndb_apply_status . See BUG#34557 for -# explanation. -# -# ==== Related bugs ==== -# -# BUG#26395: if crash during autocommit update to transactional table on master, slave fails -# BUG#29288: myisam transactions replicated to a transactional slave leaves slave unstable -# BUG#34557: Row-based replication from ndb to non-ndb gives error on slave -# BUG#34600: Rolled-back punch transactions not replicated correctly -# -# ==== Todo ==== -# -# We should eventually try transactions touching two tables which are -# of different engines on the same server (so that we try, e.g. punch -# transactions; cf BUG#34600). However, that will make the test much -# bigger (9 master-slave engine combinations [myisam->myisam, -# myisam->ndb, etc]. To try all combinations of one or more such -# tables means 2^9-1=511 transactions. We need to multiplied by 5 -# since we want to test committed/rollback'ed transactions -# with/without AUTOCOMMIT, as well as non-transactions with -# autocommit). We'd have to write a script to produce the test case. - - ---echo ==== Initialization ==== - ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/ndb_master-slave.inc ---source include/have_binlog_format_mixed_or_row.inc - ---echo ---- setup master ---- - -CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM; -CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB; -CREATE TABLE myisam_ndb (a INT) ENGINE=MYISAM; -CREATE TABLE ndb_myisam (a INT) ENGINE=NDB; -CREATE TABLE innodb_ndb (a INT) ENGINE=INNODB; -CREATE TABLE ndb_innodb (a INT) ENGINE=NDB; - -SHOW CREATE TABLE myisam_innodb; -SHOW CREATE TABLE innodb_myisam; -SHOW CREATE TABLE myisam_ndb; -SHOW CREATE TABLE ndb_myisam; -SHOW CREATE TABLE innodb_ndb; -SHOW CREATE TABLE ndb_innodb; - ---echo ---- setup slave with different engines ---- - -sync_slave_with_master; - -DROP TABLE myisam_innodb, innodb_myisam; -DROP TABLE myisam_ndb, ndb_myisam; -DROP TABLE innodb_ndb, ndb_innodb; - -CREATE TABLE myisam_innodb (a INT) ENGINE=INNODB; -CREATE TABLE innodb_myisam (a INT) ENGINE=MYISAM; -CREATE TABLE myisam_ndb (a INT) ENGINE=NDB; -CREATE TABLE ndb_myisam (a INT) ENGINE=MYISAM; -CREATE TABLE innodb_ndb (a INT) ENGINE=NDB; -CREATE TABLE ndb_innodb (a INT) ENGINE=INNODB; - -SHOW CREATE TABLE myisam_innodb; -SHOW CREATE TABLE innodb_myisam; -SHOW CREATE TABLE myisam_ndb; -SHOW CREATE TABLE ndb_myisam; -SHOW CREATE TABLE innodb_ndb; -SHOW CREATE TABLE ndb_innodb; - -connection master; - - ---echo ==== AUTOCOMMIT=0, transactions ==== - ---echo ---- COMMIT ---- - -SET AUTOCOMMIT = 0; - -BEGIN; -INSERT INTO myisam_innodb VALUES (1); -INSERT INTO myisam_innodb VALUES (2); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_myisam VALUES (3); -INSERT INTO innodb_myisam VALUES (4); -COMMIT; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO myisam_ndb VALUES (5); -INSERT INTO myisam_ndb VALUES (6); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO ndb_myisam VALUES (7); -INSERT INTO ndb_myisam VALUES (8); -COMMIT; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO ndb_innodb VALUES (9); -INSERT INTO ndb_innodb VALUES (10); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_ndb VALUES (11); -INSERT INTO innodb_ndb VALUES (12); -COMMIT; -sync_slave_with_master; -connection master; - ---echo ---- ROLLBACK ---- - -# This test does not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, Tests should be added again. ---disable_parsing -BEGIN; -INSERT INTO myisam_innodb VALUES (13); -INSERT INTO myisam_innodb VALUES (14); -ROLLBACK; -sync_slave_with_master; ---enable_parsing -connection master; -BEGIN; -INSERT INTO innodb_myisam VALUES (15); -INSERT INTO innodb_myisam VALUES (16); -ROLLBACK; -sync_slave_with_master; -connection master; - -# This test does not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, these tests should be enabled -# again. ---disable_parsing -BEGIN; -INSERT INTO myisam_ndb VALUES (17); -INSERT INTO myisam_ndb VALUES (18); -ROLLBACK; -sync_slave_with_master; -connection master; ---enable_parsing -BEGIN; -INSERT INTO ndb_myisam VALUES (19); -INSERT INTO ndb_myisam VALUES (20); -ROLLBACK; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO ndb_innodb VALUES (21); -INSERT INTO ndb_innodb VALUES (22); -ROLLBACK; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_ndb VALUES (23); -INSERT INTO innodb_ndb VALUES (24); -ROLLBACK; -sync_slave_with_master; -connection master; - - ---echo ==== AUTOCOMMIT=1, transactions ==== - ---echo ---- COMMIT ---- - -SET AUTOCOMMIT = 1; - -BEGIN; -INSERT INTO myisam_innodb VALUES (25); -INSERT INTO myisam_innodb VALUES (26); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_myisam VALUES (27); -INSERT INTO innodb_myisam VALUES (28); -COMMIT; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO myisam_ndb VALUES (29); -INSERT INTO myisam_ndb VALUES (30); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO ndb_myisam VALUES (31); -INSERT INTO ndb_myisam VALUES (32); -COMMIT; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO ndb_innodb VALUES (33); -INSERT INTO ndb_innodb VALUES (34); -COMMIT; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_ndb VALUES (35); -INSERT INTO innodb_ndb VALUES (36); -COMMIT; -sync_slave_with_master; -connection master; - ---echo ---- ROLLBACK ---- - -# This test does not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, these tests should be enabled -# again. ---disable_parsing -BEGIN; -INSERT INTO myisam_innodb VALUES (37); -INSERT INTO myisam_innodb VALUES (38); -ROLLBACK; -sync_slave_with_master; -connection master; ---enable_parsing -BEGIN; -INSERT INTO innodb_myisam VALUES (39); -INSERT INTO innodb_myisam VALUES (40); -ROLLBACK; -sync_slave_with_master; -connection master; - -# This test does not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, these tests should be enabled -# again. ---disable_parsing -BEGIN; -INSERT INTO myisam_ndb VALUES (41); -INSERT INTO myisam_ndb VALUES (42); -ROLLBACK; -sync_slave_with_master; -connection master; ---enable_parsing -BEGIN; -INSERT INTO ndb_myisam VALUES (43); -INSERT INTO ndb_myisam VALUES (44); -ROLLBACK; -sync_slave_with_master; -connection master; - -BEGIN; -INSERT INTO ndb_innodb VALUES (45); -INSERT INTO ndb_innodb VALUES (46); -ROLLBACK; -sync_slave_with_master; -connection master; -BEGIN; -INSERT INTO innodb_ndb VALUES (47); -INSERT INTO innodb_ndb VALUES (48); -ROLLBACK; -sync_slave_with_master; -connection master; - - ---echo ==== AUTOCOMMIT=1, single statements ==== - -INSERT INTO myisam_innodb VALUES (49); -INSERT INTO myisam_innodb VALUES (50); -sync_slave_with_master; -connection master; -INSERT INTO innodb_myisam VALUES (51); -INSERT INTO innodb_myisam VALUES (52); -sync_slave_with_master; -connection master; - -INSERT INTO myisam_ndb VALUES (53); -INSERT INTO myisam_ndb VALUES (54); -sync_slave_with_master; -connection master; -INSERT INTO ndb_myisam VALUES (55); -INSERT INTO ndb_myisam VALUES (56); -sync_slave_with_master; -connection master; - -INSERT INTO ndb_innodb VALUES (57); -INSERT INTO ndb_innodb VALUES (58); -sync_slave_with_master; -connection master; -INSERT INTO innodb_ndb VALUES (59); -INSERT INTO innodb_ndb VALUES (60); -sync_slave_with_master; -connection master; - - ---echo ==== AUTOCOMMIT=0, single statements, myisam on master ==== - -SET AUTOCOMMIT = 0; - -# These tests do not work in ROW mode after the changes introduced in -# BUG#40116. After WL#2687 is pushed, these tests should be enabled -# again. ---disable_parsing -# This tests BUG#29288. -INSERT INTO myisam_innodb VALUES (61); -INSERT INTO myisam_innodb VALUES (62); -sync_slave_with_master; -connection master; - -INSERT INTO myisam_ndb VALUES (63); -INSERT INTO myisam_ndb VALUES (64); -sync_slave_with_master; -connection master; ---enable_parsing - - ---echo ==== Show results ==== - -SELECT * FROM myisam_innodb ORDER BY a; -SELECT * FROM innodb_myisam ORDER BY a; -SELECT * FROM myisam_ndb ORDER BY a; -SELECT * FROM ndb_myisam ORDER BY a; -SELECT * FROM innodb_ndb ORDER BY a; -SELECT * FROM ndb_innodb ORDER BY a; - -let $diff_tables= master:myisam_innodb, slave:myisam_innodb; -source include/diff_tables.inc; - -let $diff_tables= master:innodb_myisam, slave:innodb_myisam; -source include/diff_tables.inc; - -let $diff_tables= master:myisam_ndb, slave:myisam_ndb; -source include/diff_tables.inc; - -let $diff_tables= master:ndb_myisam, slave:ndb_myisam; -source include/diff_tables.inc; - -let $diff_tables= master:innodb_ndb, slave:innodb_ndb; -source include/diff_tables.inc; - -let $diff_tables= master:ndb_innodb, slave:ndb_innodb; -source include/diff_tables.inc; - - ---echo ==== Clean up ==== - -drop table myisam_innodb, innodb_myisam; -drop table myisam_ndb, ndb_myisam; -drop table innodb_ndb, ndb_innodb; -sync_slave_with_master; ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test deleted file mode 100644 index 65093319fbe..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test +++ /dev/null @@ -1,75 +0,0 @@ ---source include/have_multi_ndb.inc ---source include/have_binlog_format_mixed_or_row.inc - -# We need server 3 later on in this test. ---let $rpl_server_count= 3 ---source include/master-slave.inc - ---connection master - -# note: server2 is another "master" connected to the master cluster - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# create a table with one row, and make sure the other "master" gets it -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -connection server2; -reset master; -SHOW TABLES; -connection master; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -connection server2; -SELECT * FROM t1 ORDER BY c3; - -# sync slave and retrieve epoch and stop the slave -connection master; -sync_slave_with_master; ---replace_column 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -let $the_epoch= `select @the_epoch` ; -SELECT * FROM t1 ORDER BY c3; -stop slave; - -# get the master binlog pos from the epoch, from the _other_ "master", server2 -connection server2; ---replace_result $the_epoch -eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) - FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; -let $the_pos= `SELECT @the_pos` ; -let $the_file= `SELECT @the_file` ; - -# now connect the slave to the _other_ "master" ---let $rpl_topology= 3->2 ---let $rpl_master_log_file= 2:$the_file ---let $rpl_master_log_pos= 2:$the_pos ---source include/rpl_change_topology.inc ---connection slave ---source include/start_slave.inc - -# insert some more values on the first master -connection master; -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; - -SELECT * FROM t1 ORDER BY c3; - -# insert another row, and check that we have it on the slave -connection server2; -INSERT INTO t1 VALUES ("row5","E",5); -SELECT * FROM t1 ORDER BY c3; -sync_slave_with_master; -SELECT * FROM t1 ORDER BY c3; - ---echo ==== clean up ==== -connection server2; -DROP TABLE t1; -sync_slave_with_master; - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt deleted file mode 100644 index 17d4171af0e..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=nothing.sensible diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test deleted file mode 100644 index 40ec8d2b6c5..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test +++ /dev/null @@ -1,14 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_multi_update2.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc - -# Run this only for row based replication, as replication of -# auto_increment values are not supported with NDB as storage engine --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc - -let $engine_type=NDB; ---source extra/rpl_tests/rpl_multi_update2.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test deleted file mode 100644 index d117fed6ace..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test +++ /dev/null @@ -1,12 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_multi_update3.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_multi_update3.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt deleted file mode 100644 index b63ef44e8fc..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---new --default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test deleted file mode 100644 index 33a4b029914..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test +++ /dev/null @@ -1,15 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -SET storage_engine=myisam; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt deleted file mode 100644 index 2211d2dbb2d..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt +++ /dev/null @@ -1,3 +0,0 @@ ---max_relay_log_size=16384 ---loose-innodb ---log-warnings diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test deleted file mode 100644 index 83cc64993b0..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test +++ /dev/null @@ -1,10 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_relayrotate.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc --- source include/have_ndb_extra.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_relayrotate.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt deleted file mode 100644 index 6262cf451a6..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-db=test --replicate-ignore-table=replica.t1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test deleted file mode 100644 index 39ac27c8759..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test +++ /dev/null @@ -1,61 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 15-12-2006 -# Purpose: To test --replicate-ignore-table=db_name.tbl_name -# and --replicate-ignore-db=db_name -# using cluster. Only replica should replicate. -########################################################## - ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - ---disable_warnings -DROP DATABASE IF EXISTS replica; ---enable_warnings - -# Create database and tables for the test. -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -# Insert data into db that should not be picked up by slave -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Insert data into db that should be replicated -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Check results on slave ---sync_slave_with_master -SHOW TABLES; -USE replica; -SHOW TABLES; -#SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -USE test; -SHOW TABLES; - -# Cleanup from testing -connection master; -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; ---sync_slave_with_master - -# End 5.1 test case ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test deleted file mode 100644 index a26d38615e2..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test +++ /dev/null @@ -1,11 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. ---source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_001.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_implicit_commit_binlog.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_implicit_commit_binlog.test deleted file mode 100644 index 3f0f1755d9f..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_implicit_commit_binlog.test +++ /dev/null @@ -1,11 +0,0 @@ -################################################################################ -# Check file extra/rpl_tests/rpl_implicit_commit_binlog.test -################################################################################ ---source include/have_binlog_format_row.inc ---source include/have_ndb.inc ---source include/ndb_master-slave.inc - ---let $engine=NDB ---source extra/rpl_tests/rpl_implicit_commit_binlog.test - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test deleted file mode 100644 index 41641ec793b..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test +++ /dev/null @@ -1,7 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc - --- let $engine= NDB --- source extra/rpl_tests/rpl_set_null.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test deleted file mode 100644 index f64c0b59332..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test +++ /dev/null @@ -1,14 +0,0 @@ -################################# -# Wrapper for rpl_row_sp003.test# -# These tests have been wrapped # -# so the same code can be used # -# For different engines # -################################# --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_sp003.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test deleted file mode 100644 index 4ad4720bd44..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test +++ /dev/null @@ -1,14 +0,0 @@ -################################# -# Wrapper for rpl_row_sp006.test# -# These tests have been wrapped # -# so the same code can be used # -# For different engines # -################################# --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_sp006.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt deleted file mode 100644 index 3596fc4d3bd..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt deleted file mode 100644 index 96f0ce3f36c..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=MyISAM diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test deleted file mode 100644 index 1a2f8c63652..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test +++ /dev/null @@ -1,41 +0,0 @@ -############################################# -#Authors: TU and Jeb -#Date: 2007/04 -#Purpose: Generic replication to cluster -# and ensuring that the ndb_apply_status -# table is updated. -############################################# -# Notes: -# include/select_ndb_apply_status.inc -# Selects out the log name, start & end pos -# from the ndb_apply_status table -# -# include/show_binlog_using_logname.inc -# To select out 1 row from offset 1 -# from the start position in the binlog whose -# name is = log_name -# -# include/tpcb.inc -# Creates DATABASE tpcb, the tables and -# stored procedures for loading the DB -# and for running transactions against DB. -############################################## - - -## Includes ## - ---disable_query_log ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/ndb_master-slave.inc ---enable_query_log - -# statement format is supported because master uses innodb -SET binlog_format = STATEMENT; -let $off_set = 6; -let $rpl_format = 'SBR'; -disable_query_log; -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -enable_query_log; ---source extra/rpl_tests/rpl_ndb_apply_status.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test deleted file mode 100644 index 7f438b0a642..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test +++ /dev/null @@ -1,103 +0,0 @@ ---source include/have_ndb.inc ---source include/ndb_default_cluster.inc ---source include/not_embedded.inc ---source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# stop the save ---connection slave -STOP SLAVE; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; - -# get some data on the master ---connection master -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4"); -CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ; -INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0); -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# take a backup on master ---source include/ndb_backup.inc - -# update a row -UPDATE t1 SET c2=0 WHERE c3="row2"; -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; - -# restore on slave, first check that nothing is there ---connection slave - -# we should have no tables -SHOW TABLES; - ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# -# BUG#11960 -# prior to bugfix "DROP DATABASE" would give a warning since -# the events were not created by ndb_restore -# -DROP DATABASE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# continue test -SHOW TABLES; - -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# -# now setup replication to continue from last epoch ---source include/ndb_setup_slave.inc ---connection slave -START SLAVE; - -# -# -# ---connection master ---sync_slave_with_master ---source include/check_slave_is_running.inc - -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# -# Cleanup -# - ---connection master -DROP DATABASE ndbsynctest; ---sync_slave_with_master ---connection slave -STOP SLAVE; - -# -# Test some replication commands -# ---connection master -reset master; -# should now contain nothing -select * from mysql.ndb_binlog_index; - ---connection slave -reset slave; -# should now contain nothing -select * from mysql.ndb_apply_status; - -# End 5.1 Test ---let $rpl_only_running_threads= 1 ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test deleted file mode 100644 index 6c3502f44cb..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: 2006-02-14 # -############################################################################# -# TEST: Use before insert triggers and has the second insert fail # -# Test is wrapped to save code and share between engines # -############################################################################# - -# Includes --- source include/have_ndb.inc -# Since the master generates row-based events, the slave must be in -# ROW or MIXED mode to accept the events. --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_trig004.test - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test deleted file mode 100644 index fdb0293676b..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test +++ /dev/null @@ -1,12 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/have_ndbapi_examples.inc --- source include/ndb_master-slave.inc - ---exec echo Running ndbapi_simple_dual ---exec $NDB_EXAMPLES_DIR/ndbapi_simple_dual/ndbapi_simple_dual $MASTER_MYSOCK "$NDB_CONNECTSTRING" $SLAVE_MYSOCK "$NDB_CONNECTSTRING_SLAVE" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running mgmapi_logevent ---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "$NDB_CONNECTSTRING" "$NDB_CONNECTSTRING_SLAVE" 1 >> $NDB_EXAMPLES_OUTPUT - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test deleted file mode 100644 index ac31e4de654..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test +++ /dev/null @@ -1,8 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_mixed_or_row.inc --- source include/ndb_master-slave.inc - -let $type= 'NDB' ; -let $extra_index= ; --- source extra/rpl_tests/rpl_row_basic.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test deleted file mode 100644 index 9a39334c308..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test +++ /dev/null @@ -1,66 +0,0 @@ - ---source include/have_ndb.inc ---source include/ndb_master-slave.inc ---source include/have_binlog_format_mixed_or_row.inc - ---disable_query_log ---disable_warnings -connection slave; -STOP SLAVE; -connection master; -DROP TABLE IF EXISTS t1; -RESET MASTER; -connection slave; -DROP TABLE IF EXISTS t1; -RESET SLAVE; -START SLAVE; ---enable_warnings ---enable_query_log - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -# This is silly, but NDB doesn't add to the binlog fast enough ---real_sleep 10 -sync_slave_with_master; -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -# Should be empty -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DROP TABLE t1; ---source include/show_binlog_events.inc - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -# Should be empty -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DROP TABLE t1; ---source include/show_binlog_events.inc - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt deleted file mode 100644 index 01cf3e0520f..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=mixed diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test deleted file mode 100644 index 7c9684d5cbb..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test +++ /dev/null @@ -1,12 +0,0 @@ -# Same test as rpl_truncate_7ndb.test, but with mixed mode -# This is marked with 'big_test' just because the rpl_truncate_7ndb test is -# so slow... - -# Last Change: 2008-09-03 -# Change Author: pcrews -# Change: Moved test to rpl_ndb suite, updated location of --source .test file - ---source include/have_binlog_format_mixed.inc ---source include/big_test.inc ---source suite/rpl_ndb/t/rpl_truncate_7ndb.test ---source include/rpl_end.inc diff --git a/mysql-test/suite/stress/r/ddl_ndb.result b/mysql-test/suite/stress/r/ddl_ndb.result deleted file mode 100644 index 05c29456f7c..00000000000 --- a/mysql-test/suite/stress/r/ddl_ndb.result +++ /dev/null @@ -1,216 +0,0 @@ -SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; -PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start"; -SET @runtime = ; -PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1"; -DROP TABLE IF EXISTS t1; -# Subtest 1A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) -ENGINE = NDB -# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) -# default: DROP TABLE t1 -# Subtest 1B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) -ENGINE = NDB -# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) -# default: DROP TABLE t1 -# Subtest 1C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) -ENGINE = NDB -# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) -# con2: DROP TABLE t1 -# Subtest 1D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) -ENGINE = NDB -# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) -# con2: DROP TABLE t1 -# Subtest 2A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 -# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 -# default: DROP TABLE t1 -# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) -# Subtest 2B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 -# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 -# default: DROP TABLE t1 -# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) -# Subtest 2C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 -# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 -# default: DROP TABLE t1 -# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) -# Subtest 2D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 -# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 -# default: DROP TABLE t1 -# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) -# Subtest 3A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) -# default: DROP TABLE t1 -# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) -# Subtest 3B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) -# default: DROP TABLE t1 -# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) -# Subtest 3C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB -# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) -# default: DROP TABLE t1 -# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) -# Subtest 3D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB -# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) -# default: DROP TABLE t1 -# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB; -DROP TABLE t1; -CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB; -DROP TABLE t1; -# Subtest 4A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB -# default: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB -# default: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# Subtest 4B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB -# default: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB -# default: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# Subtest 4C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB -# con2: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB -# con2: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# Subtest 4D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB -# con2: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB -# con2: SHOW CREATE TABLE t1 -# default: DROP TABLE t1 -# Subtest 5A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB -# default: INSERT INTO t1 SET f2 = 9 -# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 -# default: DROP TABLE t1 -# Subtest 5B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB -# default: INSERT INTO t1 SET f2 = 9 -# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 -# default: DROP TABLE t1 -# Subtest 5C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB -# con2: INSERT INTO t1 SET f2 = 9 -# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 -# con2: DROP TABLE t1 -# Subtest 5D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB -# con2: INSERT INTO t1 SET f2 = 9 -# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 -# con2: DROP TABLE t1 -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=NDB; -# Subtest 6A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX1 ON t1 (f2) -# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) -# default: DROP INDEX IDX1 ON t1 -# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) -# default: CREATE INDEX IDX1 ON t1 (f2) -# default: DROP INDEX IDX1 ON t1 -# Subtest 6B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX1 ON t1 (f2) -# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) -# default: DROP INDEX IDX1 ON t1 -# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) -# default: CREATE INDEX IDX1 ON t1 (f2) -# default: DROP INDEX IDX1 ON t1 -# Subtest 6C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX1 ON t1 (f2) -# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) -# default: DROP INDEX IDX1 ON t1 -# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) -# default: CREATE INDEX IDX1 ON t1 (f2) -# con2: DROP INDEX IDX1 ON t1 -# Subtest 6D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX1 ON t1 (f2) -# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) -# default: DROP INDEX IDX1 ON t1 -# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) -# default: CREATE INDEX IDX1 ON t1 (f2) -# con2: DROP INDEX IDX1 ON t1 -DROP TABLE t1; -CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=NDB; -INSERT INTO t1 VALUES(1,1); -CREATE INDEX IDX ON t1 (f2); -DROP INDEX IDX ON t1; -CREATE UNIQUE INDEX IDX ON t1 (f2); -DROP INDEX IDX ON t1; -# Subtest 8A (one connection, no PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX ON t1 (f2) -# default: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# default: CREATE UNIQUE INDEX IDX ON t1 (f2) -# default: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# Subtest 8B (one connection, use PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX ON t1 (f2) -# default: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# default: CREATE UNIQUE INDEX IDX ON t1 (f2) -# default: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# Subtest 8C (two connections, no PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX ON t1 (f2) -# con2: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# default: CREATE UNIQUE INDEX IDX ON t1 (f2) -# con2: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# Subtest 8D (two connections, use PREPARE/EXECUTE) -# connection action -# default: CREATE INDEX IDX ON t1 (f2) -# con2: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -# default: CREATE UNIQUE INDEX IDX ON t1 (f2) -# con2: SHOW CREATE TABLE t1 -# default: DROP INDEX IDX ON t1 -DROP TABLE t1; -DEALLOCATE PREPARE stmt_start; -DEALLOCATE PREPARE stmt_break; diff --git a/mysql-test/suite/stress/t/ddl_ndb.test b/mysql-test/suite/stress/t/ddl_ndb.test deleted file mode 100644 index 1e0a3680f8a..00000000000 --- a/mysql-test/suite/stress/t/ddl_ndb.test +++ /dev/null @@ -1,58 +0,0 @@ -######## t/ddl_ndb.test ###### -# -# Stress the storage engine NDB with CREATE/DROP TABLE/INDEX -# -# Please look for details within include/ddl1.inc. -# -# Creation of this test: -# 2007-07-04 mleich -# - -# Storage engine to be used in CREATE TABLE ---source include/have_ndb.inc -connection default; - -let $engine_type= NDB; - - -if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) -{ - --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled -} -# Attention: We set here much smaller values for $runtime and $loop_size compared -# to the other storage engines. -# The reason is that NDB is extreme slow and should not exceed -# the "testcase-timeout". -let $run= `SELECT '$BIG_TEST' = '1'`; -if ($run) -{ - # A run started with "--big-test" should be allowed to consume more time. - # Rough intended runtime per subtest variant in seconds - let $runtime = 5; - # number of rounds till we look at the clock again - let $loop_size= 3; -} -if (!$run) -{ - let $runtime = 1; - let $loop_size= 1; -} - - -##### Some preparations needed for the ddl*.inc scripts ---source suite/stress/include/ddl.pre - ---source suite/stress/include/ddl1.inc ---source suite/stress/include/ddl2.inc ---source suite/stress/include/ddl3.inc ---source suite/stress/include/ddl4.inc ---source suite/stress/include/ddl5.inc ---source suite/stress/include/ddl6.inc -# The following test suffers from -# Bug#26043 UNIQUE INDEX create always fails after constraint violation -# and is therefore set to comment. -# --source suite/stress/include/ddl7.inc ---source suite/stress/include/ddl8.inc - -##### Cleanup ---source suite/stress/include/ddl.cln diff --git a/mysql-test/t/ctype_utf8mb4_ndb.test b/mysql-test/t/ctype_utf8mb4_ndb.test deleted file mode 100644 index fba0ae918a1..00000000000 --- a/mysql-test/t/ctype_utf8mb4_ndb.test +++ /dev/null @@ -1,7 +0,0 @@ ---source include/have_utf8mb4.inc ---source include/have_ndb.inc - -let $engine= ndb; -let $is_ndb= 1; ---source include/ctype_utf8mb4.inc - diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index d312254da19..60af4159650 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -11,7 +11,6 @@ ############################################################################## lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Mac OSX query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically -ctype_utf8mb4_ndb : Bug#55799, Bug#51907, disabled by Konstantin 2010-08-06 main.mysqlhotcopy_myisam : Bug#56817 2010-10-21 anitha mysqlhotcopy* fails main.mysqlhotcopy_archive: Bug#56817 2010-10-21 anitha mysqlhotcopy* fails log_tables-big : Bug#48646 2010-11-15 mattiasj report already exists From d5bf6b8aa8bb1c745abeb5e245f0398858ca1461 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 Dec 2010 12:47:22 +0800 Subject: [PATCH 12/20] Bug #56662 Assertion failed: next_insert_id == 0, file .\handler.cc Normally, auto_increment value is generated for the column by inserting either NULL or 0 into it. NO_AUTO_VALUE_ON_ZERO suppresses this behavior for 0 so that only NULL generates the auto_increment value. This behavior is also followed by a slave, specifically by the SQL Thread, when applying events in the statement format from a master. However, when applying events in the row format, the flag was ignored thus causing an assertion failure: "Assertion failed: next_insert_id == 0, file .\handler.cc" In fact, we never need to generate a auto_increment value for the column when applying events in row format on slave. So we don't allow it to happen by using 'MODE_NO_AUTO_VALUE_ON_ZERO'. Refactoring: Get rid of all the sql_mode checks to rows_log_event when applying it for avoiding problems caused by the inconsistency of the sql_mode on slave and master as the sql_mode is not set for Rows_log_event. mysql-test/extra/rpl_tests/rpl_auto_increment.test: Added test to verify if the assertion of "next_insert_id == 0" will fail in ha_external_lock() function. mysql-test/suite/rpl/r/rpl_auto_increment.result: Test result for bug#56662. sql/log_event.cc: Added code to not allow generation of auto_increment value when processing rows event by adding 'MODE_NO_AUTO_VALUE_ON_ZERO' to sql_mode. sql/rpl_record.cc: Added code to get rid of the 'MODE_STRICT_TRANS_TABLES' and MODE_STRICT_ALL_TABLES check to the table when appling the rows event and treat it as no strict. --- .../extra/rpl_tests/rpl_auto_increment.test | 26 +++++++++ .../suite/rpl/r/rpl_auto_increment.result | 17 ++++++ sql/log_event.cc | 30 ++++++----- sql/log_event.h | 9 ++-- sql/rpl_record.cc | 53 ++++--------------- sql/rpl_record.h | 7 +-- 6 files changed, 76 insertions(+), 66 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment.test b/mysql-test/extra/rpl_tests/rpl_auto_increment.test index d81ab15a945..9bfda48df0b 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment.test @@ -229,5 +229,31 @@ source include/diff_tables.inc; DROP TABLE t1; DROP TABLE t2; SET SQL_MODE=''; +sync_slave_with_master; + +# +# BUG#56662 +# The test verifies if the assertion of "next_insert_id == 0" +# will fail in ha_external_lock() function. +# +connection master; +CREATE TABLE t1 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, data INT) ENGINE=innodb; + +BEGIN; +--echo # Set sql_mode with NO_AUTO_VALUE_ON_ZERO for allowing +--echo # zero to fill the auto_increment field. +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +INSERT INTO t1(id,data) VALUES(0,2); +--echo # Resetting sql_mode without NO_AUTO_VALUE_ON_ZERO to +--echo # affect the execution of the transaction on slave. +SET SQL_MODE=0; +COMMIT; +SELECT * FROM t1; +sync_slave_with_master; +SELECT * FROM t1; + +connection master; +DROP TABLE t1; +sync_slave_with_master; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index 2ab515c8d93..03b413e1b12 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -303,4 +303,21 @@ include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1; DROP TABLE t2; SET SQL_MODE=''; +CREATE TABLE t1 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, data INT) ENGINE=innodb; +BEGIN; +# Set sql_mode with NO_AUTO_VALUE_ON_ZERO for allowing +# zero to fill the auto_increment field. +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +INSERT INTO t1(id,data) VALUES(0,2); +# Resetting sql_mode without NO_AUTO_VALUE_ON_ZERO to +# affect the execution of the transaction on slave. +SET SQL_MODE=0; +COMMIT; +SELECT * FROM t1; +id data +0 2 +SELECT * FROM t1; +id data +0 2 +DROP TABLE t1; include/rpl_end.inc diff --git a/sql/log_event.cc b/sql/log_event.cc index d3d95c5b18f..eb7c9c30567 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -7570,6 +7570,14 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) // Do event specific preparations error= do_before_row_operations(rli); + /* + Bug#56662 Assertion failed: next_insert_id == 0, file handler.cc + Don't allow generation of auto_increment value when processing + rows event by setting 'MODE_NO_AUTO_VALUE_ON_ZERO'. + */ + ulong saved_sql_mode= thd->variables.sql_mode; + thd->variables.sql_mode= MODE_NO_AUTO_VALUE_ON_ZERO; + // row processing loop while (error == 0 && m_curr_row < m_rows_end) @@ -7632,6 +7640,11 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) thd->transaction.stmt.modified_non_trans_table= TRUE; } // row processing loop + /* + Restore the sql_mode after the rows event is processed. + */ + thd->variables.sql_mode= saved_sql_mode; + DBUG_EXECUTE_IF("STOP_SLAVE_after_first_Rows_event", const_cast(rli)->abort_slave= 1;); @@ -8601,16 +8614,11 @@ Rows_log_event::write_row(const Relay_log_info *const rli, int UNINIT_VAR(keynum); auto_afree_ptr key(NULL); - /* fill table->record[0] with default values */ - bool abort_on_warnings= (rli->sql_thd->variables.sql_mode & - (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)); - if ((error= prepare_record(table, m_width, - table->file->ht->db_type != DB_TYPE_NDBCLUSTER, - abort_on_warnings, m_curr_row == m_rows_buf))) - DBUG_RETURN(error); - + prepare_record(table, m_width, + table->file->ht->db_type != DB_TYPE_NDBCLUSTER); + /* unpack row into table->record[0] */ - if ((error= unpack_current_row(rli, abort_on_warnings))) + if ((error= unpack_current_row(rli))) DBUG_RETURN(error); if (m_curr_row == m_rows_buf) @@ -9454,11 +9462,9 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli) store_record(m_table,record[1]); - bool abort_on_warnings= (rli->sql_thd->variables.sql_mode & - (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)); m_curr_row= m_curr_row_end; /* this also updates m_curr_row_end */ - if ((error= unpack_current_row(rli, abort_on_warnings))) + if ((error= unpack_current_row(rli))) return error; /* diff --git a/sql/log_event.h b/sql/log_event.h index 75f2015a684..010658e930a 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -3583,16 +3583,13 @@ protected: int write_row(const Relay_log_info *const, const bool); // Unpack the current row into m_table->record[0] - int unpack_current_row(const Relay_log_info *const rli, - const bool abort_on_warning= TRUE) - { + int unpack_current_row(const Relay_log_info *const rli) + { DBUG_ASSERT(m_table); - bool first_row= (m_curr_row == m_rows_buf); ASSERT_OR_RETURN_ERROR(m_curr_row < m_rows_end, HA_ERR_CORRUPT_EVENT); int const result= ::unpack_row(rli, m_table, m_width, m_curr_row, &m_cols, - &m_curr_row_end, &m_master_reclength, - abort_on_warning, first_row); + &m_curr_row_end, &m_master_reclength); if (m_curr_row_end > m_rows_end) my_error(ER_SLAVE_CORRUPT_EVENT, MYF(0)); ASSERT_OR_RETURN_ERROR(m_curr_row_end <= m_rows_end, HA_ERR_CORRUPT_EVENT); diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index 3a46bbcd6ee..4d6d5666e3a 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -180,8 +180,7 @@ int unpack_row(Relay_log_info const *rli, TABLE *table, uint const colcnt, uchar const *const row_data, MY_BITMAP const *cols, - uchar const **const row_end, ulong *const master_reclength, - const bool abort_on_warning, const bool first_row) + uchar const **const row_end, ulong *const master_reclength) { DBUG_ENTER("unpack_row"); DBUG_ASSERT(row_data); @@ -251,22 +250,9 @@ unpack_row(Relay_log_info const *rli, } else { - MYSQL_ERROR::enum_warning_level error_type= - MYSQL_ERROR::WARN_LEVEL_NOTE; - if (abort_on_warning && (table->file->has_transactions() || - first_row)) - { - error = HA_ERR_ROWS_EVENT_APPLY; - error_type= MYSQL_ERROR::WARN_LEVEL_ERROR; - } - else - { - f->set_default(); - error_type= MYSQL_ERROR::WARN_LEVEL_WARN; - } - push_warning_printf(current_thd, error_type, - ER_BAD_NULL_ERROR, - ER(ER_BAD_NULL_ERROR), + f->set_default(); + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_BAD_NULL_ERROR, ER(ER_BAD_NULL_ERROR), f->field_name); } } @@ -350,20 +336,13 @@ unpack_row(Relay_log_info const *rli, @param skip Number of columns for which default/nullable check should be skipped. @param check Specifies if lack of default error needs checking. - @param abort_on_warning - Controls how to react on lack of a field's default. - The parameter mimics the master side one for - @c check_that_all_fields_are_given_values. - + @returns 0 on success or a handler level error code */ -int prepare_record(TABLE *const table, - const uint skip, const bool check, - const bool abort_on_warning, const bool first_row) +int prepare_record(TABLE *const table, const uint skip, const bool check) { DBUG_ENTER("prepare_record"); - int error= 0; restore_record(table, s->default_values); /* @@ -386,28 +365,16 @@ int prepare_record(TABLE *const table, if ((f->flags & NO_DEFAULT_VALUE_FLAG) && (f->real_type() != MYSQL_TYPE_ENUM)) { - - MYSQL_ERROR::enum_warning_level error_type= - MYSQL_ERROR::WARN_LEVEL_NOTE; - if (abort_on_warning && (table->file->has_transactions() || - first_row)) - { - error= HA_ERR_ROWS_EVENT_APPLY; - error_type= MYSQL_ERROR::WARN_LEVEL_ERROR; - } - else - { - f->set_default(); - error_type= MYSQL_ERROR::WARN_LEVEL_WARN; - } - push_warning_printf(current_thd, error_type, + f->set_default(); + push_warning_printf(current_thd, + MYSQL_ERROR::WARN_LEVEL_WARN, ER_NO_DEFAULT_FOR_FIELD, ER(ER_NO_DEFAULT_FOR_FIELD), f->field_name); } } - DBUG_RETURN(error); + DBUG_RETURN(0); } #endif // HAVE_REPLICATION diff --git a/sql/rpl_record.h b/sql/rpl_record.h index 6e8838f82b3..e3749eb03f1 100644 --- a/sql/rpl_record.h +++ b/sql/rpl_record.h @@ -27,13 +27,10 @@ size_t pack_row(TABLE* table, MY_BITMAP const* cols, int unpack_row(Relay_log_info const *rli, TABLE *table, uint const colcnt, uchar const *const row_data, MY_BITMAP const *cols, - uchar const **const row_end, ulong *const master_reclength, - const bool abort_on_warning= TRUE, const bool first_row= TRUE); + uchar const **const row_end, ulong *const master_reclength); // Fill table's record[0] with default values. -int prepare_record(TABLE *const table, const uint skip, const bool check, - const bool abort_on_warning= TRUE, - const bool first_row= TRUE); +int prepare_record(TABLE *const table, const uint skip, const bool check); #endif #endif From e2db8e6ccb2655ec5706305b491540ad3f1c8267 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Tue, 21 Dec 2010 14:34:11 +0300 Subject: [PATCH 13/20] Bug#58030 crash in Item_func_geometry_from_text::val_str Item_sum_max/Item_sum_min incorrectly set null_value flag and attempt to get result in parent functions leads to crash. This happens due to double evaluation of the function argumet. First evaluation happens in the comparator and second one happens in Item_cache::cache_value(). The fix is to introduce new Item_cache object which holds result of the argument and use this cached value as an argument of the comparator. mysql-test/r/func_group.result: test case mysql-test/t/func_group.test: test case sql/item.cc: added assertion that ether we have some result or result is NULL. sql/item_sum.cc: introduce new Item_cache object which holds result of the argument and use this cached value as an argument of the comparator. sql/item_sum.h: introduce new Item_cache object which holds result of the argument and use this cached value as an argument of the comparator. --- mysql-test/r/func_group.result | 12 ++++++++++++ mysql-test/t/func_group.test | 20 ++++++++++++++++++++ sql/item.cc | 4 ++++ sql/item_sum.cc | 20 +++++++++++--------- sql/item_sum.h | 10 +++++----- 5 files changed, 52 insertions(+), 14 deletions(-) diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 606f879b47f..60c00c49b33 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1724,4 +1724,16 @@ m 1 DROP TABLE t1; # +# Bug#58030 crash in Item_func_geometry_from_text::val_str +# +SELECT MAX(TIMESTAMP(RAND(0))); +SELECT MIN(TIMESTAMP(RAND(0))); +# +# Bug#58177 crash and valgrind warnings in decimal and protocol sending functions... +# +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +# End of 5.1 tests diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 72a78f612a2..338bf0e7718 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -1096,6 +1096,26 @@ SELECT MAX((SELECT 1 FROM t1 ORDER BY @var LIMIT 1)) m FROM t1 t2, t1 DROP TABLE t1; +--echo # +--echo # Bug#58030 crash in Item_func_geometry_from_text::val_str +--echo # + +--disable_result_log + +SELECT MAX(TIMESTAMP(RAND(0))); +SELECT MIN(TIMESTAMP(RAND(0))); + +--echo # +--echo # Bug#58177 crash and valgrind warnings in decimal and protocol sending functions... +--echo # + +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); + +--enable_result_log + --echo # --echo End of 5.1 tests diff --git a/sql/item.cc b/sql/item.cc index c75db2dc15b..c01671aff56 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -5572,6 +5572,10 @@ bool Item::send(Protocol *protocol, String *buffer) String *res; if ((res=val_str(buffer))) result= protocol->store(res->ptr(),res->length(),res->charset()); + else + { + DBUG_ASSERT(null_value); + } break; } case MYSQL_TYPE_TINY: diff --git a/sql/item_sum.cc b/sql/item_sum.cc index a60a6b3ef95..5493020b67b 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -666,8 +666,10 @@ void Item_sum_hybrid::setup_hybrid(Item *item, Item *value_arg) value= Item_cache::get_cache(item); value->setup(item); value->store(value_arg); + arg_cache= Item_cache::get_cache(item); + arg_cache->setup(item); cmp= new Arg_comparator(); - cmp->set_cmp_func(this, args, (Item**)&value, FALSE); + cmp->set_cmp_func(this, (Item**)&arg_cache, (Item**)&value, FALSE); collation.set(item->collation); } @@ -1639,11 +1641,11 @@ Item *Item_sum_min::copy_or_same(THD* thd) bool Item_sum_min::add() { /* args[0] < value */ - int res= cmp->compare(); - if (!args[0]->null_value && - (null_value || res < 0)) + arg_cache->cache_value(); + if (!arg_cache->null_value && + (null_value || cmp->compare() < 0)) { - value->store(args[0]); + value->store(arg_cache); value->cache_value(); null_value= 0; } @@ -1662,11 +1664,11 @@ Item *Item_sum_max::copy_or_same(THD* thd) bool Item_sum_max::add() { /* args[0] > value */ - int res= cmp->compare(); - if (!args[0]->null_value && - (null_value || res > 0)) + arg_cache->cache_value(); + if (!arg_cache->null_value && + (null_value || cmp->compare() > 0)) { - value->store(args[0]); + value->store(arg_cache); value->cache_value(); null_value= 0; } diff --git a/sql/item_sum.h b/sql/item_sum.h index 26290a812f4..de988c196ec 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -823,7 +823,7 @@ class Item_cache; class Item_sum_hybrid :public Item_sum { protected: - Item_cache *value; + Item_cache *value, *arg_cache; Arg_comparator *cmp; Item_result hybrid_type; enum_field_types hybrid_field_type; @@ -832,14 +832,14 @@ protected: public: Item_sum_hybrid(Item *item_par,int sign) - :Item_sum(item_par), value(0), cmp(0), + :Item_sum(item_par), value(0), arg_cache(0), cmp(0), hybrid_type(INT_RESULT), hybrid_field_type(MYSQL_TYPE_LONGLONG), cmp_sign(sign), was_values(TRUE) { collation.set(&my_charset_bin); } Item_sum_hybrid(THD *thd, Item_sum_hybrid *item) - :Item_sum(thd, item), value(item->value), hybrid_type(item->hybrid_type), - hybrid_field_type(item->hybrid_field_type), cmp_sign(item->cmp_sign), - was_values(item->was_values) + :Item_sum(thd, item), value(item->value), arg_cache(0), + hybrid_type(item->hybrid_type), hybrid_field_type(item->hybrid_field_type), + cmp_sign(item->cmp_sign), was_values(item->was_values) { } bool fix_fields(THD *, Item **); void setup_hybrid(Item *item, Item *value_arg); From 029a5df87044dd392d3c393a2ba1c882722c94e0 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Tue, 21 Dec 2010 13:00:26 +0100 Subject: [PATCH 14/20] Bug #58699 cannot build with gcc dbg on solaris cmake/os/SunOS.cmake: Remove TARGET_OS_SOLARIS config.h.cmake: Remove TARGET_OS_SOLARIS Add PTHREAD_ONCE_INITIALIZER configure.cmake: Add function for testing whether we need { PTHREAD_ONCE_INIT } rather than PTHREAD_ONCE_INIT include/my_pthread.h: Use PTHREAD_ONCE_INITIALIZER if set by cmake. include/mysql/psi/mysql_file.h: Include my_global.h first, to get correct platform definitions. mysys/ptr_cmp.c: Hide the unused static functions in #ifdef's on solaris. Use __sun (defined by both gcc and SunPro cc) rather than TARGET_OS_SOLARIS sql/my_decimal.cc: Include my_global.h first, to get correct platform definitions. sql/mysqld.cc: Fix signed/unsigned comparison warning. sql/sql_audit.h: Include my_global.h first, to get correct platform definitions. sql/sql_plugin.h: Include my_global.h first, to get correct platform definitions. sql/sql_show.cc: Fix: warning: cast from pointer to integer of different size sql/sys_vars.h: Use reinterpret_cast rather than c-style cast. storage/perfschema/pfs_instr.cc: Include my_global.h first, to get correct platform definitions. --- cmake/os/SunOS.cmake | 1 - config.h.cmake | 2 +- configure.cmake | 43 +++++++++++++++++++++++++++++++++ include/my_pthread.h | 4 +++ include/mysql/psi/mysql_file.h | 2 ++ mysys/ptr_cmp.c | 21 ++++++++++------ sql/my_decimal.cc | 1 + sql/mysqld.cc | 4 +-- sql/sql_audit.h | 2 ++ sql/sql_plugin.h | 2 ++ sql/sql_show.cc | 2 +- sql/sys_vars.h | 8 ++++-- storage/perfschema/pfs_instr.cc | 2 +- 13 files changed, 79 insertions(+), 15 deletions(-) diff --git a/cmake/os/SunOS.cmake b/cmake/os/SunOS.cmake index e932e6c2b74..9e8ca0ef11f 100644 --- a/cmake/os/SunOS.cmake +++ b/cmake/os/SunOS.cmake @@ -17,7 +17,6 @@ INCLUDE(CheckSymbolExists) INCLUDE(CheckCSourceRuns) INCLUDE(CheckCSourceCompiles) -SET(TARGET_OS_SOLARIS 1) # Enable 64 bit file offsets SET(_FILE_OFFSET_BITS 64) diff --git a/config.h.cmake b/config.h.cmake index 54567df4548..e51dcf51f32 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -226,6 +226,7 @@ #cmakedefine HAVE_PTHREAD_THREADMASK 1 #cmakedefine HAVE_PTHREAD_YIELD_NP 1 #cmakedefine HAVE_PTHREAD_YIELD_ZERO_ARG 1 +#cmakedefine PTHREAD_ONCE_INITIALIZER @PTHREAD_ONCE_INITIALIZER@ #cmakedefine HAVE_PUTENV 1 #cmakedefine HAVE_RE_COMP 1 #cmakedefine HAVE_REGCOMP 1 @@ -406,7 +407,6 @@ #cmakedefine TARGET_OS_LINUX 1 -#cmakedefine TARGET_OS_SOLARIS 1 #cmakedefine HAVE_WCTYPE_H 1 #cmakedefine HAVE_WCHAR_H 1 diff --git a/configure.cmake b/configure.cmake index cba9e79ff23..954b60a45f6 100644 --- a/configure.cmake +++ b/configure.cmake @@ -269,6 +269,49 @@ ENDIF() # FIND_PACKAGE (Threads) +FUNCTION(MY_CHECK_PTHREAD_ONCE_INIT) + CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG) + IF(NOT HAVE_WERROR_FLAG) + RETURN() + ENDIF() + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") + CHECK_C_SOURCE_COMPILES(" + #include + void foo(void) {} + int main() + { + pthread_once_t once_control = PTHREAD_ONCE_INIT; + pthread_once(&once_control, foo); + return 0; + }" + HAVE_PTHREAD_ONCE_INIT + ) + # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6611808 + IF(NOT HAVE_PTHREAD_ONCE_INIT) + CHECK_C_SOURCE_COMPILES(" + #include + void foo(void) {} + int main() + { + pthread_once_t once_control = { PTHREAD_ONCE_INIT }; + pthread_once(&once_control, foo); + return 0; + }" + HAVE_ARRAY_PTHREAD_ONCE_INIT + ) + ENDIF() + IF(HAVE_PTHREAD_ONCE_INIT) + SET(PTHREAD_ONCE_INITIALIZER "PTHREAD_ONCE_INIT" PARENT_SCOPE) + ENDIF() + IF(HAVE_ARRAY_PTHREAD_ONCE_INIT) + SET(PTHREAD_ONCE_INITIALIZER "{ PTHREAD_ONCE_INIT }" PARENT_SCOPE) + ENDIF() +ENDFUNCTION() + +IF(CMAKE_USE_PTHREADS_INIT) + MY_CHECK_PTHREAD_ONCE_INIT() +ENDIF() + # # Tests for functions # diff --git a/include/my_pthread.h b/include/my_pthread.h index bec88a716fe..c71ad9bf321 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -214,7 +214,11 @@ int pthread_cancel(pthread_t thread); typedef void *(* pthread_handler)(void *); #define my_pthread_once_t pthread_once_t +#if defined(PTHREAD_ONCE_INITIALIZER) +#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INITIALIZER +#else #define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT +#endif #define my_pthread_once(C,F) pthread_once(C,F) /* Test first for RTS or FSU threads */ diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h index de145f642e1..6fc6689c47d 100644 --- a/include/mysql/psi/mysql_file.h +++ b/include/mysql/psi/mysql_file.h @@ -16,6 +16,8 @@ #ifndef MYSQL_FILE_H #define MYSQL_FILE_H +#include + /* For strlen() */ #include /* For MY_STAT */ diff --git a/mysys/ptr_cmp.c b/mysys/ptr_cmp.c index 2005e3eb2b7..dcafe13291d 100644 --- a/mysys/ptr_cmp.c +++ b/mysys/ptr_cmp.c @@ -22,7 +22,7 @@ #include "mysys_priv.h" #include -#ifdef TARGET_OS_SOLARIS +#ifdef __sun /* * On Solaris, memcmp() is normally faster than the unrolled ptr_compare_N * functions, as memcmp() is usually a platform-specific implementation @@ -39,22 +39,25 @@ static int native_compare(size_t *length, unsigned char **a, unsigned char **b) return memcmp(*a, *b, *length); } -#else /* TARGET_OS_SOLARIS */ +#else /* __sun */ static int ptr_compare(size_t *compare_length, uchar **a, uchar **b); static int ptr_compare_0(size_t *compare_length, uchar **a, uchar **b); static int ptr_compare_1(size_t *compare_length, uchar **a, uchar **b); static int ptr_compare_2(size_t *compare_length, uchar **a, uchar **b); static int ptr_compare_3(size_t *compare_length, uchar **a, uchar **b); -#endif /* TARGET_OS_SOLARIS */ +#endif /* __sun */ /* Get a pointer to a optimal byte-compare function for a given size */ +#ifdef __sun +qsort2_cmp get_ptr_compare (size_t size __attribute__((unused))) +{ + return (qsort2_cmp) native_compare; +} +#else qsort2_cmp get_ptr_compare (size_t size) { -#ifdef TARGET_OS_SOLARIS - return (qsort2_cmp) native_compare; -#else if (size < 4) return (qsort2_cmp) ptr_compare; switch (size & 3) { @@ -64,8 +67,8 @@ qsort2_cmp get_ptr_compare (size_t size) case 3: return (qsort2_cmp) ptr_compare_3; } return 0; /* Impossible */ -#endif /* TARGET_OS_SOLARIS */ } +#endif /* __sun */ /* @@ -75,6 +78,8 @@ qsort2_cmp get_ptr_compare (size_t size) #define cmp(N) if (first[N] != last[N]) return (int) first[N] - (int) last[N] +#ifndef __sun + static int ptr_compare(size_t *compare_length, uchar **a, uchar **b) { reg3 int length= *compare_length; @@ -177,6 +182,8 @@ static int ptr_compare_3(size_t *compare_length,uchar **a, uchar **b) return (0); } +#endif /* !__sun */ + void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos) { switch (pack_length) { diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc index 8a31cec6721..a5b60739b26 100644 --- a/sql/my_decimal.cc +++ b/sql/my_decimal.cc @@ -13,6 +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 */ +#include #include "sql_priv.h" #include diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d56b6715d6e..c3afa1a5399 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3247,8 +3247,8 @@ static int init_common_variables() size_t *pagesize = (size_t *) malloc(sizeof(size_t) * nelem); if (pagesize != NULL && getpagesizes(pagesize, nelem) > 0) { - size_t i, max_page_size= 0; - for (i= 0; i < nelem; i++) + size_t max_page_size= 0; + for (int i= 0; i < nelem; i++) { if (pagesize[i] > max_page_size && pagesize[i] <= max_desired_page_size) diff --git a/sql/sql_audit.h b/sql/sql_audit.h index d676c3974bc..da44c4a023b 100644 --- a/sql/sql_audit.h +++ b/sql/sql_audit.h @@ -17,6 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #include #include "sql_class.h" diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index 0cbd5a519c1..1b7838ea085 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -16,6 +16,8 @@ #ifndef _sql_plugin_h #define _sql_plugin_h +#include + /* the following #define adds server-only members to enum_mysql_show_type, that is defined in plugin.h diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 0421cc35c5d..80dfde5343e 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2255,7 +2255,7 @@ static bool show_status_array(THD *thd, const char *wild, end= int10_to_str(*(long*) value, buff, 10); break; case SHOW_LONGLONG_STATUS: - value= ((char *) status_var + (ulonglong) value); + value= ((char *) status_var + (ulong) value); /* fall through */ case SHOW_LONGLONG: end= longlong10_to_str(*(longlong*) value, buff, 10); diff --git a/sql/sys_vars.h b/sql/sys_vars.h index e16bd3c5330..c9987ed4674 100644 --- a/sql/sys_vars.h +++ b/sql/sys_vars.h @@ -1191,7 +1191,8 @@ public: void global_save_default(THD *thd, set_var *var) { LEX_STRING pname; - pname.str= *(char**)option.def_value; + char **default_value= reinterpret_cast(option.def_value); + pname.str= *default_value; pname.length= strlen(pname.str); plugin_ref plugin; @@ -1556,7 +1557,10 @@ public: void session_save_default(THD *thd, set_var *var) { var->save_result.ptr= global_var(void*); } void global_save_default(THD *thd, set_var *var) - { var->save_result.ptr= *(void**)option.def_value; } + { + void **default_value= reinterpret_cast(option.def_value); + var->save_result.ptr= *default_value; + } bool check_update_type(Item_result type) { return type != INT_RESULT && type != STRING_RESULT; } uchar *session_value_ptr(THD *thd, LEX_STRING *base) diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc index 904efc2aff4..a09920737c8 100644 --- a/storage/perfschema/pfs_instr.cc +++ b/storage/perfschema/pfs_instr.cc @@ -18,9 +18,9 @@ Performance schema instruments (implementation). */ +#include #include -#include "my_global.h" #include "my_sys.h" #include "pfs.h" #include "pfs_stat.h" From 8493c111874564df175dcd18f96bcc20559ffa73 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Tue, 21 Dec 2010 13:09:38 +0100 Subject: [PATCH 15/20] BUG#59084: rpl_do_grant started to fail on FreeBSD (presumably after BUG#49978) Problem: master executed a statement that would fail on slave (namely, DROP USER 'create_rout_db'@'localhost'). Then the test did: --let $rpl_only_running_threads= 1 --source include/rpl_reset.inc rpl_reset.inc calls rpl_sync.inc, which first checks which of the threads are running and then syncs those threads that are running. If the SQL thread fails after the check, the sync will fail. So there was a race in the test and it failed on some slow hosts. Fix: Don't replicate the failing statement. --- mysql-test/suite/rpl/r/rpl_do_grant.result | 2 ++ mysql-test/suite/rpl/t/rpl_do_grant.test | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index dea58316287..611d1a613a7 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -162,7 +162,9 @@ USE bug42217_db; DROP FUNCTION upgrade_del_func; DROP FUNCTION upgrade_alter_func; DROP DATABASE bug42217_db; +SET SQL_LOG_BIN= 0; DROP USER 'create_rout_db'@'localhost'; +SET SQL_LOG_BIN= 1; include/rpl_reset.inc USE test; ######## BUG#49119 ####### diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index 7b535637658..ded4dac125f 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -216,10 +216,10 @@ DROP DATABASE bug42217_db; -- connection master # user was already dropped in the slave before -# so no need to wait for the slave to replicate -# this statement (if it did and we later synced -# the slave it would end up in an error anyway) +# so we should not replicate this statement. +SET SQL_LOG_BIN= 0; DROP USER 'create_rout_db'@'localhost'; +SET SQL_LOG_BIN= 1; # finish entire clean up (remove binlogs) # so that we leave a pristine environment for the From 9870e244826d9f32336aae419627c8a636694b8d Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Tue, 21 Dec 2010 15:30:07 +0300 Subject: [PATCH 16/20] test case fix --- mysql-test/r/func_group.result | 1 + mysql-test/t/func_group.test | 1 + 2 files changed, 2 insertions(+) diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 60c00c49b33..1a21fb5872f 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1735,5 +1735,6 @@ SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b11111111111111111111111111111111 SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa'); # End of 5.1 tests diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 338bf0e7718..8839a28b9dd 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -1113,6 +1113,7 @@ SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b11111111111111111111111111111111 SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); +SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa'); --enable_result_log From 283630356c9e19522df99b8fe728adcfa426703d Mon Sep 17 00:00:00 2001 From: Anitha Gopi Date: Tue, 21 Dec 2010 23:14:48 +0530 Subject: [PATCH 17/20] BUG #59055: RQG was broken after the checkin that removed rpl and rpl_ndb suites. RQG uses MTR V1 and that still has these in the default suite. Removing these from V1. Also removing references to ndb tests in some more disabled.def files --- mysql-test/lib/v1/mysql-test-run.pl | 2 +- mysql-test/suite/funcs_1/t/disabled.def | 1 - mysql-test/suite/funcs_2/t/disabled.def | 3 --- mysql-test/suite/parts/t/disabled.def | 3 --- 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl index 4e4f09981cc..5abae272c36 100755 --- a/mysql-test/lib/v1/mysql-test-run.pl +++ b/mysql-test/lib/v1/mysql-test-run.pl @@ -135,7 +135,7 @@ our $default_vardir; our $opt_usage; our $opt_suites; -our $opt_suites_default= "main,binlog,rpl,rpl_ndb,ndb"; # Default suites to run +our $opt_suites_default= "main,binlog,rpl"; # Default suites to run our $opt_script_debug= 0; # Script debugging, enable with --script-debug our $opt_verbose= 0; # Verbose output, enable with --verbose diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index 23f15b78103..9bfe9567d83 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -10,4 +10,3 @@ # ############################################################################## -ndb_trig_1011ext: Bug#47564 diff --git a/mysql-test/suite/funcs_2/t/disabled.def b/mysql-test/suite/funcs_2/t/disabled.def index 8ca94961dd2..8b137891791 100644 --- a/mysql-test/suite/funcs_2/t/disabled.def +++ b/mysql-test/suite/funcs_2/t/disabled.def @@ -1,4 +1 @@ -# Should maybe be enabled, but ndb is not part of the ordinary build. -# Bernt M. Johnsen 2010-05-10 -ndb_charset : Bug#20447 Problem with prefix keys with contractions and expansions diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def index 8a1dafe59a2..e69de29bb2d 100644 --- a/mysql-test/suite/parts/t/disabled.def +++ b/mysql-test/suite/parts/t/disabled.def @@ -1,3 +0,0 @@ -partition_basic_ndb : Bug#44919 parts-suite in mtr tries to use features not supported by ndb -# http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html -partition_syntax_ndb : Bug#36735 Not supported From bc56dcea9d7047c5561cee08ec2d74077e329f7d Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Fri, 24 Dec 2010 14:05:04 +0300 Subject: [PATCH 18/20] Bug#57810 case/when/then : Assertion failed: length || !scale ASSERT happens due to improper calculation of the max_length in Item_func_div object, if dividend has max_length == 0 then Item_func_div::max_length is set to 0 under some circumstances. The fix: If decimals == NOT_FIXED_DEC then set Item_func_div::max_length to max possible DOUBLE length value. mysql-test/r/func_math.result: test case mysql-test/t/func_math.test: test case sql/item_func.cc: The fix: If decimals == NOT_FIXED_DEC then set Item_func_div::max_length to max possible DOUBLE length value. --- mysql-test/r/func_math.result | 13 +++++++++++++ mysql-test/t/func_math.test | 9 +++++++++ sql/item_func.cc | 9 +++++++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 649232e0b05..3a626084c9e 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -498,4 +498,17 @@ SELECT -9223372036854775808 MOD -1; SELECT -9223372036854775808999 MOD -1; -9223372036854775808999 MOD -1 0 +# +# Bug#57810 case/when/then : Assertion failed: length || !scale +# +SELECT CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END; +CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END +NULL +CREATE TABLE t1 SELECT CAST((CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END) AS CHAR) as C; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `C` varchar(23) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index b0c92c9d6ab..c8ea11c7490 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -315,4 +315,13 @@ SELECT -9223372036854775808 DIV -1; SELECT -9223372036854775808 MOD -1; SELECT -9223372036854775808999 MOD -1; +--echo # +--echo # Bug#57810 case/when/then : Assertion failed: length || !scale +--echo # + +SELECT CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END; +CREATE TABLE t1 SELECT CAST((CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END) AS CHAR) as C; +SHOW CREATE TABLE t1; +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/sql/item_func.cc b/sql/item_func.cc index 2ba4415dbac..55b81c8c823 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1329,9 +1329,14 @@ void Item_func_div::fix_length_and_dec() { decimals=max(args[0]->decimals,args[1]->decimals)+prec_increment; set_if_smaller(decimals, NOT_FIXED_DEC); - max_length=args[0]->max_length - args[0]->decimals + decimals; uint tmp=float_length(decimals); - set_if_smaller(max_length,tmp); + if (decimals == NOT_FIXED_DEC) + max_length= tmp; + else + { + max_length=args[0]->max_length - args[0]->decimals + decimals; + set_if_smaller(max_length,tmp); + } break; } case INT_RESULT: From 85323eda8a5823e4db1fa34dc998684b67e710b5 Mon Sep 17 00:00:00 2001 From: Kent Boortz Date: Tue, 28 Dec 2010 19:57:23 +0100 Subject: [PATCH 19/20] - Added/updated copyright headers - Removed files specific to compiling on OS/2 - Removed files specific to SCO Unix packaging - Removed "libmysqld/copyright", text is included in documentation - Removed LaTeX headers for NDB Doxygen documentation - Removed obsolete NDB files - Removed "mkisofs" binaries - Removed the "cvs2cl.pl" script - Changed a few GPL texts to use "program" instead of "library" --- BUILD/FINISH.sh | 17 + BUILD/Makefile.am | 4 +- BUILD/SETUP.sh | 17 + BUILD/autorun.sh | 18 + BUILD/check-cpu | 16 + BUILD/cleanup | 15 + BUILD/compile-alpha | 15 + BUILD/compile-alpha-ccc | 15 + BUILD/compile-alpha-cxx | 15 + BUILD/compile-alpha-debug | 15 + BUILD/compile-amd64-debug-max | 16 + BUILD/compile-amd64-gcov | 15 + BUILD/compile-amd64-gprof | 15 + BUILD/compile-amd64-max | 15 + BUILD/compile-amd64-max-sci | 15 + BUILD/compile-darwin-mwcc | 15 + BUILD/compile-dist | 16 + BUILD/compile-hpux11-parisc2-aCC | 15 + BUILD/compile-ia64-debug-max | 15 + BUILD/compile-irix-mips64-mipspro | 15 + BUILD/compile-ndb-autotest | 15 + BUILD/compile-pentium | 15 + BUILD/compile-pentium-cybozu | 15 + BUILD/compile-pentium-debug | 15 + BUILD/compile-pentium-debug-max | 15 + BUILD/compile-pentium-debug-max-no-embedded | 15 + BUILD/compile-pentium-debug-max-no-ndb | 15 + BUILD/compile-pentium-debug-no-bdb | 15 + BUILD/compile-pentium-debug-openssl | 15 + BUILD/compile-pentium-debug-yassl | 15 + BUILD/compile-pentium-gcov | 15 + BUILD/compile-pentium-gprof | 15 + BUILD/compile-pentium-icc | 15 + BUILD/compile-pentium-icc-valgrind-max | 15 + BUILD/compile-pentium-icc-yassl | 15 + BUILD/compile-pentium-max | 15 + BUILD/compile-pentium-myodbc | 15 + BUILD/compile-pentium-mysqlfs-debug | 15 + BUILD/compile-pentium-pgcc | 15 + BUILD/compile-pentium-valgrind-max | 15 + BUILD/compile-pentium64-debug | 15 + BUILD/compile-pentium64-debug-max | 15 + BUILD/compile-pentium64-gcov | 15 + BUILD/compile-pentium64-gprof | 15 + BUILD/compile-pentium64-max-sci | 15 + BUILD/compile-pentium64-valgrind-max | 15 + BUILD/compile-ppc | 15 + BUILD/compile-ppc-debug | 15 + BUILD/compile-ppc-debug-max | 15 + BUILD/compile-ppc-debug-max-no-ndb | 15 + BUILD/compile-ppc-max | 15 + BUILD/compile-sap | 15 + BUILD/compile-sap-debug | 15 + BUILD/compile-solaris-amd64 | 16 + BUILD/compile-solaris-amd64-debug | 16 + BUILD/compile-solaris-amd64-forte | 15 + BUILD/compile-solaris-amd64-forte-debug | 15 + BUILD/compile-solaris-sparc | 15 + BUILD/compile-solaris-sparc-debug | 15 + BUILD/compile-solaris-sparc-forte | 15 + BUILD/compile-solaris-sparc-purify | 15 + BUILD/test-alpha-ccc | 15 + Makefile.am | 4 +- client/completion_hash.h | 4 +- configure.in | 1 - dbug/dbug_add_tags.pl | 15 + extra/yassl/CMakeLists.txt | 2 +- extra/yassl/Makefile.am | 15 + extra/yassl/examples/client/client.cpp | 18 + .../yassl/examples/echoclient/echoclient.cpp | 18 + .../yassl/examples/echoserver/echoserver.cpp | 18 + extra/yassl/examples/server/server.cpp | 18 + extra/yassl/include/lock.hpp | 2 +- extra/yassl/include/openssl/crypto.h | 18 + extra/yassl/include/openssl/des.h | 18 + extra/yassl/include/openssl/des_old.h | 18 + extra/yassl/include/openssl/engine.h | 18 + extra/yassl/include/openssl/err.h | 18 + extra/yassl/include/openssl/evp.h | 18 + .../include/openssl/generate_prefix_files.pl | 16 + extra/yassl/include/openssl/hmac.h | 18 + extra/yassl/include/openssl/lhash.h | 18 + extra/yassl/include/openssl/md4.h | 18 + extra/yassl/include/openssl/md5.h | 18 + extra/yassl/include/openssl/objects.h | 18 + extra/yassl/include/openssl/opensslv.h | 18 + extra/yassl/include/openssl/pem.h | 18 + extra/yassl/include/openssl/pkcs12.h | 18 + extra/yassl/include/openssl/prefix_crypto.h | 18 + extra/yassl/include/openssl/prefix_ssl.h | 18 + extra/yassl/include/openssl/rand.h | 18 + extra/yassl/include/openssl/rsa.h | 18 + extra/yassl/include/openssl/sha.h | 18 + extra/yassl/include/openssl/x509.h | 18 + extra/yassl/include/openssl/x509v3.h | 18 + extra/yassl/src/Makefile.am | 15 + extra/yassl/src/lock.cpp | 2 +- extra/yassl/src/make.bat | 15 + extra/yassl/taocrypt/CMakeLists.txt | 2 +- extra/yassl/taocrypt/Makefile.am | 15 + extra/yassl/taocrypt/benchmark/Makefile.am | 15 + extra/yassl/taocrypt/benchmark/benchmark.cpp | 18 + extra/yassl/taocrypt/benchmark/make.bat | 15 + extra/yassl/taocrypt/src/Makefile.am | 15 + extra/yassl/taocrypt/src/make.bat | 15 + extra/yassl/taocrypt/test/Makefile.am | 15 + extra/yassl/taocrypt/test/make.bat | 15 + extra/yassl/taocrypt/test/memory.cpp | 18 + extra/yassl/taocrypt/test/test.cpp | 18 + extra/yassl/testsuite/Makefile.am | 15 + extra/yassl/testsuite/make.bat | 15 + extra/yassl/testsuite/test.hpp | 18 + extra/yassl/testsuite/testsuite.cpp | 18 + heap/hp_delete.c | 2 +- include/Makefile.am | 6 +- include/config-os2.h | 835 ---- include/my_handler.h | 4 +- include/my_sys.h | 2 +- include/mysql_com.h | 2 +- libmysqld/copyright | 14 - libmysqld/examples/test-run | 15 + man/Makefile.am | 4 +- myisam/ftbench/Ecompare.pl | 15 + myisam/ftbench/Ecreate.pl | 15 + myisam/ftbench/Ereport.pl | 15 + myisam/ftbench/ft-test-run.sh | 17 + myisam/mi_test_all.sh | 18 + myisam/myisampack.c | 4 +- myisam/rt_index.c | 2 +- mysql-test/Makefile.am | 4 +- mysql-test/create-test-result | 17 + mysql-test/fix-result | 17 + mysql-test/lib/mtr_cases.pl | 2 +- mysql-test/lib/mtr_process.pl | 2 +- mysql-test/misc/kill_master.sh | 17 + mysql-test/misc/mysql-test_V1.9.pl | 18 + mysql-test/mysql-stress-test.pl | 18 + mysql-test/mysql-test-run-shell.sh | 18 + mysql-test/mysql-test-run.pl | 17 + mysql-test/ndb/Makefile.am | 14 + mysql-test/ndb/ndb_config_1_node.ini | 17 + mysql-test/ndb/ndb_config_2_node.ini | 17 + mysql-test/ndb/ndb_config_4_node.ini | 17 + mysql-test/purify.supp | 17 + mysql-test/resolve-stack | 18 + mysql-test/valgrind.supp | 17 + mysys/Makefile.am | 5 +- mysys/mf_pack.c | 2 +- mysys/my_lib.c | 4 - mysys/my_os2cond.c | 162 - mysys/my_os2dirsrch.c | 184 - mysys/my_os2dirsrch.h | 88 - mysys/my_os2dlfcn.c | 74 - mysys/my_os2dlfcn.h0 | 39 - mysys/my_os2file64.c | 394 -- mysys/my_os2mutex.c | 83 - mysys/my_os2thread.c | 128 - mysys/my_os2tls.c | 151 - ndb/Makefile.am | 3 +- ndb/config/make-win-dsw.sh | 14 + ndb/config/win-includes | 15 + ndb/config/win-libraries | 15 + ndb/config/win-name | 15 + ndb/config/win-sources | 15 + ndb/docs/Makefile.am | 2 +- ndb/docs/doxygen/Doxyfile.mgmapi | 17 +- ndb/docs/doxygen/Doxyfile.ndb | 15 + ndb/docs/doxygen/Doxyfile.ndbapi | 17 +- ndb/docs/doxygen/Doxyfile.odbc | 15 + ndb/docs/doxygen/header.mgmapi.tex | 44 - ndb/docs/doxygen/header.ndbapi.tex | 44 - ndb/docs/doxygen/postdoxy.pl | 15 + ndb/docs/doxygen/predoxy.pl | 15 + ndb/home/bin/Linuxmkisofs | Bin 503146 -> 0 bytes ndb/home/bin/Solarismkisofs | Bin 634084 -> 0 bytes ndb/home/bin/cvs2cl.pl | 1865 --------- ndb/home/bin/fix-cvs-root | 15 + ndb/home/bin/import-from-bk.sh | 15 + ndb/home/bin/ndb_deploy | 15 + ndb/home/bin/ndbdoxy.pl | 16 + ndb/home/bin/ngcalc | 15 + ndb/home/bin/parseConfigFile.awk | 15 + ndb/home/bin/setup-test.sh | 15 + .../bin/signallog2html.lib/signallog2list.awk | 15 + .../bin/signallog2html.lib/uniq_blocks.awk | 15 + ndb/home/bin/signallog2html.sh | 16 + ndb/home/bin/stripcr | 14 + ndb/home/lib/funcs.sh | 15 + ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs | 15 + ndb/src/cw/cpcc-win32/csharp/Computer.cs | 15 + .../cw/cpcc-win32/csharp/ComputerAddDialog.cs | 15 + .../cpcc-win32/csharp/ComputerRemoveDialog.cs | 15 + ndb/src/cw/cpcc-win32/csharp/Database.cs | 15 + ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs | 15 + ndb/src/cw/cpcc-win32/csharp/Process.cs | 15 + .../cpcc-win32/csharp/ProcessDefineDialog.cs | 15 + .../cpcc-win32/csharp/fileaccess/FileMgmt.cs | 15 + .../csharp/simpleparser/SimpleCPCParser.cs | 15 + .../csharp/socketcomm/SocketComm.cs | 15 + .../csharp/socketcomm/myTcpClient.cs | 15 + .../cw/cpcc-win32/csharp/startDatabaseDlg.cs | 15 + .../csharp/telnetclient/telnetClient.cs | 15 + ndb/src/cw/cpcc-win32/vb6/Computer.cls | 20 - ndb/src/cw/cpcc-win32/vb6/Database.cls | 18 - ndb/src/cw/cpcc-win32/vb6/Icon 110.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 231.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 237.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 241.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 242.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 270.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 271.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 273.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 31.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 337.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 338.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/Icon 339.ico | Bin 766 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/MSSCCPRJ.SCC | 5 - ndb/src/cw/cpcc-win32/vb6/Module1.bas | 233 -- ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbp | 49 - ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbw | 13 - ndb/src/cw/cpcc-win32/vb6/Process.cls | 22 - ndb/src/cw/cpcc-win32/vb6/closed folder.ico | Bin 10134 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/computer.ico | Bin 10134 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/frmAbout.frm | 245 -- ndb/src/cw/cpcc-win32/vb6/frmLogin.frm | 119 - ndb/src/cw/cpcc-win32/vb6/frmMain.frm | 1207 ------ ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frm | 124 - ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frx | Bin 4 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/frmNewDatabase.frx | Bin 12 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/frmNewDatabase1.frm | 187 - ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.frm | 136 - ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.log | 1 - ndb/src/cw/cpcc-win32/vb6/frmNewDatabase3.frm | 88 - ndb/src/cw/cpcc-win32/vb6/frmOptions.frm | 231 -- ndb/src/cw/cpcc-win32/vb6/frmSplash.frx | Bin 70450 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/networking.ico | Bin 10134 -> 0 bytes ndb/src/cw/cpcc-win32/vb6/open folder.ico | Bin 10134 -> 0 bytes ndb/src/libndb.ver.in | 15 + ndb/src/old_files/client/Makefile | 9 - ndb/src/old_files/client/odbc/Extra.mk | 59 - ndb/src/old_files/client/odbc/Makefile | 75 - ndb/src/old_files/client/odbc/NdbOdbc.cpp | 78 - ndb/src/old_files/client/odbc/NdbOdbc.def | 85 - .../old_files/client/odbc/codegen/CodeGen.cpp | 229 - .../old_files/client/odbc/codegen/CodeGen.hpp | 69 - .../client/odbc/codegen/Code_base.cpp | 167 - .../client/odbc/codegen/Code_base.hpp | 237 -- .../client/odbc/codegen/Code_column.cpp | 72 - .../client/odbc/codegen/Code_column.hpp | 122 - .../client/odbc/codegen/Code_comp_op.cpp | 485 --- .../client/odbc/codegen/Code_comp_op.hpp | 172 - .../client/odbc/codegen/Code_create_index.cpp | 124 - .../client/odbc/codegen/Code_create_index.hpp | 203 - .../client/odbc/codegen/Code_create_row.cpp | 162 - .../client/odbc/codegen/Code_create_row.hpp | 99 - .../client/odbc/codegen/Code_create_table.cpp | 137 - .../client/odbc/codegen/Code_create_table.hpp | 178 - .../client/odbc/codegen/Code_data_type.cpp | 44 - .../client/odbc/codegen/Code_data_type.hpp | 49 - .../client/odbc/codegen/Code_ddl.cpp | 37 - .../client/odbc/codegen/Code_ddl.hpp | 63 - .../client/odbc/codegen/Code_ddl_column.cpp | 104 - .../client/odbc/codegen/Code_ddl_column.hpp | 150 - .../client/odbc/codegen/Code_ddl_constr.cpp | 51 - .../client/odbc/codegen/Code_ddl_constr.hpp | 65 - .../client/odbc/codegen/Code_ddl_row.cpp | 54 - .../client/odbc/codegen/Code_ddl_row.hpp | 72 - .../client/odbc/codegen/Code_delete.cpp | 205 - .../client/odbc/codegen/Code_delete.hpp | 69 - .../client/odbc/codegen/Code_delete_index.cpp | 164 - .../client/odbc/codegen/Code_delete_index.hpp | 156 - .../odbc/codegen/Code_delete_lookup.cpp | 162 - .../odbc/codegen/Code_delete_lookup.hpp | 152 - .../client/odbc/codegen/Code_delete_scan.cpp | 110 - .../client/odbc/codegen/Code_delete_scan.hpp | 130 - .../client/odbc/codegen/Code_dml.cpp | 51 - .../client/odbc/codegen/Code_dml.hpp | 67 - .../client/odbc/codegen/Code_dml_column.cpp | 47 - .../client/odbc/codegen/Code_dml_column.hpp | 46 - .../client/odbc/codegen/Code_dml_row.cpp | 56 - .../client/odbc/codegen/Code_dml_row.hpp | 76 - .../client/odbc/codegen/Code_drop_index.cpp | 87 - .../client/odbc/codegen/Code_drop_index.hpp | 136 - .../client/odbc/codegen/Code_drop_table.cpp | 87 - .../client/odbc/codegen/Code_drop_table.hpp | 124 - .../client/odbc/codegen/Code_expr.cpp | 79 - .../client/odbc/codegen/Code_expr.hpp | 219 - .../client/odbc/codegen/Code_expr_column.cpp | 160 - .../client/odbc/codegen/Code_expr_column.hpp | 120 - .../client/odbc/codegen/Code_expr_const.cpp | 138 - .../client/odbc/codegen/Code_expr_const.hpp | 120 - .../client/odbc/codegen/Code_expr_conv.cpp | 273 -- .../client/odbc/codegen/Code_expr_conv.hpp | 141 - .../client/odbc/codegen/Code_expr_func.cpp | 401 -- .../client/odbc/codegen/Code_expr_func.hpp | 193 - .../client/odbc/codegen/Code_expr_op.cpp | 424 -- .../client/odbc/codegen/Code_expr_op.hpp | 166 - .../client/odbc/codegen/Code_expr_param.cpp | 279 -- .../client/odbc/codegen/Code_expr_param.hpp | 136 - .../client/odbc/codegen/Code_expr_row.cpp | 204 - .../client/odbc/codegen/Code_expr_row.hpp | 272 -- .../client/odbc/codegen/Code_idx_column.cpp | 49 - .../client/odbc/codegen/Code_idx_column.hpp | 50 - .../client/odbc/codegen/Code_insert.cpp | 253 -- .../client/odbc/codegen/Code_insert.hpp | 229 - .../client/odbc/codegen/Code_pred.cpp | 70 - .../client/odbc/codegen/Code_pred.hpp | 172 - .../client/odbc/codegen/Code_pred_op.cpp | 188 - .../client/odbc/codegen/Code_pred_op.hpp | 158 - .../client/odbc/codegen/Code_query.cpp | 299 -- .../client/odbc/codegen/Code_query.hpp | 155 - .../client/odbc/codegen/Code_query_count.cpp | 177 - .../client/odbc/codegen/Code_query_count.hpp | 162 - .../odbc/codegen/Code_query_distinct.cpp | 204 - .../odbc/codegen/Code_query_distinct.hpp | 165 - .../client/odbc/codegen/Code_query_filter.cpp | 161 - .../client/odbc/codegen/Code_query_filter.hpp | 162 - .../client/odbc/codegen/Code_query_group.cpp | 301 -- .../client/odbc/codegen/Code_query_group.hpp | 221 - .../client/odbc/codegen/Code_query_index.cpp | 186 - .../client/odbc/codegen/Code_query_index.hpp | 160 - .../client/odbc/codegen/Code_query_join.cpp | 192 - .../client/odbc/codegen/Code_query_join.hpp | 159 - .../client/odbc/codegen/Code_query_lookup.cpp | 184 - .../client/odbc/codegen/Code_query_lookup.hpp | 155 - .../odbc/codegen/Code_query_project.cpp | 184 - .../odbc/codegen/Code_query_project.hpp | 178 - .../client/odbc/codegen/Code_query_range.cpp | 211 - .../client/odbc/codegen/Code_query_range.hpp | 186 - .../client/odbc/codegen/Code_query_repeat.cpp | 109 - .../client/odbc/codegen/Code_query_repeat.hpp | 133 - .../client/odbc/codegen/Code_query_scan.cpp | 177 - .../client/odbc/codegen/Code_query_scan.hpp | 174 - .../client/odbc/codegen/Code_query_sort.cpp | 239 -- .../client/odbc/codegen/Code_query_sort.hpp | 208 - .../client/odbc/codegen/Code_query_sys.cpp | 130 - .../client/odbc/codegen/Code_query_sys.hpp | 148 - .../client/odbc/codegen/Code_root.cpp | 307 -- .../client/odbc/codegen/Code_root.hpp | 162 - .../client/odbc/codegen/Code_select.cpp | 406 -- .../client/odbc/codegen/Code_select.hpp | 132 - .../client/odbc/codegen/Code_set_row.cpp | 44 - .../client/odbc/codegen/Code_set_row.hpp | 76 - .../client/odbc/codegen/Code_stmt.cpp | 49 - .../client/odbc/codegen/Code_stmt.hpp | 76 - .../client/odbc/codegen/Code_table.cpp | 254 -- .../client/odbc/codegen/Code_table.hpp | 202 - .../client/odbc/codegen/Code_table_list.cpp | 53 - .../client/odbc/codegen/Code_table_list.hpp | 73 - .../client/odbc/codegen/Code_update.cpp | 246 -- .../client/odbc/codegen/Code_update.hpp | 102 - .../client/odbc/codegen/Code_update_index.cpp | 196 - .../client/odbc/codegen/Code_update_index.hpp | 171 - .../odbc/codegen/Code_update_lookup.cpp | 194 - .../odbc/codegen/Code_update_lookup.hpp | 167 - .../client/odbc/codegen/Code_update_scan.cpp | 146 - .../client/odbc/codegen/Code_update_scan.hpp | 160 - .../old_files/client/odbc/codegen/Makefile | 104 - .../client/odbc/codegen/SimpleGram.ypp | 1649 -------- .../client/odbc/codegen/SimpleParser.cpp | 96 - .../client/odbc/codegen/SimpleParser.hpp | 161 - .../client/odbc/codegen/SimpleScan.lpp | 243 -- .../old_files/client/odbc/common/AttrArea.cpp | 91 - .../old_files/client/odbc/common/AttrArea.hpp | 135 - .../old_files/client/odbc/common/CodeTree.cpp | 37 - .../old_files/client/odbc/common/CodeTree.hpp | 49 - .../old_files/client/odbc/common/ConnArea.cpp | 109 - .../old_files/client/odbc/common/ConnArea.hpp | 135 - ndb/src/old_files/client/odbc/common/Ctx.cpp | 355 -- ndb/src/old_files/client/odbc/common/Ctx.hpp | 182 - .../client/odbc/common/DataField.cpp | 3023 -------------- .../client/odbc/common/DataField.hpp | 446 -- .../old_files/client/odbc/common/DataRow.cpp | 140 - .../old_files/client/odbc/common/DataRow.hpp | 185 - .../old_files/client/odbc/common/DataType.cpp | 551 --- .../old_files/client/odbc/common/DataType.hpp | 293 -- .../old_files/client/odbc/common/DescArea.cpp | 167 - .../old_files/client/odbc/common/DescArea.hpp | 266 -- .../old_files/client/odbc/common/DiagArea.cpp | 284 -- .../old_files/client/odbc/common/DiagArea.hpp | 196 - ndb/src/old_files/client/odbc/common/Makefile | 29 - .../old_files/client/odbc/common/OdbcData.cpp | 560 --- .../old_files/client/odbc/common/OdbcData.hpp | 283 -- .../client/odbc/common/ResultArea.cpp | 29 - .../client/odbc/common/ResultArea.hpp | 162 - .../old_files/client/odbc/common/Sqlstate.cpp | 93 - .../old_files/client/odbc/common/Sqlstate.hpp | 85 - .../old_files/client/odbc/common/StmtArea.cpp | 112 - .../old_files/client/odbc/common/StmtArea.hpp | 157 - .../old_files/client/odbc/common/StmtInfo.cpp | 78 - .../old_files/client/odbc/common/StmtInfo.hpp | 86 - .../old_files/client/odbc/common/common.cpp | 17 - .../old_files/client/odbc/common/common.hpp | 124 - .../client/odbc/dictionary/DictCatalog.cpp | 42 - .../client/odbc/dictionary/DictCatalog.hpp | 64 - .../client/odbc/dictionary/DictColumn.cpp | 23 - .../client/odbc/dictionary/DictColumn.hpp | 143 - .../client/odbc/dictionary/DictIndex.cpp | 29 - .../client/odbc/dictionary/DictIndex.hpp | 108 - .../client/odbc/dictionary/DictSchema.cpp | 155 - .../client/odbc/dictionary/DictSchema.hpp | 89 - .../client/odbc/dictionary/DictSys.cpp | 433 -- .../client/odbc/dictionary/DictSys.hpp | 77 - .../client/odbc/dictionary/DictTable.cpp | 91 - .../client/odbc/dictionary/DictTable.hpp | 192 - .../old_files/client/odbc/dictionary/Makefile | 20 - ndb/src/old_files/client/odbc/docs/class.fig | 332 -- .../old_files/client/odbc/docs/descfield.pl | 1482 ------- ndb/src/old_files/client/odbc/docs/diag.txt | 48 - ndb/src/old_files/client/odbc/docs/getinfo.pl | 3676 ----------------- .../old_files/client/odbc/docs/gettypeinfo.pl | 645 --- .../old_files/client/odbc/docs/handleattr.pl | 2232 ---------- ndb/src/old_files/client/odbc/docs/main.hpp | 104 - .../old_files/client/odbc/docs/ndbodbc.html | 659 --- ndb/src/old_files/client/odbc/docs/select.fig | 94 - .../old_files/client/odbc/docs/systables.pl | 2192 ---------- ndb/src/old_files/client/odbc/docs/type.txt | 333 -- .../old_files/client/odbc/driver/Func.data | 2822 ------------- ndb/src/old_files/client/odbc/driver/Func.pl | 352 -- ndb/src/old_files/client/odbc/driver/Makefile | 16 - .../client/odbc/driver/SQLAllocConnect.cpp | 52 - .../client/odbc/driver/SQLAllocEnv.cpp | 46 - .../client/odbc/driver/SQLAllocHandle.cpp | 62 - .../client/odbc/driver/SQLAllocHandleStd.cpp | 56 - .../client/odbc/driver/SQLAllocStmt.cpp | 52 - .../client/odbc/driver/SQLBindCol.cpp | 50 - .../client/odbc/driver/SQLBindParam.cpp | 52 - .../client/odbc/driver/SQLBindParameter.cpp | 54 - .../client/odbc/driver/SQLBrowseConnect.cpp | 61 - .../client/odbc/driver/SQLBulkOperations.cpp | 53 - .../client/odbc/driver/SQLCancel.cpp | 45 - .../client/odbc/driver/SQLCloseCursor.cpp | 45 - .../client/odbc/driver/SQLColAttribute.cpp | 51 - .../client/odbc/driver/SQLColAttributes.cpp | 51 - .../odbc/driver/SQLColumnPrivileges.cpp | 67 - .../client/odbc/driver/SQLColumns.cpp | 49 - .../client/odbc/driver/SQLConnect.cpp | 51 - .../client/odbc/driver/SQLCopyDesc.cpp | 58 - .../client/odbc/driver/SQLDataSources.cpp | 65 - .../client/odbc/driver/SQLDescribeCol.cpp | 53 - .../client/odbc/driver/SQLDescribeParam.cpp | 50 - .../client/odbc/driver/SQLDisconnect.cpp | 45 - .../client/odbc/driver/SQLDriverConnect.cpp | 52 - .../client/odbc/driver/SQLDrivers.cpp | 65 - .../client/odbc/driver/SQLEndTran.cpp | 70 - .../old_files/client/odbc/driver/SQLError.cpp | 67 - .../client/odbc/driver/SQLExecDirect.cpp | 47 - .../client/odbc/driver/SQLExecute.cpp | 45 - .../client/odbc/driver/SQLExtendedFetch.cpp | 59 - .../old_files/client/odbc/driver/SQLFetch.cpp | 45 - .../client/odbc/driver/SQLFetchScroll.cpp | 55 - .../client/odbc/driver/SQLForeignKeys.cpp | 75 - .../client/odbc/driver/SQLFreeConnect.cpp | 53 - .../client/odbc/driver/SQLFreeEnv.cpp | 52 - .../client/odbc/driver/SQLFreeHandle.cpp | 60 - .../client/odbc/driver/SQLFreeStmt.cpp | 54 - .../client/odbc/driver/SQLGetConnectAttr.cpp | 49 - .../odbc/driver/SQLGetConnectOption.cpp | 47 - .../client/odbc/driver/SQLGetCursorName.cpp | 48 - .../client/odbc/driver/SQLGetData.cpp | 50 - .../client/odbc/driver/SQLGetDescField.cpp | 50 - .../client/odbc/driver/SQLGetDescRec.cpp | 55 - .../client/odbc/driver/SQLGetDiagField.cpp | 50 - .../client/odbc/driver/SQLGetDiagRec.cpp | 51 - .../client/odbc/driver/SQLGetEnvAttr.cpp | 66 - .../client/odbc/driver/SQLGetFunctions.cpp | 47 - .../client/odbc/driver/SQLGetInfo.cpp | 49 - .../client/odbc/driver/SQLGetStmtAttr.cpp | 49 - .../client/odbc/driver/SQLGetStmtOption.cpp | 47 - .../client/odbc/driver/SQLGetTypeInfo.cpp | 46 - .../client/odbc/driver/SQLMoreResults.cpp | 42 - .../client/odbc/driver/SQLNativeSql.cpp | 61 - .../client/odbc/driver/SQLNumParams.cpp | 46 - .../client/odbc/driver/SQLNumResultCols.cpp | 46 - .../client/odbc/driver/SQLParamData.cpp | 46 - .../client/odbc/driver/SQLParamOptions.cpp | 55 - .../client/odbc/driver/SQLPrepare.cpp | 47 - .../client/odbc/driver/SQLPrimaryKeys.cpp | 47 - .../odbc/driver/SQLProcedureColumns.cpp | 67 - .../client/odbc/driver/SQLProcedures.cpp | 63 - .../client/odbc/driver/SQLPutData.cpp | 47 - .../client/odbc/driver/SQLRowCount.cpp | 46 - .../client/odbc/driver/SQLSetConnectAttr.cpp | 48 - .../odbc/driver/SQLSetConnectOption.cpp | 47 - .../client/odbc/driver/SQLSetCursorName.cpp | 47 - .../client/odbc/driver/SQLSetDescField.cpp | 49 - .../client/odbc/driver/SQLSetDescRec.cpp | 54 - .../client/odbc/driver/SQLSetEnvAttr.cpp | 65 - .../client/odbc/driver/SQLSetParam.cpp | 52 - .../client/odbc/driver/SQLSetPos.cpp | 57 - .../odbc/driver/SQLSetScrollOptions.cpp | 57 - .../client/odbc/driver/SQLSetStmtAttr.cpp | 48 - .../client/odbc/driver/SQLSetStmtOption.cpp | 47 - .../client/odbc/driver/SQLSpecialColumns.cpp | 69 - .../client/odbc/driver/SQLStatistics.cpp | 67 - .../client/odbc/driver/SQLTablePrivileges.cpp | 63 - .../client/odbc/driver/SQLTables.cpp | 49 - .../client/odbc/driver/SQLTransact.cpp | 71 - .../old_files/client/odbc/driver/driver.cpp | 150 - .../old_files/client/odbc/driver/driver.hpp | 28 - .../client/odbc/executor/Exec_comp_op.cpp | 518 --- .../odbc/executor/Exec_create_index.cpp | 46 - .../odbc/executor/Exec_create_table.cpp | 83 - .../odbc/executor/Exec_delete_index.cpp | 82 - .../odbc/executor/Exec_delete_lookup.cpp | 82 - .../client/odbc/executor/Exec_delete_scan.cpp | 54 - .../client/odbc/executor/Exec_drop_index.cpp | 38 - .../client/odbc/executor/Exec_drop_table.cpp | 38 - .../client/odbc/executor/Exec_expr_conv.cpp | 54 - .../client/odbc/executor/Exec_expr_func.cpp | 284 -- .../client/odbc/executor/Exec_expr_op.cpp | 147 - .../client/odbc/executor/Exec_insert.cpp | 144 - .../client/odbc/executor/Exec_pred_op.cpp | 197 - .../client/odbc/executor/Exec_query_index.cpp | 136 - .../odbc/executor/Exec_query_lookup.cpp | 136 - .../client/odbc/executor/Exec_query_range.cpp | 143 - .../client/odbc/executor/Exec_query_scan.cpp | 130 - .../client/odbc/executor/Exec_query_sys.cpp | 761 ---- .../odbc/executor/Exec_update_index.cpp | 96 - .../odbc/executor/Exec_update_lookup.cpp | 96 - .../client/odbc/executor/Exec_update_scan.cpp | 61 - .../client/odbc/executor/Executor.cpp | 68 - .../client/odbc/executor/Executor.hpp | 52 - .../old_files/client/odbc/executor/Makefile | 36 - .../old_files/client/odbc/handles/AttrDbc.cpp | 473 --- .../old_files/client/odbc/handles/AttrEnv.cpp | 123 - .../client/odbc/handles/AttrRoot.cpp | 92 - .../client/odbc/handles/AttrStmt.cpp | 1005 ----- .../client/odbc/handles/DescSpec.cpp | 1140 ----- .../old_files/client/odbc/handles/FuncTab.cpp | 100 - .../client/odbc/handles/HandleBase.cpp | 162 - .../client/odbc/handles/HandleBase.hpp | 67 - .../client/odbc/handles/HandleDbc.cpp | 419 -- .../client/odbc/handles/HandleDbc.hpp | 111 - .../client/odbc/handles/HandleDesc.cpp | 254 -- .../client/odbc/handles/HandleDesc.hpp | 89 - .../client/odbc/handles/HandleEnv.cpp | 144 - .../client/odbc/handles/HandleEnv.hpp | 77 - .../client/odbc/handles/HandleRoot.cpp | 271 -- .../client/odbc/handles/HandleRoot.hpp | 103 - .../client/odbc/handles/HandleStmt.cpp | 823 ---- .../client/odbc/handles/HandleStmt.hpp | 117 - .../old_files/client/odbc/handles/InfoTab.cpp | 878 ---- .../old_files/client/odbc/handles/Makefile | 28 - .../old_files/client/odbc/handles/PoolNdb.cpp | 81 - .../old_files/client/odbc/handles/PoolNdb.hpp | 44 - .../old_files/client/odbc/handles/handles.hpp | 28 - ndb/src/old_files/ndbbaseclient/Makefile | 29 - .../ndbbaseclient/ndbbaseclient_dummy.cpp | 0 ndb/src/old_files/ndbclient/Makefile | 37 - .../old_files/ndbclient/ndbclient_dummy.cpp | 0 ndb/src/old_files/newtonapi/Makefile | 27 - ndb/src/old_files/newtonapi/dba_binding.cpp | 439 -- ndb/src/old_files/newtonapi/dba_bulkread.cpp | 267 -- ndb/src/old_files/newtonapi/dba_config.cpp | 115 - ndb/src/old_files/newtonapi/dba_dac.cpp | 842 ---- ndb/src/old_files/newtonapi/dba_error.cpp | 118 - ndb/src/old_files/newtonapi/dba_init.cpp | 86 - ndb/src/old_files/newtonapi/dba_internal.hpp | 122 - ndb/src/old_files/newtonapi/dba_process.cpp | 123 - ndb/src/old_files/newtonapi/dba_process.hpp | 56 - ndb/src/old_files/newtonapi/dba_schema.cpp | 150 - ndb/src/old_files/rep/ExtSender.cpp | 149 - ndb/src/old_files/rep/ExtSender.hpp | 76 - ndb/src/old_files/rep/Makefile | 28 - ndb/src/old_files/rep/NodeConnectInfo.hpp | 29 - ndb/src/old_files/rep/README | 147 - ndb/src/old_files/rep/RepApiInterpreter.cpp | 80 - ndb/src/old_files/rep/RepApiInterpreter.hpp | 54 - ndb/src/old_files/rep/RepApiService.cpp | 318 -- ndb/src/old_files/rep/RepApiService.hpp | 59 - .../old_files/rep/RepCommandInterpreter.cpp | 456 -- .../old_files/rep/RepCommandInterpreter.hpp | 45 - ndb/src/old_files/rep/RepComponents.cpp | 138 - ndb/src/old_files/rep/RepComponents.hpp | 60 - ndb/src/old_files/rep/RepMain.cpp | 97 - ndb/src/old_files/rep/Requestor.cpp | 224 - ndb/src/old_files/rep/Requestor.hpp | 154 - .../old_files/rep/RequestorSubscriptions.cpp | 60 - ndb/src/old_files/rep/SignalQueue.cpp | 106 - ndb/src/old_files/rep/SignalQueue.hpp | 117 - ndb/src/old_files/rep/TODO | 119 - ndb/src/old_files/rep/adapters/AppNDB.cpp | 583 --- ndb/src/old_files/rep/adapters/AppNDB.hpp | 141 - ndb/src/old_files/rep/adapters/ExtAPI.cpp | 31 - ndb/src/old_files/rep/adapters/ExtAPI.hpp | 107 - ndb/src/old_files/rep/adapters/ExtNDB.cpp | 559 --- ndb/src/old_files/rep/adapters/ExtNDB.hpp | 118 - ndb/src/old_files/rep/adapters/Makefile | 11 - .../old_files/rep/adapters/TableInfoPs.hpp | 118 - ndb/src/old_files/rep/dbug_hack.cpp | 75 - ndb/src/old_files/rep/rep_version.hpp | 88 - ndb/src/old_files/rep/repapi/Makefile | 25 - ndb/src/old_files/rep/repapi/repapi.cpp | 598 --- ndb/src/old_files/rep/repapi/repapi.h | 216 - ndb/src/old_files/rep/state/Channel.cpp | 487 --- ndb/src/old_files/rep/state/Channel.hpp | 206 - ndb/src/old_files/rep/state/Interval.cpp | 171 - ndb/src/old_files/rep/state/Interval.hpp | 107 - ndb/src/old_files/rep/state/Makefile | 17 - ndb/src/old_files/rep/state/RepState.cpp | 869 ---- ndb/src/old_files/rep/state/RepState.hpp | 276 -- ndb/src/old_files/rep/state/RepStateEvent.cpp | 284 -- .../old_files/rep/state/RepStateRequests.cpp | 294 -- .../old_files/rep/state/testInterval/Makefile | 12 - .../rep/state/testInterval/testInterval.cpp | 127 - .../old_files/rep/state/testRepState/Makefile | 15 - .../rep/state/testRepState/testRequestor.cpp | 166 - .../rep/state/testRepState/testRequestor.hpp | 24 - ndb/src/old_files/rep/storage/GCIBuffer.cpp | 173 - ndb/src/old_files/rep/storage/GCIBuffer.hpp | 112 - .../old_files/rep/storage/GCIContainer.cpp | 272 -- .../old_files/rep/storage/GCIContainer.hpp | 121 - .../old_files/rep/storage/GCIContainerPS.cpp | 128 - .../old_files/rep/storage/GCIContainerPS.hpp | 90 - ndb/src/old_files/rep/storage/GCIPage.cpp | 165 - ndb/src/old_files/rep/storage/GCIPage.hpp | 114 - ndb/src/old_files/rep/storage/LogRecord.hpp | 81 - ndb/src/old_files/rep/storage/Makefile | 14 - .../old_files/rep/storage/NodeConnectInfo.hpp | 29 - ndb/src/old_files/rep/storage/NodeGroup.cpp | 149 - ndb/src/old_files/rep/storage/NodeGroup.hpp | 109 - .../old_files/rep/storage/NodeGroupInfo.cpp | 218 - .../old_files/rep/storage/NodeGroupInfo.hpp | 145 - ndb/src/old_files/rep/transfer/Makefile | 11 - ndb/src/old_files/rep/transfer/TransPS.cpp | 553 --- ndb/src/old_files/rep/transfer/TransPS.hpp | 136 - ndb/src/old_files/rep/transfer/TransSS.cpp | 653 --- ndb/src/old_files/rep/transfer/TransSS.hpp | 145 - .../rep/transfer/TransSSSubscriptions.cpp | 193 - ndb/test/ndbapi/old_dirs/acid/Makefile | 10 - ndb/test/ndbapi/old_dirs/acid2/Makefile | 10 - .../ndbapi/old_dirs/acid2/TraceNdbApi.hpp | 131 - .../ndbapi/old_dirs/acid2/VerifyNdbApi.hpp | 465 --- ndb/test/ndbapi/old_dirs/basicAsynch/Makefile | 9 - ndb/test/ndbapi/old_dirs/bulk_copy/Makefile | 9 - .../ndbapi/old_dirs/create_all_tabs/Makefile | 11 - ndb/test/ndbapi/old_dirs/create_tab/Makefile | 11 - .../ndbapi/old_dirs/drop_all_tabs/Makefile | 11 - ndb/test/ndbapi/old_dirs/flexAsynch/Makefile | 11 - .../ndbapi/old_dirs/flexBench/Makefile.am | 10 - ndb/test/ndbapi/old_dirs/flexBench/ndbplot.pl | 305 -- ndb/test/ndbapi/old_dirs/flexHammer/Makefile | 9 - ndb/test/ndbapi/old_dirs/flexHammer/README | 67 - ndb/test/ndbapi/old_dirs/flexScan/Makefile | 9 - ndb/test/ndbapi/old_dirs/flexScan/README | 66 - ndb/test/ndbapi/old_dirs/flexTT/Makefile | 11 - .../ndbapi/old_dirs/flexTimedAsynch/Makefile | 11 - .../ndbapi/old_dirs/flex_bench_mysql/Makefile | 15 - ndb/test/ndbapi/old_dirs/indexTest/Makefile | 9 - ndb/test/ndbapi/old_dirs/indexTest2/Makefile | 9 - .../ndbapi/old_dirs/interpreterInTup/Makefile | 10 - ndb/test/ndbapi/old_dirs/lmc-bench/Makefile | 6 - .../old_dirs/lmc-bench/async-src/Makefile | 8 - .../lmc-bench/async-src/generator/Makefile | 13 - .../lmc-bench/async-src/include/dbGenerator.h | 62 - .../lmc-bench/async-src/include/testData.h | 155 - .../async-src/include/userInterface.h | 78 - .../lmc-bench/async-src/user/Makefile | 11 - .../lmc-bench/async-src/user/macros.h | 50 - .../lmc-bench/async-src/user/ndb_error.hpp | 62 - ndb/test/ndbapi/old_dirs/lmc-bench/bin/.empty | 0 .../old_dirs/lmc-bench/include/ndb_schema.hpp | 77 - .../lmc-bench/include/testDefinitions.h | 89 - ndb/test/ndbapi/old_dirs/lmc-bench/lib/.empty | 0 .../ndbapi/old_dirs/lmc-bench/script/Makefile | 5 - .../lmc-bench/script/async-lmc-bench-l-p10.sh | 14 - .../lmc-bench/script/async-lmc-bench-l.sh | 14 - .../lmc-bench/script/async-lmc-bench-p10.sh | 14 - .../lmc-bench/script/async-lmc-bench.sh | 14 - .../ndbapi/old_dirs/lmc-bench/src/Makefile | 8 - ndb/test/ndbapi/old_dirs/lmc-bench/src/README | 8 - .../old_dirs/lmc-bench/src/generator/Makefile | 17 - .../lmc-bench/src/generator/dbGenerator.c | 542 --- .../lmc-bench/src/generator/dbGenerator.h | 60 - .../lmc-bench/src/generator/mainGenerator.c | 322 -- .../old_dirs/lmc-bench/src/include/testData.h | 102 - .../lmc-bench/src/include/userInterface.h | 127 - .../old_dirs/lmc-bench/src/makevars.linux | 6 - .../old_dirs/lmc-bench/src/makevars.sparc | 15 - .../old_dirs/lmc-bench/src/populator/Makefile | 15 - .../lmc-bench/src/populator/dbPopulate.c | 243 -- .../lmc-bench/src/populator/dbPopulate.h | 58 - .../lmc-bench/src/populator/mainPopulate.c | 75 - .../old_dirs/lmc-bench/src/user/Makefile | 11 - .../lmc-bench/src/user/localDbPrepare.c | 647 --- .../old_dirs/lmc-bench/src/user/macros.h | 50 - .../old_dirs/lmc-bench/src/user/ndb_error.hpp | 30 - .../old_dirs/lmc-bench/src/user/old/Makefile | 10 - .../lmc-bench/src/user/old/userHandle.h | 189 - .../lmc-bench/src/user/old/userInterface.c | 452 -- .../lmc-bench/src/user/old/userTransaction.c | 472 --- .../old_dirs/lmc-bench/src/user/userHandle.h | 50 - .../lmc-bench/src/user/userInterface.cpp | 738 ---- .../lmc-bench/src/user/userTransaction.c | 472 --- ndb/test/ndbapi/old_dirs/restarter/Makefile | 11 - ndb/test/ndbapi/old_dirs/restarter2/Makefile | 11 - ndb/test/ndbapi/old_dirs/restarts/Makefile | 11 - ndb/test/ndbapi/old_dirs/ronja/Makefile | 6 - .../ndbapi/old_dirs/ronja/benchronja/Makefile | 10 - .../ndbapi/old_dirs/ronja/initronja/Makefile | 9 - ndb/test/ndbapi/old_dirs/telco/Makefile | 10 - ndb/test/ndbapi/old_dirs/telco/readme | 9 - ndb/test/ndbapi/old_dirs/testBackup/Makefile | 8 - ndb/test/ndbapi/old_dirs/testBasic/Makefile | 9 - ndb/test/ndbapi/old_dirs/testBlobs/Makefile | 11 - .../ndbapi/old_dirs/testDataBuffers/Makefile | 9 - ndb/test/ndbapi/old_dirs/testDict/Makefile | 11 - ndb/test/ndbapi/old_dirs/testGrep/Makefile | 9 - .../ndbapi/old_dirs/testGrep/verify/Makefile | 10 - ndb/test/ndbapi/old_dirs/testIndex/Makefile | 11 - .../ndbapi/old_dirs/testInterpreter/Makefile | 9 - ndb/test/ndbapi/old_dirs/testMgm/Makefile | 9 - ndb/test/ndbapi/old_dirs/testNdbApi/Makefile | 9 - .../ndbapi/old_dirs/testNodeRestart/Makefile | 9 - ndb/test/ndbapi/old_dirs/testOIBasic/Makefile | 13 - .../ndbapi/old_dirs/testOIBasic/times.txt | 8 - .../ndbapi/old_dirs/testOperations/Makefile | 9 - .../ndbapi/old_dirs/testOrderedIndex/Makefile | 9 - .../ndbapi/old_dirs/testRestartGci/Makefile | 9 - ndb/test/ndbapi/old_dirs/testScan/Makefile | 9 - .../old_dirs/testScanInterpreter/Makefile | 9 - .../old_dirs/testSystemRestart/Makefile | 11 - ndb/test/ndbapi/old_dirs/testTimeout/Makefile | 9 - .../ndbapi/old_dirs/testTransactions/Makefile | 10 - ndb/test/ndbapi/old_dirs/test_event/Makefile | 9 - ndb/test/ndbapi/old_dirs/vw_test/Makefile | 11 - ndb/test/ndbapi/old_dirs/vw_test/bcd.h | 25 - .../old_dirs/vw_test/script/client_start | 10 - ndb/test/ndbapi/old_dirs/vw_test/utv.h | 160 - ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h | 54 - ndb/test/ndbapi/slow_select.cpp | 14 + ndb/test/ndbapi/testBitfield.cpp | 14 + ndb/test/ndbapi/testLcp.cpp | 14 + ndb/test/ndbnet/test.run | 15 + ndb/test/ndbnet/testError.run | 17 + ndb/test/ndbnet/testMNF.run | 17 + ndb/test/ndbnet/testNR.run | 15 + ndb/test/ndbnet/testNR1.run | 17 + ndb/test/ndbnet/testNR4.run | 17 + ndb/test/ndbnet/testSRhang.run | 15 + ndb/test/ndbnet/testTR295.run | 17 + ndb/test/run-test/16node-tests.txt | 15 + ndb/test/run-test/atrt-analyze-result.sh | 17 + ndb/test/run-test/atrt-clear-result.sh | 17 + ndb/test/run-test/atrt-gather-result.sh | 17 + ndb/test/run-test/atrt-mysql-test-run | 17 + ndb/test/run-test/atrt-setup.sh | 17 + ndb/test/run-test/atrt-testBackup | 17 + ndb/test/run-test/basic.txt | 15 + .../run-test/conf-daily-devel-ndbmaster.txt | 15 + .../run-test/conf-daily-sql-ndbmaster.txt | 15 + ndb/test/run-test/conf-dl145a.txt | 15 + ndb/test/run-test/conf-ndbmaster.txt | 15 + ndb/test/run-test/conf-shark.txt | 15 + ndb/test/run-test/daily-basic-tests.txt | 15 + ndb/test/run-test/daily-devel-tests.txt | 15 + ndb/test/run-test/make-config.sh | 17 + ndb/test/run-test/make-html-reports.sh | 17 + ndb/test/run-test/make-index.sh | 18 + ndb/test/run-test/ndb-autotest.sh | 18 + ndb/test/sql/test_create_drop.pl | 17 + ndb/test/sql/test_range_bounds.pl | 17 + ndb/tools/clean-links.sh | 15 + ndb/tools/make-errors.pl | 15 + ndb/tools/make-links.sh | 15 + ndb/tools/ndb_error_reporter | 15 + ndb/tools/ndb_size.pl | 30 +- ndb/tools/ndb_size.tmpl | 17 + ndb/tools/rgrep | 15 + os2/BldLevel.RES | Bin 127 -> 0 bytes os2/BldLevel.cmd | 10 - os2/BldLevel.rc | 1 - os2/BldLevelInf.cmd | 570 --- os2/ChangeLog.os2 | 56 - os2/Makefile.am | 27 - os2/MySQL-Client.icc | 122 - os2/MySQL-Opt.icc | 59 - os2/MySQL-Source.icc | 324 -- os2/MySQL-Sql.icc | 44 - os2/MySQL-Sql.irs | 7 - os2/MySQL-Util.icc | 171 - os2/MySQL-Util.irs | 3271 --------------- os2/ReadMe.txt | 205 - os2/build-all.cmd | 10 - os2/include/Makefile.am | 22 - os2/include/config.h | 13 - os2/include/pwd.h | 1 - os2/include/sgtty.h | 1 - os2/include/sys/Makefile.am | 21 - os2/include/sys/file.h | 1 - os2/include/termio.h | 156 - os2/mysql-inf.wis | 15 - os2/mysql.wis | 127 - os2/mysqlalt.wis | 15 - os2/rint.cmd | 4 - os2/rint.obj | Bin 334 -> 0 bytes os2/rint.s | 32 - scripts/fill_help_tables.sql | 15 + scripts/make_binary_distribution.sh | 2 +- scripts/make_win_bin_dist | 2 +- scripts/make_win_src_distribution_old.sh | 4 +- scripts/mysql_fix_extensions.sh | 18 + .../mysql_prepare_privilege_tables_for_5.sql | 14 + scripts/mysql_setpermission.sh | 18 + scripts/mysql_system_tables.sql | 15 + scripts/mysql_system_tables_data.sql | 15 + scripts/mysql_system_tables_fix.sql | 15 + scripts/mysql_tableinfo.sh | 17 + scripts/mysql_test_data_timezone.sql | 15 + scripts/mysqlaccess.sh | 18 + scripts/mysqld_multi.sh | 17 + scripts/mysqldumpslow.sh | 18 + scripts/mysqlhotcopy.sh | 17 + server-tools/instance-manager/options.cc | 4 +- sql/field.cc | 2 +- sql/gen_lex_hash.cc | 4 +- sql/item.h | 2 +- sql/item_cmpfunc.cc | 2 +- sql/item_cmpfunc.h | 2 +- sql/item_func.cc | 2 +- sql/item_func.h | 2 +- sql/item_subselect.cc | 2 +- sql/item_sum.cc | 2 +- sql/message.h | 15 + sql/mysqld.cc | 2 +- sql/net_serv.cc | 6 +- sql/opt_range.cc | 2 +- sql/set_var.cc | 2 +- sql/set_var.h | 2 +- sql/share/charsets/languages.html | 16 + sql/sql_base.cc | 2 +- sql/sql_class.h | 2 +- sql/sql_parse.cc | 2 +- sql/sql_prepare.cc | 2 +- sql/sql_select.cc | 2 +- sql/sql_select.h | 2 +- sql/sql_show.cc | 2 +- sql/sql_update.cc | 2 +- sql/table.h | 2 +- strings/strtod.c | 22 + support-files/MacOSX/Description.plist.sh | 16 + support-files/MacOSX/Info.plist.sh | 16 + support-files/MacOSX/Makefile.am | 4 +- support-files/MacOSX/MySQLCOM | 16 + .../MacOSX/StartupItem.Description.plist | 16 + support-files/MacOSX/StartupItem.Info.plist | 16 + support-files/MacOSX/StartupItem.postinstall | 16 + .../MacOSX/StartupParameters.plist.sh | 16 + support-files/MacOSX/mwar-wrapper | 15 + support-files/MacOSX/mwcc-wrapper | 15 + support-files/MacOSX/postflight.sh | 18 + support-files/MacOSX/preflight.sh | 18 + support-files/Makefile.am | 4 +- support-files/RHEL4-SElinux/Makefile.am | 4 +- support-files/RHEL4-SElinux/mysql.fc | 15 + support-files/RHEL4-SElinux/mysql.te | 14 + support-files/SCO/INSTALL.sh | 29 - support-files/SCO/compile.sh | 102 - support-files/SCO/doc.sh | 17 - support-files/SCO/mkpkg.sh | 47 - support-files/SCO/patch | 96 - support-files/SCO/pkginfo.ini | 8 - support-files/SCO/postinstall | 30 - support-files/SCO/preinstall | 21 - support-files/SCO/preremove | 25 - support-files/SCO/prototype.ini | 4 - support-files/SCO/version | 1 - support-files/compiler_warnings.supp | 15 + support-files/mysql.spec.sh | 2 +- tests/Makefile.am | 4 +- tests/big_record.pl | 15 + tests/drop_test.pl | 16 + tests/export.pl | 15 + tests/fork2_test.pl | 15 + tests/fork_big.pl | 16 + tests/fork_big2.pl | 16 + tests/grant.pl | 16 + tests/index_corrupt.pl | 16 + tests/insert_and_repair.pl | 16 + tests/lock_test.pl | 15 + tests/mysql_client_test.c | 2 +- tests/pmail.pl | 16 + tests/rename_test.pl | 16 + tests/table_types.pl | 16 +- tests/test_delayed_insert.pl | 15 + tests/truncate.pl | 16 + win/create_manifest.js | 15 + win/mysql_manifest.cmake | 14 + 889 files changed, 4032 insertions(+), 93816 deletions(-) delete mode 100644 include/config-os2.h delete mode 100644 libmysqld/copyright delete mode 100644 mysys/my_os2cond.c delete mode 100644 mysys/my_os2dirsrch.c delete mode 100644 mysys/my_os2dirsrch.h delete mode 100644 mysys/my_os2dlfcn.c delete mode 100644 mysys/my_os2dlfcn.h0 delete mode 100644 mysys/my_os2file64.c delete mode 100644 mysys/my_os2mutex.c delete mode 100644 mysys/my_os2thread.c delete mode 100644 mysys/my_os2tls.c delete mode 100644 ndb/docs/doxygen/header.mgmapi.tex delete mode 100644 ndb/docs/doxygen/header.ndbapi.tex delete mode 100755 ndb/home/bin/Linuxmkisofs delete mode 100755 ndb/home/bin/Solarismkisofs delete mode 100755 ndb/home/bin/cvs2cl.pl delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Computer.cls delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Database.cls delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 110.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 231.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 237.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 241.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 242.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 270.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 271.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 273.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 31.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 337.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 338.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Icon 339.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/MSSCCPRJ.SCC delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Module1.bas delete mode 100644 ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbp delete mode 100644 ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbw delete mode 100644 ndb/src/cw/cpcc-win32/vb6/Process.cls delete mode 100644 ndb/src/cw/cpcc-win32/vb6/closed folder.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/computer.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmAbout.frm delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmLogin.frm delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmMain.frm delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frm delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frx delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmNewDatabase.frx delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmNewDatabase1.frm delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.frm delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.log delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmNewDatabase3.frm delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmOptions.frm delete mode 100644 ndb/src/cw/cpcc-win32/vb6/frmSplash.frx delete mode 100644 ndb/src/cw/cpcc-win32/vb6/networking.ico delete mode 100644 ndb/src/cw/cpcc-win32/vb6/open folder.ico delete mode 100644 ndb/src/old_files/client/Makefile delete mode 100644 ndb/src/old_files/client/odbc/Extra.mk delete mode 100644 ndb/src/old_files/client/odbc/Makefile delete mode 100755 ndb/src/old_files/client/odbc/NdbOdbc.cpp delete mode 100755 ndb/src/old_files/client/odbc/NdbOdbc.def delete mode 100644 ndb/src/old_files/client/odbc/codegen/CodeGen.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/CodeGen.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_base.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_base.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_column.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_column.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_comp_op.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_comp_op.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_create_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_create_index.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_create_row.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_create_row.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_create_table.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_create_table.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_data_type.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_data_type.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_ddl.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_ddl.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_ddl_column.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_ddl_column.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_ddl_constr.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_ddl_constr.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_ddl_row.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_ddl_row.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_delete.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_delete.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_delete_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_delete_index.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_delete_lookup.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_delete_lookup.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_delete_scan.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_delete_scan.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_dml.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_dml.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_dml_column.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_dml_column.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_dml_row.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_dml_row.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_drop_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_drop_index.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_drop_table.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_drop_table.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_column.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_column.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_const.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_const.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_conv.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_conv.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_func.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_func.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_op.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_op.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_param.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_param.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_row.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_expr_row.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_idx_column.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_idx_column.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_insert.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_insert.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_pred.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_pred.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_pred_op.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_pred_op.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_count.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_count.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_distinct.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_distinct.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_filter.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_filter.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_group.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_group.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_index.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_join.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_join.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_lookup.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_lookup.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_project.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_project.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_range.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_range.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_repeat.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_repeat.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_scan.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_scan.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_sort.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_sort.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_sys.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_query_sys.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_root.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_root.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_select.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_select.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_set_row.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_set_row.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_stmt.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_stmt.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_table.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_table.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_table_list.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_table_list.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_update.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_update.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_update_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_update_index.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_update_lookup.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_update_lookup.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_update_scan.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Code_update_scan.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/Makefile delete mode 100644 ndb/src/old_files/client/odbc/codegen/SimpleGram.ypp delete mode 100644 ndb/src/old_files/client/odbc/codegen/SimpleParser.cpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/SimpleParser.hpp delete mode 100644 ndb/src/old_files/client/odbc/codegen/SimpleScan.lpp delete mode 100644 ndb/src/old_files/client/odbc/common/AttrArea.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/AttrArea.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/CodeTree.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/CodeTree.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/ConnArea.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/ConnArea.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/Ctx.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/Ctx.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/DataField.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/DataField.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/DataRow.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/DataRow.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/DataType.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/DataType.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/DescArea.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/DescArea.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/DiagArea.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/DiagArea.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/Makefile delete mode 100644 ndb/src/old_files/client/odbc/common/OdbcData.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/OdbcData.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/ResultArea.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/ResultArea.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/Sqlstate.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/Sqlstate.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/StmtArea.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/StmtArea.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/StmtInfo.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/StmtInfo.hpp delete mode 100644 ndb/src/old_files/client/odbc/common/common.cpp delete mode 100644 ndb/src/old_files/client/odbc/common/common.hpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictCatalog.cpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictCatalog.hpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictColumn.cpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictColumn.hpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictIndex.cpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictIndex.hpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictSchema.cpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictSchema.hpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictSys.cpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictSys.hpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictTable.cpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/DictTable.hpp delete mode 100644 ndb/src/old_files/client/odbc/dictionary/Makefile delete mode 100644 ndb/src/old_files/client/odbc/docs/class.fig delete mode 100644 ndb/src/old_files/client/odbc/docs/descfield.pl delete mode 100644 ndb/src/old_files/client/odbc/docs/diag.txt delete mode 100644 ndb/src/old_files/client/odbc/docs/getinfo.pl delete mode 100644 ndb/src/old_files/client/odbc/docs/gettypeinfo.pl delete mode 100644 ndb/src/old_files/client/odbc/docs/handleattr.pl delete mode 100644 ndb/src/old_files/client/odbc/docs/main.hpp delete mode 100644 ndb/src/old_files/client/odbc/docs/ndbodbc.html delete mode 100644 ndb/src/old_files/client/odbc/docs/select.fig delete mode 100644 ndb/src/old_files/client/odbc/docs/systables.pl delete mode 100644 ndb/src/old_files/client/odbc/docs/type.txt delete mode 100644 ndb/src/old_files/client/odbc/driver/Func.data delete mode 100644 ndb/src/old_files/client/odbc/driver/Func.pl delete mode 100644 ndb/src/old_files/client/odbc/driver/Makefile delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLAllocConnect.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLAllocEnv.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLAllocHandle.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLAllocHandleStd.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLAllocStmt.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLBindCol.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLBindParam.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLBindParameter.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLBrowseConnect.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLBulkOperations.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLCancel.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLCloseCursor.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLColAttribute.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLColAttributes.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLColumnPrivileges.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLColumns.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLConnect.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLCopyDesc.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLDataSources.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLDescribeCol.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLDescribeParam.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLDisconnect.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLDriverConnect.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLDrivers.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLEndTran.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLError.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLExecDirect.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLExecute.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLExtendedFetch.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLFetch.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLFetchScroll.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLForeignKeys.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLFreeConnect.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLFreeEnv.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLFreeHandle.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLFreeStmt.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetConnectAttr.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetConnectOption.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetCursorName.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetData.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetDescField.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetDescRec.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetDiagField.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetDiagRec.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetEnvAttr.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetFunctions.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetInfo.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetStmtAttr.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetStmtOption.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLGetTypeInfo.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLMoreResults.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLNativeSql.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLNumParams.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLNumResultCols.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLParamData.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLParamOptions.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLPrepare.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLPrimaryKeys.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLProcedureColumns.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLProcedures.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLPutData.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLRowCount.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetConnectAttr.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetConnectOption.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetCursorName.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetDescField.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetDescRec.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetEnvAttr.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetParam.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetPos.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetScrollOptions.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetStmtAttr.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSetStmtOption.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLSpecialColumns.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLStatistics.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLTablePrivileges.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLTables.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/SQLTransact.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/driver.cpp delete mode 100644 ndb/src/old_files/client/odbc/driver/driver.hpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_comp_op.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_create_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_create_table.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_delete_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_delete_lookup.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_delete_scan.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_drop_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_drop_table.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_expr_conv.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_expr_func.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_expr_op.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_insert.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_pred_op.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_query_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_query_lookup.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_query_range.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_query_scan.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_query_sys.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_update_index.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_update_lookup.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Exec_update_scan.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Executor.cpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Executor.hpp delete mode 100644 ndb/src/old_files/client/odbc/executor/Makefile delete mode 100644 ndb/src/old_files/client/odbc/handles/AttrDbc.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/AttrEnv.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/AttrRoot.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/AttrStmt.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/DescSpec.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/FuncTab.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleBase.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleBase.hpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleDbc.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleDbc.hpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleDesc.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleDesc.hpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleEnv.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleEnv.hpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleRoot.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleRoot.hpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleStmt.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/HandleStmt.hpp delete mode 100644 ndb/src/old_files/client/odbc/handles/InfoTab.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/Makefile delete mode 100644 ndb/src/old_files/client/odbc/handles/PoolNdb.cpp delete mode 100644 ndb/src/old_files/client/odbc/handles/PoolNdb.hpp delete mode 100644 ndb/src/old_files/client/odbc/handles/handles.hpp delete mode 100644 ndb/src/old_files/ndbbaseclient/Makefile delete mode 100644 ndb/src/old_files/ndbbaseclient/ndbbaseclient_dummy.cpp delete mode 100644 ndb/src/old_files/ndbclient/Makefile delete mode 100644 ndb/src/old_files/ndbclient/ndbclient_dummy.cpp delete mode 100644 ndb/src/old_files/newtonapi/Makefile delete mode 100644 ndb/src/old_files/newtonapi/dba_binding.cpp delete mode 100644 ndb/src/old_files/newtonapi/dba_bulkread.cpp delete mode 100644 ndb/src/old_files/newtonapi/dba_config.cpp delete mode 100644 ndb/src/old_files/newtonapi/dba_dac.cpp delete mode 100644 ndb/src/old_files/newtonapi/dba_error.cpp delete mode 100644 ndb/src/old_files/newtonapi/dba_init.cpp delete mode 100644 ndb/src/old_files/newtonapi/dba_internal.hpp delete mode 100644 ndb/src/old_files/newtonapi/dba_process.cpp delete mode 100644 ndb/src/old_files/newtonapi/dba_process.hpp delete mode 100644 ndb/src/old_files/newtonapi/dba_schema.cpp delete mode 100644 ndb/src/old_files/rep/ExtSender.cpp delete mode 100644 ndb/src/old_files/rep/ExtSender.hpp delete mode 100644 ndb/src/old_files/rep/Makefile delete mode 100644 ndb/src/old_files/rep/NodeConnectInfo.hpp delete mode 100644 ndb/src/old_files/rep/README delete mode 100644 ndb/src/old_files/rep/RepApiInterpreter.cpp delete mode 100644 ndb/src/old_files/rep/RepApiInterpreter.hpp delete mode 100644 ndb/src/old_files/rep/RepApiService.cpp delete mode 100644 ndb/src/old_files/rep/RepApiService.hpp delete mode 100644 ndb/src/old_files/rep/RepCommandInterpreter.cpp delete mode 100644 ndb/src/old_files/rep/RepCommandInterpreter.hpp delete mode 100644 ndb/src/old_files/rep/RepComponents.cpp delete mode 100644 ndb/src/old_files/rep/RepComponents.hpp delete mode 100644 ndb/src/old_files/rep/RepMain.cpp delete mode 100644 ndb/src/old_files/rep/Requestor.cpp delete mode 100644 ndb/src/old_files/rep/Requestor.hpp delete mode 100644 ndb/src/old_files/rep/RequestorSubscriptions.cpp delete mode 100644 ndb/src/old_files/rep/SignalQueue.cpp delete mode 100644 ndb/src/old_files/rep/SignalQueue.hpp delete mode 100644 ndb/src/old_files/rep/TODO delete mode 100644 ndb/src/old_files/rep/adapters/AppNDB.cpp delete mode 100644 ndb/src/old_files/rep/adapters/AppNDB.hpp delete mode 100644 ndb/src/old_files/rep/adapters/ExtAPI.cpp delete mode 100644 ndb/src/old_files/rep/adapters/ExtAPI.hpp delete mode 100644 ndb/src/old_files/rep/adapters/ExtNDB.cpp delete mode 100644 ndb/src/old_files/rep/adapters/ExtNDB.hpp delete mode 100644 ndb/src/old_files/rep/adapters/Makefile delete mode 100644 ndb/src/old_files/rep/adapters/TableInfoPs.hpp delete mode 100644 ndb/src/old_files/rep/dbug_hack.cpp delete mode 100644 ndb/src/old_files/rep/rep_version.hpp delete mode 100644 ndb/src/old_files/rep/repapi/Makefile delete mode 100644 ndb/src/old_files/rep/repapi/repapi.cpp delete mode 100644 ndb/src/old_files/rep/repapi/repapi.h delete mode 100644 ndb/src/old_files/rep/state/Channel.cpp delete mode 100644 ndb/src/old_files/rep/state/Channel.hpp delete mode 100644 ndb/src/old_files/rep/state/Interval.cpp delete mode 100644 ndb/src/old_files/rep/state/Interval.hpp delete mode 100644 ndb/src/old_files/rep/state/Makefile delete mode 100644 ndb/src/old_files/rep/state/RepState.cpp delete mode 100644 ndb/src/old_files/rep/state/RepState.hpp delete mode 100644 ndb/src/old_files/rep/state/RepStateEvent.cpp delete mode 100644 ndb/src/old_files/rep/state/RepStateRequests.cpp delete mode 100644 ndb/src/old_files/rep/state/testInterval/Makefile delete mode 100644 ndb/src/old_files/rep/state/testInterval/testInterval.cpp delete mode 100644 ndb/src/old_files/rep/state/testRepState/Makefile delete mode 100644 ndb/src/old_files/rep/state/testRepState/testRequestor.cpp delete mode 100644 ndb/src/old_files/rep/state/testRepState/testRequestor.hpp delete mode 100644 ndb/src/old_files/rep/storage/GCIBuffer.cpp delete mode 100644 ndb/src/old_files/rep/storage/GCIBuffer.hpp delete mode 100644 ndb/src/old_files/rep/storage/GCIContainer.cpp delete mode 100644 ndb/src/old_files/rep/storage/GCIContainer.hpp delete mode 100644 ndb/src/old_files/rep/storage/GCIContainerPS.cpp delete mode 100644 ndb/src/old_files/rep/storage/GCIContainerPS.hpp delete mode 100644 ndb/src/old_files/rep/storage/GCIPage.cpp delete mode 100644 ndb/src/old_files/rep/storage/GCIPage.hpp delete mode 100644 ndb/src/old_files/rep/storage/LogRecord.hpp delete mode 100644 ndb/src/old_files/rep/storage/Makefile delete mode 100644 ndb/src/old_files/rep/storage/NodeConnectInfo.hpp delete mode 100644 ndb/src/old_files/rep/storage/NodeGroup.cpp delete mode 100644 ndb/src/old_files/rep/storage/NodeGroup.hpp delete mode 100644 ndb/src/old_files/rep/storage/NodeGroupInfo.cpp delete mode 100644 ndb/src/old_files/rep/storage/NodeGroupInfo.hpp delete mode 100644 ndb/src/old_files/rep/transfer/Makefile delete mode 100644 ndb/src/old_files/rep/transfer/TransPS.cpp delete mode 100644 ndb/src/old_files/rep/transfer/TransPS.hpp delete mode 100644 ndb/src/old_files/rep/transfer/TransSS.cpp delete mode 100644 ndb/src/old_files/rep/transfer/TransSS.hpp delete mode 100644 ndb/src/old_files/rep/transfer/TransSSSubscriptions.cpp delete mode 100644 ndb/test/ndbapi/old_dirs/acid/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/acid2/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp delete mode 100644 ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp delete mode 100755 ndb/test/ndbapi/old_dirs/basicAsynch/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/bulk_copy/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/create_all_tabs/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/create_tab/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/drop_all_tabs/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/flexAsynch/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/flexBench/Makefile.am delete mode 100755 ndb/test/ndbapi/old_dirs/flexBench/ndbplot.pl delete mode 100644 ndb/test/ndbapi/old_dirs/flexHammer/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/flexHammer/README delete mode 100644 ndb/test/ndbapi/old_dirs/flexScan/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/flexScan/README delete mode 100644 ndb/test/ndbapi/old_dirs/flexTT/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/flexTimedAsynch/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/flex_bench_mysql/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/indexTest/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/indexTest2/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/interpreterInTup/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/async-src/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/async-src/generator/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/bin/.empty delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/lib/.empty delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/script/Makefile delete mode 100755 ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l-p10.sh delete mode 100755 ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l.sh delete mode 100755 ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-p10.sh delete mode 100755 ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench.sh delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/README delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.linux delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.sparc delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/mainPopulate.c delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/localDbPrepare.c delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp delete mode 100644 ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c delete mode 100644 ndb/test/ndbapi/old_dirs/restarter/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/restarter2/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/restarts/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/ronja/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/ronja/benchronja/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/ronja/initronja/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/telco/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/telco/readme delete mode 100644 ndb/test/ndbapi/old_dirs/testBackup/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testBasic/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testBlobs/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testDataBuffers/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testDict/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testGrep/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testGrep/verify/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testIndex/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testInterpreter/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testMgm/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testNdbApi/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testNodeRestart/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testOIBasic/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testOIBasic/times.txt delete mode 100644 ndb/test/ndbapi/old_dirs/testOperations/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testOrderedIndex/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testRestartGci/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testScan/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testScanInterpreter/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testSystemRestart/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testTimeout/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/testTransactions/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/test_event/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/vw_test/Makefile delete mode 100644 ndb/test/ndbapi/old_dirs/vw_test/bcd.h delete mode 100644 ndb/test/ndbapi/old_dirs/vw_test/script/client_start delete mode 100644 ndb/test/ndbapi/old_dirs/vw_test/utv.h delete mode 100644 ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h delete mode 100644 os2/BldLevel.RES delete mode 100644 os2/BldLevel.cmd delete mode 100644 os2/BldLevel.rc delete mode 100644 os2/BldLevelInf.cmd delete mode 100644 os2/ChangeLog.os2 delete mode 100644 os2/Makefile.am delete mode 100644 os2/MySQL-Client.icc delete mode 100644 os2/MySQL-Opt.icc delete mode 100644 os2/MySQL-Source.icc delete mode 100644 os2/MySQL-Sql.icc delete mode 100644 os2/MySQL-Sql.irs delete mode 100644 os2/MySQL-Util.icc delete mode 100644 os2/MySQL-Util.irs delete mode 100644 os2/ReadMe.txt delete mode 100644 os2/build-all.cmd delete mode 100644 os2/include/Makefile.am delete mode 100644 os2/include/config.h delete mode 100644 os2/include/pwd.h delete mode 100644 os2/include/sgtty.h delete mode 100644 os2/include/sys/Makefile.am delete mode 100644 os2/include/sys/file.h delete mode 100644 os2/include/termio.h delete mode 100644 os2/mysql-inf.wis delete mode 100644 os2/mysql.wis delete mode 100644 os2/mysqlalt.wis delete mode 100644 os2/rint.cmd delete mode 100644 os2/rint.obj delete mode 100644 os2/rint.s delete mode 100755 support-files/SCO/INSTALL.sh delete mode 100644 support-files/SCO/compile.sh delete mode 100644 support-files/SCO/doc.sh delete mode 100644 support-files/SCO/mkpkg.sh delete mode 100644 support-files/SCO/patch delete mode 100644 support-files/SCO/pkginfo.ini delete mode 100644 support-files/SCO/postinstall delete mode 100644 support-files/SCO/preinstall delete mode 100644 support-files/SCO/preremove delete mode 100644 support-files/SCO/prototype.ini delete mode 100644 support-files/SCO/version diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index 2fc8015ea28..7c73d8e0723 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -1,3 +1,20 @@ +# Copyright (C) 2000, 2005 MySQL AB, 2008 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + cflags="$c_warnings $extra_flags" cxxflags="$cxx_warnings $base_cxxflags $extra_flags" extra_configs="$extra_configs $local_infile_configs" diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am index ee0f07864e8..43ffc78e82e 100644 --- a/BUILD/Makefile.am +++ b/BUILD/Makefile.am @@ -1,11 +1,11 @@ # Copyright (C) 2002, 2004-2005 MySQL AB # -# This library is free software; you can redistribute it and/or +# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; version 2 # of the License. # -# This library is distributed in the hope that it will be useful, +# 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 # Library General Public License for more details. diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 532ea4eb0f1..a4ec8be1018 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2000, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + if test ! -f sql/mysqld.cc then echo "You must run this script from the MySQL top-level directory" diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh index f5986720b48..53668e2f24d 100755 --- a/BUILD/autorun.sh +++ b/BUILD/autorun.sh @@ -1,4 +1,22 @@ #!/bin/sh + +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # Create MySQL autotools infrastructure die() { echo "$@"; exit 1; } diff --git a/BUILD/check-cpu b/BUILD/check-cpu index e7cae1c1da8..ce14afcc57a 100755 --- a/BUILD/check-cpu +++ b/BUILD/check-cpu @@ -1,4 +1,20 @@ #!/bin/sh + +# Copyright (C) 2005, 2008 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # # Check cpu of current machine and find the # best compiler optimization flags for gcc diff --git a/BUILD/cleanup b/BUILD/cleanup index 518c5722d87..1ae29368fa7 100755 --- a/BUILD/cleanup +++ b/BUILD/cleanup @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2003 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-alpha b/BUILD/compile-alpha index ce5050fee72..a0b98ecb2a5 100755 --- a/BUILD/compile-alpha +++ b/BUILD/compile-alpha @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2002 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-alpha-ccc b/BUILD/compile-alpha-ccc index 889592295b5..1146a8bc53c 100755 --- a/BUILD/compile-alpha-ccc +++ b/BUILD/compile-alpha-ccc @@ -1,3 +1,18 @@ +# Copyright (C) 2000, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + /bin/rm -f */.deps/*.P */*.o make -k clean /bin/rm -f */.deps/*.P */*.o diff --git a/BUILD/compile-alpha-cxx b/BUILD/compile-alpha-cxx index c49846fd964..386778fb045 100755 --- a/BUILD/compile-alpha-cxx +++ b/BUILD/compile-alpha-cxx @@ -1,3 +1,18 @@ +# Copyright (C) 2000, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + /bin/rm -f */.deps/*.P */*.o make -k clean /bin/rm -f */.deps/*.P */*.o diff --git a/BUILD/compile-alpha-debug b/BUILD/compile-alpha-debug index 113c2151461..ccaec6aa17a 100755 --- a/BUILD/compile-alpha-debug +++ b/BUILD/compile-alpha-debug @@ -1,3 +1,18 @@ +# Copyright (C) 2000, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + /bin/rm -f */.deps/*.P */*.o make -k clean /bin/rm -f */.deps/*.P */*.o diff --git a/BUILD/compile-amd64-debug-max b/BUILD/compile-amd64-debug-max index 530bdba009b..a394d3e2101 100755 --- a/BUILD/compile-amd64-debug-max +++ b/BUILD/compile-amd64-debug-max @@ -1,4 +1,20 @@ #! /bin/sh + +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" extra_flags="$amd64_cflags $debug_cflags $max_cflags" diff --git a/BUILD/compile-amd64-gcov b/BUILD/compile-amd64-gcov index 239a4aed0fb..2b33b5c81ab 100755 --- a/BUILD/compile-amd64-gcov +++ b/BUILD/compile-amd64-gcov @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-amd64-gprof b/BUILD/compile-amd64-gprof index 6cfb8a4302c..6545013771b 100755 --- a/BUILD/compile-amd64-gprof +++ b/BUILD/compile-amd64-gprof @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-amd64-max b/BUILD/compile-amd64-max index 228448f6392..3bd8d6cd8ba 100755 --- a/BUILD/compile-amd64-max +++ b/BUILD/compile-amd64-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" extra_flags="$amd64_cflags $fast_cflags $max_cflags -g" diff --git a/BUILD/compile-amd64-max-sci b/BUILD/compile-amd64-max-sci index 4afa9004742..dcb6967850b 100644 --- a/BUILD/compile-amd64-max-sci +++ b/BUILD/compile-amd64-max-sci @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" extra_flags="$amd64_cflags $fast_cflags -g" diff --git a/BUILD/compile-darwin-mwcc b/BUILD/compile-darwin-mwcc index 6fd0eab7e26..2fb96b32f80 100755 --- a/BUILD/compile-darwin-mwcc +++ b/BUILD/compile-darwin-mwcc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-dist b/BUILD/compile-dist index 7c2dbe00dc5..66c3754381e 100755 --- a/BUILD/compile-dist +++ b/BUILD/compile-dist @@ -1,4 +1,20 @@ #!/bin/sh + +# Copyright (C) 2004, 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # # This script's purpose is to update the automake/autoconf helper scripts and # to run a plain "configure" without any special compile flags. Only features diff --git a/BUILD/compile-hpux11-parisc2-aCC b/BUILD/compile-hpux11-parisc2-aCC index c286488bb26..ca2ae93e69f 100755 --- a/BUILD/compile-hpux11-parisc2-aCC +++ b/BUILD/compile-hpux11-parisc2-aCC @@ -1,5 +1,20 @@ #!/bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + if [ ! -f "sql/mysqld.cc" ]; then echo "You must run this script from the MySQL top-level directory." exit 1 diff --git a/BUILD/compile-ia64-debug-max b/BUILD/compile-ia64-debug-max index 5082844f088..ecbd750bff5 100755 --- a/BUILD/compile-ia64-debug-max +++ b/BUILD/compile-ia64-debug-max @@ -1,3 +1,18 @@ +# Copyright (C) 2001, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + gmake -k clean || true /bin/rm -f */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache diff --git a/BUILD/compile-irix-mips64-mipspro b/BUILD/compile-irix-mips64-mipspro index 0cebb4b9f5b..0c54309e822 100755 --- a/BUILD/compile-irix-mips64-mipspro +++ b/BUILD/compile-irix-mips64-mipspro @@ -1,5 +1,20 @@ #!/bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + if [ ! -f "sql/mysqld.cc" ]; then echo "You must run this script from the MySQL top-level directory." exit 1 diff --git a/BUILD/compile-ndb-autotest b/BUILD/compile-ndb-autotest index be28cc28346..1f0e2a888d1 100755 --- a/BUILD/compile-ndb-autotest +++ b/BUILD/compile-ndb-autotest @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium b/BUILD/compile-pentium index b8f8d028e1f..0b8caa763ce 100755 --- a/BUILD/compile-pentium +++ b/BUILD/compile-pentium @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2002 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-cybozu b/BUILD/compile-pentium-cybozu index 841635985a1..86445715fba 100755 --- a/BUILD/compile-pentium-cybozu +++ b/BUILD/compile-pentium-cybozu @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug b/BUILD/compile-pentium-debug index e31cb59a8a4..af7c0fa978c 100755 --- a/BUILD/compile-pentium-debug +++ b/BUILD/compile-pentium-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` set -- "$@" --with-debug=full . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-max b/BUILD/compile-pentium-debug-max index 56e24617abb..66db0d31e87 100755 --- a/BUILD/compile-pentium-debug-max +++ b/BUILD/compile-pentium-debug-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` set -- "$@" --with-debug=full . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-max-no-embedded b/BUILD/compile-pentium-debug-max-no-embedded index dfdf7d0a5e1..ae43eada2b3 100755 --- a/BUILD/compile-pentium-debug-max-no-embedded +++ b/BUILD/compile-pentium-debug-max-no-embedded @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-max-no-ndb b/BUILD/compile-pentium-debug-max-no-ndb index 92a388f9cb9..cbcd954b8c2 100755 --- a/BUILD/compile-pentium-debug-max-no-ndb +++ b/BUILD/compile-pentium-debug-max-no-ndb @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` set -- "$@" --with-debug=full . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-no-bdb b/BUILD/compile-pentium-debug-no-bdb index d7e70f868cc..c28b7d0132a 100755 --- a/BUILD/compile-pentium-debug-no-bdb +++ b/BUILD/compile-pentium-debug-no-bdb @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2002 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-openssl b/BUILD/compile-pentium-debug-openssl index 68d99b6eda6..b8b014c512b 100755 --- a/BUILD/compile-pentium-debug-openssl +++ b/BUILD/compile-pentium-debug-openssl @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2003 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-debug-yassl b/BUILD/compile-pentium-debug-yassl index 666e73d0267..16786151d4d 100755 --- a/BUILD/compile-pentium-debug-yassl +++ b/BUILD/compile-pentium-debug-yassl @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-gcov b/BUILD/compile-pentium-gcov index d4878dc591e..7d355b90fba 100755 --- a/BUILD/compile-pentium-gcov +++ b/BUILD/compile-pentium-gcov @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-gprof b/BUILD/compile-pentium-gprof index 4aebc1d2e02..f04d7154888 100755 --- a/BUILD/compile-pentium-gprof +++ b/BUILD/compile-pentium-gprof @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-icc b/BUILD/compile-pentium-icc index bf550a4b574..0c41b6045af 100755 --- a/BUILD/compile-pentium-icc +++ b/BUILD/compile-pentium-icc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-icc-valgrind-max b/BUILD/compile-pentium-icc-valgrind-max index b765c777e2b..0e32efdc9a6 100755 --- a/BUILD/compile-pentium-icc-valgrind-max +++ b/BUILD/compile-pentium-icc-valgrind-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-icc-yassl b/BUILD/compile-pentium-icc-yassl index 53b191e4db3..78a547d91e0 100644 --- a/BUILD/compile-pentium-icc-yassl +++ b/BUILD/compile-pentium-icc-yassl @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-max b/BUILD/compile-pentium-max index 595581f604e..91e8d967302 100755 --- a/BUILD/compile-pentium-max +++ b/BUILD/compile-pentium-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-myodbc b/BUILD/compile-pentium-myodbc index 4fcfc7e49dc..2d5a06f5f78 100755 --- a/BUILD/compile-pentium-myodbc +++ b/BUILD/compile-pentium-myodbc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-mysqlfs-debug b/BUILD/compile-pentium-mysqlfs-debug index 6643553d943..6ef61177980 100755 --- a/BUILD/compile-pentium-mysqlfs-debug +++ b/BUILD/compile-pentium-mysqlfs-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2002 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium-pgcc b/BUILD/compile-pentium-pgcc index 639f108bb2b..c91def7faa5 100755 --- a/BUILD/compile-pentium-pgcc +++ b/BUILD/compile-pentium-pgcc @@ -1,3 +1,18 @@ +# Copyright (C) 2000, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + AM_MAKEFLAGS="-j 2" gmake -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max index f0dc92c2ffd..5aa6654bf6f 100755 --- a/BUILD/compile-pentium-valgrind-max +++ b/BUILD/compile-pentium-valgrind-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2002, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-debug b/BUILD/compile-pentium64-debug index 1edc9827366..8a768b65bc4 100755 --- a/BUILD/compile-pentium64-debug +++ b/BUILD/compile-pentium64-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` set -- "$@" --with-debug=full . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-debug-max b/BUILD/compile-pentium64-debug-max index 656825d8494..5cf89c75017 100755 --- a/BUILD/compile-pentium64-debug-max +++ b/BUILD/compile-pentium64-debug-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` set -- "$@" --with-debug=full . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-gcov b/BUILD/compile-pentium64-gcov index 5a99b7f8796..72cfa2cbcf8 100755 --- a/BUILD/compile-pentium64-gcov +++ b/BUILD/compile-pentium64-gcov @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-gprof b/BUILD/compile-pentium64-gprof index f64dee6d196..c74ea7ba775 100755 --- a/BUILD/compile-pentium64-gprof +++ b/BUILD/compile-pentium64-gprof @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-max-sci b/BUILD/compile-pentium64-max-sci index 9ebb1988475..e6b7e3b02df 100644 --- a/BUILD/compile-pentium64-max-sci +++ b/BUILD/compile-pentium64-max-sci @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-pentium64-valgrind-max b/BUILD/compile-pentium64-valgrind-max index ef932920130..4a78977b847 100755 --- a/BUILD/compile-pentium64-valgrind-max +++ b/BUILD/compile-pentium64-valgrind-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc b/BUILD/compile-ppc index d248ecf2677..d0845b3ddd2 100755 --- a/BUILD/compile-ppc +++ b/BUILD/compile-ppc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc-debug b/BUILD/compile-ppc-debug index 2be11eaaf22..c8279de6439 100755 --- a/BUILD/compile-ppc-debug +++ b/BUILD/compile-ppc-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc-debug-max b/BUILD/compile-ppc-debug-max index 49d1442fd45..c5718bbab21 100755 --- a/BUILD/compile-ppc-debug-max +++ b/BUILD/compile-ppc-debug-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc-debug-max-no-ndb b/BUILD/compile-ppc-debug-max-no-ndb index a5b922a1ec9..85d786d35ee 100755 --- a/BUILD/compile-ppc-debug-max-no-ndb +++ b/BUILD/compile-ppc-debug-max-no-ndb @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-ppc-max b/BUILD/compile-ppc-max index 1d89be81c9c..91db8699017 100755 --- a/BUILD/compile-ppc-max +++ b/BUILD/compile-ppc-max @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-sap b/BUILD/compile-sap index 376afaf6f56..bdde866c49d 100755 --- a/BUILD/compile-sap +++ b/BUILD/compile-sap @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-sap-debug b/BUILD/compile-sap-debug index d7e70f868cc..1691fe26120 100755 --- a/BUILD/compile-sap-debug +++ b/BUILD/compile-sap-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" diff --git a/BUILD/compile-solaris-amd64 b/BUILD/compile-solaris-amd64 index 9204170b908..bcd62e6de24 100755 --- a/BUILD/compile-solaris-amd64 +++ b/BUILD/compile-solaris-amd64 @@ -1,4 +1,20 @@ #! /bin/sh + +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" amd64_cflags="-m64 -mtune=athlon64" diff --git a/BUILD/compile-solaris-amd64-debug b/BUILD/compile-solaris-amd64-debug index ad1c298907f..f2cdb1f56c3 100644 --- a/BUILD/compile-solaris-amd64-debug +++ b/BUILD/compile-solaris-amd64-debug @@ -1,4 +1,20 @@ #! /bin/sh + +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + path=`dirname $0` . "$path/SETUP.sh" amd64_cflags="-m64 -mtune=athlon64" diff --git a/BUILD/compile-solaris-amd64-forte b/BUILD/compile-solaris-amd64-forte index 63aceb16c04..0f13bdddb16 100644 --- a/BUILD/compile-solaris-amd64-forte +++ b/BUILD/compile-solaris-amd64-forte @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + gmake -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-solaris-amd64-forte-debug b/BUILD/compile-solaris-amd64-forte-debug index 8e3ade9b429..9c1e892e9f4 100644 --- a/BUILD/compile-solaris-amd64-forte-debug +++ b/BUILD/compile-solaris-amd64-forte-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + gmake -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-solaris-sparc b/BUILD/compile-solaris-sparc index 0c05bf8a101..c3546111789 100755 --- a/BUILD/compile-solaris-sparc +++ b/BUILD/compile-solaris-sparc @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + gmake -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-solaris-sparc-debug b/BUILD/compile-solaris-sparc-debug index 3384b623ccb..dfc0d9ed354 100755 --- a/BUILD/compile-solaris-sparc-debug +++ b/BUILD/compile-solaris-sparc-debug @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + gmake -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-solaris-sparc-forte b/BUILD/compile-solaris-sparc-forte index 7cdbff6ae4a..cd101ace310 100755 --- a/BUILD/compile-solaris-sparc-forte +++ b/BUILD/compile-solaris-sparc-forte @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + gmake -k clean || true /bin/rm -f */.deps/*.P config.cache diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify index 29cf5671432..952137a42a2 100755 --- a/BUILD/compile-solaris-sparc-purify +++ b/BUILD/compile-solaris-sparc-purify @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2000, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + mode="" cxxfilt="" diff --git a/BUILD/test-alpha-ccc b/BUILD/test-alpha-ccc index c6f4abc0973..92da165ceed 100755 --- a/BUILD/test-alpha-ccc +++ b/BUILD/test-alpha-ccc @@ -1,3 +1,18 @@ +# Copyright (C) 2000 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + cd /usr/local/mysql bin/mysqladmin shutdown libexec/mysqld --basedir . & diff --git a/Makefile.am b/Makefile.am index 1f171bc9c7c..f082aaa5df7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2000-2006 MySQL AB +# Copyright (c) 2000, 2010, 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 @@ -32,7 +32,7 @@ DIST_SUBDIRS = . include @docs_dirs@ zlib \ @readline_topdir@ sql-common \ @thread_dirs@ pstack \ @sql_union_dirs@ scripts @man_dirs@ tests SSL\ - BUILD netware os2 @libmysqld_dirs@ \ + BUILD netware @libmysqld_dirs@ \ @bench_dirs@ support-files @tools_dirs@ win # Run these targets before any others, also make part of clean target, diff --git a/client/completion_hash.h b/client/completion_hash.h index b91d6e4d187..8e1b2d6e453 100644 --- a/client/completion_hash.h +++ b/client/completion_hash.h @@ -1,11 +1,11 @@ /* Copyright (C) 2000-2002 MySQL AB - This library is free software; you can redistribute it and/or + This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2 of the License. - This library is distributed in the hope that it will be useful, + 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 Library General Public License for more details. diff --git a/configure.in b/configure.in index 53598d2b4c7..21386494bda 100644 --- a/configure.in +++ b/configure.in @@ -3120,7 +3120,6 @@ AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS) AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl strings/Makefile regex/Makefile heap/Makefile dnl myisam/Makefile myisammrg/Makefile dnl - os2/Makefile os2/include/Makefile os2/include/sys/Makefile dnl man/Makefile BUILD/Makefile vio/Makefile dnl libmysql/Makefile client/Makefile dnl pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile dnl diff --git a/dbug/dbug_add_tags.pl b/dbug/dbug_add_tags.pl index 141a2ed85f1..df913e650cb 100755 --- a/dbug/dbug_add_tags.pl +++ b/dbug/dbug_add_tags.pl @@ -1,5 +1,20 @@ #!/usr/bin/perl +# Copyright (C) 2002 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + die "No files specified\n" unless $ARGV[0]; $ctags="exctags -x -f - --c-types=f -u"; diff --git a/extra/yassl/CMakeLists.txt b/extra/yassl/CMakeLists.txt index 981f679f785..f3b541dfa0c 100755 --- a/extra/yassl/CMakeLists.txt +++ b/extra/yassl/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2006 MySQL AB +# Copyright (c) 2006, 2010, 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 diff --git a/extra/yassl/Makefile.am b/extra/yassl/Makefile.am index 35946e002c4..87be92f07e4 100644 --- a/extra/yassl/Makefile.am +++ b/extra/yassl/Makefile.am @@ -1,3 +1,18 @@ +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + SUBDIRS = taocrypt src testsuite EXTRA_DIST = yassl.dsp yassl.dsw CMakeLists.txt diff --git a/extra/yassl/examples/client/client.cpp b/extra/yassl/examples/client/client.cpp index 6c3cdf04dc1..a80a8c2f1a2 100644 --- a/extra/yassl/examples/client/client.cpp +++ b/extra/yassl/examples/client/client.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* client.cpp */ #include "../../testsuite/test.hpp" diff --git a/extra/yassl/examples/echoclient/echoclient.cpp b/extra/yassl/examples/echoclient/echoclient.cpp index e2c33c7cda2..787e554f8bf 100644 --- a/extra/yassl/examples/echoclient/echoclient.cpp +++ b/extra/yassl/examples/echoclient/echoclient.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* echoclient.cpp */ #include "../../testsuite/test.hpp" diff --git a/extra/yassl/examples/echoserver/echoserver.cpp b/extra/yassl/examples/echoserver/echoserver.cpp index 92613744ba0..a3ba8c12c60 100644 --- a/extra/yassl/examples/echoserver/echoserver.cpp +++ b/extra/yassl/examples/echoserver/echoserver.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* echoserver.cpp */ #include "../../testsuite/test.hpp" diff --git a/extra/yassl/examples/server/server.cpp b/extra/yassl/examples/server/server.cpp index 75ce4224770..8b8066eace5 100644 --- a/extra/yassl/examples/server/server.cpp +++ b/extra/yassl/examples/server/server.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* server.cpp */ diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp index 99829b0b6de..ae875001633 100644 --- a/extra/yassl/include/lock.hpp +++ b/extra/yassl/include/lock.hpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2007 MySQL AB + Copyright (c) 2005, 2010, 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 diff --git a/extra/yassl/include/openssl/crypto.h b/extra/yassl/include/openssl/crypto.h index f53e5231027..22bbbbf594e 100644 --- a/extra/yassl/include/openssl/crypto.h +++ b/extra/yassl/include/openssl/crypto.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005, 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* crypto.h for openSSL */ #ifndef ysSSL_crypto_h__ diff --git a/extra/yassl/include/openssl/des.h b/extra/yassl/include/openssl/des.h index 67be7eecfb9..6e2ebbd83f5 100644 --- a/extra/yassl/include/openssl/des.h +++ b/extra/yassl/include/openssl/des.h @@ -1 +1,19 @@ +/* + Copyright (C) 2005 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* des.h for openssl */ diff --git a/extra/yassl/include/openssl/des_old.h b/extra/yassl/include/openssl/des_old.h index 40e8fbc02af..1223a38056c 100644 --- a/extra/yassl/include/openssl/des_old.h +++ b/extra/yassl/include/openssl/des_old.h @@ -1 +1,19 @@ +/* + Copyright (C) 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* des_old.h for openvn */ diff --git a/extra/yassl/include/openssl/engine.h b/extra/yassl/include/openssl/engine.h index 39952fcae84..cadb05a92b4 100644 --- a/extra/yassl/include/openssl/engine.h +++ b/extra/yassl/include/openssl/engine.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* engine.h for libcurl */ #undef HAVE_OPENSSL_ENGINE_H diff --git a/extra/yassl/include/openssl/err.h b/extra/yassl/include/openssl/err.h index 45ac1ca2469..23f2f1393ab 100644 --- a/extra/yassl/include/openssl/err.h +++ b/extra/yassl/include/openssl/err.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005, 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* err.h for openssl */ #ifndef yaSSL_err_h__ diff --git a/extra/yassl/include/openssl/evp.h b/extra/yassl/include/openssl/evp.h index 1d66b08df46..eccdcdffda6 100644 --- a/extra/yassl/include/openssl/evp.h +++ b/extra/yassl/include/openssl/evp.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* evp.h for openSSL */ #ifndef SSLEAY_NUMBER_DEFINED diff --git a/extra/yassl/include/openssl/generate_prefix_files.pl b/extra/yassl/include/openssl/generate_prefix_files.pl index da591b31332..f74d79c8143 100755 --- a/extra/yassl/include/openssl/generate_prefix_files.pl +++ b/extra/yassl/include/openssl/generate_prefix_files.pl @@ -1,4 +1,20 @@ #!/usr/bin/perl + +# Copyright (C) 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # # This script generates defines for all functions # in yassl/include/openssl/ so they are renamed to diff --git a/extra/yassl/include/openssl/hmac.h b/extra/yassl/include/openssl/hmac.h index a2eae4c08c1..478d92e087d 100644 --- a/extra/yassl/include/openssl/hmac.h +++ b/extra/yassl/include/openssl/hmac.h @@ -1 +1,19 @@ +/* + Copyright (C) 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* hmac.h for openvpn */ diff --git a/extra/yassl/include/openssl/lhash.h b/extra/yassl/include/openssl/lhash.h index 01f8535f869..34bc34c3f11 100644 --- a/extra/yassl/include/openssl/lhash.h +++ b/extra/yassl/include/openssl/lhash.h @@ -1,2 +1,20 @@ +/* + Copyright (C) 2005 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* lhash.h for openSSL */ diff --git a/extra/yassl/include/openssl/md4.h b/extra/yassl/include/openssl/md4.h index 2e99f977fca..2718d170fcf 100644 --- a/extra/yassl/include/openssl/md4.h +++ b/extra/yassl/include/openssl/md4.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* md4.h for libcurl */ diff --git a/extra/yassl/include/openssl/md5.h b/extra/yassl/include/openssl/md5.h index dfaf9799c44..9400649ebd8 100644 --- a/extra/yassl/include/openssl/md5.h +++ b/extra/yassl/include/openssl/md5.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005, 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* md5.h for openssl */ #include "ssl.h" /* in there for now */ diff --git a/extra/yassl/include/openssl/objects.h b/extra/yassl/include/openssl/objects.h index 99f2326e51b..ec00e04e213 100644 --- a/extra/yassl/include/openssl/objects.h +++ b/extra/yassl/include/openssl/objects.h @@ -1 +1,19 @@ +/* + Copyright (C) 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* objects.h for openvpn */ diff --git a/extra/yassl/include/openssl/opensslv.h b/extra/yassl/include/openssl/opensslv.h index d932130684f..bafcfaec8a3 100644 --- a/extra/yassl/include/openssl/opensslv.h +++ b/extra/yassl/include/openssl/opensslv.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* opensslv.h compatibility */ #ifndef yaSSL_opensslv_h__ diff --git a/extra/yassl/include/openssl/pem.h b/extra/yassl/include/openssl/pem.h index b4c63d56a4d..3762b9597a4 100644 --- a/extra/yassl/include/openssl/pem.h +++ b/extra/yassl/include/openssl/pem.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* pem.h for libcurl */ diff --git a/extra/yassl/include/openssl/pkcs12.h b/extra/yassl/include/openssl/pkcs12.h index e452fc879c4..71ba287ede0 100644 --- a/extra/yassl/include/openssl/pkcs12.h +++ b/extra/yassl/include/openssl/pkcs12.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* pkcs12.h for libcurl */ diff --git a/extra/yassl/include/openssl/prefix_crypto.h b/extra/yassl/include/openssl/prefix_crypto.h index 3fa5f32c627..ff3aea14b0e 100644 --- a/extra/yassl/include/openssl/prefix_crypto.h +++ b/extra/yassl/include/openssl/prefix_crypto.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + #define SSLeay_version yaSSLeay_version diff --git a/extra/yassl/include/openssl/prefix_ssl.h b/extra/yassl/include/openssl/prefix_ssl.h index 3a3a8c26c9c..5906ecbbbce 100644 --- a/extra/yassl/include/openssl/prefix_ssl.h +++ b/extra/yassl/include/openssl/prefix_ssl.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + #define Copyright yaCopyright #define yaSSL_CleanUp yayaSSL_CleanUp #define BN_bin2bn yaBN_bin2bn diff --git a/extra/yassl/include/openssl/rand.h b/extra/yassl/include/openssl/rand.h index df9c9020346..136a01459e2 100644 --- a/extra/yassl/include/openssl/rand.h +++ b/extra/yassl/include/openssl/rand.h @@ -1,2 +1,20 @@ +/* + Copyright (C) 2005 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* rand.h for openSSL */ diff --git a/extra/yassl/include/openssl/rsa.h b/extra/yassl/include/openssl/rsa.h index fe64e655bdc..b20da32be24 100644 --- a/extra/yassl/include/openssl/rsa.h +++ b/extra/yassl/include/openssl/rsa.h @@ -1,3 +1,21 @@ +/* + Copyright (C) 2005, 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* rsa.h for openSSL */ diff --git a/extra/yassl/include/openssl/sha.h b/extra/yassl/include/openssl/sha.h index bb487c05c2e..79b46ec83ce 100644 --- a/extra/yassl/include/openssl/sha.h +++ b/extra/yassl/include/openssl/sha.h @@ -1 +1,19 @@ +/* + Copyright (C) 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* sha.h for openvpn */ diff --git a/extra/yassl/include/openssl/x509.h b/extra/yassl/include/openssl/x509.h index dcd847c0337..eb60bcbc0a6 100644 --- a/extra/yassl/include/openssl/x509.h +++ b/extra/yassl/include/openssl/x509.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* x509.h for libcurl */ diff --git a/extra/yassl/include/openssl/x509v3.h b/extra/yassl/include/openssl/x509v3.h index adf94af8f48..1215826f53f 100644 --- a/extra/yassl/include/openssl/x509v3.h +++ b/extra/yassl/include/openssl/x509v3.h @@ -1 +1,19 @@ +/* + Copyright (C) 2006 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + /* x509v3.h for libcurl */ diff --git a/extra/yassl/src/Makefile.am b/extra/yassl/src/Makefile.am index d192eb03b49..7db36f652ac 100644 --- a/extra/yassl/src/Makefile.am +++ b/extra/yassl/src/Makefile.am @@ -1,3 +1,18 @@ +# Copyright (c) 2005, 2010, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../taocrypt/include -I$(srcdir)/../taocrypt/mySTL noinst_LTLIBRARIES = libyassl.la diff --git a/extra/yassl/src/lock.cpp b/extra/yassl/src/lock.cpp index 6e85fefa14d..9eb41408ff7 100644 --- a/extra/yassl/src/lock.cpp +++ b/extra/yassl/src/lock.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2007 MySQL AB + Copyright (c) 2005, 2010, 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 diff --git a/extra/yassl/src/make.bat b/extra/yassl/src/make.bat index dde305721a7..cccd11dbd17 100644 --- a/extra/yassl/src/make.bat +++ b/extra/yassl/src/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/taocrypt/CMakeLists.txt b/extra/yassl/taocrypt/CMakeLists.txt index c8faeac3b77..5965f0d29d0 100755 --- a/extra/yassl/taocrypt/CMakeLists.txt +++ b/extra/yassl/taocrypt/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2006 MySQL AB +# Copyright (c) 2006, 2010, 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 diff --git a/extra/yassl/taocrypt/Makefile.am b/extra/yassl/taocrypt/Makefile.am index c03c1a2713b..37a884e4deb 100644 --- a/extra/yassl/taocrypt/Makefile.am +++ b/extra/yassl/taocrypt/Makefile.am @@ -1,3 +1,18 @@ +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + SUBDIRS = src test benchmark EXTRA_DIST = taocrypt.dsw taocrypt.dsp CMakeLists.txt $(wildcard mySTL/*.hpp) diff --git a/extra/yassl/taocrypt/benchmark/Makefile.am b/extra/yassl/taocrypt/benchmark/Makefile.am index 1f082f22f40..32fe504734d 100644 --- a/extra/yassl/taocrypt/benchmark/Makefile.am +++ b/extra/yassl/taocrypt/benchmark/Makefile.am @@ -1,3 +1,18 @@ +# Copyright (c) 2006, 2010, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL noinst_PROGRAMS = benchmark benchmark_SOURCES = benchmark.cpp diff --git a/extra/yassl/taocrypt/benchmark/benchmark.cpp b/extra/yassl/taocrypt/benchmark/benchmark.cpp index bb725a90187..55e94275b20 100644 --- a/extra/yassl/taocrypt/benchmark/benchmark.cpp +++ b/extra/yassl/taocrypt/benchmark/benchmark.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // benchmark.cpp // TaoCrypt benchmark diff --git a/extra/yassl/taocrypt/benchmark/make.bat b/extra/yassl/taocrypt/benchmark/make.bat index bf1383f5e97..1457521bce9 100644 --- a/extra/yassl/taocrypt/benchmark/make.bat +++ b/extra/yassl/taocrypt/benchmark/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/taocrypt/src/Makefile.am b/extra/yassl/taocrypt/src/Makefile.am index 6ca969ad686..760205a625c 100644 --- a/extra/yassl/taocrypt/src/Makefile.am +++ b/extra/yassl/taocrypt/src/Makefile.am @@ -1,3 +1,18 @@ +# Copyright (c) 2005, 2010, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL noinst_LTLIBRARIES = libtaocrypt.la diff --git a/extra/yassl/taocrypt/src/make.bat b/extra/yassl/taocrypt/src/make.bat index 0aa1350f7d8..ecd3023f5ab 100644 --- a/extra/yassl/taocrypt/src/make.bat +++ b/extra/yassl/taocrypt/src/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/taocrypt/test/Makefile.am b/extra/yassl/taocrypt/test/Makefile.am index aa325ff9b75..87f35f2f78e 100644 --- a/extra/yassl/taocrypt/test/Makefile.am +++ b/extra/yassl/taocrypt/test/Makefile.am @@ -1,3 +1,18 @@ +# Copyright (c) 2006, 2010, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL noinst_PROGRAMS = test test_SOURCES = test.cpp diff --git a/extra/yassl/taocrypt/test/make.bat b/extra/yassl/taocrypt/test/make.bat index 7b53e9abc90..d6d62b984a8 100644 --- a/extra/yassl/taocrypt/test/make.bat +++ b/extra/yassl/taocrypt/test/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/taocrypt/test/memory.cpp b/extra/yassl/taocrypt/test/memory.cpp index a879a497800..bac8f9c2e97 100644 --- a/extra/yassl/taocrypt/test/memory.cpp +++ b/extra/yassl/taocrypt/test/memory.cpp @@ -1,3 +1,21 @@ +/* + Copyright (c) 2006, 2010, 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; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // memory.cpp #include "../../include/lock.hpp" // locking #include // std::bad_alloc diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp index 0af278404ab..f8177b31e2f 100644 --- a/extra/yassl/taocrypt/test/test.cpp +++ b/extra/yassl/taocrypt/test/test.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // test.cpp // test taocrypt functionality diff --git a/extra/yassl/testsuite/Makefile.am b/extra/yassl/testsuite/Makefile.am index e626b1822ec..081b76401fa 100644 --- a/extra/yassl/testsuite/Makefile.am +++ b/extra/yassl/testsuite/Makefile.am @@ -1,3 +1,18 @@ +# Copyright (c) 2006, 2010, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../taocrypt/include -I$(srcdir)/../taocrypt/mySTL noinst_PROGRAMS = testsuite testsuite_SOURCES = testsuite.cpp ../taocrypt/test/test.cpp \ diff --git a/extra/yassl/testsuite/make.bat b/extra/yassl/testsuite/make.bat index ea2677db481..941e499d7e6 100644 --- a/extra/yassl/testsuite/make.bat +++ b/extra/yassl/testsuite/make.bat @@ -1,3 +1,18 @@ +REM Copyright (C) 2006, 2007 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + REM quick and dirty build file for testing different MSDEVs setlocal diff --git a/extra/yassl/testsuite/test.hpp b/extra/yassl/testsuite/test.hpp index c921f8f9c69..4555080f84c 100644 --- a/extra/yassl/testsuite/test.hpp +++ b/extra/yassl/testsuite/test.hpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // test.hpp #ifndef yaSSL_TEST_HPP diff --git a/extra/yassl/testsuite/testsuite.cpp b/extra/yassl/testsuite/testsuite.cpp index 3cd832ebb03..5ddb9bb4dab 100644 --- a/extra/yassl/testsuite/testsuite.cpp +++ b/extra/yassl/testsuite/testsuite.cpp @@ -1,3 +1,21 @@ +/* + Copyright (C) 2006, 2007 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. +*/ + // testsuite.cpp #include "test.hpp" diff --git a/heap/hp_delete.c b/heap/hp_delete.c index e5c8dfcef01..6f27b88d203 100644 --- a/heap/hp_delete.c +++ b/heap/hp_delete.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2002, 2004-200 MySQL AB +/* Copyright (C) 2000-2002, 2004-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/Makefile.am b/include/Makefile.am index c856b6398fe..06d7efe754b 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,11 +1,11 @@ # Copyright (C) 2000-2006 MySQL AB # -# This library is free software; you can redistribute it and/or +# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; version 2 # of the License. # -# This library is distributed in the hope that it will be useful, +# 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 # Library General Public License for more details. @@ -26,7 +26,7 @@ pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \ my_getopt.h sslopt-longopts.h my_dir.h \ sslopt-vars.h sslopt-case.h sql_common.h keycache.h \ m_ctype.h my_attribute.h $(HEADERS_GEN) -noinst_HEADERS = config-win.h config-os2.h config-netware.h \ +noinst_HEADERS = config-win.h config-netware.h \ heap.h my_bitmap.h\ myisam.h myisampack.h myisammrg.h ft_global.h\ mysys_err.h my_base.h help_start.h help_end.h \ diff --git a/include/config-os2.h b/include/config-os2.h deleted file mode 100644 index 8e2d0e2e836..00000000000 --- a/include/config-os2.h +++ /dev/null @@ -1,835 +0,0 @@ -/* Copyright (C) 2000 MySQL AB & Yuri Dario - All the above parties has a full, independent copyright to - the following code, including the right to use the code in - any manner without any demands from the other parties. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* Defines for OS2 to make it compatible for MySQL */ - -#ifndef __CONFIG_OS2_H__ -#define __CONFIG_OS2_H__ - -#include -#include -#include -#include - -/* Define to name of system eg solaris*/ -#define SYSTEM_TYPE "IBM OS/2 Warp" -/* Define to machine type name eg sun10 */ -#define MACHINE_TYPE "i686" -/* Name of package */ -#define PACKAGE "mysql" -/* Version number of package */ -#define VERSION MYSQL_SERVER_VERSION -/* Default socket */ -#define MYSQL_UNIX_ADDR "\\socket\\MySQL" - -#define FN_LIBCHAR '\\' -#define FN_ROOTDIR "\\" -#define MY_NFILE 1024 /* This is only used to save filenames */ - -#define HAVE_ACCESS - -#define DEFAULT_MYSQL_HOME "c:\\mysql" -#define DEFAULT_BASEDIR "C:\\" -#define SHAREDIR "share" -#define DEFAULT_CHARSET_HOME "C:/mysql/" -#define _POSIX_PATH_MAX 255 -#define DWORD ULONG - -#define O_SHARE 0x1000 /* Open file in sharing mode */ -#define FILE_BINARY O_BINARY /* my_fopen in binary mode */ -#define S_IROTH S_IREAD /* for my_lib */ - -#define CANT_DELETE_OPEN_FILES /* saves open files in a list, for delayed delete */ - -#define O_NONBLOCK 0x10 - -#define NO_OPEN_3 /* For my_create() */ -#define SIGQUIT SIGTERM /* No SIGQUIT */ -#define SIGALRM 14 /* Alarm */ - -#define NO_FCNTL_NONBLOCK - -#define EFBIG E2BIG -/*#define ENFILE EMFILE */ -/*#define ENAMETOOLONG (EOS2ERR+2) */ -/*#define ETIMEDOUT 145 */ -/*#define EPIPE 146 */ -#define EROFS 147 - -#define sleep(A) DosSleep((A)*1000) -#define closesocket(A) soclose(A) - -#define F_OK 0 -#define W_OK 2 - -#define bzero(x,y) memset((x),'\0',(y)) -#define bcopy(x,y,z) memcpy((y),(x),(z)) -#define bcmp(x,y,z) memcmp((y),(x),(z)) - -#define F_RDLCK 4 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 0 /* Remove lock. */ - -#define S_IFMT 0x17000 /* Mask for file type */ -#define F_TO_EOF 0L /* Param to lockf() to lock rest of file */ - -#define HUGE_PTR - -#ifdef __cplusplus -extern "C" -#endif -double _cdecl rint( double nr); - -DWORD TlsAlloc( void); -BOOL TlsFree( DWORD); -PVOID TlsGetValue( DWORD); -BOOL TlsSetValue( DWORD, PVOID); - -/* support for > 2GB file size */ -#define SIZEOF_OFF_T 8 -#define lseek(A,B,C) _lseek64( A, B, C) -#define tell(A) _lseek64( A, 0, SEEK_CUR) - -void* dlopen( char* path, int flag); -char* dlerror( void); -void* dlsym( void* hmod, char* fn); -void dlclose( void* hmod); - -/* Some typedefs */ -typedef unsigned long long os_off_t; - -/* config.h. Generated automatically by configure. */ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if using alloca.c. */ -/* #undef C_ALLOCA */ - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -/* #undef CRAY_STACKSEG_END */ - -/* Define if you have alloca, as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define if you have and it should be used (not on Ultrix). */ -/* #define HAVE_ALLOCA_H 1 */ - -/* Define if you don't have vprintf but do have _doprnt. */ -/* #undef HAVE_DOPRNT */ - -/* Define if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define if system calls automatically restart after interruption - by a signal. */ -/* #undef HAVE_RESTARTABLE_SYSCALLS */ - -/* Define if your struct stat has st_rdev. */ -#define HAVE_ST_RDEV 1 - -/* Define if you have that is POSIX.1 compatible. */ -/* #define HAVE_SYS_WAIT_H 1 */ - -/* Define if you don't have tm_zone but do have the external array - tzname. */ -#define HAVE_TZNAME 1 - -/* Define if utime(file, NULL) sets file's timestamp to the present. */ -#define HAVE_UTIME_NULL 1 - -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - -/* Define as __inline if that's what the C compiler calls it. */ -/* #undef inline */ - -/* Define to `long' if doesn't define. */ -/* #undef off_t */ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -#define STACK_DIRECTION -1 - -/* Define if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if your declares struct tm. */ -/* #undef TM_IN_SYS_TIME */ - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* Version of .frm files */ -#define DOT_FRM_VERSION 6 - -/* READLINE: */ -#define FIONREAD_IN_SYS_IOCTL 1 - -/* READLINE: Define if your system defines TIOCGWINSZ in sys/ioctl.h. */ -/* #undef GWINSZ_IN_SYS_IOCTL */ - -/* Do we have FIONREAD */ -#define FIONREAD_IN_SYS_IOCTL 1 - -/* atomic_add() from (Linux only) */ -/* #undef HAVE_ATOMIC_ADD */ - -/* atomic_sub() from (Linux only) */ -/* #undef HAVE_ATOMIC_SUB */ - -/* bool is not defined by all C++ compilators */ -#define HAVE_BOOL 1 - -/* Have berkeley db installed */ -/* #define HAVE_BERKELEY_DB 1 */ - -/* DSB style signals ? */ -/* #undef HAVE_BSD_SIGNALS */ - -/* Can netinet be included */ -/* #undef HAVE_BROKEN_NETINET_INCLUDES */ - -/* READLINE: */ -/* #undef HAVE_BSD_SIGNALS */ - -/* ZLIB and compress: */ -#define HAVE_COMPRESS 1 - -/* Define if we are using OSF1 DEC threads */ -/* #undef HAVE_DEC_THREADS */ - -/* Define if we are using OSF1 DEC threads on 3.2 */ -/* #undef HAVE_DEC_3_2_THREADS */ - -/* fp_except from ieeefp.h */ -/* #undef HAVE_FP_EXCEPT */ - -/* READLINE: */ -/* #undef HAVE_GETPW_DECLS */ - -/* Solaris define gethostbyname_r with 5 arguments. glibc2 defines - this with 6 arguments */ -/* #undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE */ - -/* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */ -/* #undef HAVE_GETHOSTBYNAME_R_RETURN_INT */ - -/* Define if int8, int16 and int32 types exist */ -/* #undef HAVE_INT_8_16_32 */ - -/* Define if have -lwrap */ -/* #undef HAVE_LIBWRAP */ - -/* Define if we are using Xavier Leroy's LinuxThreads */ -/* #undef HAVE_LINUXTHREADS */ - -/* Do we use user level threads */ -/* #undef HAVE_mit_thread */ - -/* For some non posix threads */ -/* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */ - -/* For some non posix threads */ -/* #undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */ - -/* READLINE: */ -#define HAVE_POSIX_SIGNALS 0 - -/* sigwait with one argument */ -/* #undef HAVE_NONPOSIX_SIGWAIT */ - -/* pthread_attr_setscope */ -#define HAVE_PTHREAD_ATTR_SETSCOPE 1 - -/* POSIX readdir_r */ -/* #undef HAVE_READDIR_R */ - -/* POSIX sigwait */ -/* #undef HAVE_SIGWAIT */ - -/* crypt */ -#define HAVE_CRYPT 1 - -/* Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines - this with 8 arguments */ -/* #undef HAVE_SOLARIS_STYLE_GETHOST */ - -/* Timespec has a ts_sec instead of tv_sev */ -#define HAVE_TIMESPEC_TS_SEC 1 - -/* Have the tzname variable */ -#define HAVE_TZNAME 1 - -/* Define if the system files define uchar */ -/* #undef HAVE_UCHAR */ - -/* Define if the system files define uint */ -/* #undef HAVE_UINT */ - -/* Define if the system files define ulong */ -/* #undef HAVE_ULONG */ - -/* UNIXWARE7 threads are not posix */ -/* #undef HAVE_UNIXWARE7_THREADS */ - -/* new UNIXWARE7 threads that are not yet posix */ -/* #undef HAVE_UNIXWARE7_POSIX */ - -/* READLINE: */ -/* #undef HAVE_USG_SIGHOLD */ - -/* Define if want -lwrap */ -/* #undef LIBWRAP */ - -/* mysql client protocoll version */ -#define PROTOCOL_VERSION 10 - -/* Define if qsort returns void */ -#define QSORT_TYPE_IS_VOID 1 - -/* Define as the return type of qsort (int or void). */ -#define RETQSORTTYPE void - -/* Define as the base type of the last arg to accept */ -#define SOCKET_SIZE_TYPE int - -/* Last argument to get/setsockopt */ -/* #undef SOCKOPT_OPTLEN_TYPE */ - -/* #undef SPEED_T_IN_SYS_TYPES */ -/* #undef SPRINTF_RETURNS_PTR */ -#define SPRINTF_RETURNS_INT 1 -/* #undef SPRINTF_RETURNS_GARBAGE */ - -/* #undef STRUCT_DIRENT_HAS_D_FILENO */ -#define STRUCT_DIRENT_HAS_D_INO 1 - -/* Define if you want to have threaded code. This may be undef on client code */ -#define THREAD 1 - -/* Should be client be thread safe */ -/* #undef THREAD_SAFE_CLIENT */ - -/* READLINE: */ -/* #undef TIOCSTAT_IN_SYS_IOCTL */ - -/* Use multi-byte character routines */ -/* #undef USE_MB */ -/* #undef USE_MB_IDENT */ - -/* Use MySQL RAID */ -/* #undef USE_RAID */ - -/* Use strcoll() functions when comparing and sorting. */ -/* #undef USE_STRCOLL */ - -/* READLINE: */ -#define VOID_SIGHANDLER 1 - -/* The number of bytes in a char. */ -#define SIZEOF_CHAR 1 - -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - -/* The number of bytes in a long long. */ -#define SIZEOF_LONG_LONG 8 - -/* Define if you have the alarm function. */ -#define HAVE_ALARM 1 - -/* Define if you have the atod function. */ -/* #undef HAVE_ATOD */ - -/* Define if you have the bcmp function. */ -#define HAVE_BCMP 1 - -/* Define if you have the bfill function. */ -/* #undef HAVE_BFILL */ - -/* Define if you have the bmove function. */ -/* #undef HAVE_BMOVE */ - -/* Define if you have the bzero function. */ -#define HAVE_BZERO 1 - -/* Define if you have the chsize function. */ -#define HAVE_CHSIZE 1 - -/* Define if you have the cuserid function. */ -/* #define HAVE_CUSERID 1 */ - -/* Define if you have the dlerror function. */ -#define HAVE_DLERROR 1 - -/* Define if you have the dlopen function. */ -#define HAVE_DLOPEN 1 - -/* Define if you have the fchmod function. */ -/* #undef HAVE_FCHMOD */ - -/* Define if you have the fcntl function. */ -/* #define HAVE_FCNTL 1 */ - -/* Define if you have the fconvert function. */ -/* #undef HAVE_FCONVERT */ - -/* Define if you have the finite function. */ -/* #undef HAVE_FINITE */ - -/* Define if you have the fpresetsticky function. */ -/* #undef HAVE_FPRESETSTICKY */ - -/* Define if you have the fpsetmask function. */ -/* #undef HAVE_FPSETMASK */ - -/* Define if you have the fseeko function. */ -/* #undef HAVE_FSEEKO */ - -/* Define if you have the ftruncate function. */ -/* #define HAVE_FTRUNCATE 1 */ - -/* Define if you have the getcwd function. */ -#define HAVE_GETCWD 1 - -/* Define if you have the gethostbyaddr_r function. */ -/* #undef HAVE_GETHOSTBYADDR_R */ - -/* Define if you have the gethostbyname_r function. */ -/* #undef HAVE_GETHOSTBYNAME_R */ - -/* Define if you have the getpagesize function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define if you have the getpass function. */ -/*#define HAVE_GETPASS 1 */ - -/* Define if you have the getpassphrase function. */ -/* #undef HAVE_GETPASSPHRASE */ - -/* Define if you have the getpwnam function. */ -/* #define HAVE_GETPWNAM 1 */ - -/* Define if you have the getpwuid function. */ -/* #define HAVE_GETPWUID 1 */ - -/* Define if you have the getrlimit function. */ -/* #undef HAVE_GETRLIMIT */ - -/* Define if you have the getrusage function. */ -/* #undef HAVE_GETRUSAGE */ - -/* Define if you have the getwd function. */ -#define HAVE_GETWD 1 - -/* Define to 1 if you have the `gmtime_r' function. */ -#define HAVE_GMTIME_R 1 - -/* Define if you have the index function. */ -#define HAVE_INDEX 1 - -/* Define if you have the initgroups function. */ -/* #undef HAVE_INITGROUPS */ - -/* Define if you have the localtime_r function. */ -#define HAVE_LOCALTIME_R 1 - -/* Define if you have the locking function. */ -/* #undef HAVE_LOCKING */ - -/* Define if you have the longjmp function. */ -#define HAVE_LONGJMP 1 - -/* Define if you have the lrand48 function. */ -/* #undef HAVE_LRAND48 */ - -/* Define if you have the lstat function. */ -/* #undef HAVE_LSTAT */ - -/* Define if you have the madvise function. */ -/* #undef HAVE_MADVISE */ - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY 1 - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE 1 - -/* Define if you have the mkstemp function. */ -/* #define HAVE_MKSTEMP 1 */ - -/* Define if you have the mlockall function. */ -/* #undef HAVE_MLOCKALL */ - -/* Define if you have the perror function. */ -#define HAVE_PERROR 1 - -/* Define if you have the poll function. */ -/* #undef HAVE_POLL */ - -/* Define if you have the pread function. */ -/* #undef HAVE_PREAD */ - -/* Define if you have the pthread_attr_create function. */ -/* #undef HAVE_PTHREAD_ATTR_CREATE */ - -/* Define if you have the pthread_attr_setprio function. */ -#define HAVE_PTHREAD_ATTR_SETPRIO 1 - -/* Define if you have the pthread_attr_setschedparam function. */ -/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */ - -/* Define if you have the pthread_attr_setstacksize function. */ -#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 - -/* Define if you have the pthread_condattr_create function. */ -/* #undef HAVE_PTHREAD_CONDATTR_CREATE */ - -/* Define if you have the pthread_getsequence_np function. */ -/* #undef HAVE_PTHREAD_GETSEQUENCE_NP */ - -/* Define if you have the pthread_init function. */ -/* #undef HAVE_PTHREAD_INIT */ - -/* Define if you have the pthread_rwlock_rdlock function. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK */ - -/* Define if you have the pthread_setprio function. */ -#define HAVE_PTHREAD_SETPRIO 1 - -/* Define if you have the pthread_setprio_np function. */ -/* #undef HAVE_PTHREAD_SETPRIO_NP */ - -/* Define if you have the pthread_setschedparam function. */ -/* #undef HAVE_PTHREAD_SETSCHEDPARAM */ - -/* Define if you have the pthread_sigmask function. */ -#define HAVE_PTHREAD_SIGMASK 1 - -/* Define if you have the putenv function. */ -#define HAVE_PUTENV 1 - -/* Define if you have the readlink function. */ -/* #undef HAVE_READLINK */ - -/* Define if you have the realpath function. */ -/* #undef HAVE_REALPATH */ - -/* Define if you have the rename function. */ -#define HAVE_RENAME 1 - -/* Define if you have the rint function. */ -#define HAVE_RINT 1 - -/* Define if you have the rwlock_init function. */ -/* #undef HAVE_RWLOCK_INIT */ - -/* Define if you have the select function. */ -#define HAVE_SELECT 1 - -/* Define if you have the setenv function. */ -/* #undef HAVE_SETENV */ - -/* Define if you have the setlocale function. */ -#define HAVE_SETLOCALE 1 - -/* Define if you have the setupterm function. */ -/* #undef HAVE_SETUPTERM */ - -/* Define if you have the sighold function. */ -/* #undef HAVE_SIGHOLD */ - -/* Define if you have the sigset function. */ -/* #undef HAVE_SIGSET */ - -/* Define if you have the sigthreadmask function. */ -/* #undef HAVE_SIGTHREADMASK */ - -/* Define if you have the snprintf function. */ -/* #define HAVE_SNPRINTF 1 */ - -/* Define if you have the socket function. */ -#define HAVE_SOCKET 1 - -/* Define if you have the stpcpy function. */ -/* #undef HAVE_STPCPY */ - -/* Define if you have the strcasecmp function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define if you have the strcoll function. */ -#define HAVE_STRCOLL 1 - -/* Define if you have the strerror function. */ -#define HAVE_STRERROR 1 - -/* Define if you have the strnlen function. */ -/* #undef HAVE_STRNLEN */ - -/* Define if you have the strpbrk function. */ -#define HAVE_STRPBRK 1 - -/* Define if you have the strstr function. */ -#define HAVE_STRSTR 1 - -/* Define if you have the strtok_r function. */ -/* #undef HAVE_STRTOK_R */ - -/* Define if you have the strtol function. */ -#define HAVE_STRTOL 1 - -/* Define if you have the strtoul function. */ -#define HAVE_STRTOUL 1 - -/* Define if you have the strtoull function. */ -/* #undef HAVE_STRTOULL */ - -/* Define if you have the tcgetattr function. */ -#define HAVE_TCGETATTR 1 - -/* Define if you have the tell function. */ -#define HAVE_TELL 1 - -/* Define if you have the tempnam function. */ -#define HAVE_TEMPNAM 1 - -/* Define if you have the thr_setconcurrency function. */ -/* #undef HAVE_THR_SETCONCURRENCY */ - -/* Define if you have the vidattr function. */ -/* #undef HAVE_VIDATTR */ - -/* Define if you have the header file. */ -/* #define HAVE_ALLOCA_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_ASM_TERMBITS_H */ - -/* Define if you have the header file. */ -#define HAVE_CRYPT_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_CURSES_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_DIRENT_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_FLOATINGPOINT_H */ - -/* Define if you have the header file. */ -/* #define HAVE_GRP_H 1 */ - -/* Define if you have the header file. */ -/* #undef HAVE_IEEEFP_H */ - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_NDIR_H */ - -/* Define if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_PATHS_H */ - -/* Define if you have the header file. */ -/* #define HAVE_PWD_H 1 */ - -/* Define if you have the header file. */ -/* #undef HAVE_SCHED_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_SELECT_H */ - -/* Define if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_STRINGS_H 1 */ - -/* Define if you have the header file. */ -/* #undef HAVE_SYNCH_H */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_DIR_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_FILE_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_PTE_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_PTEM_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_STREAM_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_TIMEB_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_UN_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_UTIME_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_VADVISE_H */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_WAIT_H 1 */ - -/* Define if you have the header file. */ -/* #undef HAVE_TERM_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_TERMBITS_H */ - -/* Define if you have the header file. */ -/* #define HAVE_TERMCAP_H 1 */ - -/* Define if you have the header file. */ -/* /#define HAVE_TERMIO_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_TERMIOS_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* Define if you have the header file. */ -#define HAVE_VARARGS_H 1 - -/* Define if you have the bind library (-lbind). */ -/* #undef HAVE_LIBBIND */ - -/* Define if you have the c_r library (-lc_r). */ -/* #undef HAVE_LIBC_R */ - -/* Define if you have the compat library (-lcompat). */ -/* #undef HAVE_LIBCOMPAT */ - -/* Define if you have the crypt library (-lcrypt). */ -#define HAVE_LIBCRYPT 1 - -/* Define if you have the dl library (-ldl). */ -#define HAVE_LIBDL 1 - -/* Define if you have the gen library (-lgen). */ -/* #undef HAVE_LIBGEN */ - -/* Define if you have the m library (-lm). */ -#define HAVE_LIBM 1 - -/* Define if you have the nsl library (-lnsl). */ -/* #undef HAVE_LIBNSL */ - -/* Define if you have the nsl_r library (-lnsl_r). */ -/* #undef HAVE_LIBNSL_R */ - -/* Define if you have the pthread library (-lpthread). */ -/* #undef HAVE_LIBPTHREAD */ - -/* Define if you have the socket library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define to make fseeko etc. visible, on some hosts. */ -/* #undef _LARGEFILE_SOURCE */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -#endif /* __CONFIG_OS2_H__ */ diff --git a/include/my_handler.h b/include/my_handler.h index d7cd0567f9c..20cc90e4a8f 100644 --- a/include/my_handler.h +++ b/include/my_handler.h @@ -1,11 +1,11 @@ /* Copyright (C) 2002-2006 MySQL AB - This library is free software; you can redistribute it and/or + This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2 of the License. - This library is distributed in the hope that it will be useful, + 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 Library General Public License for more details. diff --git a/include/my_sys.h b/include/my_sys.h index 40ae6924f9f..93cab0852f7 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/include/mysql_com.h b/include/mysql_com.h index 2eeec270cd0..9d29ee1e724 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/libmysqld/copyright b/libmysqld/copyright deleted file mode 100644 index 0b4dd1725a2..00000000000 --- a/libmysqld/copyright +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2000 - * SWsoft company - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ diff --git a/libmysqld/examples/test-run b/libmysqld/examples/test-run index aea5b13eaba..1667280a986 100755 --- a/libmysqld/examples/test-run +++ b/libmysqld/examples/test-run @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2001, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # This is slapped together as a quick way to run the tests and # is not meant for prime time. Please hack at it and submit # changes, though, so we can gradually turn it into something diff --git a/man/Makefile.am b/man/Makefile.am index 7fdfc297f96..8a3228b4630 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,11 +1,11 @@ # Copyright (C) 2000-2001, 2003-2006 MySQL AB # -# This library is free software; you can redistribute it and/or +# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; version 2 # of the License. # -# This library is distributed in the hope that it will be useful, +# 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 # Library General Public License for more details. diff --git a/myisam/ftbench/Ecompare.pl b/myisam/ftbench/Ecompare.pl index 265534e704d..2c50ae9b9ce 100755 --- a/myisam/ftbench/Ecompare.pl +++ b/myisam/ftbench/Ecompare.pl @@ -1,5 +1,20 @@ #!/usr/bin/perl +# Copyright (C) 2003 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # compares out-files (as created by Ereport.pl) from dir1/*.out and dir2/*.out # for each effectiveness column computes the probability of the hypothesis # "Both files have the same effectiveness" diff --git a/myisam/ftbench/Ecreate.pl b/myisam/ftbench/Ecreate.pl index d90a6f7a0ad..123ca729c31 100755 --- a/myisam/ftbench/Ecreate.pl +++ b/myisam/ftbench/Ecreate.pl @@ -1,5 +1,20 @@ #!/usr/bin/perl +# Copyright (C) 2003 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + $test=shift || die "Usage $0 testname [option]"; $option=shift; diff --git a/myisam/ftbench/Ereport.pl b/myisam/ftbench/Ereport.pl index 5969304da09..2f63d7ea37a 100755 --- a/myisam/ftbench/Ereport.pl +++ b/myisam/ftbench/Ereport.pl @@ -1,5 +1,20 @@ #!/usr/bin/perl +# Copyright (C) 2003 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + die "Use: $0 eval_output qrels_file\n" unless @ARGV==2; open(EOUT,$eout=shift) || die "Cannot open $eout: $!"; diff --git a/myisam/ftbench/ft-test-run.sh b/myisam/ftbench/ft-test-run.sh index ceba818fa5c..6ef5f81c527 100755 --- a/myisam/ftbench/ft-test-run.sh +++ b/myisam/ftbench/ft-test-run.sh @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2003 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + if [ ! -x ./ft-test-run.sh ] ; then echo "Usage: ./ft-test-run.sh" exit 1 diff --git a/myisam/mi_test_all.sh b/myisam/mi_test_all.sh index 5989d9cfaf0..812ea914464 100755 --- a/myisam/mi_test_all.sh +++ b/myisam/mi_test_all.sh @@ -1,4 +1,22 @@ #!/bin/sh + +# Copyright (C) 2000, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # # Execute some simple basic test on MyISAM libary to check if things # works at all. diff --git a/myisam/myisampack.c b/myisam/myisampack.c index fa58211ea88..e1b9e99fc2d 100644 --- a/myisam/myisampack.c +++ b/myisam/myisampack.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (C) 2000-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -300,7 +300,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts("Copyright (C) 2002 MySQL AB"); + puts("Copyright (C) 2000-2007 MySQL AB"); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,"); puts("and you are welcome to modify and redistribute it under the GPL license\n"); diff --git a/myisam/rt_index.c b/myisam/rt_index.c index 7ac55bbb549..4df83978983 100644 --- a/myisam/rt_index.c +++ b/myisam/rt_index.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2006 MySQL AB & Ramil Kalimullin +/* Copyright (c) 2002, 2010, 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 diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index cdb2d9fd598..09f6c9d34d5 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -1,11 +1,11 @@ # Copyright (C) 2000-2006 MySQL AB # -# This library is free software; you can redistribute it and/or +# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; version 2 # of the License. # -# This library is distributed in the hope that it will be useful, +# 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 # Library General Public License for more details. diff --git a/mysql-test/create-test-result b/mysql-test/create-test-result index ad19cdf08a1..bfc41a6a7ce 100755 --- a/mysql-test/create-test-result +++ b/mysql-test/create-test-result @@ -1,5 +1,22 @@ #! /bin/sh +# Copyright (C) 2000, 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # This script is a hack for lazy developers who want to get a quick # start on the result file. The code here is rather dirty, but it works # If you have a spare moment feel free to improve it - the right way is diff --git a/mysql-test/fix-result b/mysql-test/fix-result index bd380332ff5..4b67ddcaff9 100755 --- a/mysql-test/fix-result +++ b/mysql-test/fix-result @@ -1,5 +1,22 @@ #! /bin/sh +# Copyright (C) 2001 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # Sasha's hack to fix results generated with mysql-test-run --record # to be version and test port independent. In some cases, further minor # manual edititing may be required, but most of the time it should not diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index b74512e5a39..90c6233e77d 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -1,5 +1,5 @@ # -*- cperl -*- -# Copyright (C) 2005-2006 MySQL AB +# Copyright (c) 2005, 2010, 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 diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index ee5277d39d7..ddfce977b62 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -1,5 +1,5 @@ # -*- cperl -*- -# Copyright (C) 2004-2006 MySQL AB +# Copyright (c) 2004, 2010, 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 diff --git a/mysql-test/misc/kill_master.sh b/mysql-test/misc/kill_master.sh index 7938c9d3ac2..d272212052e 100644 --- a/mysql-test/misc/kill_master.sh +++ b/mysql-test/misc/kill_master.sh @@ -1,3 +1,20 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + kill -9 `cat var/run/master.pid` # The kill may fail if process has already gone away, # so don't use the exit code of the kill. Use 0. diff --git a/mysql-test/misc/mysql-test_V1.9.pl b/mysql-test/misc/mysql-test_V1.9.pl index 129ec41b4d5..31d12b44613 100644 --- a/mysql-test/misc/mysql-test_V1.9.pl +++ b/mysql-test/misc/mysql-test_V1.9.pl @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright (C) 2000 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # # Tests MySQL. Output is given to the stderr. Use # diff to check the possible differencies. diff --git a/mysql-test/mysql-stress-test.pl b/mysql-test/mysql-stress-test.pl index 3061506da51..e64bb69f883 100755 --- a/mysql-test/mysql-stress-test.pl +++ b/mysql-test/mysql-stress-test.pl @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # ====================================================================== # MySQL server stress test system # ====================================================================== diff --git a/mysql-test/mysql-test-run-shell.sh b/mysql-test/mysql-test-run-shell.sh index 7d3e871fe19..d919246f2e1 100644 --- a/mysql-test/mysql-test-run-shell.sh +++ b/mysql-test/mysql-test-run-shell.sh @@ -1,4 +1,22 @@ #!/bin/sh + +# Copyright (c) 2000, 2010, 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 Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # mysql-test-run - originally written by Matt Wagner # modified by Sasha Pachev # Slightly updated by Monty diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 046199f49f3..2cfd689b0e7 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1,6 +1,23 @@ #!/usr/bin/perl # -*- cperl -*- +# Copyright (c) 2004, 2010, 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 Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # ############################################################################## # diff --git a/mysql-test/ndb/Makefile.am b/mysql-test/ndb/Makefile.am index 178e40fb19a..abd89bddbbe 100644 --- a/mysql-test/ndb/Makefile.am +++ b/mysql-test/ndb/Makefile.am @@ -1,3 +1,17 @@ +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA benchdir_root= $(prefix) testdir = $(benchdir_root)/mysql-test/ndb diff --git a/mysql-test/ndb/ndb_config_1_node.ini b/mysql-test/ndb/ndb_config_1_node.ini index 68533396930..15437b54949 100644 --- a/mysql-test/ndb/ndb_config_1_node.ini +++ b/mysql-test/ndb/ndb_config_1_node.ini @@ -1,3 +1,20 @@ +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + [ndbd default] NoOfReplicas= 1 MaxNoOfConcurrentTransactions= 64 diff --git a/mysql-test/ndb/ndb_config_2_node.ini b/mysql-test/ndb/ndb_config_2_node.ini index 55c9c285310..333520ade1c 100644 --- a/mysql-test/ndb/ndb_config_2_node.ini +++ b/mysql-test/ndb/ndb_config_2_node.ini @@ -1,3 +1,20 @@ +# Copyright (C) 2004, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + [ndbd default] NoOfReplicas= 2 MaxNoOfConcurrentTransactions= 64 diff --git a/mysql-test/ndb/ndb_config_4_node.ini b/mysql-test/ndb/ndb_config_4_node.ini index 779432e1660..fdb98db3ed7 100644 --- a/mysql-test/ndb/ndb_config_4_node.ini +++ b/mysql-test/ndb/ndb_config_4_node.ini @@ -1,3 +1,20 @@ +# Copyright (C) 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + [ndbd default] NoOfReplicas= 2 MaxNoOfConcurrentTransactions= 64 diff --git a/mysql-test/purify.supp b/mysql-test/purify.supp index 58553130c51..74ed8c42181 100644 --- a/mysql-test/purify.supp +++ b/mysql-test/purify.supp @@ -1,3 +1,20 @@ +# Copyright (C) 2005, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + suppress UMR rw_read_held; mi_open; ha_myisam::open64; handler::ha_open; openfrm suppress UMR my_end; main suppress UMR _doprnt; fprintf; my_end; main diff --git a/mysql-test/resolve-stack b/mysql-test/resolve-stack index cdbe362c752..90db2e2e40b 100755 --- a/mysql-test/resolve-stack +++ b/mysql-test/resolve-stack @@ -1,4 +1,22 @@ #! /bin/sh + +# Copyright (C) 2002 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # A shortcut for resolving stacks when debugging when # we cannot duplicate the crash in a debugger and have to # resort to using stack traces diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index d7ac6bc6c88..8267b29e5c6 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -1,3 +1,20 @@ +# Copyright (C) 2005, 2008 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # # Suppress some common (not fatal) errors in system libraries found by valgrind # diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 7cb87492b40..77af5a47e99 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -21,10 +21,7 @@ INCLUDES = @ZLIB_INCLUDES@ -I$(top_builddir)/include \ pkglib_LIBRARIES = libmysys.a LDADD = libmysys.a ../dbug/libdbug.a \ ../strings/libmystrings.a -noinst_HEADERS = mysys_priv.h my_static.h \ - my_os2cond.c my_os2dirsrch.c my_os2dirsrch.h \ - my_os2dlfcn.c my_os2file64.c my_os2mutex.c \ - my_os2thread.c my_os2tls.c +noinst_HEADERS = mysys_priv.h my_static.h libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ mf_path.c mf_loadpath.c my_file.c \ my_open.c my_create.c my_dup.c my_seek.c my_read.c \ diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index df206f7e235..e833aeb0b06 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/mysys/my_lib.c b/mysys/my_lib.c index a076a0c971d..76f27cfb645 100644 --- a/mysys/my_lib.c +++ b/mysys/my_lib.c @@ -51,10 +51,6 @@ #include #endif -#ifdef OS2 -#include "my_os2dirsrch.h" -#endif - #if defined(THREAD) && defined(HAVE_READDIR_R) #define READDIR(A,B,C) ((errno=readdir_r(A,B,&C)) != 0 || !C) #else diff --git a/mysys/my_os2cond.c b/mysys/my_os2cond.c deleted file mode 100644 index f0cf91404d2..00000000000 --- a/mysys/my_os2cond.c +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (C) Yuri Dario & 2000 MySQL AB - All the above parties has a full, independent copyright to - the following code, including the right to use the code in - any manner without any demands from the other parties. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/***************************************************************************** -** The following is a simple implementation of posix conditions -*****************************************************************************/ - -#undef SAFE_MUTEX /* Avoid safe_mutex redefinitions */ -#include "mysys_priv.h" -#if defined(THREAD) && defined(OS2) -#include -#include -#include - -int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) -{ - cond->waiting= 0; - /* Warp3 FP29 or Warp4 FP4 or better required */ - if (DosCreateEventSem(NULL, &cond->semaphore, 0x0800, 0)) - return ENOMEM; - return 0; -} - -int pthread_cond_destroy(pthread_cond_t *cond) -{ - for (;;) - { - APIRET rc; - if ((rc= DosCloseEventSem(cond->semaphore)) != 301) - return rc ? EINVAL : 0; - DosPostEventSem(cond->semaphore); - } -} - - -int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) -{ - int rval= 0; - cond->waiting++; - if (mutex) - pthread_mutex_unlock(mutex); - if (DosWaitEventSem(cond->semaphore, SEM_INDEFINITE_WAIT)) - rval= EINVAL; - if (mutex) - pthread_mutex_lock(mutex); - cond->waiting--; - return rval; -} - -int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - struct timespec *abstime) -{ - struct timeb curtime; - int result; - long timeout; - int rval= 0; - - _ftime(&curtime); - timeout= ((long) (abstime->ts_sec - curtime.time) * 1000L + - (long) ((abstime->ts_nsec / 1000) - curtime.millitm) / 1000L); - if (timeout < 0) /* Some safety */ - timeout= 0L; - - cond->waiting++; - - if (mutex) - pthread_mutex_unlock(mutex); - if (DosWaitEventSem(cond->semaphore, timeout) != 0) - rval= ETIMEDOUT; - if (mutex) - pthread_mutex_lock(mutex); - - cond->waiting--; - - return rval; -} - - -int pthread_cond_signal(pthread_cond_t *cond) -{ - /* Bring the next thread off the condition queue: */ - DosPostEventSem(cond->semaphore); - return 0; -} - - -int pthread_cond_broadcast(pthread_cond_t *cond) -{ - int i; - /* Enter a loop to bring all threads off the condition queue */ - for (i= cond->waiting; i--;) - DosPostEventSem(cond->semaphore); - return 0; -} - - -int pthread_attr_init(pthread_attr_t *connect_att) -{ - connect_att->dwStackSize= 0; - connect_att->dwCreatingFlag= 0; - connect_att->priority= 0; - return 0; -} - -int pthread_attr_setstacksize(pthread_attr_t *connect_att, DWORD stack) -{ - connect_att->dwStackSize= stack; - return 0; -} - -int pthread_attr_setprio(pthread_attr_t *connect_att, int priority) -{ - connect_att->priority= priority; - return 0; -} - -int pthread_attr_destroy(pthread_attr_t *connect_att) -{ - bzero((gptr) connect_att, sizeof(*connect_att)); - return 0; -} - -/**************************************************************************** -** Fix localtime_r() to be a bit safer -****************************************************************************/ - -struct tm *localtime_r(const time_t *timep, struct tm *tmp) -{ - if (*timep == (time_t) - 1) /* This will crash win32 */ - { - bzero(tmp, sizeof(*tmp)); - } - else - { - struct tm *res= localtime(timep); - if (!res) /* Wrong date */ - { - bzero(tmp, sizeof(*tmp)); /* Keep things safe */ - return 0; - } - *tmp= *res; - } - return tmp; -} -#endif /* __WIN__ */ diff --git a/mysys/my_os2dirsrch.c b/mysys/my_os2dirsrch.c deleted file mode 100644 index 27e774c8e04..00000000000 --- a/mysys/my_os2dirsrch.c +++ /dev/null @@ -1,184 +0,0 @@ -/* Copyright (C) Yuri Dario & 2000-2003 MySQL AB - All the above parties has a full, independent copyright to - the following code, including the right to use the code in - any manner without any demands from the other parties. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - - -/* Win32 directory search emulation */ - -#if defined(OS2) - -long _findfirst( char* path, struct _finddata_t* dos_file) -{ - HDIR hdir = HDIR_CREATE; - APIRET rc; - FILEFINDBUF3 buf3; - ULONG entries = 1; - -#ifdef _DEBUG - printf( "_findfirst path %s\n", path); -#endif - - memset( &buf3, 0, sizeof( buf3)); - rc = DosFindFirst( - path, /* The ASCIIZ path name of the file or subdirectory to be found. */ - &hdir, /* The handle associated with this DosFindFirst request. */ - FILE_NORMAL | FILE_DIRECTORY, /* Attribute value that determines the file objects to be searched for. */ - &buf3, /* Result buffer. */ - sizeof( buf3), /* The length, in bytes, of pfindbuf. */ - &entries, /* Pointer to the number of entries: */ - FIL_STANDARD); /* The level of file information required. */ - -#ifdef _DEBUG - printf( "_findfirst rc=%d hdir=%d entries=%d->%s\n", rc, hdir, entries, - buf3.achName); -#endif - - if (rc /* && entries == 0 */) - return -1; - - if (dos_file) - { - memset( dos_file, 0, sizeof( struct _finddata_t)); - strcpy( dos_file->name, buf3.achName); - dos_file->size = buf3.cbFile; - dos_file->attrib = buf3.attrFile; - } - return (ULONG) hdir; -} - - -long _findnext( long hdir, struct _finddata_t* dos_file) -{ - APIRET rc; - FILEFINDBUF3 buf3; - ULONG entries = 1; - - memset( &buf3, 0, sizeof( buf3)); - rc = DosFindNext(hdir, - &buf3, /* Result buffer. */ - sizeof( buf3), /* Length, in bytes, of pfindbuf. */ - &entries); /* Pointer to the number of entries */ - -#ifdef _DEBUG - printf( "_findnext rc=%d hdir=%d entries=%d->%s\n", rc, hdir, entries, - buf3.achName); -#endif - - if (rc /* && entries == 0 */) - return -1; - - if (dos_file) - { - memset( dos_file, 0, sizeof( struct _finddata_t)); - strcpy( dos_file->name, buf3.achName); - dos_file->size = buf3.cbFile; - dos_file->attrib = buf3.attrFile; - } - return 0; -} - -void _findclose( long hdir) -{ - APIRET rc; - - rc = DosFindClose( hdir); -#ifdef _DEBUG - printf( "_findclose rc=%d hdir=%d\n", rc, hdir); -#endif -} - -DIR* opendir(char* path) -{ - DIR* dir = (DIR*) calloc(1, sizeof( DIR)); - char buffer[260]; - APIRET rc; - ULONG entries = 1; - - strmov(strmov(buffer, path), "*.*"); - -#ifdef _DEBUG - printf( "_findfirst path %s\n", buffer); -#endif - - dir->hdir = HDIR_CREATE; - memset( &dir->buf3, 0, sizeof( dir->buf3)); - rc = DosFindFirst( - buffer, /* Address of the ASCIIZ path name of the file or subdirectory to be found. */ - &dir->hdir, /* Address of the handle associated with this DosFindFirst request. */ - FILE_NORMAL | FILE_DIRECTORY, /* Attribute value that determines the file objects to be searched for. */ - &dir->buf3, /* Result buffer. */ - sizeof( dir->buf3), /* The length, in bytes, of pfindbuf. */ - &entries, /* Pointer to the number of entries: */ - FIL_STANDARD); /* The level of file information required. */ - -#ifdef _DEBUG - printf( "opendir rc=%d hdir=%d entries=%d->%s\n", rc, dir->hdir, entries, dir->buf3.achName); -#endif - - if (rc /* && entries == 0 */) - return NULL; - - return dir; -} - - -struct dirent* readdir( DIR* dir) -{ - APIRET rc; - ULONG entries = 1; - - if (!dir->buf3.achName[0]) /* file not found on previous query */ - return NULL; - - /* copy last file name */ - strcpy( dir->ent.d_name, dir->buf3.achName); - - /* query next file */ - memset( &dir->buf3, 0, sizeof( dir->buf3)); - rc= DosFindNext( - dir->hdir, - &dir->buf3, /* Result buffer. */ - sizeof(dir->buf3), /* Length, in bytes, of pfindbuf. */ - &entries); /* Pointer to the number of entries */ - -#ifdef _DEBUG - printf( "_findnext rc=%d hdir=%d entries=%d->%s\n", rc, dir->hdir, entries, - dir->buf3.achName); -#endif - - if (rc /* && entries == 0 */) - *dir->buf3.achName= 0; /* reset name for next query */ - - return &dir->ent; -} - - -int closedir (DIR *dir) -{ - APIRET rc; - - rc = DosFindClose( dir->hdir); -#ifdef _DEBUG - printf( "_findclose rc=%d hdir=%d\n", rc, dir->hdir); -#endif - free(dir); - return 0; -} - -#endif /* OS2 */ diff --git a/mysys/my_os2dirsrch.h b/mysys/my_os2dirsrch.h deleted file mode 100644 index e3af6740769..00000000000 --- a/mysys/my_os2dirsrch.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (C) Yuri Dario & 2000 MySQL AB - All the above parties has a full, independent copyright to - the following code, including the right to use the code in - any manner without any demands from the other parties. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* Win32 directory search emulation */ - -#ifndef __MY_OS2DIRSRCH2_H__ -#define __MY_OS2DIRSRCH2_H__ - -#ifdef __cplusplus_00 -extern "C" { -#endif - -struct _finddata_t -{ - unsigned attrib; -#ifdef NOT_USED - unsigned long time_create; /* -1 for FAT file systems */ - unsigned long time_access; /* -1 for FAT file systems */ - unsigned long time_write; -#endif - unsigned long size; - char name[260]; -#ifdef NOT_USED - uint16 wr_date; - uint16 wr_time; -#endif -}; - - -struct dirent -{ -#ifdef NOT_USED - unsigned attrib; - unsigned long time_create; /* -1 for FAT file systems */ - unsigned long time_access; /* -1 for FAT file systems */ - unsigned long time_write; - unsigned long size; -#endif - char d_name[260]; -#ifdef NOT_USED - uint16 wr_date; - uint16 wr_time; -#endif -}; - -struct DIR -{ - HDIR hdir; - FILEFINDBUF3 buf3; - struct dirent ent; -}; - -DIR *opendir ( char *); -struct dirent *readdir (DIR *); -int closedir (DIR *); - -#ifdef NOT_USED -#define _A_NORMAL FILE_NORMAL -#define _A_SUBDIR FILE_DIRECTORY -#define _A_RDONLY FILE_READONLY - -long _findfirst( char*, struct _finddata_t*); -long _findnext( long, struct _finddata_t*); -void _findclose( long); -#endif - -#ifdef __cplusplus_00 -} -#endif - -#endif /* __MY_OS2DIRSRCH2_H__ */ diff --git a/mysys/my_os2dlfcn.c b/mysys/my_os2dlfcn.c deleted file mode 100644 index 74be940d0d4..00000000000 --- a/mysys/my_os2dlfcn.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (C) Yuri Dario & 2000 MySQL AB - All the above parties has a full, independent copyright to - the following code, including the right to use the code in - any manner without any demands from the other parties. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* - * dlfcn::Unix dynamic loading for OS/2 - * - * Compatibility layer for dynamic loading. - * Only minimal implementation - * -*/ - -#define RTLD_LAZY 0 -#define RTLD_NOW 0 - -void* dlopen( char* path, int flag); -char* dlerror( void); -void* dlsym( void* hmod, char* fn); -void dlclose( void* hmod); - -char fail[ 256]; - -void* dlopen( char* path, int flag) -{ - APIRET rc; - HMODULE hmod; - - rc = DosLoadModule( fail, sizeof( fail), path, &hmod); - if (rc) - return NULL; - - return (void*) hmod; -} - -char* dlerror( void) -{ - return fail; -} - -void* dlsym( void* hmod, char* fn) -{ - APIRET rc; - PFN addr; - - rc = DosQueryProcAddr( (HMODULE) hmod, 0l, fn, &addr); - if (rc) - return NULL; - - return (void*) addr; -} - -void dlclose( void* hmod) -{ - APIRET rc; - - rc = DosFreeModule( (HMODULE) hmod); - -} diff --git a/mysys/my_os2dlfcn.h0 b/mysys/my_os2dlfcn.h0 deleted file mode 100644 index ec05eebc47b..00000000000 --- a/mysys/my_os2dlfcn.h0 +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) Yuri Dario & 2000 MySQL AB - All the above parties has a full, independent copyright to - the following code, including the right to use the code in - any manner without any demands from the other parties. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ -/* - * dlfcn::Unix dynamic loading for OS/2 - * - * Compatibility layer for dynamic loading. - * Only minimal implementation - * -*/ - -#ifndef __DLFCN_H__ -#define __DLFCN_H__ - -#define RTLD_LAZY 0 -#define RTLD_NOW 0 - -void* dlopen( char* path, int flag); -char* dlerror( void); -void* dlsym( void* hmod, char* fn); -void dlclose( void* hmod); - -#endif diff --git a/mysys/my_os2file64.c b/mysys/my_os2file64.c deleted file mode 100644 index 52156903b80..00000000000 --- a/mysys/my_os2file64.c +++ /dev/null @@ -1,394 +0,0 @@ -/* Copyright (C) Yuri Dario & 2000 MySQL AB - All the above parties has a full, independent copyright to - the following code, including the right to use the code in - any manner without any demands from the other parties. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -void _OS2errno( APIRET rc); -longlong _lseek64( int fd, longlong offset, int seektype); -int _lock64( int fd, int locktype, my_off_t start, - my_off_t length, myf MyFlags); -int _sopen64( const char *name, int oflag, int shflag, int mask); - -/* - This class is used to define a global c++ variable, that - is initialized before main() gets called. -*/ - -class File64bit -{ - public: - File64bit(); /* default constructor */ -} initFile64bit; - -static APIRET (* APIENTRY _DosOpenL)(PCSZ pszFileName, - PHFILE phf, - PULONG pulAction, - LONGLONG cbFile, - ULONG ulAttribute, - ULONG fsOpenFlags, - ULONG fsOpenMode, - PEAOP2 peaop2); -static APIRET (* APIENTRY _DosSetFilePtrL)(HFILE hFile, - LONGLONG ib, - ULONG method, - PLONGLONG ibActual); -static APIRET (* APIENTRY _DosSetFileLocksL)(HFILE hFile, - PFILELOCKL pflUnlock, - PFILELOCKL pflLock, - ULONG timeout, - ULONG flags); - -#define EIO EINVAL -#define ESPIPE EBADSEEK - - -static unsigned char const errno_tab[] = -{ - 0 , EINVAL, ENOENT, ENOENT, EMFILE, /* 0..4 */ - EACCES, EBADF, EIO, ENOMEM, EIO, /* 5..9 */ - EINVAL, ENOEXEC,EINVAL, EINVAL, EINVAL, /* 10..14 */ - ENOENT, EBUSY, EXDEV, ENOENT, EROFS, /* 15..19 */ - EIO, EIO, EIO, EIO, EIO, /* 20..24 */ - EIO, EIO, EIO, ENOSPC, EIO, /* 25..29 */ - EIO, EIO, EACCES, EACCES, EIO, /* 30..34 */ - EIO, EIO, EIO, EIO, ENOSPC, /* 35..39 */ - EIO, EIO, EIO, EIO, EIO, /* 40..44 */ - EIO, EIO, EIO, EIO, EIO, /* 45..49 */ - EIO, EIO, EIO, EIO, EBUSY, /* 50..54 */ - EIO, EIO, EIO, EIO, EIO, /* 55..59 */ - EIO, ENOSPC, ENOSPC, EIO, EIO, /* 60..64 */ - EACCES, EIO, EIO, EIO, EIO, /* 65..69 */ - EIO, EIO, EIO, EROFS, EIO, /* 70..74 */ - EIO, EIO, EIO, EIO, EIO, /* 75..79 */ - EEXIST, EIO, ENOENT, EIO, EIO, /* 80..84 */ - EIO, EIO, EINVAL, EIO, EAGAIN, /* 85..89 */ - EIO, EIO, EIO, EIO, EIO, /* 90..94 */ - EINTR, EIO, EIO, EIO, EACCES, /* 95..99 */ - ENOMEM, EINVAL, EINVAL, ENOMEM, EINVAL, /* 100..104 */ - EINVAL, ENOMEM, EIO, EACCES, EPIPE, /* 105..109 */ - ENOENT, E2BIG, ENOSPC, ENOMEM, EBADF, /* 110..114 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 115..119 */ - EINVAL, EINVAL, EINVAL, ENOENT, EINVAL, /* 120..124 */ - ENOENT, ENOENT, ENOENT, ECHILD, ECHILD, /* 125..129 */ - EACCES, EINVAL, ESPIPE, EINVAL, EINVAL, /* 130..134 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 135..139 */ - EINVAL, EINVAL, EBUSY, EINVAL, EINVAL, /* 140..144 */ - EINVAL, EINVAL, EINVAL, EBUSY, EINVAL, /* 145..149 */ - EINVAL, EINVAL, ENOMEM, EINVAL, EINVAL, /* 150..154 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 155..159 */ - EINVAL, EINVAL, EINVAL, EINVAL, EAGAIN, /* 160..164 */ - EINVAL, EINVAL, EACCES, EINVAL, EINVAL, /* 165..169 */ - EBUSY, EINVAL, EINVAL, EINVAL, EINVAL, /* 170..174 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 175..179 */ - EINVAL, EINVAL, EINVAL, EINVAL, ECHILD, /* 180..184 */ - EINVAL, EINVAL, ENOENT, EINVAL, EINVAL, /* 185..189 */ - ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC, /* 190..194 */ - ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC,ENOEXEC, /* 195..199 */ - ENOEXEC,ENOEXEC,ENOEXEC,ENOENT, EINVAL, /* 200..204 */ - EINVAL, ENAMETOOLONG, EINVAL, EINVAL, EINVAL, /* 205..209 */ - EINVAL, EINVAL, EACCES, ENOEXEC,ENOEXEC, /* 210..214 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 215..219 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 220..224 */ - EINVAL, EINVAL, EINVAL, ECHILD, EINVAL, /* 225..229 */ - EINVAL, EBUSY, EAGAIN, ENOTCONN, EINVAL, /* 230..234 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 235..239 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 240..244 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 245..249 */ - EACCES, EACCES, EINVAL, ENOENT, EINVAL, /* 250..254 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 255..259 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 260..264 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 265..269 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 270..274 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 275..279 */ - EINVAL, EINVAL, EINVAL, EINVAL, EEXIST, /* 280..284 */ - EEXIST, EINVAL, EINVAL, EINVAL, EINVAL, /* 285..289 */ - ENOMEM, EMFILE, EINVAL, EINVAL, EINVAL, /* 290..294 */ - EINVAL, EINVAL, EINVAL, EINVAL, EINVAL, /* 295..299 */ - EINVAL, EBUSY, EINVAL, ESRCH, EINVAL, /* 300..304 */ - ESRCH, EINVAL, EINVAL, EINVAL, ESRCH, /* 305..309 */ - EINVAL, ENOMEM, EINVAL, EINVAL, EINVAL, /* 310..314 */ - EINVAL, E2BIG, ENOENT, EIO, EIO, /* 315..319 */ - EINVAL, EINVAL, EINVAL, EINVAL, EAGAIN, /* 320..324 */ - EINVAL, EINVAL, EINVAL, EIO, ENOENT, /* 325..329 */ - EACCES, EACCES, EACCES, ENOENT, ENOMEM /* 330..334 */ -}; - -/* - * Initialize 64bit file access: dynamic load of WSeB API -*/ - File64bit :: File64bit() -{ - HMODULE hDoscalls; - - if (DosQueryModuleHandle("DOSCALLS", &hDoscalls) != NO_ERROR) - return; - - if (DosQueryProcAddr(hDoscalls, 981, NULL, (PFN *)&_DosOpenL) != NO_ERROR) - return; - - if (DosQueryProcAddr(hDoscalls, 988, NULL, (PFN *)&_DosSetFilePtrL) != NO_ERROR) { - _DosOpenL = NULL; - return; - } - - if (DosQueryProcAddr(hDoscalls, 986, NULL, (PFN *)&_DosSetFileLocksL) != NO_ERROR) { - _DosOpenL = NULL; - _DosSetFilePtrL = NULL; - return; - } - /* notify success */ -#ifdef MYSQL_SERVER - printf( "WSeB 64bit file API loaded.\n"); -#endif -} - -void _OS2errno( APIRET rc) -{ - if (rc >= sizeof (errno_tab)) - errno = EINVAL; - else - errno = errno_tab[rc]; -} - - -longlong _lseek64( int fd, longlong offset, int seektype) -{ - APIRET rc; - longlong actual; - - if (_DosSetFilePtrL) - rc = _DosSetFilePtrL( fd, offset, seektype, &actual); - else - { - ULONG ulActual; - rc = DosSetFilePtr( fd, (long) offset, seektype, &ulActual); - actual = ulActual; - } - - if (!rc) - return( actual); /* NO_ERROR */ - - _OS2errno( rc); /* set errno */ - return(-1); /* seek failed */ -} - - -inline APIRET _SetFileLocksL(HFILE hFile, - PFILELOCKL pflUnlock, - PFILELOCKL pflLock, - ULONG timeout, - ULONG flags) -{ - if (_DosSetFileLocksL) - { - APIRET rc; - rc = _DosSetFileLocksL( hFile, pflUnlock, pflLock, timeout, flags); - - /* - on FAT/HPFS/LAN a INVALID_PARAMETER is returned, seems that - only JFS can handle >2GB ranges. - */ - if (rc != 87) - return rc; - /* got INVALID_PARAMETER, fallback to standard call */ - } - - FILELOCK flUnlock = { pflUnlock->lOffset, pflUnlock->lRange }; - FILELOCK flLock = { pflLock->lOffset, pflLock->lRange }; - return DosSetFileLocks( hFile, &flUnlock, &flLock, timeout, flags); -} - - -int _lock64( int fd, int locktype, my_off_t start, - my_off_t length, myf MyFlags) -{ - FILELOCKL LockArea = {0,0}, UnlockArea = {0,0}; - ULONG readonly = 0; - APIRET rc = -1; - - switch (locktype) { - case F_UNLCK: - UnlockArea.lOffset = start; - UnlockArea.lRange = length ? length : LONGLONG_MAX; - break; - - case F_RDLCK: - case F_WRLCK: - LockArea.lOffset = start; - LockArea.lRange = length ? length : LONGLONG_MAX; - readonly = (locktype == F_RDLCK ? 1 : 0); - break; - - default: - errno = EINVAL; - rc = -1; - break; - } - - if (MyFlags & MY_DONT_WAIT) - { - rc = _SetFileLocksL( fd, &UnlockArea, &LockArea, 0, readonly); - /* printf("fd %d, locktype %d, rc %d (dont_wait)\n", fd, locktype, rc); */ - if (rc == 33) { /* Lock Violation */ - - DBUG_PRINT("info",("Was locked, trying with timeout")); - rc = _SetFileLocksL( fd, &UnlockArea, &LockArea, 1 * 1000, readonly); - /* printf( "fd %d, locktype %d, rc %d (dont_wait with timeout)\n", fd, locktype, rc); */ - } - } - else - { - while (rc = _SetFileLocksL( fd, &UnlockArea, &LockArea, 0, readonly) && - (rc == 33)) - { - printf("."); - DosSleep(1 * 1000); - } - /* printf( "fd %d, locktype %d, rc %d (wait2)\n", fd, locktype, rc); */ - } - if (!rc) - return(0); /* NO_ERROR */ - _OS2errno( rc); /* set errno */ - return(-1); /* lock failed */ -} - - -int sopen(const char *name, int oflag, int shflag, int mask) -{ - int fail_errno; - APIRET rc = 0; - HFILE hf = 0; - ULONG ulAction = 0; - LONGLONG cbFile = 0; - ULONG ulAttribute = FILE_NORMAL; - ULONG fsOpenFlags = 0; - ULONG fsOpenMode = 0; - - /* Extract the access mode and sharing mode bits. */ - fsOpenMode = (shflag & 0xFF) | (oflag & 0x03); - - /* - Translate ERROR_OPEN_FAILED to ENOENT unless O_EXCL is set (see - below). - */ - fail_errno = ENOENT; - - /* - Compute `open_flag' depending on `flags'. Note that _SO_CREAT is - set for O_CREAT. - */ - - if (oflag & O_CREAT) - { - if (oflag & O_EXCL) - { - fsOpenFlags = OPEN_ACTION_FAIL_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW; - fail_errno = EEXIST; - } - else if (oflag & O_TRUNC) - fsOpenFlags = OPEN_ACTION_REPLACE_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW; - else - fsOpenFlags = OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW; - - if (mask & S_IWRITE) - ulAttribute = FILE_NORMAL; - else - ulAttribute = FILE_READONLY; - - } - else if (oflag & O_TRUNC) - fsOpenFlags = OPEN_ACTION_REPLACE_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW; - else - fsOpenFlags = OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW; - - /* Try to open the file and handle errors. */ - if (_DosOpenL) - rc = _DosOpenL( name, &hf, &ulAction, cbFile, - ulAttribute, fsOpenFlags, fsOpenMode, NULL); - else - rc = DosOpen( name, &hf, &ulAction, (LONG) cbFile, - ulAttribute, fsOpenFlags, fsOpenMode, NULL); - - if (rc == ERROR_OPEN_FAILED) - { - errno = fail_errno; - return -1; - } - if (rc != 0) - { - _OS2errno( rc); /* set errno */ - return -1; - } - if (oflag & O_APPEND) - _lseek64( hf, 0L, SEEK_END); - return hf; -} - - -int read(int fd, void *buffer, unsigned int count) -{ - APIRET rc; - ULONG actual; - - rc= DosRead( fd, (PVOID) buffer, count, &actual); - - if (!rc) - return( actual); /* NO_ERROR */ - _OS2errno( rc); /* set errno */ - return(-1); /* read failed */ -} - - -int write(int fd, const void *buffer, unsigned int count) -{ - APIRET rc; - ULONG actual; - - rc = DosWrite( fd, (PVOID) buffer, count, &actual); - - if (!rc) - return( actual); /* NO_ERROR */ - _OS2errno( rc); /* set errno */ - return(-1); /* write failed */ -} - - -int close( int fd) -{ - APIRET rc; - ULONG actual; - - rc = DosClose( fd); - - if (!rc) - return( 0); /* NO_ERROR */ - _OS2errno( rc); /* set errno */ - return(-1); /* close failed */ -} - - -int open( const char *name, int oflag) -{ - return sopen( name, oflag, OPEN_SHARE_DENYNONE, S_IREAD | S_IWRITE); -} - - -int open( const char *name, int oflag, int mask) -{ - return sopen( name, oflag, OPEN_SHARE_DENYNONE, mask); -} diff --git a/mysys/my_os2mutex.c b/mysys/my_os2mutex.c deleted file mode 100644 index 5010d6e8dd5..00000000000 --- a/mysys/my_os2mutex.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 1995 John Birrell . - * All rights reserved. - * - * Modified and extended by Antony T Curtis - * for use with OS/2. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by John Birrell. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -#include -#include -#ifdef _THREAD_SAFE - -int -pthread_mutex_init(pthread_mutex_t * mutex, - const pthread_mutexattr_t * mutex_attr) -{ - (void) DosCreateMutexSem(NULL,mutex,0,0); - return (0); /* Return the completion status: */ -} - - -int -pthread_mutex_destroy(pthread_mutex_t * mutex) -{ - APIRET rc; - - do - { - rc = DosCloseMutexSem(*mutex); - if (rc == 301) DosReleaseMutexSem(*mutex); - } while (rc == 301); - - *mutex = 0; - return (0); /* Return the completion status: */ -} - - -int -pthread_mutex_lock(pthread_mutex_t * mutex) -{ - APIRET rc; - - rc = DosRequestMutexSem(*mutex,SEM_INDEFINITE_WAIT); - if (rc) - return(EINVAL); - return (0); /* Return the completion status: */ -} - - -int -pthread_mutex_unlock(pthread_mutex_t * mutex) -{ - (void) DosReleaseMutexSem(*mutex); - return (0); /* Return the completion status: */ -} -#endif diff --git a/mysys/my_os2thread.c b/mysys/my_os2thread.c deleted file mode 100644 index e34fd18d596..00000000000 --- a/mysys/my_os2thread.c +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright (C) Yuri Dario & 2000 MySQL AB - All the above parties has a full, independent copyright to - the following code, including the right to use the code in - any manner without any demands from the other parties. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/***************************************************************************** -** Simulation of posix threads calls for OS/2 -*****************************************************************************/ - -#include "mysys_priv.h" -#if defined(THREAD) && defined(OS2) -#include -#include - -static pthread_mutex_t THR_LOCK_thread; - -struct pthread_map -{ - HANDLE pthreadself; - pthread_handler func; - void * param; -}; - -void win_pthread_init(void) -{ - pthread_mutex_init(&THR_LOCK_thread,NULL); -} - -/* -** We have tried to use '_beginthreadex' instead of '_beginthread' here -** but in this case the program leaks about 512 characters for each -** created thread ! -** As we want to save the created thread handler for other threads to -** use and to be returned by pthread_self() (instead of the Win32 pseudo -** handler), we have to go trough pthread_start() to catch the returned handler -** in the new thread. -*/ - -pthread_handler_t pthread_start(void *param) -{ - DBUG_ENTER("pthread_start"); - pthread_handler func=((struct pthread_map *) param)->func; - void *func_param=((struct pthread_map *) param)->param; - my_thread_init(); /* Will always succeed in windows */ - pthread_mutex_lock(&THR_LOCK_thread); /* Wait for beginthread to return */ - win_pthread_self=((struct pthread_map *) param)->pthreadself; - pthread_mutex_unlock(&THR_LOCK_thread); - free((char*) param); /* Free param from create */ - /* pthread_exit((void*) (*func)(func_param)); */ - (*func)(func_param); - DBUG_RETURN(0); -} - - -int pthread_create(pthread_t *thread_id, pthread_attr_t *attr, - pthread_handler func, void *param) -{ - HANDLE hThread; - struct pthread_map *map; - DBUG_ENTER("pthread_create"); - - if (!(map=(struct pthread_map *)malloc(sizeof(*map)))) - DBUG_RETURN(-1); - map->func=func; - map->param=param; - pthread_mutex_lock(&THR_LOCK_thread); -#ifdef __BORLANDC__ - hThread=(HANDLE)_beginthread((void(_USERENTRY *)(void *)) pthread_start, - attr->dwStackSize ? attr->dwStackSize : - 65535, (void*) map); -#elif defined( OS2) - hThread=(HANDLE)_beginthread((void( _Optlink *)(void *)) pthread_start, NULL, - attr->dwStackSize ? attr->dwStackSize : - 65535, (void*) map); -#else - hThread=(HANDLE)_beginthread((void( __cdecl *)(void *)) pthread_start, - attr->dwStackSize ? attr->dwStackSize : - 65535, (void*) map); -#endif - DBUG_PRINT("info", ("hThread=%lu",(long) hThread)); - *thread_id=map->pthreadself=hThread; - pthread_mutex_unlock(&THR_LOCK_thread); - - if (hThread == (HANDLE) -1) - { - int error=errno; - DBUG_PRINT("error", - ("Can't create thread to handle request (error %d)",error)); - DBUG_RETURN(error ? error : -1); - } -#ifdef OS2 - my_pthread_setprio(hThread, attr->priority); -#else - VOID(SetThreadPriority(hThread, attr->priority)) ; -#endif - DBUG_RETURN(0); -} - - -void pthread_exit(void *a) -{ - _endthread(); -} - -/* This is neaded to get the macro pthread_setspecific to work */ - -int win_pthread_setspecific(void *a,void *b,uint length) -{ - memcpy(a,b,length); - return 0; -} - -#endif diff --git a/mysys/my_os2tls.c b/mysys/my_os2tls.c deleted file mode 100644 index 49100c65516..00000000000 --- a/mysys/my_os2tls.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Copyright (C) Yuri Dario & 2000 MySQL AB - All the above parties has a full, independent copyright to - the following code, including the right to use the code in - any manner without any demands from the other parties. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -DWORD TlsAlloc( void); -BOOL TlsFree( DWORD); -PVOID TlsGetValue( DWORD); -BOOL TlsSetValue( DWORD, PVOID); - -#define TLS_MINIMUM_AVAILABLE 64 - - -PULONG tls_storage; /* TLS local storage */ -DWORD tls_bits[2]; /* TLS in-use bits */ -pthread_mutex_t tls_mutex; /* TLS mutex for in-use bits */ - - -DWORD TlsAlloc( void) -{ - DWORD index = -1; - DWORD mask, tibidx; - int i; - - if (tls_storage == NULL) - { - - APIRET rc; - - /* allocate memory for TLS storage */ - rc = DosAllocThreadLocalMemory( 1, &tls_storage); - if (rc) - fprintf( stderr, "DosAllocThreadLocalMemory error: return code = %u\n", - rc); - /* create a mutex */ - if (pthread_mutex_init( &tls_mutex, NULL)) - fprintf( stderr, "Failed to init TLS mutex\n"); - } - - pthread_mutex_lock( &tls_mutex); - - tibidx = 0; - if (tls_bits[0] == 0xFFFFFFFF) - { - if (tls_bits[1] == 0xFFFFFFFF) - { - fprintf( stderr, "tid#%d, no more TLS bits available\n", _threadid); - pthread_mutex_unlock( &tls_mutex); - return -1; - } - tibidx = 1; - } - - for (i=0; i<32; i++) - { - mask = (1 << i); - if ((tls_bits[ tibidx] & mask) == 0) - { - tls_bits[ tibidx] |= mask; - index = (tibidx*32) + i; - break; - } - } - tls_storage[index] = 0; - - pthread_mutex_unlock( &tls_mutex); - /* fprintf( stderr, "tid#%d, TlsAlloc index %d\n", _threadid, index); */ - return index; -} - -BOOL TlsFree( DWORD index) -{ - int tlsidx; - DWORD mask; - - if (index >= TLS_MINIMUM_AVAILABLE) - return NULL; - - pthread_mutex_lock( &tls_mutex); - - tlsidx = 0; - if (index > 32) - tlsidx++; - - mask = (1 << index); - if (tls_bits[ tlsidx] & mask) - { - tls_bits[tlsidx] &= ~mask; - tls_storage[index] = 0; - pthread_mutex_unlock( &tls_mutex); - return TRUE; - } - - pthread_mutex_unlock( &tls_mutex); - return FALSE; -} - - -PVOID TlsGetValue( DWORD index) -{ - if (index >= TLS_MINIMUM_AVAILABLE) - return NULL; - - /* verify if memory has been allocated for this thread */ - if (*tls_storage == NULL) - { - /* allocate memory for indexes */ - *tls_storage = (ULONG)calloc( TLS_MINIMUM_AVAILABLE, sizeof(int)); - /* fprintf(stderr, "tid#%d, tls_storage %x\n", _threadid, *tls_storage); */ - } - - ULONG* tls_array = (ULONG*) *tls_storage; - return (PVOID) tls_array[index]; -} - - -BOOL TlsSetValue( DWORD index, PVOID val) -{ - - /* verify if memory has been allocated for this thread */ - if (*tls_storage == NULL) - { - /* allocate memory for indexes */ - *tls_storage = (ULONG)calloc( TLS_MINIMUM_AVAILABLE, sizeof(int)); - /* fprintf(stderr, "tid#%d, tls_storage %x\n", _threadid, *tls_storage); */ - } - - if (index >= TLS_MINIMUM_AVAILABLE) - return FALSE; - - ULONG* tls_array = (ULONG*) *tls_storage; - /* fprintf( stderr, "tid#%d, TlsSetValue array %08x index %d -> %08x (old)\n", _threadid, tls_array, index, tls_array[ index]); */ - tls_array[ index] = (ULONG) val; - /* fprintf( stderr, "tid#%d, TlsSetValue array %08x index %d -> %08x\n", _threadid, tls_array, index, val); */ - return TRUE; -} diff --git a/ndb/Makefile.am b/ndb/Makefile.am index a652fc5b6a9..b7dfcde3c2b 100644 --- a/ndb/Makefile.am +++ b/ndb/Makefile.am @@ -21,7 +21,6 @@ include $(top_srcdir)/ndb/config/common.mk.am dist-hook: -rm -rf `find $(distdir) -type d -name SCCS` - -rm -rf `find $(distdir) -type d -name old_files` -rm -rf `find $(distdir)/ndbapi-examples -name '*.o'` list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" != "." -a "$$subdir" != "include"; then \ @@ -35,7 +34,7 @@ dist-hook: done windoze: - for i in `find . -name 'old_dirs' -prune -o -name 'Makefile.am' -print`; \ + for i in `find . -name 'Makefile.am' -print`; \ do make -C `dirname $$i` windoze-dsp; done windoze-dsp: diff --git a/ndb/config/make-win-dsw.sh b/ndb/config/make-win-dsw.sh index b0613620f8a..070a3665bc0 100755 --- a/ndb/config/make-win-dsw.sh +++ b/ndb/config/make-win-dsw.sh @@ -1,3 +1,17 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA cat <ARBkr z=5kp{TWP7)3WZi}ZA&Xyw4&joS+v@sQl*M*RNCHcs6|DHO5OK)&fL4%@ZtM^e=mA7 zb7sz*bLPyMGaq;6Ze#gP6%L0(v;Spj*%~4LqfYlogq{y_Bx|Hrpyg;owF|Wi5NaCp zMuvfdrxkHNE<8>=*?5lfK^~uei1T3{X{Wg%Ps3Avvs2^4@>;IS4+9Rr=XUcs_#cNh z?(A&g%ls^$Jv=r?d-#=JZa#Yf^Pybi!N(0I?k1<3PXS;)cHWh>3+}wKw)*ng1&c$= zu4q_t#nmbgq(!!g-<*z^;zM4PYc8HfJd5y5!{f(Of+zFeG5~ks8INZ$p8k05#B)BL zYCQMjS&HXAJY(^Yru}aYB0dWkgz!8(<#oRcqNP@4={B}n7YZ`(!>1_()&W=tmlLu^l;O534eg} zLg3TZh|fBY1iamX51_Fp0NyF(mE6++KWV{VA;0R6z1-|qXQPGL@BDjQZt9!#!w3&Q z(!`#=Z8T20pJl=v|M*e2NtQYeOL2oNy z`WM3Q;@JcEb4$J(fWIH`)mHwa2oC}FSouc~9tFJ5${z{X`2(jr+sgj{-w$}LJ$hRD@QUx8fPD6K=6?qKX@Ebo;PZjMHv@kk=vO1Z)Z#Z2 z_(8zzM=XCM(zpD!hkLW+do&O7qsXV9V*YfbZ}?3Qt9~AB67nBLzOBC;{!03P!V?7SLptHfm{ot3``^dAOn%a;V+X283w{62uU0)EFT ze<#ZC0er8OKOgD)Gs-)KXkgI7QGY5&jb7i z3ob-{Az<5{?gIajfPY}oTSXZCF<EO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LZ#&3R8ha<+Z&jl@>Za|?N`K=g3DY-m`= z0pyc25{J^qtA)O%FDIKYUU;(?m)NmZwwNncq|-fiFFtEk#ik)oKRHjqt?}aZy*vdH-_XB#@QkY#v^M@es~VgFmu9l19( zu;3wt1=hZohEHN^BwB zydlW`tF<-zi@3^@A0jn>g(D7GHXu0IEw!3RK`=){Sa;|RFPwiWexP^e+%rHHHn(^f z1Cv>h`E2&d*0#~5mukhThkJF@AeXPGvoZZ>2Z{Nuu6-S?N&V``hLOgxK=)`TDy{22o-g=K4ElPqONO zoS#03dnc;^x?vo0;G@h*%QLehbFBE1G1~eI) zFY&Ok%LTO>9uxI$?D?fJBzjQODmpHWjb9pMNcNWD**06zDk!TUY_p4}6W4mHhP)Yz zXuF+rTR8_?5$*v!ZfDaLZh+=|YXia(xw2V*(9cj8%_#+$3als4Xp{U@9Buhl=I~r- zkHt1dV~ok{gfm5&j(zXKnmNc7o;gcq;rZNzifN~Of6TdLhSMWs$251VUv=DFFs r310x?N5=TDk?UA?z}Vg~z+u)AolJ4t8|mP6KfEo6frD^Sc>n(o2DrUi diff --git a/ndb/home/bin/Solarismkisofs b/ndb/home/bin/Solarismkisofs deleted file mode 100755 index b239eaed6adeb40fcbe8f5e6511250b28cb17500..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 634084 zcmeFaeVmn5)$qTs>s<4~tHb*spvPg*Q4t12rNSB&kqng-jfy(+a%Py(GcV2y4BeEc z8jA{(jEt1*2xwGf=#55(Ipt)eRC5;@c3VwJMaErdlvF6c@7jCqITvJ4PtWuD{Qmg; zI3LdJy*|IIq(b@pYfwS{6w;v#Xv|u(v z?t(r^VR(aOt}Z`={rS4Dg{Nrk4$8CO*{E(0{@APTJg` z#|NJRx7NXlFpoF*hkO$Fv)M>l1s^^Z5J$org#vCg^{ZVy5WXc^UkxAgpEw1$#o^>< zcsqF3OmH4w@iE2{5KjZfY3c8#{(AT#z85=OfL#-(DgB$^Wj)693=h-hDBtVgsd0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vnbObxNvIGLfW8OdLtU zlLu?Gm(Ba+rNjX^mA`#@s&G~9~Z%0LjdGcXV(i-=>oc9wT5AErS85LrAt zgrMaP=3OSyVR=9|um1443@@~JuQTuX6p8|Q%;4b&D0n}AH;|d1=kWix@XgN;;$#1q z#=n>Fc>y2h`)~Nh=SO}6-#78$-}C141Ni*MqM=HDVd{LOs7iG273EBG+a z58=bK@5ARa<~Q^GA@boP_nGg9O&aq(G{2eeJIIGm@KJo2@6Vbv=KHJWH}d^`^oyS| zAM@LK6EEM($cN7h_(*vl@$zN(&AxvixbY9s27GS*!q;$Z|2}Ab4Dqe`UikPQ1<&K7 zZMOL=Ee%<7|8NB%N520>5RyHg1@$-*Oz88`2qsRwr zUmz{mKjz_h{8M~BfDg)B90V`m69m7557YU_Z({f_@L~IqZ|T#)3-|;9$HV^F{Qm|w zY`zxqwQ$XP?4Ql|P28~g`pDN0Zv4R?+f4Yjf=}#v`D}T=XP&tk zy!6>`1TW$f{PB^O&zAT5xc6Ln|HaRO?uUI`{|LIu{;<3c2 zUgDc==imRv$NomEKZw45cvDjJKbFV-lPA4=AH5R<|MSb5MgBKwH(tb*tM{c3fL3lS a;GX@n`6zR|d@ug%Ao$vSn+e~N@Bafw&h, under the GNU GPL. -## -## (Extensively hacked on by Melissa O'Neill .) -## -## cvs2cl.pl is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2, or (at your option) -## any later version. -## -## cvs2cl.pl 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 may have received a copy of the GNU General Public License -## along with cvs2cl.pl; see the file COPYING. If not, write to the -## Free Software Foundation, Inc., 59 Temple Place - Suite 330, -## Boston, MA 02111-1307, USA. - - - -use strict; -use Text::Wrap; -use Time::Local; -use File::Basename; - - -# The Plan: -# -# Read in the logs for multiple files, spit out a nice ChangeLog that -# mirrors the information entered during `cvs commit'. -# -# The problem presents some challenges. In an ideal world, we could -# detect files with the same author, log message, and checkin time -- -# each would be a changelog entry. -# We'd sort them; and spit them out. Unfortunately, CVS is *not atomic* -# so checkins can span a range of times. Also, the directory structure -# could be hierarchical. -# -# Another question is whether we really want to have the ChangeLog -# exactly reflect commits. An author could issue two related commits, -# with different log entries, reflecting a single logical change to the -# source. GNU style ChangeLogs group these under a single author/date. -# We try to do the same. -# -# So, we parse the output of `cvs log', storing log messages in a -# multilevel hash that stores the mapping: -# directory => author => time => message => filelist -# As we go, we notice "nearby" commit times and store them together -# (i.e., under the same timestamp), so they appear in the same log -# entry. -# -# When we've read all the logs, we twist this mapping into -# a time => author => message => filelist mapping for each directory. -# -# If we're not using the `--distributed' flag, the directory is always -# considered to be `./', even as descend into subdirectories. - - -############### Globals ################ - - -# What we run to generate it: -my $Log_Source_Command = "cvs log"; - -# In case we have to print it out: -my $VERSION = '$Revision: 2.38 $'; -$VERSION =~ s/\S+\s+(\S+)\s+\S+/$1/; - -## Vars set by options: - -# Print debugging messages? -my $Debug = 0; - -# Just show version and exit? -my $Print_Version = 0; - -# Just print usage message and exit? -my $Print_Usage = 0; - -# Single top-level ChangeLog, or one per subdirectory? -my $Distributed = 0; - -# What file should we generate (defaults to "ChangeLog")? -my $Log_File_Name = "ChangeLog"; - -# Grab most recent entry date from existing ChangeLog file, just add -# to that ChangeLog. -my $Cumulative = 0; - -# Expand usernames to email addresses based on a map file? -my $User_Map_File = ""; - -# Output to a file or to stdout? -my $Output_To_Stdout = 0; - -# Eliminate empty log messages? -my $Prune_Empty_Msgs = 0; - -# Don't call Text::Wrap on the body of the message -my $No_Wrap = 0; - -# Separates header from log message. Code assumes it is either " " or -# "\n\n", so if there's ever an option to set it to something else, -# make sure to go through all conditionals that use this var. -my $After_Header = " "; - -# Format more for programs than for humans. -my $XML_Output = 0; - -# Do some special tweaks for log data that was written in FSF -# ChangeLog style. -my $FSF_Style = 0; - -# Show times in UTC instead of local time -my $UTC_Times = 0; - -# Show day of week in output? -my $Show_Day_Of_Week = 0; - -# Show revision numbers in output? -my $Show_Revisions = 0; - -# Show tags (symbolic names) in output? -my $Show_Tags = 0; - -# Show branches by symbolic name in output? -my $Show_Branches = 0; - -# Show only revisions on these branches or their ancestors. -my @Follow_Branches; - -# Don't bother with files matching this regexp. -my @Ignore_Files; - -# How exactly we match entries. We definitely want "o", -# and user might add "i" by using --case-insensitive option. -my $Case_Insensitive = 0; - -# Maybe only show log messages matching a certain regular expression. -my $Regexp_Gate = ""; - -# Pass this global option string along to cvs, to the left of `log': -my $Global_Opts = ""; - -# Pass this option string along to the cvs log subcommand: -my $Command_Opts = ""; - -# Read log output from stdin instead of invoking cvs log? -my $Input_From_Stdin = 0; - -# Don't show filenames in output. -my $Hide_Filenames = 0; - -# Max checkin duration. CVS checkin is not atomic, so we may have checkin -# times that span a range of time. We assume that checkins will last no -# longer than $Max_Checkin_Duration seconds, and that similarly, no -# checkins will happen from the same users with the same message less -# than $Max_Checkin_Duration seconds apart. -my $Max_Checkin_Duration = 180; - -# What to put at the front of [each] ChangeLog. -my $ChangeLog_Header = ""; - -## end vars set by options. - -# In 'cvs log' output, one long unbroken line of equal signs separates -# files: -my $file_separator = "=======================================" - . "======================================"; - -# In 'cvs log' output, a shorter line of dashes separates log messages -# within a file: -my $logmsg_separator = "----------------------------"; - - -############### End globals ############ - - - - -&parse_options (); -&derive_change_log (); - - - -### Everything below is subroutine definitions. ### - -# If accumulating, grab the boundary date from pre-existing ChangeLog. -sub maybe_grab_accumulation_date () -{ - if (! $Cumulative) { - return ""; - } - - # else - - open (LOG, "$Log_File_Name") - or die ("trouble opening $Log_File_Name for reading ($!)"); - - my $boundary_date; - while () - { - if (/^(\d\d\d\d-\d\d-\d\d\s+\d\d:\d\d)/) - { - $boundary_date = "$1"; - last; - } - } - - close (LOG); - return $boundary_date; -} - - -# Fills up a ChangeLog structure in the current directory. -sub derive_change_log () -{ - # See "The Plan" above for a full explanation. - - my %grand_poobah; - - my $file_full_path; - my $time; - my $revision; - my $author; - my $msg_txt; - my $detected_file_separator; - - # Might be adding to an existing ChangeLog - my $accumulation_date = &maybe_grab_accumulation_date (); - if ($accumulation_date) { - $Log_Source_Command .= " -d\'>${accumulation_date}\'"; - } - - # We might be expanding usernames - my %usermap; - - # In general, it's probably not very maintainable to use state - # variables like this to tell the loop what it's doing at any given - # moment, but this is only the first one, and if we never have more - # than a few of these, it's okay. - my $collecting_symbolic_names = 0; - my %symbolic_names; # Where tag names get stored. - my %branch_names; # We'll grab branch names while we're at it. - my %branch_numbers; # Save some revisions for @Follow_Branches - my @branch_roots; # For showing which files are branch ancestors. - - # Bleargh. Compensate for a deficiency of custom wrapping. - if (($After_Header ne " ") and $FSF_Style) - { - $After_Header .= "\t"; - } - - if (! $Input_From_Stdin) { - open (LOG_SOURCE, "$Log_Source_Command |") - or die "unable to run \"${Log_Source_Command}\""; - } - else { - open (LOG_SOURCE, "-") or die "unable to open stdin for reading"; - } - - %usermap = &maybe_read_user_map_file (); - - while () - { - # If on a new file and don't see filename, skip until we find it, and - # when we find it, grab it. - if ((! (defined $file_full_path)) and /^Working file: (.*)/) - { - $file_full_path = $1; - if (@Ignore_Files) - { - my $base; - ($base, undef, undef) = fileparse ($file_full_path); - # Ouch, I wish trailing operators in regexps could be - # evaluated on the fly! - if ($Case_Insensitive) { - if (grep ($file_full_path =~ m|$_|i, @Ignore_Files)) { - undef $file_full_path; - } - } - elsif (grep ($file_full_path =~ m|$_|, @Ignore_Files)) { - undef $file_full_path; - } - } - next; - } - - # Just spin wheels if no file defined yet. - next if (! $file_full_path); - - # Collect tag names in case we're asked to print them in the output. - if (/^symbolic names:$/) { - $collecting_symbolic_names = 1; - next; # There's no more info on this line, so skip to next - } - if ($collecting_symbolic_names) - { - # All tag names are listed with whitespace in front in cvs log - # output; so if see non-whitespace, then we're done collecting. - if (/^\S/) { - $collecting_symbolic_names = 0; - } - else # we're looking at a tag name, so parse & store it - { - # According to the Cederqvist manual, in node "Tags", tag - # names must start with an uppercase or lowercase letter and - # can contain uppercase and lowercase letters, digits, `-', - # and `_'. However, it's not our place to enforce that, so - # we'll allow anything CVS hands us to be a tag: - /^\s+([^:]+): ([\d.]+)$/; - my $tag_name = $1; - my $tag_rev = $2; - - # A branch number either has an odd number of digit sections - # (and hence an even number of dots), or has ".0." as the - # second-to-last digit section. Test for these conditions. - my $real_branch_rev = ""; - if (($tag_rev =~ /^(\d+\.\d+\.)+\d+$/) # Even number of dots... - and (! ($tag_rev =~ /^(1\.)+1$/))) # ...but not "1.[1.]1" - { - $real_branch_rev = $tag_rev; - } - elsif ($tag_rev =~ /(\d+\.(\d+\.)+)0.(\d+)/) # Has ".0." - { - $real_branch_rev = $1 . $3; - } - # If we got a branch, record its number. - if ($real_branch_rev) - { - $branch_names{$real_branch_rev} = $tag_name; - if (@Follow_Branches) { - if (grep ($_ eq $tag_name, @Follow_Branches)) { - $branch_numbers{$tag_name} = $real_branch_rev; - } - } - } - else { - # Else it's just a regular (non-branch) tag. - push (@{$symbolic_names{$tag_rev}}, $tag_name); - } - } - } - # End of code for collecting tag names. - - # If have file name, but not revision, and see revision, then grab - # it. (We collect unconditionally, even though we may or may not - # ever use it.) - if ((! (defined $revision)) and (/^revision (\d+\.[\d.]+)/)) - { - $revision = $1; - - if (@Follow_Branches) - { - foreach my $branch (@Follow_Branches) - { - # Special case for following trunk revisions - if (($branch =~ /^trunk$/i) and ($revision =~ /^[0-9]+\.[0-9]+$/)) - { - goto dengo; - } - - my $branch_number = $branch_numbers{$branch}; - if ($branch_number) - { - # Are we on one of the follow branches or an ancestor of - # same? - # - # If this revision is a prefix of the branch number, or - # possibly is less in the minormost number, OR if this - # branch number is a prefix of the revision, then yes. - # Otherwise, no. - # - # So below, we determine if any of those conditions are - # met. - - # Trivial case: is this revision on the branch? - # (Compare this way to avoid regexps that screw up Emacs - # indentation, argh.) - if ((substr ($revision, 0, ((length ($branch_number)) + 1))) - eq ($branch_number . ".")) - { - goto dengo; - } - # Non-trivial case: check if rev is ancestral to branch - elsif ((length ($branch_number)) > (length ($revision))) - { - $revision =~ /^((?:\d+\.)+)(\d+)$/; - my $r_left = $1; # still has the trailing "." - my $r_end = $2; - - $branch_number =~ /^((?:\d+\.)+)(\d+)\.\d+$/; - my $b_left = $1; # still has trailing "." - my $b_mid = $2; # has no trailing "." - - if (($r_left eq $b_left) - && ($r_end <= $b_mid)) - { - goto dengo; - } - } - } - } - } - else # (! @Follow_Branches) - { - next; - } - - # Else we are following branches, but this revision isn't on the - # path. So skip it. - undef $revision; - dengo: - next; - } - - # If we don't have a revision right now, we couldn't possibly - # be looking at anything useful. - if (! (defined ($revision))) { - $detected_file_separator = /^$file_separator$/o; - if ($detected_file_separator) { - # No revisions for this file; can happen, e.g. "cvs log -d DATE" - goto CLEAR; - } - else { - next; - } - } - - # If have file name but not date and author, and see date or - # author, then grab them: - unless (defined $time) - { - if (/^date: .*/) - { - ($time, $author) = &parse_date_and_author ($_); - if (defined ($usermap{$author}) and $usermap{$author}) { - $author = $usermap{$author}; - } - } - else { - $detected_file_separator = /^$file_separator$/o; - if ($detected_file_separator) { - # No revisions for this file; can happen, e.g. "cvs log -d DATE" - goto CLEAR; - } - } - # If the date/time/author hasn't been found yet, we couldn't - # possibly care about anything we see. So skip: - next; - } - - # A "branches: ..." line here indicates that one or more branches - # are rooted at this revision. If we're showing branches, then we - # want to show that fact as well, so we collect all the branches - # that this is the latest ancestor of and store them in - # @branch_roots. Just for reference, the format of the line we're - # seeing at this point is: - # - # branches: 1.5.2; 1.5.4; ...; - # - # Okay, here goes: - - if (/^branches:\s+(.*);$/) - { - if ($Show_Branches) - { - my $lst = $1; - $lst =~ s/(1\.)+1;|(1\.)+1$//; # ignore the trivial branch 1.1.1 - if ($lst) { - @branch_roots = split (/;\s+/, $lst); - } - else { - undef @branch_roots; - } - next; - } - else - { - # Ugh. This really bothers me. Suppose we see a log entry - # like this: - # - # ---------------------------- - # revision 1.1 - # date: 1999/10/17 03:07:38; author: jrandom; state: Exp; - # branches: 1.1.2; - # Intended first line of log message begins here. - # ---------------------------- - # - # The question is, how we can tell the difference between that - # log message and a *two*-line log message whose first line is - # - # "branches: 1.1.2;" - # - # See the problem? The output of "cvs log" is inherently - # ambiguous. - # - # For now, we punt: we liberally assume that people don't - # write log messages like that, and just toss a "branches:" - # line if we see it but are not showing branches. I hope no - # one ever loses real log data because of this. - next; - } - } - - # If have file name, time, and author, then we're just grabbing - # log message texts: - $detected_file_separator = /^$file_separator$/o; - if ($detected_file_separator && ! (defined $revision)) { - # No revisions for this file; can happen, e.g. "cvs log -d DATE" - goto CLEAR; - } - unless ($detected_file_separator || /^$logmsg_separator$/o) - { - $msg_txt .= $_; # Normally, just accumulate the message... - next; - } - # ... until a msg separator is encountered: - # Ensure the message contains something: - if ((! $msg_txt) - || ($msg_txt =~ /^\s*\.\s*$|^\s*$/) - || ($msg_txt =~ /\*\*\* empty log message \*\*\*/)) - { - if ($Prune_Empty_Msgs) { - goto CLEAR; - } - # else - $msg_txt = "[no log message]\n"; - } - - ### Store it all in the Grand Poobah: - { - my $dir_key; # key into %grand_poobah - my %qunk; # complicated little jobbie, see below - - # Each revision of a file has a little data structure (a `qunk') - # associated with it. That data structure holds not only the - # file's name, but any additional information about the file - # that might be needed in the output, such as the revision - # number, tags, branches, etc. The reason to have these things - # arranged in a data structure, instead of just appending them - # textually to the file's name, is that we may want to do a - # little rearranging later as we write the output. For example, - # all the files on a given tag/branch will go together, followed - # by the tag in parentheses (so trunk or otherwise non-tagged - # files would go at the end of the file list for a given log - # message). This rearrangement is a lot easier to do if we - # don't have to reparse the text. - # - # A qunk looks like this: - # - # { - # filename => "hello.c", - # revision => "1.4.3.2", - # time => a timegm() return value (moment of commit) - # tags => [ "tag1", "tag2", ... ], - # branch => "branchname" # There should be only one, right? - # branchroots => [ "branchtag1", "branchtag2", ... ] - # } - - if ($Distributed) { - # Just the basename, don't include the path. - ($qunk{'filename'}, $dir_key, undef) = fileparse ($file_full_path); - } - else { - $dir_key = "./"; - $qunk{'filename'} = $file_full_path; - } - - # This may someday be used in a more sophisticated calculation - # of what other files are involved in this commit. For now, we - # don't use it, because the common-commit-detection algorithm is - # hypothesized to be "good enough" as it stands. - $qunk{'time'} = $time; - - # We might be including revision numbers and/or tags and/or - # branch names in the output. Most of the code from here to - # loop-end deals with organizing these in qunk. - - $qunk{'revision'} = $revision; - - # Grab the branch, even though we may or may not need it: - $qunk{'revision'} =~ /((?:\d+\.)+)\d+/; - my $branch_prefix = $1; - $branch_prefix =~ s/\.$//; # strip off final dot - if ($branch_names{$branch_prefix}) { - $qunk{'branch'} = $branch_names{$branch_prefix}; - } - - # If there's anything in the @branch_roots array, then this - # revision is the root of at least one branch. We'll display - # them as branch names instead of revision numbers, the - # substitution for which is done directly in the array: - if (@branch_roots) { - my @roots = map { $branch_names{$_} } @branch_roots; - $qunk{'branchroots'} = \@roots; - } - - # Save tags too. - if (defined ($symbolic_names{$revision})) { - $qunk{'tags'} = $symbolic_names{$revision}; - delete $symbolic_names{$revision}; - } - - # Add this file to the list - # (We use many spoonfuls of autovivication magic. Hashes and arrays - # will spring into existence if they aren't there already.) - - &debug ("(pushing log msg for ${dir_key}$qunk{'filename'})\n"); - - # Store with the files in this commit. Later we'll loop through - # again, making sure that revisions with the same log message - # and nearby commit times are grouped together as one commit. - push (@{$grand_poobah{$dir_key}{$author}{$time}{$msg_txt}}, \%qunk); - } - - CLEAR: - # Make way for the next message - undef $msg_txt; - undef $time; - undef $revision; - undef $author; - undef @branch_roots; - - # Maybe even make way for the next file: - if ($detected_file_separator) { - undef $file_full_path; - undef %branch_names; - undef %branch_numbers; - undef %symbolic_names; - } - } - - close (LOG_SOURCE); - - ### Process each ChangeLog - - while (my ($dir,$authorhash) = each %grand_poobah) - { - &debug ("DOING DIR: $dir\n"); - - # Here we twist our hash around, from being - # author => time => message => filelist - # in %$authorhash to - # time => author => message => filelist - # in %changelog. - # - # This is also where we merge entries. The algorithm proceeds - # through the timeline of the changelog with a sliding window of - # $Max_Checkin_Duration seconds; within that window, entries that - # have the same log message are merged. - # - # (To save space, we zap %$authorhash after we've copied - # everything out of it.) - - my %changelog; - while (my ($author,$timehash) = each %$authorhash) - { - my $lasttime; - my %stamptime; - foreach my $time (sort {$main::a <=> $main::b} (keys %$timehash)) - { - my $msghash = $timehash->{$time}; - while (my ($msg,$qunklist) = each %$msghash) - { - my $stamptime = $stamptime{$msg}; - if ((defined $stamptime) - and (($time - $stamptime) < $Max_Checkin_Duration) - and (defined $changelog{$stamptime}{$author}{$msg})) - { - push(@{$changelog{$stamptime}{$author}{$msg}}, @$qunklist); - } - else { - $changelog{$time}{$author}{$msg} = $qunklist; - $stamptime{$msg} = $time; - } - } - } - } - undef (%$authorhash); - - ### Now we can write out the ChangeLog! - - my ($logfile_here, $logfile_bak, $tmpfile); - - if (! $Output_To_Stdout) { - $logfile_here = $dir . $Log_File_Name; - $logfile_here =~ s/^\.\/\//\//; # fix any leading ".//" problem - $tmpfile = "${logfile_here}.cvs2cl$$.tmp"; - $logfile_bak = "${logfile_here}.bak"; - - open (LOG_OUT, ">$tmpfile") or die "Unable to open \"$tmpfile\""; - } - else { - open (LOG_OUT, ">-") or die "Unable to open stdout for writing"; - } - - print LOG_OUT $ChangeLog_Header; - - if ($XML_Output) { - print LOG_OUT "\n\n" - . "\n\n"; - } - - foreach my $time (sort {$main::b <=> $main::a} (keys %changelog)) - { - my $authorhash = $changelog{$time}; - while (my ($author,$mesghash) = each %$authorhash) - { - # If XML, escape in outer loop to avoid compound quoting: - if ($XML_Output) { - $author = &xml_escape ($author); - } - - while (my ($msg,$qunklist) = each %$mesghash) - { - my $files = &pretty_file_list ($qunklist); - my $header_line; # date and author - my $body; # see below - my $wholething; # $header_line + $body - - # Set up the date/author line. - # kff todo: do some more XML munging here, on the header - # part of the entry: - my ($ignore,$min,$hour,$mday,$mon,$year,$wday) - = $UTC_Times ? gmtime($time) : localtime($time); - - # XML output includes everything else, we might as well make - # it always include Day Of Week too, for consistency. - if ($Show_Day_Of_Week or $XML_Output) { - $wday = ("Sunday", "Monday", "Tuesday", "Wednesday", - "Thursday", "Friday", "Saturday")[$wday]; - $wday = ($XML_Output) ? "${wday}\n" : " $wday"; - } - else { - $wday = ""; - } - - if ($XML_Output) { - $header_line = - sprintf ("%4u-%02u-%02u\n" - . "${wday}" - . "\n" - . "%s\n", - $year+1900, $mon+1, $mday, $hour, $min, $author); - } - else { - $header_line = - sprintf ("%4u-%02u-%02u${wday} %02u:%02u %s\n\n", - $year+1900, $mon+1, $mday, $hour, $min, $author); - } - - # Reshape the body according to user preferences. - if ($XML_Output) - { - $msg = &preprocess_msg_text ($msg); - $body = $files . $msg; - } - elsif ($No_Wrap) - { - $msg = &preprocess_msg_text ($msg); - $files = wrap ("\t", " ", "$files"); - $msg =~ s/\n(.*)/\n\t$1/g; - unless ($After_Header eq " ") { - $msg =~ s/^(.*)/\t$1/g; - } - $body = $files . $After_Header . $msg; - } - else # do wrapping, either FSF-style or regular - { - if ($FSF_Style) - { - $files = wrap ("\t", " ", "$files"); - - my $files_last_line_len = 0; - if ($After_Header eq " ") - { - $files_last_line_len = &last_line_len ($files); - $files_last_line_len += 1; # for $After_Header - } - - $msg = &wrap_log_entry - ($msg, "\t", 69 - $files_last_line_len, 69); - $body = $files . $After_Header . $msg; - } - else # not FSF-style - { - $msg = &preprocess_msg_text ($msg); - $body = $files . $After_Header . $msg; - $body = wrap ("\t", " ", "$body"); - } - } - - $wholething = $header_line . $body; - - if ($XML_Output) { - $wholething = "\n${wholething}\n"; - } - - # One last check: make sure it passes the regexp test, if the - # user asked for that. We have to do it here, so that the - # test can match against information in the header as well - # as in the text of the log message. - - # How annoying to duplicate so much code just because I - # can't figure out a way to evaluate scalars on the trailing - # operator portion of a regular expression. Grrr. - if ($Case_Insensitive) { - unless ($Regexp_Gate && ($wholething !~ /$Regexp_Gate/oi)) { - print LOG_OUT "${wholething}\n"; - } - } - else { - unless ($Regexp_Gate && ($wholething !~ /$Regexp_Gate/o)) { - print LOG_OUT "${wholething}\n"; - } - } - } - } - } - - if ($XML_Output) { - print LOG_OUT "\n"; - } - - close (LOG_OUT); - - if (! $Output_To_Stdout) - { - # If accumulating, append old data to new before renaming. But - # don't append the most recent entry, since it's already in the - # new log due to CVS's idiosyncratic interpretation of "log -d". - if ($Cumulative && -f $logfile_here) - { - open (NEW_LOG, ">>$tmpfile") - or die "trouble appending to $tmpfile ($!)"; - - open (OLD_LOG, "<$logfile_here") - or die "trouble reading from $logfile_here ($!)"; - - my $started_first_entry = 0; - my $passed_first_entry = 0; - while () - { - if (! $passed_first_entry) - { - if ((! $started_first_entry) - && /^(\d\d\d\d-\d\d-\d\d\s+\d\d:\d\d)/) { - $started_first_entry = 1; - } - elsif (/^(\d\d\d\d-\d\d-\d\d\s+\d\d:\d\d)/) { - $passed_first_entry = 1; - print NEW_LOG $_; - } - } - else { - print NEW_LOG $_; - } - } - - close (NEW_LOG); - close (OLD_LOG); - } - - if (-f $logfile_here) { - rename ($logfile_here, $logfile_bak); - } - rename ($tmpfile, $logfile_here); - } - } -} - - -sub parse_date_and_author () -{ - # Parses the date/time and author out of a line like: - # - # date: 1999/02/19 23:29:05; author: apharris; state: Exp; - - my $line = shift; - - my ($year, $mon, $mday, $hours, $min, $secs, $author) = $line =~ - m#(\d+)/(\d+)/(\d+)\s+(\d+):(\d+):(\d+);\s+author:\s+([^;]+);# - or die "Couldn't parse date ``$line''"; - die "Bad date or Y2K issues" unless ($year > 1969 and $year < 2258); - # Kinda arbitrary, but useful as a sanity check - my $time = timegm($secs,$min,$hours,$mday,$mon-1,$year-1900); - - return ($time, $author); -} - - -# Here we take a bunch of qunks and convert them into printed -# summary that will include all the information the user asked for. -sub pretty_file_list () -{ - if ($Hide_Filenames and (! $XML_Output)) { - return ""; - } - - my $qunksref = shift; - my @qunkrefs = @$qunksref; - my @filenames; - my $beauty = ""; # The accumulating header string for this entry. - my %non_unanimous_tags; # Tags found in a proper subset of qunks - my %unanimous_tags; # Tags found in all qunks - my %all_branches; # Branches found in any qunk - my $common_dir = undef; # Dir prefix common to all files ("" if none) - my $fbegun = 0; # Did we begin printing filenames yet? - - # First, loop over the qunks gathering all the tag/branch names. - # We'll put them all in non_unanimous_tags, and take out the - # unanimous ones later. - foreach my $qunkref (@qunkrefs) - { - # Keep track of whether all the files in this commit were in the - # same directory, and memorize it if so. We can make the output a - # little more compact by mentioning the directory only once. - if ((scalar (@qunkrefs)) > 1) - { - if (! (defined ($common_dir))) - { - my ($base, $dir); - ($base, $dir, undef) = fileparse ($$qunkref{'filename'}); - - if ((! (defined ($dir))) # this first case is sheer paranoia - or ($dir eq "") - or ($dir eq "./") - or ($dir eq ".\\")) - { - $common_dir = ""; - } - else - { - $common_dir = $dir; - } - } - elsif ($common_dir ne "") - { - # Already have a common dir prefix, so how much of it can we preserve? - $common_dir = &common_path_prefix ($$qunkref{'filename'}, $common_dir); - } - } - else # only one file in this entry anyway, so common dir not an issue - { - $common_dir = ""; - } - - if (defined ($$qunkref{'branch'})) { - $all_branches{$$qunkref{'branch'}} = 1; - } - if (defined ($$qunkref{'tags'})) { - foreach my $tag (@{$$qunkref{'tags'}}) { - $non_unanimous_tags{$tag} = 1; - } - } - } - - # Any tag held by all qunks will be printed specially... but only if - # there are multiple qunks in the first place! - if ((scalar (@qunkrefs)) > 1) { - foreach my $tag (keys (%non_unanimous_tags)) { - my $everyone_has_this_tag = 1; - foreach my $qunkref (@qunkrefs) { - if ((! (defined ($$qunkref{'tags'}))) - or (! (grep ($_ eq $tag, @{$$qunkref{'tags'}})))) { - $everyone_has_this_tag = 0; - } - } - if ($everyone_has_this_tag) { - $unanimous_tags{$tag} = 1; - delete $non_unanimous_tags{$tag}; - } - } - } - - if ($XML_Output) - { - # If outputting XML, then our task is pretty simple, because we - # don't have to detect common dir, common tags, branch prefixing, - # etc. We just output exactly what we have, and don't worry about - # redundancy or readability. - - foreach my $qunkref (@qunkrefs) - { - my $filename = $$qunkref{'filename'}; - my $revision = $$qunkref{'revision'}; - my $tags = $$qunkref{'tags'}; - my $branch = $$qunkref{'branch'}; - my $branchroots = $$qunkref{'branchroots'}; - - $filename = &xml_escape ($filename); # probably paranoia - $revision = &xml_escape ($revision); # definitely paranoia - - $beauty .= "\n"; - $beauty .= "${filename}\n"; - $beauty .= "${revision}\n"; - if ($branch) { - $branch = &xml_escape ($branch); # more paranoia - $beauty .= "${branch}\n"; - } - foreach my $tag (@$tags) { - $tag = &xml_escape ($tag); # by now you're used to the paranoia - $beauty .= "${tag}\n"; - } - foreach my $root (@$branchroots) { - $root = &xml_escape ($root); # which is good, because it will continue - $beauty .= "${root}\n"; - } - $beauty .= "\n"; - } - - # Theoretically, we could go home now. But as long as we're here, - # let's print out the common_dir and utags, as a convenience to - # the receiver (after all, earlier code calculated that stuff - # anyway, so we might as well take advantage of it). - - if ((scalar (keys (%unanimous_tags))) > 1) { - foreach my $utag ((keys (%unanimous_tags))) { - $utag = &xml_escape ($utag); # the usual paranoia - $beauty .= "${utag}\n"; - } - } - if ($common_dir) { - $common_dir = &xml_escape ($common_dir); - $beauty .= "${common_dir}\n"; - } - - # That's enough for XML, time to go home: - return $beauty; - } - - # Else not XML output, so complexly compactify for chordate - # consumption. At this point we have enough global information - # about all the qunks to organize them non-redundantly for output. - - if ($common_dir) { - # Note that $common_dir still has its trailing slash - $beauty .= "$common_dir: "; - } - - if ($Show_Branches) - { - # For trailing revision numbers. - my @brevisions; - - foreach my $branch (keys (%all_branches)) - { - foreach my $qunkref (@qunkrefs) - { - if ((defined ($$qunkref{'branch'})) - and ($$qunkref{'branch'} eq $branch)) - { - if ($fbegun) { - # kff todo: comma-delimited in XML too? Sure. - $beauty .= ", "; - } - else { - $fbegun = 1; - } - my $fname = substr ($$qunkref{'filename'}, length ($common_dir)); - $beauty .= $fname; - $$qunkref{'printed'} = 1; # Just setting a mark bit, basically - - if ($Show_Tags && (defined @{$$qunkref{'tags'}})) { - my @tags = grep ($non_unanimous_tags{$_}, @{$$qunkref{'tags'}}); - if (@tags) { - $beauty .= " (tags: "; - $beauty .= join (', ', @tags); - $beauty .= ")"; - } - } - - if ($Show_Revisions) { - # Collect the revision numbers' last components, but don't - # print them -- they'll get printed with the branch name - # later. - $$qunkref{'revision'} =~ /.+\.([\d]+)$/; - push (@brevisions, $1); - - # todo: we're still collecting branch roots, but we're not - # showing them anywhere. If we do show them, it would be - # nifty to just call them revision "0" on a the branch. - # Yeah, that's the ticket. - } - } - } - $beauty .= " ($branch"; - if (@brevisions) { - if ((scalar (@brevisions)) > 1) { - $beauty .= ".["; - $beauty .= (join (',', @brevisions)); - $beauty .= "]"; - } - else { - $beauty .= ".$brevisions[0]"; - } - } - $beauty .= ")"; - } - } - - # Okay; any qunks that were done according to branch are taken care - # of, and marked as printed. Now print everyone else. - - foreach my $qunkref (@qunkrefs) - { - next if (defined ($$qunkref{'printed'})); # skip if already printed - - if ($fbegun) { - $beauty .= ", "; - } - else { - $fbegun = 1; - } - $beauty .= substr ($$qunkref{'filename'}, length ($common_dir)); - # todo: Shlomo's change was this: - # $beauty .= substr ($$qunkref{'filename'}, - # (($common_dir eq "./") ? "" : length ($common_dir))); - $$qunkref{'printed'} = 1; # Set a mark bit. - - if ($Show_Revisions || $Show_Tags) - { - my $started_addendum = 0; - - if ($Show_Revisions) { - $started_addendum = 1; - $beauty .= " ("; - $beauty .= "$$qunkref{'revision'}"; - } - if ($Show_Tags && (defined $$qunkref{'tags'})) { - my @tags = grep ($non_unanimous_tags{$_}, @{$$qunkref{'tags'}}); - if ((scalar (@tags)) > 0) { - if ($started_addendum) { - $beauty .= ", "; - } - else { - $beauty .= " (tags: "; - } - $beauty .= join (', ', @tags); - $started_addendum = 1; - } - } - if ($started_addendum) { - $beauty .= ")"; - } - } - } - - # Unanimous tags always come last. - if ($Show_Tags && %unanimous_tags) - { - $beauty .= " (utags: "; - $beauty .= join (', ', keys (%unanimous_tags)); - $beauty .= ")"; - } - - # todo: still have to take care of branch_roots? - - $beauty = "* $beauty:"; - - return $beauty; -} - - -sub common_path_prefix () -{ - my $path1 = shift; - my $path2 = shift; - - my ($dir1, $dir2); - (undef, $dir1, undef) = fileparse ($path1); - (undef, $dir2, undef) = fileparse ($path2); - - # Transmogrify Windows filenames to look like Unix. - # (It is far more likely that someone is running cvs2cl.pl under - # Windows than that they would genuinely have backslashes in their - # filenames.) - $dir1 =~ tr#\\#/#; - $dir2 =~ tr#\\#/#; - - my $accum1 = ""; - my $accum2 = ""; - my $last_common_prefix = ""; - - while ($accum1 eq $accum2) - { - $last_common_prefix = $accum1; - last if ($accum1 eq $dir1); - my ($tmp1) = split (/\//, (substr ($dir1, length ($accum1)))); - my ($tmp2) = split (/\//, (substr ($dir2, length ($accum2)))); - $accum1 .= "$tmp1/" if ((defined ($tmp1)) and $tmp1); - $accum2 .= "$tmp2/" if ((defined ($tmp2)) and $tmp2); - } - - return $last_common_prefix; -} - - -sub preprocess_msg_text () -{ - my $text = shift; - - # Strip out carriage returns (as they probably result from DOSsy editors). - $text =~ s/\r\n/\n/g; - - # If it *looks* like two newlines, make it *be* two newlines: - $text =~ s/\n\s*\n/\n\n/g; - - if ($XML_Output) - { - $text = &xml_escape ($text); - $text = "${text}\n"; - } - elsif (! $No_Wrap) - { - # Strip off lone newlines, but only for lines that don't begin with - # whitespace or a mail-quoting character, since we want to preserve - # that kind of formatting. Also don't strip newlines that follow a - # period; we handle those specially next. And don't strip - # newlines that precede an open paren. - 1 while ($text =~ s/(^|\n)([^>\s].*[^.\n])\n([^>\n])/$1$2 $3/g); - - # If a newline follows a period, make sure that when we bring up the - # bottom sentence, it begins with two spaces. - 1 while ($text =~ s/(^|\n)([^>\s].*)\n([^>\n])/$1$2 $3/g); - } - - return $text; -} - - -sub last_line_len () -{ - my $files_list = shift; - my @lines = split (/\n/, $files_list); - my $last_line = pop (@lines); - return length ($last_line); -} - - -# A custom wrap function, sensitive to some common constructs used in -# log entries. -sub wrap_log_entry () -{ - my $text = shift; # The text to wrap. - my $left_pad_str = shift; # String to pad with on the left. - - # These do NOT take left_pad_str into account: - my $length_remaining = shift; # Amount left on current line. - my $max_line_length = shift; # Amount left for a blank line. - - my $wrapped_text = ""; # The accumulating wrapped entry. - my $user_indent = ""; # Inherited user_indent from prev line. - - my $first_time = 1; # First iteration of the loop? - my $suppress_line_start_match = 0; # Set to disable line start checks. - - my @lines = split (/\n/, $text); - while (@lines) # Don't use `foreach' here, it won't work. - { - my $this_line = shift (@lines); - chomp $this_line; - - if ($this_line =~ /^(\s+)/) { - $user_indent = $1; - } - else { - $user_indent = ""; - } - - # If it matches any of the line-start regexps, print a newline now... - if ($suppress_line_start_match) - { - $suppress_line_start_match = 0; - } - elsif (($this_line =~ /^(\s*)\*\s+[a-zA-Z0-9]/) - || ($this_line =~ /^(\s*)\* [a-zA-Z0-9_\.\/\+-]+/) - || ($this_line =~ /^(\s*)\([a-zA-Z0-9_\.\/\+-]+(\)|,\s*)/) - || ($this_line =~ /^(\s+)(\S+)/) - || ($this_line =~ /^(\s*)- +/) - || ($this_line =~ /^()\s*$/) - || ($this_line =~ /^(\s*)\*\) +/) - || ($this_line =~ /^(\s*)[a-zA-Z0-9](\)|\.|\:) +/)) - { - # Make a line break immediately, unless header separator is set - # and this line is the first line in the entry, in which case - # we're getting the blank line for free already and shouldn't - # add an extra one. - unless (($After_Header ne " ") and ($first_time)) - { - if ($this_line =~ /^()\s*$/) { - $suppress_line_start_match = 1; - $wrapped_text .= "\n${left_pad_str}"; - } - - $wrapped_text .= "\n${left_pad_str}"; - } - - $length_remaining = $max_line_length - (length ($user_indent)); - } - - # Now that any user_indent has been preserved, strip off leading - # whitespace, so up-folding has no ugly side-effects. - $this_line =~ s/^\s*//; - - # Accumulate the line, and adjust parameters for next line. - my $this_len = length ($this_line); - if ($this_len == 0) - { - # Blank lines should cancel any user_indent level. - $user_indent = ""; - $length_remaining = $max_line_length; - } - elsif ($this_len >= $length_remaining) # Line too long, try breaking it. - { - # Walk backwards from the end. At first acceptable spot, break - # a new line. - my $idx = $length_remaining - 1; - if ($idx < 0) { $idx = 0 }; - while ($idx > 0) - { - if (substr ($this_line, $idx, 1) =~ /\s/) - { - my $line_now = substr ($this_line, 0, $idx); - my $next_line = substr ($this_line, $idx); - $this_line = $line_now; - - # Clean whitespace off the end. - chomp $this_line; - - # The current line is ready to be printed. - $this_line .= "\n${left_pad_str}"; - - # Make sure the next line is allowed full room. - $length_remaining = $max_line_length - (length ($user_indent)); - - # Strip next_line, but then preserve any user_indent. - $next_line =~ s/^\s*//; - - # Sneak a peek at the user_indent of the upcoming line, so - # $next_line (which will now precede it) can inherit that - # indent level. Otherwise, use whatever user_indent level - # we currently have, which might be none. - my $next_next_line = shift (@lines); - if ((defined ($next_next_line)) && ($next_next_line =~ /^(\s+)/)) { - $next_line = $1 . $next_line if (defined ($1)); - # $length_remaining = $max_line_length - (length ($1)); - $next_next_line =~ s/^\s*//; - } - else { - $next_line = $user_indent . $next_line; - } - if (defined ($next_next_line)) { - unshift (@lines, $next_next_line); - } - unshift (@lines, $next_line); - - # Our new next line might, coincidentally, begin with one of - # the line-start regexps, so we temporarily turn off - # sensitivity to that until we're past the line. - $suppress_line_start_match = 1; - - last; - } - else - { - $idx--; - } - } - - if ($idx == 0) - { - # We bottomed out because the line is longer than the - # available space. But that could be because the space is - # small, or because the line is longer than even the maximum - # possible space. Handle both cases below. - - if ($length_remaining == ($max_line_length - (length ($user_indent)))) - { - # The line is simply too long -- there is no hope of ever - # breaking it nicely, so just insert it verbatim, with - # appropriate padding. - $this_line = "\n${left_pad_str}${this_line}"; - } - else - { - # Can't break it here, but may be able to on the next round... - unshift (@lines, $this_line); - $length_remaining = $max_line_length - (length ($user_indent)); - $this_line = "\n${left_pad_str}"; - } - } - } - else # $this_len < $length_remaining, so tack on what we can. - { - # Leave a note for the next iteration. - $length_remaining = $length_remaining - $this_len; - - if ($this_line =~ /\.$/) - { - $this_line .= " "; - $length_remaining -= 2; - } - else # not a sentence end - { - $this_line .= " "; - $length_remaining -= 1; - } - } - - # Unconditionally indicate that loop has run at least once. - $first_time = 0; - - $wrapped_text .= "${user_indent}${this_line}"; - } - - # One last bit of padding. - $wrapped_text .= "\n"; - - return $wrapped_text; -} - - -sub xml_escape () -{ - my $txt = shift; - $txt =~ s/&/&/g; - $txt =~ s//>/g; - return $txt; -} - - -sub maybe_read_user_map_file () -{ - my %expansions; - - if ($User_Map_File) - { - open (MAPFILE, "<$User_Map_File") - or die ("Unable to open $User_Map_File ($!)"); - - while () - { - next if /^\s*#/; # Skip comment lines. - next if not /:/; # Skip lines without colons. - - # It is now safe to split on ':'. - my ($username, $expansion) = split ':'; - chomp $expansion; - $expansion =~ s/^'(.*)'$/$1/; - $expansion =~ s/^"(.*)"$/$1/; - - # If it looks like the expansion has a real name already, then - # we toss the username we got from CVS log. Otherwise, keep - # it to use in combination with the email address. - - if ($expansion =~ /^\s*<{0,1}\S+@.*/) { - # Also, add angle brackets if none present - if (! ($expansion =~ /<\S+@\S+>/)) { - $expansions{$username} = "$username <$expansion>"; - } - else { - $expansions{$username} = "$username $expansion"; - } - } - else { - $expansions{$username} = $expansion; - } - } - - close (MAPFILE); - } - - return %expansions; -} - - -sub parse_options () -{ - # Check this internally before setting the global variable. - my $output_file; - - # If this gets set, we encountered unknown options and will exit at - # the end of this subroutine. - my $exit_with_admonishment = 0; - - while (my $arg = shift (@ARGV)) - { - if ($arg =~ /^-h$|^-help$|^--help$|^--usage$|^-?$/) { - $Print_Usage = 1; - } - elsif ($arg =~ /^--debug$/) { # unadvertised option, heh - $Debug = 1; - } - elsif ($arg =~ /^--version$/) { - $Print_Version = 1; - } - elsif ($arg =~ /^-g$|^--global-opts$/) { - my $narg = shift (@ARGV) || die "$arg needs argument.\n"; - # Don't assume CVS is called "cvs" on the user's system: - $Log_Source_Command =~ s/(^\S*)/$1 $narg/; - } - elsif ($arg =~ /^-l$|^--log-opts$/) { - my $narg = shift (@ARGV) || die "$arg needs argument.\n"; - $Log_Source_Command .= " $narg"; - } - elsif ($arg =~ /^-f$|^--file$/) { - my $narg = shift (@ARGV) || die "$arg needs argument.\n"; - $output_file = $narg; - } - elsif ($arg =~ /^--accum$/) { - $Cumulative = 1; - } - elsif ($arg =~ /^--fsf$/) { - $FSF_Style = 1; - } - elsif ($arg =~ /^-U$|^--usermap$/) { - my $narg = shift (@ARGV) || die "$arg needs argument.\n"; - $User_Map_File = $narg; - } - elsif ($arg =~ /^-W$|^--window$/) { - my $narg = shift (@ARGV) || die "$arg needs argument.\n"; - $Max_Checkin_Duration = $narg; - } - elsif ($arg =~ /^-I$|^--ignore$/) { - my $narg = shift (@ARGV) || die "$arg needs argument.\n"; - push (@Ignore_Files, $narg); - } - elsif ($arg =~ /^-C$|^--case-insensitive$/) { - $Case_Insensitive = 1; - } - elsif ($arg =~ /^-R$|^--regexp$/) { - my $narg = shift (@ARGV) || die "$arg needs argument.\n"; - $Regexp_Gate = $narg; - } - elsif ($arg =~ /^--stdout$/) { - $Output_To_Stdout = 1; - } - elsif ($arg =~ /^--version$/) { - $Print_Version = 1; - } - elsif ($arg =~ /^-d$|^--distributed$/) { - $Distributed = 1; - } - elsif ($arg =~ /^-P$|^--prune$/) { - $Prune_Empty_Msgs = 1; - } - elsif ($arg =~ /^-S$|^--separate-header$/) { - $After_Header = "\n\n"; - } - elsif ($arg =~ /^--no-wrap$/) { - $No_Wrap = 1; - } - elsif ($arg =~ /^--gmt$|^--utc$/) { - $UTC_Times = 1; - } - elsif ($arg =~ /^-w$|^--day-of-week$/) { - $Show_Day_Of_Week = 1; - } - elsif ($arg =~ /^-r$|^--revisions$/) { - $Show_Revisions = 1; - } - elsif ($arg =~ /^-t$|^--tags$/) { - $Show_Tags = 1; - } - elsif ($arg =~ /^-b$|^--branches$/) { - $Show_Branches = 1; - } - elsif ($arg =~ /^-F$|^--follow$/) { - my $narg = shift (@ARGV) || die "$arg needs argument.\n"; - push (@Follow_Branches, $narg); - } - elsif ($arg =~ /^--stdin$/) { - $Input_From_Stdin = 1; - } - elsif ($arg =~ /^--header$/) { - my $narg = shift (@ARGV) || die "$arg needs argument.\n"; - $ChangeLog_Header = &slurp_file ($narg); - if (! defined ($ChangeLog_Header)) { - $ChangeLog_Header = ""; - } - } - elsif ($arg =~ /^--xml$/) { - $XML_Output = 1; - } - elsif ($arg =~ /^--hide-filenames$/) { - $Hide_Filenames = 1; - $After_Header = ""; - } - else { - # Just add a filename as argument to the log command - $Log_Source_Command .= " $arg"; - } - } - - ## Check for contradictions... - - if ($Output_To_Stdout && $Distributed) { - print STDERR "cannot pass both --stdout and --distributed\n"; - $exit_with_admonishment = 1; - } - - if ($Output_To_Stdout && $output_file) { - print STDERR "cannot pass both --stdout and --file\n"; - $exit_with_admonishment = 1; - } - - if ($XML_Output && $Cumulative) { - print STDERR "cannot pass both --xml and --accum\n"; - $exit_with_admonishment = 1; - } - - # Or if any other error message has already been printed out, we - # just leave now: - if ($exit_with_admonishment) { - &usage (); - exit (1); - } - elsif ($Print_Usage) { - &usage (); - exit (0); - } - elsif ($Print_Version) { - &version (); - exit (0); - } - - ## Else no problems, so proceed. - - if ($output_file) { - $Log_File_Name = $output_file; - } -} - - -sub slurp_file () -{ - my $filename = shift || die ("no filename passed to slurp_file()"); - my $retstr; - - open (SLURPEE, "<${filename}") or die ("unable to open $filename ($!)"); - my $saved_sep = $/; - undef $/; - $retstr = ; - $/ = $saved_sep; - close (SLURPEE); - return $retstr; -} - - -sub debug () -{ - if ($Debug) { - my $msg = shift; - print STDERR $msg; - } -} - - -sub version () -{ - print "cvs2cl.pl version ${VERSION}; distributed under the GNU GPL.\n"; -} - - -sub usage () -{ - &version (); - print <<'END_OF_INFO'; -Generate GNU-style ChangeLogs in CVS working copies. - -Notes about the output format(s): - - The default output of cvs2cl.pl is designed to be compact, formally - unambiguous, but still easy for humans to read. It is largely - self-explanatory, I hope; the one abbreviation that might not be - obvious is "utags". That stands for "universal tags" -- a - universal tag is one held by all the files in a given change entry. - - If you need output that's easy for a program to parse, use the - --xml option. Note that with XML output, just about all available - information is included with each change entry, whether you asked - for it or not, on the theory that your parser can ignore anything - it's not looking for. - -Notes about the options and arguments (the actual options are listed -last in this usage message): - - * The -I and -F options may appear multiple times. - - * To follow trunk revisions, use "-F trunk" ("-F TRUNK" also works). - This is okay because no would ever, ever be crazy enough to name a - branch "trunk", right? Right. - - * For the -U option, the UFILE should be formatted like - CVSROOT/users. That is, each line of UFILE looks like this - jrandom:jrandom@red-bean.com - or maybe even like this - jrandom:'Jesse Q. Random ' - Don't forget to quote the portion after the colon if necessary. - - * Many people want to filter by date. To do so, invoke cvs2cl.pl - like this: - cvs2cl.pl -l "-d'DATESPEC'" - where DATESPEC is any date specification valid for "cvs log -d". - (Note that CVS 1.10.7 and below requires there be no space between - -d and its argument). - -Options/Arguments: - - -h, -help, --help, or -? Show this usage and exit - --version Show version and exit - -r, --revisions Show revision numbers in output - -b, --branches Show branch names in revisions when possible - -t, --tags Show tags (symbolic names) in output - --stdin Read from stdin, don't run cvs log - --stdout Output to stdout not to ChangeLog - -d, --distributed Put ChangeLogs in subdirs - -f FILE, --file FILE Write to FILE instead of "ChangeLog" - --fsf Use this if log data is in FSF ChangeLog style - -W SECS, --window SECS Window of time within which log entries unify - -U UFILE, --usermap UFILE Expand usernames to email addresses from UFILE - -R REGEXP, --regexp REGEXP Include only entries that match REGEXP - -I REGEXP, --ignore REGEXP Ignore files whose names match REGEXP - -C, --case-insensitive Any regexp matching is done case-insensitively - -F BRANCH, --follow BRANCH Show only revisions on or ancestral to BRANCH - -S, --separate-header Blank line between each header and log message - --no-wrap Don't auto-wrap log message (recommend -S also) - --gmt, --utc Show times in GMT/UTC instead of local time - --accum Add to an existing ChangeLog (incompat w/ --xml) - -w, --day-of-week Show day of week - --header FILE Get ChangeLog header from FILE ("-" means stdin) - --xml Output XML instead of ChangeLog format - --hide-filenames Don't show filenames (ignored for XML output) - -P, --prune Don't show empty log messages - -g OPTS, --global-opts OPTS Invoke like this "cvs OPTS log ..." - -l OPTS, --log-opts OPTS Invoke like this "cvs ... log OPTS" - FILE1 [FILE2 ...] Show only log information for the named FILE(s) - -See http://www.red-bean.com/cvs2cl for maintenance and bug info. -END_OF_INFO -} - -__END__ - -=head1 NAME - -cvs2cl.pl - produces GNU-style ChangeLogs in CVS working copies, by - running "cvs log" and parsing the output. Shared log entries are - unified in an intuitive way. - -=head1 DESCRIPTION - -This script generates GNU-style ChangeLog files from CVS log -information. Basic usage: just run it inside a working copy and a -ChangeLog will appear. It requires repository access (i.e., 'cvs log' -must work). Run "cvs2cl.pl --help" to see more advanced options. - -See http://www.red-bean.com/cvs2cl for updates, and for instructions -on getting anonymous CVS access to this script. - -Maintainer: Karl Fogel -Please report bugs to . - -=head1 README - -This script generates GNU-style ChangeLog files from CVS log -information. Basic usage: just run it inside a working copy and a -ChangeLog will appear. It requires repository access (i.e., 'cvs log' -must work). Run "cvs2cl.pl --help" to see more advanced options. - -See http://www.red-bean.com/cvs2cl for updates, and for instructions -on getting anonymous CVS access to this script. - -Maintainer: Karl Fogel -Please report bugs to . - -=head1 PREREQUISITES - -This script requires C, C, and -C. -It also seems to require C or higher. - -=pod OSNAMES - -any - -=pod SCRIPT CATEGORIES - -Version_Control/CVS - -=cut - - --*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- - -Note about a bug-slash-opportunity: ------------------------------------ - -There's a bug in Text::Wrap, which affects cvs2cl. This script -reveals it: - - #!/usr/bin/perl -w - - use Text::Wrap; - - my $test_text = - "This script demonstrates a bug in Text::Wrap. The very long line - following this paragraph will be relocated relative to the surrounding - text: - - ==================================================================== - - See? When the bug happens, we'll get the line of equal signs below - this paragraph, even though it should be above."; - - - # Print out the test text with no wrapping: - print "$test_text"; - print "\n"; - print "\n"; - - # Now print it out wrapped, and see the bug: - print wrap ("\t", " ", "$test_text"); - print "\n"; - print "\n"; - -If the line of equal signs were one shorter, then the bug doesn't -happen. Interesting. - -Anyway, rather than fix this in Text::Wrap, we might as well write a -new wrap() which has the following much-needed features: - -* initial indentation, like current Text::Wrap() -* subsequent line indentation, like current Text::Wrap() -* user chooses among: force-break long words, leave them alone, or die()? -* preserve existing indentation: chopped chunks from an indented line - are indented by same (like this line, not counting the asterisk!) -* optional list of things to preserve on line starts, default ">" - -Note that the last two are essentially the same concept, so unify in -implementation and give a good interface to controlling them. - -And how about: - -Optionally, when encounter a line pre-indented by same as previous -line, then strip the newline and refill, but indent by the same. -Yeah... diff --git a/ndb/home/bin/fix-cvs-root b/ndb/home/bin/fix-cvs-root index 2c4f158f825..1ba6fca170e 100755 --- a/ndb/home/bin/fix-cvs-root +++ b/ndb/home/bin/fix-cvs-root @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # change all CVS/Root to current CVSROOT [ "$CVSROOT" ] || { echo "no CVSROOT in environment" >&2; exit 1; } diff --git a/ndb/home/bin/import-from-bk.sh b/ndb/home/bin/import-from-bk.sh index 4e3957be6d5..d3e7e4ae9f3 100755 --- a/ndb/home/bin/import-from-bk.sh +++ b/ndb/home/bin/import-from-bk.sh @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # XXX does not delete files # XXX does not handle nested new dirs # this script screams for perl, no time now diff --git a/ndb/home/bin/ndb_deploy b/ndb/home/bin/ndb_deploy index 773fc9b8fd7..347d6c45f51 100755 --- a/ndb/home/bin/ndb_deploy +++ b/ndb/home/bin/ndb_deploy @@ -1,5 +1,20 @@ #!/bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + if [ $# -eq 0 ] then for i in $DEPLOY_DST diff --git a/ndb/home/bin/ndbdoxy.pl b/ndb/home/bin/ndbdoxy.pl index 89b7de8440e..8896437fa0f 100755 --- a/ndb/home/bin/ndbdoxy.pl +++ b/ndb/home/bin/ndbdoxy.pl @@ -1,4 +1,20 @@ #!/usr/local/bin/perl + +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # # ndbdoxy.pl Executes doxygen on a checked out version of NDB Cluster # diff --git a/ndb/home/bin/ngcalc b/ndb/home/bin/ngcalc index a289d384db9..921a82881f0 100755 --- a/ndb/home/bin/ngcalc +++ b/ndb/home/bin/ngcalc @@ -1,5 +1,20 @@ #! /usr/local/bin/perl +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + use strict; use Getopt::Long; diff --git a/ndb/home/bin/parseConfigFile.awk b/ndb/home/bin/parseConfigFile.awk index 6903949156c..8c9b308b4cf 100644 --- a/ndb/home/bin/parseConfigFile.awk +++ b/ndb/home/bin/parseConfigFile.awk @@ -1,3 +1,18 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + BEGIN{ where=0; n_hosts=0; diff --git a/ndb/home/bin/setup-test.sh b/ndb/home/bin/setup-test.sh index 61097c30027..7d7b33cd002 100755 --- a/ndb/home/bin/setup-test.sh +++ b/ndb/home/bin/setup-test.sh @@ -1,5 +1,20 @@ #!/bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # NAME # run-test.sh - Run a test program # diff --git a/ndb/home/bin/signallog2html.lib/signallog2list.awk b/ndb/home/bin/signallog2html.lib/signallog2list.awk index 9839f314556..c049b33ef16 100644 --- a/ndb/home/bin/signallog2html.lib/signallog2list.awk +++ b/ndb/home/bin/signallog2html.lib/signallog2list.awk @@ -1,3 +1,18 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + BEGIN{ PRINT=0; SIGNAL_ARRAY[0]=""; diff --git a/ndb/home/bin/signallog2html.lib/uniq_blocks.awk b/ndb/home/bin/signallog2html.lib/uniq_blocks.awk index 43f48d1cde1..f1463889ef6 100644 --- a/ndb/home/bin/signallog2html.lib/uniq_blocks.awk +++ b/ndb/home/bin/signallog2html.lib/uniq_blocks.awk @@ -1,3 +1,18 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + BEGIN{ NAMES[""]=""; ORDER[0]=""; diff --git a/ndb/home/bin/signallog2html.sh b/ndb/home/bin/signallog2html.sh index 5665275807c..8b49849be50 100755 --- a/ndb/home/bin/signallog2html.sh +++ b/ndb/home/bin/signallog2html.sh @@ -1,4 +1,20 @@ #!/bin/sh + +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # NAME # signallog2html.sh # diff --git a/ndb/home/bin/stripcr b/ndb/home/bin/stripcr index 540418f88cf..97b35fd42d5 100755 --- a/ndb/home/bin/stripcr +++ b/ndb/home/bin/stripcr @@ -1,5 +1,19 @@ #!/bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # NAME # stripcr - a program for removing carriage return chars from dos-files. diff --git a/ndb/home/lib/funcs.sh b/ndb/home/lib/funcs.sh index b7d8914035e..f967f52c567 100644 --- a/ndb/home/lib/funcs.sh +++ b/ndb/home/lib/funcs.sh @@ -1,3 +1,18 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + # NAME # safe, safe_eval, die, rawdie, syndie, msg, errmsg, # rawmsg, rawerrmsg, trace, errtrace, is_wordmatch diff --git a/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs b/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs index ea1798c8c67..b19875b97ef 100644 --- a/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs +++ b/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Drawing; using System.Collections; diff --git a/ndb/src/cw/cpcc-win32/csharp/Computer.cs b/ndb/src/cw/cpcc-win32/csharp/Computer.cs index 9763fac5622..5ee35e5e90e 100644 --- a/ndb/src/cw/cpcc-win32/csharp/Computer.cs +++ b/ndb/src/cw/cpcc-win32/csharp/Computer.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Drawing; using System.Collections; diff --git a/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs b/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs index c01e41f3e60..506cb6777f0 100644 --- a/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs +++ b/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Drawing; using System.Collections; diff --git a/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs b/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs index 5b4d1b56df7..a126c632ffd 100644 --- a/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs +++ b/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Drawing; using System.Collections; diff --git a/ndb/src/cw/cpcc-win32/csharp/Database.cs b/ndb/src/cw/cpcc-win32/csharp/Database.cs index 39b8c160159..80a8daee2d0 100644 --- a/ndb/src/cw/cpcc-win32/csharp/Database.cs +++ b/ndb/src/cw/cpcc-win32/csharp/Database.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Drawing; using System.Collections; diff --git a/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs b/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs index f492aa64c60..a780190f86c 100644 --- a/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs +++ b/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + //author:Arun //date:Nov 13,2002 //Wizard using panel diff --git a/ndb/src/cw/cpcc-win32/csharp/Process.cs b/ndb/src/cw/cpcc-win32/csharp/Process.cs index c1ee1b2fe9e..eac12d4868e 100644 --- a/ndb/src/cw/cpcc-win32/csharp/Process.cs +++ b/ndb/src/cw/cpcc-win32/csharp/Process.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Drawing; using System.Collections; diff --git a/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs b/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs index 581b8383e7c..ab8d58ed11f 100644 --- a/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs +++ b/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Drawing; using System.Collections; diff --git a/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs b/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs index b3a2361bcb0..41929c104d0 100644 --- a/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs +++ b/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Text; using System.Collections.Specialized; diff --git a/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs b/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs index b8ff2844af9..6e070875b25 100644 --- a/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs +++ b/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Collections; using System.IO; diff --git a/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs b/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs index 2cef5d34f17..9025f122994 100644 --- a/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs +++ b/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Net; using System.Net.Sockets; diff --git a/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs b/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs index 9c0d82a0b27..25d0d9947d6 100644 --- a/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs +++ b/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Net; using System.Net.Sockets; diff --git a/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs b/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs index cecfcaeb0f3..4261efc8a29 100644 --- a/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs +++ b/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Drawing; using System.Collections; diff --git a/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs b/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs index a7966947e1f..5258ad290fc 100644 --- a/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs +++ b/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs @@ -1,3 +1,18 @@ +/* Copyright (C) 2004 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + using System; using System.Drawing; using System.Collections; diff --git a/ndb/src/cw/cpcc-win32/vb6/Computer.cls b/ndb/src/cw/cpcc-win32/vb6/Computer.cls deleted file mode 100644 index 5b42dfeadb6..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/Computer.cls +++ /dev/null @@ -1,20 +0,0 @@ -VERSION 1.0 CLASS -BEGIN - MultiUse = -1 'True - Persistable = 0 'NotPersistable - DataBindingBehavior = 0 'vbNone - DataSourceBehavior = 0 'vbNone - MTSTransactionMode = 0 'NotAnMTSObject -END -Attribute VB_Name = "Computer" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = False -Attribute VB_Exposed = False -Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes" -Attribute VB_Ext_KEY = "Top_Level" ,"Yes" -Public m_ip As String -Public m_name As String -Public m_status As String -Public m_processes As Collection - diff --git a/ndb/src/cw/cpcc-win32/vb6/Database.cls b/ndb/src/cw/cpcc-win32/vb6/Database.cls deleted file mode 100644 index dfb1195d910..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/Database.cls +++ /dev/null @@ -1,18 +0,0 @@ -VERSION 1.0 CLASS -BEGIN - MultiUse = -1 'True - Persistable = 0 'NotPersistable - DataBindingBehavior = 0 'vbNone - DataSourceBehavior = 0 'vbNone - MTSTransactionMode = 0 'NotAnMTSObject -END -Attribute VB_Name = "Database_" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = False -Attribute VB_Exposed = False -Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes" -Attribute VB_Ext_KEY = "Top_Level" ,"Yes" -Public m_name As String -Public m_processes As Collection -Public m_status As String diff --git a/ndb/src/cw/cpcc-win32/vb6/Icon 110.ico b/ndb/src/cw/cpcc-win32/vb6/Icon 110.ico deleted file mode 100644 index 34b859923948830d079ecef0af86285faf116c84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmbV}J#ND=427A(fV?GBXOBHb2Or2o0eRFWZoZO_;<015YAC>dl$5mS&(J>kNqT%F zB_$#!#xz~T@q8z8&-wr-_y|ujFpDI-pOG+eQfdn`TbN|ucMPkanE4JeJmk|~5pSrK zfhG-Q@jxhXEt#BEn|>u!jjl_Ke4uO7&5EjS*Lqc#%pdi>3%}N@ea`QV zObKOfN!L+>m1wZtXB+~SI^()v&%7tM3w!#24w*=`MQ5}>*0E|{(3(k5#%6|=xJa}8 z)Tg=r6rO->*7Vt{U3Se|n_ZeO=Wb{ERfJkyynlsv0OhJ%RK~AbwL7<^9?L}FKlH!W YdB6#NgC!d8@PIFnY!i6X^aMN3M`NL#w$)BH&%rF4;e3MJ*0NGD<5+KxCKR97(0*qNR6 z+OZ=Iv}roZ@$n!%GrqzJzQI9{^isn68wnF9r8dy>3X`^N!zlGpDgFj&9`f!Na?ZIYkL)2%*!Jl*(B|Eq61e1E6W+Q$;C`wM

s*m|!|1h7dNIFpChKib3Ip<3mxEbZ)pdYXs8@BaBeCarP jP2s(us?VYZ*a7C#9GlSajc9)*a=)a!ahKJLrab)sqQc?h diff --git a/ndb/src/cw/cpcc-win32/vb6/Icon 241.ico b/ndb/src/cw/cpcc-win32/vb6/Icon 241.ico deleted file mode 100644 index e8caf6e9a739c85a142307dfcd6c272c121243ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmd5)F>b>!3_Mo>I(TrWuJM@BfW|C&n*O9wgY}e*89fH@z#d5%F_LuYRLUpmcp^nm z20D&${DRu;1Ni28B1YmubU1JZ61Df1C{jtu7tY)g3AI)VVjo0wM{uZ1rxz?}~0Hv+xm_0{keye7db&K*xnJuNP{wCgat)bPv nTNWIp;!_d=e}=9B1CIov+a3MWHZkf-ECercR95M0z5?69(h(qG_{=&&Ol=dXB*rKKeWW8B<96vjfw@xtb^*-P#&00~D? z>=5j_0`~L=q9Be$f(>WDQG0KWA{FP%apsb6=(>)A*AL!@6~PgDF^w_*ea{miT}_2sUCLr;F9X423q}q3+VKu?YMBUN4l`)3*|RpesN^Q-B(0=_ybS@Cm^E@W+Dsivss8xtaT1EmVl+c?;*(ak%+DU4BgV{TPxz=3l1+% z=ORauhbGGz)``>$enohVfS@Z!K+KN`PxR&aB)`^+>N5)X{-%Do!-iHvf2xRd#&~Wf z+qRCn{+U}Fb06*R$83`LH~0C2{-6Az9-Z~Uxtr^S3;6ztTmwN5`?_$=-r#J57b-`h ZVsOaeQ_NZktpQ}9^-mZP{{+PUhZna->hk~q diff --git a/ndb/src/cw/cpcc-win32/vb6/Icon 31.ico b/ndb/src/cw/cpcc-win32/vb6/Icon 31.ico deleted file mode 100644 index a2404977771566a31d0eb74d8f8a7c9bfa0e9d4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmcgqI}XAy41EElGBPn|H{duq4yPczII*Q7h9aT9^!XDfjb9reaKv~( z!*c^1=}%-N&t$-k77*6HLs(=*q&r%Mq@a|-Le&Sgwut0tQ_cL2DJw3vQ}g>H&GMX+ zEg0+9%c+aF`T0q)_k8p(qhafBasTVQ-@g~G+OX@v=MO*^X!=aYBHy*pVyZ7}$w1=o O)axd^awYhYEqDVSm(W`P diff --git a/ndb/src/cw/cpcc-win32/vb6/Icon 337.ico b/ndb/src/cw/cpcc-win32/vb6/Icon 337.ico deleted file mode 100644 index 9dadb12cfbe8bfdc404c6a9c1e4716b92dea2a0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmb7?F>Zt~5Jf-PNKThjX_qo35+wyW5>g7MTX*CNxkV%nupDK}EhD+uNE>PL$1q-k zqDVXN4Syap7#pDAQI-$TINkt{ygpGS^-LAG

0_zatQmgfLw=@|Fr1$B{tN2@$=c zcxXz8Rk$~eK4+7E?>kG(+^@Zx6UMLi65|Ju>+5sd)D;{jDe~oALq5=Zjjngbr}^Gx zKKX9NFZI^X>aCykw|>U0-*4{!?|;f1uc-mwe`Zwq16{jk&?8O2H=g*EmRS=q)*O=s zUiQMZuob6ohd3;~wi*^(UllLj?a1?vF|Ug_<8dPr3W|S2z>aDcs$`A4N?M(mx diff --git a/ndb/src/cw/cpcc-win32/vb6/Icon 338.ico b/ndb/src/cw/cpcc-win32/vb6/Icon 338.ico deleted file mode 100644 index a13c80c81b4b8b357e341135506a609312c25139..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmbtRyKciU47}6@)GeL5#$(3-9z8gpWFUjGMVtEzp865~fap^)b~K{%EuE)J%ANQSw2JU;{kZ#{7RI>j#%N59&prtHb;?)b7`XIFX7<5ry%izi2e~A z8dA3~^QPA6DjDe`?>noDHIQ|?R?hTacq`KP?@Y-0-+AowIrp<_ZMW!e(*Cx$eg_SV z#l)?tfnp%f^-Ohb>WVzqGqr@EdOH8pq$l1kbi2@5Kj+8#mr2JV7NCBmZKn$}&51^i zxB**R%9mDOLjxgH^pOJllW?ypCEGVc81A{28g44rYpXDGbEIx(9uJ+VFUF(8ZsUM8 bVKNHN|AJ@!nHX8~3)qO>{5>3B@Z88Zjw}z& diff --git a/ndb/src/cw/cpcc-win32/vb6/Icon 339.ico b/ndb/src/cw/cpcc-win32/vb6/Icon 339.ico deleted file mode 100644 index 5eb4c06815d5b352779dc49e8567c152e1033099..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmbtSF>b>!45aG<%H~X6V`S=<03JQKPZE$p-J;F?Lf_#BL{G`s(TIi=NC5UIsfrxM9C-CH_y4%oq;K@(*?7ism`BzzwTo<}2boi(G;D60Jy$1v6 zH^e@_AT^v2;1mWhy@7ny@-<|``wlr!qQi+Xt4J{p!{nzW7pv)4#d&GvA6y-wn+FdM nov5qlqpjQq|Cq*Nx`Z0*zu-`R24;BPi8d^6ehJ$!p9lT{&r%J! diff --git a/ndb/src/cw/cpcc-win32/vb6/MSSCCPRJ.SCC b/ndb/src/cw/cpcc-win32/vb6/MSSCCPRJ.SCC deleted file mode 100644 index 3100640f8bd..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/MSSCCPRJ.SCC +++ /dev/null @@ -1,5 +0,0 @@ -[SCC] -SCC=This is a source code control file -[NdbCPC.vbp] -SCC_Project_Name=this project is not under source code control -SCC_Aux_Path= diff --git a/ndb/src/cw/cpcc-win32/vb6/Module1.bas b/ndb/src/cw/cpcc-win32/vb6/Module1.bas deleted file mode 100644 index ae8ed444a41..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/Module1.bas +++ /dev/null @@ -1,233 +0,0 @@ -Attribute VB_Name = "Module1" -Option Explicit -Public fMainForm As frmMain -Public g_computers As New Collection -Public g_databases As New Collection - -Sub Main() - If False Then - Dim fLogin As New frmLogin - fLogin.Show vbModal - If Not fLogin.OK Then - 'Login Failed so exit app - End - End If - Unload fLogin - - frmSplash.Show - frmSplash.Refresh - End If - - init - - Set fMainForm = New frmMain - Load fMainForm - Unload frmSplash - - fMainForm.Show -End Sub - -Private Sub init() - Dim c As Computer - Dim p As Process - - ' --- - ' One node configuration - ' - Set c = New Computer - With c - .m_ip = "130.100.232.31" - .m_name = "ndb-client31" - .m_status = "Connected" - Set .m_processes = New Collection - End With - addComputer c - - Set p = New Process - With p - .m_id = "1" - .m_name = "mgm-1" - .m_database = "elathal" - .m_status = "Running" - .m_owner = "elathal" - Set .m_computer = c - End With - addProcess c, p - - Set p = New Process - With p - .m_id = "2" - .m_name = "ndb-2" - .m_database = "elathal" - .m_status = "Running" - .m_owner = "elathal" - Set .m_computer = c - End With - addProcess c, p - - Set p = New Process - With p - .m_id = "3" - .m_name = "api-3" - .m_database = "elathal" - .m_status = "Running" - .m_owner = "elathal" - Set .m_computer = c - End With - addProcess c, p - - ' --- - ' Two node configuration - ' - Set p = New Process - With p - .m_id = "4" - .m_name = "mgm-1" - .m_database = "ejonore-2-node" - .m_status = "Running" - .m_owner = "ejonore" - Set .m_computer = c - End With - addProcess c, p - - Set c = New Computer - With c - .m_ip = "10.0.1.1" - .m_name = "cluster-1" - .m_status = "Connected" - Set .m_processes = New Collection - End With - addComputer c - - Set p = New Process - With p - .m_id = "1" - .m_name = "ndb-2" - .m_database = "ejonore-2-node" - .m_status = "Running" - .m_owner = "ejonore" - Set .m_computer = c - End With - addProcess c, p - - Set c = New Computer - With c - .m_ip = "10.0.2.1" - .m_name = "cluster-2" - .m_status = "Connected" - Set .m_processes = New Collection - End With - addComputer c - - Set p = New Process - With p - .m_id = "1" - .m_name = "ndb-3" - .m_database = "ejonore-2-node" - .m_status = "Running" - .m_owner = "ejonore" - Set .m_computer = c - End With - addProcess c, p - - Set c = New Computer - With c - .m_ip = "10.0.3.1" - .m_name = "cluster-3" - .m_status = "Connected" - Set .m_processes = New Collection - End With - addComputer c - - Set p = New Process - With p - .m_id = "1" - .m_name = "api-4" - .m_database = "ejonore-2-node" - .m_status = "Running" - .m_owner = "ejonore" - Set .m_computer = c - End With - addProcess c, p - - Set c = New Computer - With c - .m_ip = "10.0.4.1" - .m_name = "cluster-4" - .m_status = "Connected" - Set .m_processes = New Collection - End With - addComputer c - - Set p = New Process - With p - .m_id = "1" - .m_name = "api-5" - .m_database = "ejonore-2-node" - .m_status = "Running" - .m_owner = "ejonore" - Set .m_computer = c - End With - addProcess c, p - - Set c = New Computer - With c - .m_ip = "130.100.232.5" - .m_name = "ndbs05" - .m_status = "Not connected" - Set .m_processes = New Collection - End With - addComputer c - - Set c = New Computer - With c - .m_ip = "130.100.232.7" - .m_name = "ndb-srv7" - .m_status = "No contact" - Set .m_processes = New Collection - End With - addComputer c - -End Sub - -Public Sub addComputer(ByRef c As Computer) - g_computers.Add c, "_" & c.m_name -End Sub - -Private Sub addProcess(ByRef c As Computer, ByRef p As Process) - c.m_processes.Add p, "_" & p.m_id - - Dim cl As Database_ - If Not Exists(g_databases, "_" & p.m_database) Then - Set cl = New Database_ - With cl - .m_name = p.m_database - .m_status = "Unknown" - Set .m_processes = New Collection - End With - g_databases.Add cl, "_" & p.m_database - Else - Set cl = g_databases("_" & p.m_database) - End If - cl.m_processes.Add p, "_" & p.m_computer.m_name & "_" & p.m_id -End Sub - -Public Function Exists(ByRef c As Collection, ByVal k As String) As Boolean - Dim r As Boolean - Dim o As Object - - r = True - - On Error GoTo NotFound - Set o = c.Item(k) - GoTo Continue -NotFound: - If Err.Number <> 5 Then - Err.Raise Err.Number, Err.Source, Err.Description - End If - - r = False -Continue: - Exists = r -End Function - diff --git a/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbp b/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbp deleted file mode 100644 index dc8f3780a74..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbp +++ /dev/null @@ -1,49 +0,0 @@ -Type=Exe -Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; mscomctl.ocx -Module=Module1; Module1.bas -Form=frmMain.frm -Form=frmSplash.frm -Form=frmLogin.frm -Form=frmOptions.frm -Form=frmAbout.frm -Class=Computer; Computer.cls -Class=Process; Process.cls -Class=Database_; Database.cls -Form=frmNewComputer.frm -Form=frmNewDatabase3.frm -Form=frmNewDatabase1.frm -Form=frmNewDatabase2.frm -IconForm="frmAbout" -Startup="Sub Main" -HelpFile="" -Title="NdbCPC" -ExeName32="NdbCPC.exe" -Command32="" -Name="NdbCPC" -HelpContextID="0" -CompatibleMode="0" -MajorVer=1 -MinorVer=0 -RevisionVer=0 -AutoIncrementVer=0 -ServerSupportFiles=0 -VersionCompanyName="ctp" -CompilationType=0 -OptimizationType=0 -FavorPentiumPro(tm)=0 -CodeViewDebugInfo=0 -NoAliasing=0 -BoundsCheck=0 -OverflowCheck=0 -FlPointCheck=0 -FDIVCheck=0 -UnroundedFP=0 -StartMode=0 -Unattended=0 -Retained=0 -ThreadPerObject=0 -MaxNumberOfThreads=1 -DebugStartupOption=0 - -[MS Transaction Server] -AutoRefresh=1 diff --git a/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbw b/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbw deleted file mode 100644 index 825abbc923a..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/NdbCPC.vbw +++ /dev/null @@ -1,13 +0,0 @@ -Module1 = 44, 44, 577, 492, -frmMain = 44, 44, 577, 492, , 66, 66, 599, 514, C -frmSplash = 132, 132, 670, 576, C, 88, 88, 621, 536, C -frmLogin = 0, 0, 538, 444, C, 110, 110, 643, 558, C -frmOptions = 176, 176, 714, 620, C, 132, 132, 665, 580, C -frmAbout = 132, 132, 759, 511, C, 154, 154, 687, 602, C -Computer = 110, 110, 648, 554, -Process = 132, 132, 670, 576, C -Database_ = 88, 88, 626, 532, C -frmNewComputer = 44, 44, 582, 488, , 22, 22, 390, 218, C -frmNewDatabase3 = 0, 0, 506, 444, , 0, 0, 506, 444, C -frmNewDatabase1 = 132, 132, 638, 550, , 154, 154, 660, 572, C -frmNewDatabase2 = 198, 198, 704, 616, , 176, 176, 682, 594, C diff --git a/ndb/src/cw/cpcc-win32/vb6/Process.cls b/ndb/src/cw/cpcc-win32/vb6/Process.cls deleted file mode 100644 index fcb4c2cbb2c..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/Process.cls +++ /dev/null @@ -1,22 +0,0 @@ -VERSION 1.0 CLASS -BEGIN - MultiUse = -1 'True - Persistable = 0 'NotPersistable - DataBindingBehavior = 0 'vbNone - DataSourceBehavior = 0 'vbNone - MTSTransactionMode = 0 'NotAnMTSObject -END -Attribute VB_Name = "Process" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = False -Attribute VB_Exposed = False -Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes" -Attribute VB_Ext_KEY = "Top_Level" ,"Yes" -Public m_computer As Computer -Public m_id As String -Public m_name As String -Public m_database As String -Public m_status As String -Public m_owner As String - diff --git a/ndb/src/cw/cpcc-win32/vb6/closed folder.ico b/ndb/src/cw/cpcc-win32/vb6/closed folder.ico deleted file mode 100644 index fe82350d376f989b8e2c20998cf8c86c4b7d81f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10134 zcmeI2zl$AJ6vxlHYkZQRiAAau$yP}t15<=lE9oO?Qpak@fAF#>WI$L2iwHtsw%S5P z3!4PolurT{X6mFd5=apVf*Ult5aIec=iEC#-p|Os2<6qts$+F15C9?L8@@{`& zpUAt%M2-^^7kQ6E^B9q9m`V};q%6IoWhj%$gkBZF{v-q)aqv-*HZPby&U=(y-t19! z`NJN~^}XfU%r0|MI+T4fcKXywMvra%E;gsl7r1Qrk$P`8tcW_c>W;#Oom@7=k}LM5 z&_c--H(3bb?qUdAZ+K?C&bf8$TG#u>XeNS^Ya9!%Y3pbi+I2qpc_LdseJx8%OEMab z4f2KDlJHwC zKi>LXZr#5xpMU!uiE<9TyDN^`*&JDpEJv2BjC)8;3giWY0(pVFK(1~T@(OtcQz5UA z(@BlIMqVSY5!A>7e1H$NWzK1Hg69Ovamu-GEj>*Rh8zqz7;-QeBrxP)$ia|!FD=<|gtw>OTsUmlUvLbgy?uy)YIxIJG@>k@q$giiUB7eo&RA8vU zP_Yhr+E^8vJra6aJ&mkEO}-jzH8^VW*{M|=tU(QqT5&KjJKZ?dV5z}U1EMCOT>@aK zajY?_5!7JekApazlNv0wu7_dKt3l5KGB5-%1TX|J1TX|J*yRL<8Vmsp0Sq-52*ZIr z7y=jq7y=jw&4C;Y0So~Q0RVygHNgUo0i%K#1$+UHV6oMvkYnEp;0C0#5!7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z#@31Bh2B-sOhj#{^y#A#Bpsd_S zFq0CL;i*ozj^7NhsH+>EntutAXLEhiQe6R&aBeerpVfbrA8v$xSoXK`GiDI-iT~EQE@sW3t{)bnO>T=@4D=&bAYMWAmUU&^Bs!=1@1F^}%1xi; zbVV$z{We>l^>?*lX$C9p`V17ym9jrN&OfgRjKcWnp9kCh>-nM|(y2X~Hy;|IUElDa z@5Yc$x`A2`I|8Tz5K)thll>bt{d}(7$ z^=JAo^W!go?YGh2J_f(O)v_4GzPVrg#%^N*PSkX-1zsJnnHlWn+ckcL>mzd)rOCwB-4?0AY^Mp+n z(>n~N_3I0&w%6JLPKTFMO8SyYX|Ck<@>~V$etD#C&4yaP=+|TVy>4IYe1p^XX1ZR} zcV#TNMBke!y)7Sy9GaQ%uFR;FO4Yn?U@}< z?oxjtSe$Z1VdG#p9KuyX7B!JA-#xUojl!qyil?SF{u4m>c)mLD@@lv%j|OJY)Ym^F z=;z_XZrGe1t(FGsshil|G!49Ah}<-Ye1tK?a1hOaG$*w!9MVyAL@aZ@@DFMDyrO z>EO1Puh$`QS}Ilj+qDQ=b$L?J`^kMI{j@vj$N!&(e}BB2To&5(-TTV@e?x9J{CvWP z)uI?SYWjdAB^{4v7`1-cXC;rUDX@veD z(WJh=Q8kv&&bYPoPY2-&zAdnhVQ{cb<8*FR5|aEjUzW+%I8Ws6QrMK_;#)B9lmE92fFe1m6!24 c)A53QI^MJ%IEIP~`JQs>HqU^|<{2md1E!eX5&!@I diff --git a/ndb/src/cw/cpcc-win32/vb6/frmAbout.frm b/ndb/src/cw/cpcc-win32/vb6/frmAbout.frm deleted file mode 100644 index b842d20de21..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/frmAbout.frm +++ /dev/null @@ -1,245 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmAbout - BorderStyle = 3 'Fixed Dialog - Caption = "About NdbCPC" - ClientHeight = 3630 - ClientLeft = 45 - ClientTop = 330 - ClientWidth = 5865 - ClipControls = 0 'False - LinkTopic = "Form1" - MaxButton = 0 'False - MinButton = 0 'False - ScaleHeight = 3630 - ScaleWidth = 5865 - ShowInTaskbar = 0 'False - StartUpPosition = 1 'CenterOwner - Tag = "About NdbCPC" - Begin VB.PictureBox picIcon - AutoSize = -1 'True - BackColor = &H00C0C0C0& - ClipControls = 0 'False - Height = 540 - Left = 240 - Picture = "frmAbout.frx":0000 - ScaleHeight = 480 - ScaleMode = 0 'User - ScaleWidth = 480 - TabIndex = 2 - TabStop = 0 'False - Top = 240 - Width = 540 - End - Begin VB.CommandButton cmdOK - Cancel = -1 'True - Caption = "OK" - Default = -1 'True - Height = 345 - Left = 4245 - TabIndex = 0 - Tag = "OK" - Top = 2625 - Width = 1467 - End - Begin VB.CommandButton cmdSysInfo - Caption = "&System Info..." - Height = 345 - Left = 4260 - TabIndex = 1 - Tag = "&System Info..." - Top = 3075 - Width = 1452 - End - Begin VB.Label lblDescription - Caption = "App Description" - ForeColor = &H00000000& - Height = 1170 - Left = 1050 - TabIndex = 6 - Tag = "App Description" - Top = 1125 - Width = 4092 - End - Begin VB.Label lblTitle - Caption = "Application Title" - ForeColor = &H00000000& - Height = 480 - Left = 1050 - TabIndex = 5 - Tag = "Application Title" - Top = 240 - Width = 4092 - End - Begin VB.Line Line1 - BorderColor = &H00808080& - BorderStyle = 6 'Inside Solid - Index = 1 - X1 = 225 - X2 = 5657 - Y1 = 2430 - Y2 = 2430 - End - Begin VB.Line Line1 - BorderColor = &H00FFFFFF& - BorderWidth = 2 - Index = 0 - X1 = 240 - X2 = 5657 - Y1 = 2445 - Y2 = 2445 - End - Begin VB.Label lblVersion - Caption = "Version" - Height = 225 - Left = 1050 - TabIndex = 4 - Tag = "Version" - Top = 780 - Width = 4092 - End - Begin VB.Label lblDisclaimer - Caption = "Warning: ..." - ForeColor = &H00000000& - Height = 825 - Left = 255 - TabIndex = 3 - Tag = "Warning: ..." - Top = 2625 - Width = 3870 - End -End -Attribute VB_Name = "frmAbout" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -' Reg Key Security Options... -Const KEY_ALL_ACCESS = &H2003F - - -' Reg Key ROOT Types... -Const HKEY_LOCAL_MACHINE = &H80000002 -Const ERROR_SUCCESS = 0 -Const REG_SZ = 1 ' Unicode nul terminated string -Const REG_DWORD = 4 ' 32-bit number - - -Const gREGKEYSYSINFOLOC = "SOFTWARE\Microsoft\Shared Tools Location" -Const gREGVALSYSINFOLOC = "MSINFO" -Const gREGKEYSYSINFO = "SOFTWARE\Microsoft\Shared Tools\MSINFO" -Const gREGVALSYSINFO = "PATH" - - -Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long -Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long -Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long - -Private Sub Form_Load() - lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision - lblTitle.Caption = App.Title -End Sub - - - -Private Sub cmdSysInfo_Click() - Call StartSysInfo -End Sub - - -Private Sub cmdOK_Click() - Unload Me -End Sub - - -Public Sub StartSysInfo() - On Error GoTo SysInfoErr - - - Dim rc As Long - Dim SysInfoPath As String - - - ' Try To Get System Info Program Path\Name From Registry... - If GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO, SysInfoPath) Then - ' Try To Get System Info Program Path Only From Registry... - ElseIf GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFOLOC, gREGVALSYSINFOLOC, SysInfoPath) Then - ' Validate Existance Of Known 32 Bit File Version - If (Dir(SysInfoPath & "\MSINFO32.EXE") <> "") Then - SysInfoPath = SysInfoPath & "\MSINFO32.EXE" - - - ' Error - File Can Not Be Found... - Else - GoTo SysInfoErr - End If - ' Error - Registry Entry Can Not Be Found... - Else - GoTo SysInfoErr - End If - - - Call Shell(SysInfoPath, vbNormalFocus) - - - Exit Sub -SysInfoErr: - MsgBox "System Information Is Unavailable At This Time", vbOKOnly -End Sub - - -Public Function GetKeyValue(KeyRoot As Long, KeyName As String, SubKeyRef As String, ByRef KeyVal As String) As Boolean - Dim i As Long ' Loop Counter - Dim rc As Long ' Return Code - Dim hKey As Long ' Handle To An Open Registry Key - Dim hDepth As Long ' - Dim KeyValType As Long ' Data Type Of A Registry Key - Dim tmpVal As String ' Tempory Storage For A Registry Key Value - Dim KeyValSize As Long ' Size Of Registry Key Variable - '------------------------------------------------------------ - ' Open RegKey Under KeyRoot {HKEY_LOCAL_MACHINE...} - '------------------------------------------------------------ - rc = RegOpenKeyEx(KeyRoot, KeyName, 0, KEY_ALL_ACCESS, hKey) ' Open Registry Key - - - If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Handle Error... - - - tmpVal = String$(1024, 0) ' Allocate Variable Space - KeyValSize = 1024 ' Mark Variable Size - - - '------------------------------------------------------------ - ' Retrieve Registry Key Value... - '------------------------------------------------------------ - rc = RegQueryValueEx(hKey, SubKeyRef, 0, KeyValType, tmpVal, KeyValSize) ' Get/Create Key Value - - - If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Handle Errors - - - tmpVal = VBA.Left(tmpVal, InStr(tmpVal, VBA.Chr(0)) - 1) - '------------------------------------------------------------ - ' Determine Key Value Type For Conversion... - '------------------------------------------------------------ - Select Case KeyValType ' Search Data Types... - Case REG_SZ ' String Registry Key Data Type - KeyVal = tmpVal ' Copy String Value - Case REG_DWORD ' Double Word Registry Key Data Type - For i = Len(tmpVal) To 1 Step -1 ' Convert Each Bit - KeyVal = KeyVal + Hex(Asc(Mid(tmpVal, i, 1))) ' Build Value Char. By Char. - Next - KeyVal = Format$("&h" + KeyVal) ' Convert Double Word To String - End Select - - - GetKeyValue = True ' Return Success - rc = RegCloseKey(hKey) ' Close Registry Key - Exit Function ' Exit - - -GetKeyError: ' Cleanup After An Error Has Occured... - KeyVal = "" ' Set Return Val To Empty String - GetKeyValue = False ' Return Failure - rc = RegCloseKey(hKey) ' Close Registry Key -End Function - diff --git a/ndb/src/cw/cpcc-win32/vb6/frmLogin.frm b/ndb/src/cw/cpcc-win32/vb6/frmLogin.frm deleted file mode 100644 index d4d663c93c2..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/frmLogin.frm +++ /dev/null @@ -1,119 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmLogin - BorderStyle = 3 'Fixed Dialog - Caption = "Login" - ClientHeight = 1590 - ClientLeft = 45 - ClientTop = 330 - ClientWidth = 3750 - LinkTopic = "Form1" - MaxButton = 0 'False - MinButton = 0 'False - ScaleHeight = 1590 - ScaleWidth = 3750 - ShowInTaskbar = 0 'False - StartUpPosition = 2 'CenterScreen - Tag = "Login" - Begin VB.CommandButton cmdCancel - Cancel = -1 'True - Caption = "Cancel" - Height = 360 - Left = 2100 - TabIndex = 5 - Tag = "Cancel" - Top = 1020 - Width = 1140 - End - Begin VB.CommandButton cmdOK - Caption = "OK" - Default = -1 'True - Height = 360 - Left = 495 - TabIndex = 4 - Tag = "OK" - Top = 1020 - Width = 1140 - End - Begin VB.TextBox txtPassword - Height = 285 - IMEMode = 3 'DISABLE - Left = 1305 - PasswordChar = "*" - TabIndex = 1 - Top = 525 - Width = 2325 - End - Begin VB.TextBox txtUserName - Height = 285 - Left = 1305 - TabIndex = 3 - Top = 135 - Width = 2325 - End - Begin VB.Label lblLabels - Caption = "&Password:" - Height = 248 - Index = 1 - Left = 105 - TabIndex = 0 - Tag = "&Password:" - Top = 540 - Width = 1080 - End - Begin VB.Label lblLabels - Caption = "&User Name:" - Height = 248 - Index = 0 - Left = 105 - TabIndex = 2 - Tag = "&User Name:" - Top = 150 - Width = 1080 - End -End -Attribute VB_Name = "frmLogin" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long - - -Public OK As Boolean -Private Sub Form_Load() - Dim sBuffer As String - Dim lSize As Long - - - sBuffer = Space$(255) - lSize = Len(sBuffer) - Call GetUserName(sBuffer, lSize) - If lSize > 0 Then - txtUserName.Text = Left$(sBuffer, lSize) - Else - txtUserName.Text = vbNullString - End If -End Sub - - - -Private Sub cmdCancel_Click() - OK = False - Me.Hide -End Sub - - -Private Sub cmdOK_Click() - 'ToDo: create test for correct password - 'check for correct password - If txtPassword.Text = "" Then - OK = True - Me.Hide - Else - MsgBox "Invalid Password, try again!", , "Login" - txtPassword.SetFocus - txtPassword.SelStart = 0 - txtPassword.SelLength = Len(txtPassword.Text) - End If -End Sub - diff --git a/ndb/src/cw/cpcc-win32/vb6/frmMain.frm b/ndb/src/cw/cpcc-win32/vb6/frmMain.frm deleted file mode 100644 index a4bf5b58941..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/frmMain.frm +++ /dev/null @@ -1,1207 +0,0 @@ -VERSION 5.00 -Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx" -Begin VB.Form frmMain - Caption = "NdbCPC" - ClientHeight = 5955 - ClientLeft = 2115 - ClientTop = 2250 - ClientWidth = 8880 - LinkTopic = "Form1" - ScaleHeight = 5955 - ScaleWidth = 8880 - Begin MSComctlLib.ImageList ImageList1 - Left = 6840 - Top = 3120 - _ExtentX = 1005 - _ExtentY = 1005 - BackColor = 16777215 - ImageWidth = 16 - ImageHeight = 16 - MaskColor = 12632256 - _Version = 393216 - BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} - NumListImages = 11 - BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":0000 - Key = "close" - EndProperty - BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":27B4 - Key = "open" - EndProperty - BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":4F68 - Key = "computer_unknown" - EndProperty - BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":5284 - Key = "computer_stopped" - EndProperty - BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":55A0 - Key = "computer_started" - EndProperty - BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":58BC - Key = "" - EndProperty - BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":5BD8 - Key = "" - EndProperty - BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":5EF4 - Key = "" - EndProperty - BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":6210 - Key = "db" - EndProperty - BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":652A - Key = "computer" - EndProperty - BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} - Picture = "frmMain.frx":6844 - Key = "properties" - EndProperty - EndProperty - End - Begin VB.PictureBox picSplitter - BackColor = &H00808080& - BorderStyle = 0 'None - FillColor = &H00808080& - Height = 4800 - Left = 5400 - ScaleHeight = 2090.126 - ScaleMode = 0 'User - ScaleWidth = 780 - TabIndex = 6 - Top = 705 - Width = 72 - Visible = 0 'False - End - Begin MSComctlLib.TreeView tvTreeView - Height = 4800 - Left = 0 - TabIndex = 5 - Top = 705 - Width = 2016 - _ExtentX = 3545 - _ExtentY = 8467 - _Version = 393217 - HideSelection = 0 'False - Indentation = 0 - LineStyle = 1 - Sorted = -1 'True - Style = 7 - FullRowSelect = -1 'True - ImageList = "ImageList1" - Appearance = 1 - End - Begin VB.PictureBox picTitles - Align = 1 'Align Top - Appearance = 0 'Flat - BorderStyle = 0 'None - ForeColor = &H80000008& - Height = 300 - Left = 0 - ScaleHeight = 300 - ScaleWidth = 8880 - TabIndex = 2 - TabStop = 0 'False - Top = 420 - Width = 8880 - Begin VB.Label lblTitle - BorderStyle = 1 'Fixed Single - Caption = " ListView:" - Height = 270 - Index = 1 - Left = 2078 - TabIndex = 4 - Tag = " ListView:" - Top = 12 - Width = 3216 - End - Begin VB.Label lblTitle - BorderStyle = 1 'Fixed Single - Caption = " TreeView:" - Height = 270 - Index = 0 - Left = 0 - TabIndex = 3 - Tag = " TreeView:" - Top = 12 - Width = 2016 - End - End - Begin MSComctlLib.Toolbar tbToolBar - Align = 1 'Align Top - Height = 420 - Left = 0 - TabIndex = 1 - Top = 0 - Width = 8880 - _ExtentX = 15663 - _ExtentY = 741 - ButtonWidth = 609 - ButtonHeight = 582 - Appearance = 1 - ImageList = "ImageList1" - _Version = 393216 - BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} - NumButtons = 5 - BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} - Style = 3 - EndProperty - BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} - Key = "Add computer" - Object.ToolTipText = "Add computer" - ImageKey = "computer" - EndProperty - BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} - Key = "New database" - Object.ToolTipText = "New database" - ImageKey = "db" - EndProperty - BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} - Style = 3 - EndProperty - BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} - Key = "Properties" - Object.ToolTipText = "Properties" - ImageKey = "properties" - EndProperty - EndProperty - End - Begin MSComctlLib.StatusBar sbStatusBar - Align = 2 'Align Bottom - Height = 270 - Left = 0 - TabIndex = 0 - Top = 5685 - Width = 8880 - _ExtentX = 15663 - _ExtentY = 476 - _Version = 393216 - BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} - NumPanels = 3 - BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} - AutoSize = 1 - Object.Width = 10028 - Text = "Status" - TextSave = "Status" - EndProperty - BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} - Style = 6 - AutoSize = 2 - TextSave = "2002-10-15" - EndProperty - BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} - Style = 5 - AutoSize = 2 - TextSave = "09:44" - EndProperty - EndProperty - End - Begin MSComctlLib.ListView lvProcesses - Height = 4815 - Left = 2040 - TabIndex = 8 - Top = 720 - Width = 3255 - _ExtentX = 5741 - _ExtentY = 8493 - Sorted = -1 'True - MultiSelect = -1 'True - LabelWrap = -1 'True - HideSelection = 0 'False - AllowReorder = -1 'True - FullRowSelect = -1 'True - _Version = 393217 - ForeColor = -2147483640 - BackColor = -2147483643 - BorderStyle = 1 - Appearance = 1 - NumItems = 6 - BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} - Key = "Id" - Text = "Id" - Object.Width = 2540 - EndProperty - BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} - SubItemIndex = 1 - Key = "Computer" - Text = "Computer" - Object.Width = 2540 - EndProperty - BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} - SubItemIndex = 2 - Key = "Database" - Text = "Database" - Object.Width = 2540 - EndProperty - BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} - SubItemIndex = 3 - Key = "Name" - Text = "Name" - Object.Width = 2540 - EndProperty - BeginProperty ColumnHeader(5) {BDD1F052-858B-11D1-B16A-00C0F0283628} - SubItemIndex = 4 - Key = "Status" - Text = "Status" - Object.Width = 2540 - EndProperty - BeginProperty ColumnHeader(6) {BDD1F052-858B-11D1-B16A-00C0F0283628} - SubItemIndex = 5 - Key = "Owner" - Text = "Owner" - Object.Width = 2540 - EndProperty - End - Begin MSComctlLib.ListView lvComputers - Height = 4815 - Left = 2040 - TabIndex = 7 - Top = 720 - Width = 3255 - _ExtentX = 5741 - _ExtentY = 8493 - Sorted = -1 'True - MultiSelect = -1 'True - LabelWrap = -1 'True - HideSelection = -1 'True - AllowReorder = -1 'True - FullRowSelect = -1 'True - _Version = 393217 - Icons = "ImageList1" - SmallIcons = "ImageList1" - ForeColor = -2147483640 - BackColor = -2147483643 - BorderStyle = 1 - Appearance = 1 - NumItems = 2 - BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} - Text = "Computer" - Object.Width = 2540 - EndProperty - BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} - SubItemIndex = 1 - Text = "Status" - Object.Width = 2540 - EndProperty - End - Begin MSComctlLib.ListView lvDatabases - Height = 4815 - Left = 2040 - TabIndex = 9 - Top = 720 - Width = 3255 - _ExtentX = 5741 - _ExtentY = 8493 - View = 3 - Sorted = -1 'True - MultiSelect = -1 'True - LabelWrap = -1 'True - HideSelection = -1 'True - AllowReorder = -1 'True - FullRowSelect = -1 'True - _Version = 393217 - Icons = "ImageList1" - SmallIcons = "ImageList1" - ForeColor = -2147483640 - BackColor = -2147483643 - BorderStyle = 1 - Appearance = 1 - NumItems = 2 - BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} - Key = "Database" - Text = "Database" - Object.Width = 2540 - EndProperty - BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} - SubItemIndex = 1 - Key = "Status" - Text = "Status" - Object.Width = 2540 - EndProperty - End - Begin VB.Image imgSplitter - Height = 4788 - Left = 1965 - MousePointer = 9 'Size W E - Top = 705 - Width = 150 - End - Begin VB.Menu mnuFile - Caption = "&File" - Begin VB.Menu mnuFileOpen - Caption = "&Open..." - End - Begin VB.Menu mnuFileFind - Caption = "&Find" - End - Begin VB.Menu mnuFileBar0 - Caption = "-" - End - Begin VB.Menu mnuFileSendTo - Caption = "Sen&d to" - End - Begin VB.Menu mnuFileBar1 - Caption = "-" - End - Begin VB.Menu mnuFileNew - Caption = "&New" - Shortcut = ^N - End - Begin VB.Menu mnuFileBar2 - Caption = "-" - End - Begin VB.Menu mnuFileDelete - Caption = "&Delete" - End - Begin VB.Menu mnuFileRename - Caption = "Rena&me" - End - Begin VB.Menu mnuFileProperties - Caption = "Propert&ies" - End - Begin VB.Menu mnuFileBar3 - Caption = "-" - End - Begin VB.Menu mnuFileMRU - Caption = "" - Index = 1 - Visible = 0 'False - End - Begin VB.Menu mnuFileMRU - Caption = "" - Index = 2 - Visible = 0 'False - End - Begin VB.Menu mnuFileMRU - Caption = "" - Index = 3 - Visible = 0 'False - End - Begin VB.Menu mnuFileBar4 - Caption = "-" - Visible = 0 'False - End - Begin VB.Menu mnuFileBar5 - Caption = "-" - End - Begin VB.Menu mnuFileClose - Caption = "&Close" - End - End - Begin VB.Menu mnuEdit - Caption = "&Edit" - Begin VB.Menu mnuEditUndo - Caption = "&Undo" - End - Begin VB.Menu mnuEditBar0 - Caption = "-" - End - Begin VB.Menu mnuEditCut - Caption = "Cu&t" - Shortcut = ^X - End - Begin VB.Menu mnuEditCopy - Caption = "&Copy" - Shortcut = ^C - End - Begin VB.Menu mnuEditPaste - Caption = "&Paste" - Shortcut = ^V - End - Begin VB.Menu mnuEditPasteSpecial - Caption = "Paste &Special..." - End - Begin VB.Menu mnuEditBar1 - Caption = "-" - End - Begin VB.Menu mnuEditSelectAll - Caption = "Select &All" - Shortcut = ^A - End - Begin VB.Menu mnuEditInvertSelection - Caption = "&Invert Selection" - End - End - Begin VB.Menu mnuView - Caption = "&View" - Begin VB.Menu mnuViewToolbar - Caption = "&Toolbar" - Checked = -1 'True - End - Begin VB.Menu mnuViewStatusBar - Caption = "Status &Bar" - Checked = -1 'True - End - Begin VB.Menu mnuViewBar0 - Caption = "-" - End - Begin VB.Menu mnuListViewMode - Caption = "Lar&ge Icons" - Index = 0 - End - Begin VB.Menu mnuListViewMode - Caption = "S&mall Icons" - Index = 1 - End - Begin VB.Menu mnuListViewMode - Caption = "&List" - Index = 2 - End - Begin VB.Menu mnuListViewMode - Caption = "&Details" - Index = 3 - End - Begin VB.Menu mnuViewBar1 - Caption = "-" - End - Begin VB.Menu mnuViewArrangeIcons - Caption = "Arrange &Icons" - End - Begin VB.Menu mnuViewBar2 - Caption = "-" - End - Begin VB.Menu mnuViewRefresh - Caption = "&Refresh" - End - Begin VB.Menu mnuViewOptions - Caption = "&Options..." - End - Begin VB.Menu mnuViewWebBrowser - Caption = "&Web Browser" - End - End - Begin VB.Menu mnuHelp - Caption = "&Help" - Begin VB.Menu mnuHelpContents - Caption = "&Contents" - End - Begin VB.Menu mnuHelpSearchForHelpOn - Caption = "&Search For Help On..." - End - Begin VB.Menu mnuHelpBar0 - Caption = "-" - End - Begin VB.Menu mnuHelpAbout - Caption = "&About " - End - End - Begin VB.Menu mnuPopComputers - Caption = "" - Visible = 0 'False - Begin VB.Menu mnuPopAddComputer - Caption = "Add computer" - End - Begin VB.Menu mnuPop__ - Caption = "-" - End - Begin VB.Menu mnuPopSortComputers - Caption = "Sorted" - End - End - Begin VB.Menu mnuPopDatabases - Caption = "" - Visible = 0 'False - Begin VB.Menu mnuPopNewDatabase - Caption = "New database" - End - Begin VB.Menu mnuPopSortDatabases0 - Caption = "-" - End - Begin VB.Menu mnuPopSortDatabases - Caption = "Sorted" - End - End - Begin VB.Menu mnuPopComputer - Caption = "" - Visible = 0 'False - Begin VB.Menu mnuPopComputerName - Caption = "ComputerName" - Enabled = 0 'False - End - Begin VB.Menu mnuPopComputer0 - Caption = "-" - End - Begin VB.Menu mnuPopConnectComputer - Caption = "Connect" - End - Begin VB.Menu mnuPopDisconnectComputer - Caption = "Disconnect" - End - Begin VB.Menu mnuPopRemoveComputer - Caption = "Remove" - End - Begin VB.Menu mnuComputer1 - Caption = "-" - End - Begin VB.Menu mnuPopComputerProperties - Caption = "Properties" - End - End -End -Attribute VB_Name = "frmMain" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit -Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any) - -Dim mbMoving As Boolean -Const sglSplitLimit = 500 -Dim m_currentNode As MSComctlLib.Node -Dim m_currentList As ListView - -Dim m_currentView As Integer -Dim m_computerWidth As Integer -Dim m_databaseWidth As Integer - -Dim m_currentComputer As Computer -Dim m_currentDatabase As Database_ - -Private Sub Form_Load() - tvTreeView.Nodes.Clear - lvComputers.ListItems.Clear - lvProcesses.ListItems.Clear - lvDatabases.ListItems.Clear - - Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000) - Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000) - Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500) - Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500) - - tvTreeView.Nodes.Add , tvwChild, "Computers", "Computers", 1, 2 - Dim c As Computer - For Each c In g_computers - addComputer c - Next - - Set m_currentNode = tvTreeView.Nodes("Computers") - Set m_currentList = lvComputers - - tvTreeView.Nodes.Add , tvwChild, "Databases", "Databases", 1, 2 - Dim d As Database_ - For Each d In g_databases - AddDatabase d - Next - - lvComputers.Visible = True - lvProcesses.Visible = False - lvDatabases.Visible = False - lvComputers.View = lvwReport - lvProcesses.View = lvwReport - lvDatabases.View = lvwReport - m_computerWidth = lvProcesses.ColumnHeaders("Computer").Width - m_databaseWidth = lvProcesses.ColumnHeaders("Database").Width - lvProcesses.ColumnHeaders("Id").Width = 0 -End Sub - -Private Sub setComputer(ByVal f_ip As String) - Dim c As Computer - Set c = g_computers(f_ip) - If c Is Nothing Then - MsgBox "Unknown computer: " & f_ip - Exit Sub - End If - - Set m_currentComputer = c - - lblTitle(1).Caption = "Processes defined on computer: " & c.m_name - setProcesses c.m_processes - - If lvProcesses.ColumnHeaders("Computer").Width <> 0 Then - m_computerWidth = lvProcesses.ColumnHeaders("Computer").Width - lvProcesses.ColumnHeaders("Computer").Width = 0 - End If - - If lvProcesses.ColumnHeaders("Database").Width = 0 Then - lvProcesses.ColumnHeaders("Database").Width = m_databaseWidth - End If -End Sub - -Private Sub setDatabase(ByVal f_name As String) - Dim c As Database_ - Set c = g_databases(f_name) - If c Is Nothing Then - MsgBox "Unknown database: " & f_name - Exit Sub - End If - - Set m_currentDatabase = c - - lblTitle(1).Caption = "Processes defined for database: " & c.m_name - setProcesses c.m_processes - - If lvProcesses.ColumnHeaders("Database").Width <> 0 Then - m_databaseWidth = lvProcesses.ColumnHeaders("Database").Width - lvProcesses.ColumnHeaders("Database").Width = 0 - End If - - If lvProcesses.ColumnHeaders("Computer").Width = 0 Then - lvProcesses.ColumnHeaders("Computer").Width = m_computerWidth - End If - -End Sub - -Private Sub setProcesses(ByRef c As Collection) - lvProcesses.ListItems.Clear - Dim p As Process - For Each p In c - Dim li As ListItem - Set li = lvProcesses.ListItems.Add(, "_" & p.m_computer.m_name & "_" & p.m_id, p.m_id) - li.SubItems(1) = p.m_computer.m_name - li.SubItems(2) = p.m_database - li.SubItems(3) = p.m_name - li.SubItems(4) = p.m_status - li.SubItems(5) = p.m_owner - Next -End Sub - -Public Sub addComputer(ByRef c As Computer) - Dim icon As Integer - Select Case c.m_status - Case "No contact" - icon = 4 - Case "Connected" - icon = 5 - Case Else - icon = 3 - End Select - - Dim li As ListItem - Set li = lvComputers.ListItems.Add(, "_" & c.m_name, c.m_name, icon, icon) - li.SubItems(1) = c.m_status - - tvTreeView.Nodes.Add "Computers", tvwChild, "_" & c.m_name, c.m_name, icon, icon -End Sub - -Public Sub removeComputer(ByRef name As String) - lvComputers.ListItems.Remove "_" & name - tvTreeView.Nodes.Remove "_" & name - - ' - ' Check if should remove database - Dim c As Computer - Set c = g_computers("_" & name) - Dim db As Database_ - Dim dbs As New Collection - Dim p As Process - For Each p In c.m_processes - Set db = g_databases("_" & p.m_database) - db.m_processes.Remove "_" & p.m_computer.m_name & "_" & p.m_id - If Not Exists(dbs, p.m_database) Then dbs.Add db, p.m_database - Next - - For Each db In dbs - If db.m_processes.Count = 0 Then - g_databases.Remove "_" & db.m_name - tvTreeView.Nodes.Remove "_" & db.m_name - End If - Next - - g_computers.Remove "_" & name - - ' - ' Check if should remove database - - Dim n As MSComctlLib.Node - Set n = tvTreeView.SelectedItem - selectNode n -End Sub - -Private Sub AddDatabase(ByRef c As Database_) - Dim li As ListItem - Set li = lvDatabases.ListItems.Add(, "_" & c.m_name, c.m_name, 9, 9) - li.SubItems(1) = c.m_status - tvTreeView.Nodes.Add "Databases", tvwChild, "_" & c.m_name, c.m_name, 9, 9 -End Sub - -Private Sub Form_Unload(Cancel As Integer) - Dim i As Integer - - - 'close all sub forms - For i = Forms.Count - 1 To 1 Step -1 - Unload Forms(i) - Next - If Me.WindowState <> vbMinimized Then - SaveSetting App.Title, "Settings", "MainLeft", Me.Left - SaveSetting App.Title, "Settings", "MainTop", Me.Top - SaveSetting App.Title, "Settings", "MainWidth", Me.Width - SaveSetting App.Title, "Settings", "MainHeight", Me.Height - End If -End Sub - -Private Sub Form_Resize() - On Error Resume Next - If Me.Width < 3000 Then Me.Width = 3000 - SizeControls imgSplitter.Left -End Sub - -Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) - With imgSplitter - picSplitter.Move .Left, .Top, .Width \ 2, .Height - 20 - End With - picSplitter.Visible = True - mbMoving = True -End Sub - -Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) - Dim sglPos As Single - - - If mbMoving Then - sglPos = X + imgSplitter.Left - If sglPos < sglSplitLimit Then - picSplitter.Left = sglSplitLimit - ElseIf sglPos > Me.Width - sglSplitLimit Then - picSplitter.Left = Me.Width - sglSplitLimit - Else - picSplitter.Left = sglPos - End If - End If -End Sub - - -Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) - SizeControls picSplitter.Left - picSplitter.Visible = False - mbMoving = False -End Sub - - -Private Sub TreeView1_DragDrop(Source As Control, X As Single, Y As Single) - If Source = imgSplitter Then - SizeControls X - End If -End Sub - - -Sub SizeControls(X As Single) - On Error Resume Next - - 'set the width - If X < 1500 Then X = 1500 - If X > (Me.Width - 1500) Then X = Me.Width - 1500 - tvTreeView.Width = X - imgSplitter.Left = X - - Dim t_left, t_width As Integer - t_left = X + 40 - t_width = Me.Width - (tvTreeView.Width + 140) - - lblTitle(0).Width = tvTreeView.Width - lblTitle(1).Left = t_left + 20 - lblTitle(1).Width = t_width - 40 - - - 'set the top - If tbToolBar.Visible Then - tvTreeView.Top = tbToolBar.Height + picTitles.Height - Else - tvTreeView.Top = picTitles.Height - End If - - - 'set the height - If sbStatusBar.Visible Then - tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height + sbStatusBar.Height) - Else - tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height) - End If - - - imgSplitter.Top = tvTreeView.Top - imgSplitter.Height = tvTreeView.Height - - setListDimensions t_left, t_width, tvTreeView.Top, tvTreeView.Height -End Sub - -Private Sub setListView(ByVal f_View As Integer) - lvComputers.View = f_View - lvProcesses.View = f_View -End Sub - -Private Sub setListDimensions(ByVal f_Left As Integer, ByVal f_Width As Integer, ByVal f_Top As Integer, ByVal f_Height As Integer) - With lvComputers - .Left = f_Left - .Width = f_Width - .Top = f_Top - .Height = f_Height - End With - With lvProcesses - .Left = f_Left - .Width = f_Width - .Top = f_Top - .Height = f_Height - End With - With lvDatabases - .Left = f_Left - .Width = f_Width - .Top = f_Top - .Height = f_Height - End With -End Sub - -Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button) - On Error Resume Next - Select Case Button.Key - Case "New database" - 'ToDo: Add 'Back' button code. - mnuPopNewDatabase_Click - Case "Add computer" - 'ToDo: Add 'Forward' button code. - frmNewComputer.Show vbModal, Me - Dim c As Computer - For Each c In frmNewComputer.m_hosts - addComputer c - g_computers.Add c, "_" & c.m_name - Next - Case "Properties" - mnuFileProperties_Click - End Select -End Sub - -Private Sub mnuHelpAbout_Click() - frmAbout.Show vbModal, Me -End Sub - -Private Sub mnuHelpSearchForHelpOn_Click() - Dim nRet As Integer - - - 'if there is no helpfile for this project display a message to the user - 'you can set the HelpFile for your application in the - 'Project Properties dialog - If Len(App.HelpFile) = 0 Then - MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption - Else - On Error Resume Next - nRet = OSWinHelp(Me.hwnd, App.HelpFile, 261, 0) - If Err Then - MsgBox Err.Description - End If - End If - -End Sub - -Private Sub mnuHelpContents_Click() - Dim nRet As Integer - - - 'if there is no helpfile for this project display a message to the user - 'you can set the HelpFile for your application in the - 'Project Properties dialog - If Len(App.HelpFile) = 0 Then - MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption - Else - On Error Resume Next - nRet = OSWinHelp(Me.hwnd, App.HelpFile, 3, 0) - If Err Then - MsgBox Err.Description - End If - End If - -End Sub - - -Private Sub mnuViewWebBrowser_Click() - 'ToDo: Add 'mnuViewWebBrowser_Click' code. - MsgBox "Add 'mnuViewWebBrowser_Click' code." -End Sub - -Private Sub mnuViewOptions_Click() - frmOptions.Show vbModal, Me -End Sub - -Private Sub mnuViewRefresh_Click() - 'ToDo: Add 'mnuViewRefresh_Click' code. - MsgBox "Add 'mnuViewRefresh_Click' code." -End Sub - - -Private Sub mnuViewStatusBar_Click() - mnuViewStatusBar.Checked = Not mnuViewStatusBar.Checked - sbStatusBar.Visible = mnuViewStatusBar.Checked - SizeControls imgSplitter.Left -End Sub - -Private Sub mnuViewToolbar_Click() - mnuViewToolbar.Checked = Not mnuViewToolbar.Checked - tbToolBar.Visible = mnuViewToolbar.Checked - SizeControls imgSplitter.Left -End Sub - -Private Sub mnuEditInvertSelection_Click() - 'ToDo: Add 'mnuEditInvertSelection_Click' code. - MsgBox "Add 'mnuEditInvertSelection_Click' code." -End Sub - -Private Sub mnuEditSelectAll_Click() - 'ToDo: Add 'mnuEditSelectAll_Click' code. - MsgBox "Add 'mnuEditSelectAll_Click' code." -End Sub - -Private Sub mnuEditPasteSpecial_Click() - 'ToDo: Add 'mnuEditPasteSpecial_Click' code. - MsgBox "Add 'mnuEditPasteSpecial_Click' code." -End Sub - -Private Sub mnuEditPaste_Click() - 'ToDo: Add 'mnuEditPaste_Click' code. - MsgBox "Add 'mnuEditPaste_Click' code." -End Sub - -Private Sub mnuEditCopy_Click() - 'ToDo: Add 'mnuEditCopy_Click' code. - MsgBox "Add 'mnuEditCopy_Click' code." -End Sub - -Private Sub mnuEditCut_Click() - 'ToDo: Add 'mnuEditCut_Click' code. - MsgBox "Add 'mnuEditCut_Click' code." -End Sub - -Private Sub mnuEditUndo_Click() - 'ToDo: Add 'mnuEditUndo_Click' code. - MsgBox "Add 'mnuEditUndo_Click' code." -End Sub - -Private Sub mnuFileClose_Click() - 'unload the form - Unload Me - -End Sub - -Private Sub mnuFileProperties_Click() - 'ToDo: Add 'mnuFileProperties_Click' code. - MsgBox "Add 'mnuFileProperties_Click' code." -End Sub - -Private Sub mnuFileRename_Click() - 'ToDo: Add 'mnuFileRename_Click' code. - MsgBox "Add 'mnuFileRename_Click' code." -End Sub - -Private Sub mnuFileDelete_Click() - 'ToDo: Add 'mnuFileDelete_Click' code. - MsgBox "Add 'mnuFileDelete_Click' code." -End Sub - -Private Sub mnuFileNew_Click() - 'ToDo: Add 'mnuFileNew_Click' code. - MsgBox "Add 'mnuFileNew_Click' code." -End Sub - -Private Sub mnuFileSendTo_Click() - 'ToDo: Add 'mnuFileSendTo_Click' code. - MsgBox "Add 'mnuFileSendTo_Click' code." -End Sub - -Private Sub mnuFileFind_Click() - 'ToDo: Add 'mnuFileFind_Click' code. - MsgBox "Add 'mnuFileFind_Click' code." -End Sub - -Private Sub mnuFileOpen_Click() - Dim sFile As String -End Sub - -Private Sub mnuPopComputerProperties_Click() - mnuFileProperties_Click -End Sub - -Private Sub mnuPopNewDatabase_Click() - frmNewDatabase1.Show vbModal, Me - frmNewDatabase2.Show vbModal, Me - frmNewDatabase3.Show vbModal, Me -End Sub - -Private Sub mnuPopAddComputer_Click() - frmNewComputer.Show vbModal, Me - Dim c As Computer - For Each c In frmNewComputer.m_hosts - addComputer c - g_computers.Add c, "_" & c.m_name - Next -End Sub - -Private Sub mnuPopSortComputers_Click() - If m_currentNode.Sorted = True Then - mnuPopSortComputers.Checked = False - m_currentNode.Sorted = False - Else - mnuPopSortComputers.Checked = True - m_currentNode.Sorted = True - End If -End Sub - -Private Sub mnuPopRemoveComputer_Click() - Dim res As VbMsgBoxResult - Dim str As String - str = "Remove computer " & m_currentComputer.m_name - res = MsgBox(str, vbOKCancel, str) - If res = vbOK Then - removeComputer (m_currentComputer.m_name) - End If -End Sub - -Private Sub mnuPopSortDatabases_Click() - If m_currentNode.Sorted = True Then - mnuPopSortDatabases.Checked = False - m_currentNode.Sorted = False - Else - mnuPopSortDatabases.Checked = True - m_currentNode.Sorted = True - End If -End Sub - -Private Sub tvTreeView_BeforeLabelEdit(Cancel As Integer) - Cancel = True -End Sub - -Private Sub tvTreeView_Collapse(ByVal Node As MSComctlLib.Node) - 'MsgBox "tvTreeView_Collapse" -End Sub - -Private Sub tvTreeView_Expand(ByVal Node As MSComctlLib.Node) - 'MsgBox "tvTreeView_Expand" -End Sub - -Private Sub tvTreeView_NodeClick(ByVal Node As MSComctlLib.Node) - selectNode Node -End Sub - -Private Sub tvTreeView_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) - 'MsgBox "tvTreeView_MouseUp Button: " & Button & " Shift: " & Shift - Dim Node As MSComctlLib.Node - Dim place As Integer - - Set Node = tvTreeView.HitTest(X, Y) - place = selectNode(Node) - If Button = vbRightButton Then - ShowPopup place - End If -End Sub - -Private Function selectNode(ByRef n As MSComctlLib.Node) As Integer - Dim list As ListView - Dim place As Integer - - If n Is Nothing Then - If Not m_currentNode Is Nothing Then - place = 1 - m_currentNode.Selected = False - Else - place = 2 - End If - Else - n.Selected = True - If n.Text = "Computers" Then - place = 3 - Set list = lvComputers - lblTitle(1).Caption = "Computers" - ElseIf n.Text = "Databases" Then - place = 4 - Set list = lvDatabases - lblTitle(1).Caption = "Databases" - ElseIf n.Parent.Text = "Computers" Then - place = 5 - Set list = lvProcesses - setComputer (n.Key) - ElseIf n.Parent.Text = "Databases" Then - place = 6 - Set list = lvProcesses - setDatabase (n.Key) - End If - - If m_currentList.hwnd <> list.hwnd Then - m_currentList.Visible = False - list.Visible = True - Set m_currentList = list - End If - End If - Set m_currentNode = n - selectNode = place -End Function - -Private Sub lvComputers_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) - Dim li As ListItem - Set li = lvComputers.HitTest(X, Y) - If Button = vbRightButton And Not li Is Nothing Then - Dim c As Computer - Set m_currentComputer = g_computers(li.Key) - ShowPopup 5 - End If -End Sub - -Private Sub ShowPopup(ByVal place As Integer) - Select Case place - Case 3 - PopupMenu mnuPopComputers - Case 4 - PopupMenu mnuPopDatabases - Case 5 - mnuPopComputerName.Caption = m_currentComputer.m_name & ": " & m_currentComputer.m_status - Select Case m_currentComputer.m_status - Case "Connected" - mnuPopConnectComputer.Enabled = False - mnuPopDisconnectComputer.Enabled = True - Case "Connecting" - mnuPopConnectComputer.Enabled = False - mnuPopDisconnectComputer.Enabled = True - Case "Not connected" - mnuPopConnectComputer.Enabled = True - mnuPopDisconnectComputer.Enabled = False - Case "No contact" - mnuPopConnectComputer.Enabled = True - mnuPopDisconnectComputer.Enabled = False - Case Else - mnuPopConnectComputer.Enabled = False - mnuPopDisconnectComputer.Enabled = False - End Select - - PopupMenu mnuPopComputer, , , , mnuPopComputerName - End Select -End Sub - -Private Sub lvComputers_BeforeLabelEdit(Cancel As Integer) - Cancel = True -End Sub - -Private Sub lvProcesses_BeforeLabelEdit(Cancel As Integer) - Cancel = True -End Sub - -Private Sub lvDatabases_BeforeLabelEdit(Cancel As Integer) - Cancel = True -End Sub - -Private Sub ColumnClick(ByRef list As ListView, i As Integer) - i = i - 1 - If list.SortKey = i Then - list.SortOrder = 1 - list.SortOrder - Else - list.SortKey = i - End If -End Sub - -Private Sub lvComputers_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader) - ColumnClick lvComputers, ColumnHeader.Index -End Sub - -Private Sub lvProcesses_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader) - ColumnClick lvProcesses, ColumnHeader.Index -End Sub - -Private Sub lvDatabases_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader) - ColumnClick lvDatabases, ColumnHeader.Index -End Sub - diff --git a/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frm b/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frm deleted file mode 100644 index eae5802493c..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frm +++ /dev/null @@ -1,124 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmNewComputer - Caption = "Add computer" - ClientHeight = 1545 - ClientLeft = 60 - ClientTop = 345 - ClientWidth = 4605 - LinkTopic = "Form1" - ScaleHeight = 1545 - ScaleWidth = 4605 - StartUpPosition = 3 'Windows Default - Begin VB.CommandButton Command3 - Caption = "Apply" - Default = -1 'True - Height = 360 - Left = 3240 - TabIndex = 4 - Tag = "OK" - Top = 840 - Width = 1140 - End - Begin VB.CommandButton Command2 - Caption = "Cancel" - Height = 360 - Left = 1920 - TabIndex = 3 - Tag = "OK" - Top = 840 - Width = 1140 - End - Begin VB.CommandButton Command1 - Caption = "OK" - Height = 360 - Left = 600 - TabIndex = 2 - Tag = "OK" - Top = 840 - Width = 1140 - End - Begin VB.TextBox Text1 - Height = 285 - Left = 1440 - TabIndex = 1 - Top = 240 - Width = 2925 - End - Begin VB.Label lblLabels - Caption = "Computer name:" - Height = 255 - Index = 1 - Left = 120 - TabIndex = 0 - Tag = "&User Name:" - Top = 240 - Width = 1440 - End -End -Attribute VB_Name = "frmNewComputer" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Public m_hosts As New Collection - -Private Sub Form_Load() - If m_hosts.Count > 0 Then - For i = m_hosts.Count To 1 Step -1 - m_hosts.Remove i - Next - End If -End Sub - -Private Sub Command1_Click() - If Text1.Text = "" Then - MsgBox "Invalid hostname" - Exit Sub - End If - - If Exists(g_computers, "_" & Text1.Text) Then - MsgBox Text1.Text & " already exists" - Exit Sub - End If - - Dim c As New Computer - With c - .m_ip = "" - .m_name = Text1.Text - .m_status = "Not connected" - Set .m_processes = New Collection - End With - - m_hosts.Add c - - Unload Me -End Sub - -Private Sub Command2_Click() - Unload Me -End Sub - -Private Sub Command3_Click() - If Text1.Text = "" Then - MsgBox "Invalid hostname" - Exit Sub - End If - - If Exists(g_computers, "_" & Text1.Text) Then - MsgBox Text1.Text & " already exists" - Exit Sub - End If - - Dim c As New Computer - With c - .m_ip = "" - .m_name = Text1.Text - .m_status = "Not connected" - Set .m_processes = New Collection - End With - - m_hosts.Add c - - Text1.Text = "" -End Sub - diff --git a/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frx b/ndb/src/cw/cpcc-win32/vb6/frmNewComputer.frx deleted file mode 100644 index 593f4708db84ac8fd0f5cc47c634f38c013fe9e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4 LcmZQzU|;|M00aO5 diff --git a/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase.frx b/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase.frx deleted file mode 100644 index b20c2b651ae30922e10c956dab3f94549db23433..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12 Qcmd;JU|`580TMs}00#H~=>Px# diff --git a/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase1.frm b/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase1.frm deleted file mode 100644 index 3fa1fd4c4e8..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase1.frm +++ /dev/null @@ -1,187 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmNewDatabase1 - BorderStyle = 5 'Sizable ToolWindow - Caption = "Nodes" - ClientHeight = 3000 - ClientLeft = 2850 - ClientTop = 3450 - ClientWidth = 6240 - LinkTopic = "Form1" - MaxButton = 0 'False - MinButton = 0 'False - ScaleHeight = 3281.25 - ScaleMode = 0 'User - ScaleWidth = 6359.712 - ShowInTaskbar = 0 'False - StartUpPosition = 2 'CenterScreen - Begin VB.TextBox textApiNodes - Height = 285 - Left = 2760 - TabIndex = 12 - Text = "4" - Top = 1665 - Width = 375 - End - Begin VB.VScrollBar VScroll1 - Height = 255 - Left = 3240 - TabIndex = 11 - Top = 1680 - Width = 135 - End - Begin VB.OptionButton Option4 - Alignment = 1 'Right Justify - Caption = "1" - Height = 375 - Left = 2760 - TabIndex = 10 - Top = 1020 - Width = 375 - End - Begin VB.OptionButton Option3 - Alignment = 1 'Right Justify - Caption = "4" - Height = 375 - Left = 3960 - TabIndex = 9 - Top = 360 - Width = 375 - End - Begin VB.OptionButton Option2 - Alignment = 1 'Right Justify - Caption = "2" - Height = 375 - Left = 3360 - TabIndex = 8 - Top = 360 - Width = 375 - End - Begin VB.OptionButton Option1 - Alignment = 1 'Right Justify - Caption = "1" - Height = 375 - Left = 2760 - TabIndex = 7 - Top = 360 - Value = -1 'True - Width = 375 - End - Begin VB.CommandButton cmdCancel - Cancel = -1 'True - Caption = "Cancel" - Height = 305 - Left = 1320 - TabIndex = 3 - Top = 2400 - Width = 1140 - End - Begin VB.CommandButton cmdFinish - Caption = "Finish" - Enabled = 0 'False - Height = 305 - Left = 5040 - TabIndex = 2 - Top = 2400 - Width = 1140 - End - Begin VB.CommandButton cmdBack - Caption = "Back" - Default = -1 'True - Enabled = 0 'False - Height = 305 - Left = 2640 - TabIndex = 0 - Top = 2400 - Width = 1140 - End - Begin VB.CommandButton cmdNext - Caption = "Next" - Height = 305 - Left = 3720 - TabIndex = 1 - Top = 2400 - Width = 1140 - End - Begin VB.Label Label3 - Caption = "No of api nodes" - Height = 255 - Left = 240 - TabIndex = 6 - Top = 1680 - Width = 2415 - End - Begin VB.Label Label2 - Caption = "No of management nodes" - Height = 255 - Left = 240 - TabIndex = 5 - Top = 1080 - Width = 2415 - End - Begin VB.Label Label1 - Caption = "No of database nodes" - Height = 255 - Left = 240 - TabIndex = 4 - Top = 420 - Width = 2415 - End - Begin VB.Line Line1 - BorderColor = &H80000003& - X1 = 122.302 - X2 = 6237.41 - Y1 = 2493.75 - Y2 = 2493.75 - End -End -Attribute VB_Name = "frmNewDatabase1" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub Form_Resize() - If Me.Width < 6375 Then Me.Width = 6375 - cmdCancel.Left = Me.ScaleWidth - 5136 + 400 - cmdBack.Left = Me.ScaleWidth - 3897 + 400 - cmdNext.Left = Me.ScaleWidth - 2883 + 400 - cmdFinish.Left = Me.ScaleWidth - 1643 + 400 - Line1.X2 = Me.ScaleWidth - 480 + 400 - - cmdCancel.Top = Me.ScaleHeight - 375 - cmdBack.Top = Me.ScaleHeight - 375 - cmdNext.Top = Me.ScaleHeight - 375 - cmdFinish.Top = Me.ScaleHeight - 375 - Line1.Y1 = Me.ScaleHeight - 475 - Line1.Y2 = Me.ScaleHeight - 475 -End Sub - -Private Sub cmdCancel_Click() - 'set the global var to false - 'to denote a failed login - Unload Me -End Sub - -Private Sub Option1_Click() - Option2.Value = False - Option3.Value = False -End Sub - -Private Sub Option2_Click() - Option1.Value = False - Option3.Value = False -End Sub - -Private Sub Option3_Click() - Option1.Value = False - Option2.Value = False -End Sub - -Private Sub Option4_Click() - Option4.Value = True -End Sub - -Private Sub textApiNodes_Validate(Cancel As Boolean) - 'If Not isnumber(textApiNodes.Text) Then Cancel = False -End Sub diff --git a/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.frm b/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.frm deleted file mode 100644 index 49806a695ea..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.frm +++ /dev/null @@ -1,136 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmNewDatabase2 - BorderStyle = 5 'Sizable ToolWindow - Caption = "Computers" - ClientHeight = 2895 - ClientLeft = 2850 - ClientTop = 3450 - ClientWidth = 6240 - LinkTopic = "Form1" - MaxButton = 0 'False - MinButton = 0 'False - ScaleHeight = 3166.406 - ScaleMode = 0 'User - ScaleWidth = 6359.712 - ShowInTaskbar = 0 'False - StartUpPosition = 2 'CenterScreen - Begin VB.ComboBox Combo1 - Height = 315 - Left = 2400 - TabIndex = 7 - Text = "Combo1" - Top = 360 - Width = 1455 - End - Begin VB.VScrollBar VScroll2 - Height = 255 - Left = 4560 - TabIndex = 6 - Top = 375 - Width = 135 - End - Begin VB.TextBox Text1 - Height = 285 - Left = 4080 - TabIndex = 5 - Text = "4" - Top = 360 - Width = 375 - End - Begin VB.CommandButton cmdCancel - Cancel = -1 'True - Caption = "Cancel" - Height = 305 - Left = 1320 - TabIndex = 3 - Top = 2400 - Width = 1140 - End - Begin VB.CommandButton cmdFinish - Caption = "Finish" - Enabled = 0 'False - Height = 305 - Left = 5040 - TabIndex = 2 - Top = 2400 - Width = 1140 - End - Begin VB.CommandButton cmdBack - Caption = "Back" - Default = -1 'True - Enabled = 0 'False - Height = 305 - Left = 2640 - TabIndex = 0 - Top = 2400 - Width = 1140 - End - Begin VB.CommandButton cmdNext - Caption = "Next" - Height = 305 - Left = 3720 - TabIndex = 1 - Top = 2400 - Width = 1140 - End - Begin VB.Label Label5 - Caption = "Computer" - Height = 255 - Left = 2400 - TabIndex = 9 - Top = 0 - Width = 975 - End - Begin VB.Label Label4 - Caption = "Node id" - Height = 255 - Left = 4080 - TabIndex = 8 - Top = 120 - Width = 615 - End - Begin VB.Label Label1 - Caption = "Database node 1" - Height = 255 - Left = 240 - TabIndex = 4 - Top = 420 - Width = 2415 - End - Begin VB.Line Line1 - BorderColor = &H80000003& - X1 = 122.302 - X2 = 6237.41 - Y1 = 2493.75 - Y2 = 2493.75 - End -End -Attribute VB_Name = "frmNewDatabase2" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub Form_Resize() - If Me.Width < 6375 Then Me.Width = 6375 - cmdCancel.Left = Me.ScaleWidth - 5136 + 400 - cmdBack.Left = Me.ScaleWidth - 3897 + 400 - cmdNext.Left = Me.ScaleWidth - 2883 + 400 - cmdFinish.Left = Me.ScaleWidth - 1643 + 400 - Line1.X2 = Me.ScaleWidth - 480 + 400 - - cmdCancel.Top = Me.ScaleHeight - 375 - cmdBack.Top = Me.ScaleHeight - 375 - cmdNext.Top = Me.ScaleHeight - 375 - cmdFinish.Top = Me.ScaleHeight - 375 - Line1.Y1 = Me.ScaleHeight - 475 - Line1.Y2 = Me.ScaleHeight - 475 -End Sub - -Private Sub cmdCancel_Click() - 'set the global var to false - 'to denote a failed login - Unload Me -End Sub - diff --git a/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.log b/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.log deleted file mode 100644 index 808b21866e5..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase2.log +++ /dev/null @@ -1 +0,0 @@ -Line 2: The Form or MDIForm name frmNewDatabase1 is already in use; cannot load this form. diff --git a/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase3.frm b/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase3.frm deleted file mode 100644 index ba050a58a09..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/frmNewDatabase3.frm +++ /dev/null @@ -1,88 +0,0 @@ -VERSION 5.00 -Begin VB.Form frmNewDatabase3 - BorderStyle = 5 'Sizable ToolWindow - Caption = "Database configuration" - ClientHeight = 3000 - ClientLeft = 2850 - ClientTop = 3450 - ClientWidth = 6240 - LinkTopic = "Form1" - MaxButton = 0 'False - MinButton = 0 'False - ScaleHeight = 3281.25 - ScaleMode = 0 'User - ScaleWidth = 6359.712 - ShowInTaskbar = 0 'False - StartUpPosition = 2 'CenterScreen - Begin VB.CommandButton cmdCancel - Cancel = -1 'True - Caption = "Cancel" - Height = 305 - Left = 1320 - TabIndex = 3 - Top = 2400 - Width = 1140 - End - Begin VB.CommandButton cmdFinish - Caption = "Finish" - Enabled = 0 'False - Height = 305 - Left = 5040 - TabIndex = 2 - Top = 2400 - Width = 1140 - End - Begin VB.CommandButton cmdBack - Caption = "Back" - Default = -1 'True - Enabled = 0 'False - Height = 305 - Left = 2640 - TabIndex = 0 - Top = 2400 - Width = 1140 - End - Begin VB.CommandButton cmdNext - Caption = "Next" - Height = 305 - Left = 3720 - TabIndex = 1 - Top = 2400 - Width = 1140 - End - Begin VB.Line Line1 - BorderColor = &H80000003& - X1 = 122.302 - X2 = 6237.41 - Y1 = 2493.75 - Y2 = 2493.75 - End -End -Attribute VB_Name = "frmNewDatabase3" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Explicit - -Private Sub Form_Resize() - If Me.Width < 6375 Then Me.Width = 6375 - cmdCancel.Left = Me.ScaleWidth - 5136 + 400 - cmdBack.Left = Me.ScaleWidth - 3897 + 400 - cmdNext.Left = Me.ScaleWidth - 2883 + 400 - cmdFinish.Left = Me.ScaleWidth - 1643 + 400 - Line1.X2 = Me.ScaleWidth - 480 + 400 - - cmdCancel.Top = Me.ScaleHeight - 375 - cmdBack.Top = Me.ScaleHeight - 375 - cmdNext.Top = Me.ScaleHeight - 375 - cmdFinish.Top = Me.ScaleHeight - 375 - Line1.Y1 = Me.ScaleHeight - 475 - Line1.Y2 = Me.ScaleHeight - 475 -End Sub - -Private Sub cmdCancel_Click() - 'set the global var to false - 'to denote a failed login - Unload Me -End Sub diff --git a/ndb/src/cw/cpcc-win32/vb6/frmOptions.frm b/ndb/src/cw/cpcc-win32/vb6/frmOptions.frm deleted file mode 100644 index e526a35b3ec..00000000000 --- a/ndb/src/cw/cpcc-win32/vb6/frmOptions.frm +++ /dev/null @@ -1,231 +0,0 @@ -VERSION 5.00 -Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx" -Begin VB.Form frmOptions - BorderStyle = 3 'Fixed Dialog - Caption = "Options" - ClientHeight = 5040 - ClientLeft = 6600 - ClientTop = 4575 - ClientWidth = 6150 - KeyPreview = -1 'True - LinkTopic = "Form1" - MaxButton = 0 'False - MinButton = 0 'False - ScaleHeight = 5040 - ScaleWidth = 6150 - ShowInTaskbar = 0 'False - Tag = "Options" - Begin VB.CommandButton cmdOK - Caption = "OK" - Height = 375 - Left = 2490 - TabIndex = 1 - Tag = "OK" - Top = 4455 - Width = 1095 - End - Begin VB.CommandButton cmdCancel - Cancel = -1 'True - Caption = "Cancel" - Height = 375 - Left = 3720 - TabIndex = 3 - Tag = "Cancel" - Top = 4455 - Width = 1095 - End - Begin VB.CommandButton cmdApply - Caption = "&Apply" - Height = 375 - Left = 4920 - TabIndex = 5 - Tag = "&Apply" - Top = 4455 - Width = 1095 - End - Begin VB.PictureBox picOptions - BorderStyle = 0 'None - Height = 3780 - Index = 3 - Left = -20000 - ScaleHeight = 3840.968 - ScaleMode = 0 'User - ScaleWidth = 5745.64 - TabIndex = 7 - TabStop = 0 'False - Top = 480 - Width = 5685 - Begin VB.Frame fraSample4 - Caption = "Sample 4" - Height = 2022 - Left = 505 - TabIndex = 11 - Tag = "Sample 4" - Top = 502 - Width = 2033 - End - End - Begin VB.PictureBox picOptions - BorderStyle = 0 'None - Height = 3780 - Index = 2 - Left = -20000 - ScaleHeight = 3840.968 - ScaleMode = 0 'User - ScaleWidth = 5745.64 - TabIndex = 9 - TabStop = 0 'False - Top = 480 - Width = 5685 - Begin VB.Frame fraSample3 - Caption = "Sample 3" - Height = 2022 - Left = 406 - TabIndex = 10 - Tag = "Sample 3" - Top = 403 - Width = 2033 - End - End - Begin VB.PictureBox picOptions - BorderStyle = 0 'None - Height = 3780 - Index = 1 - Left = -20000 - ScaleHeight = 3840.968 - ScaleMode = 0 'User - ScaleWidth = 5745.64 - TabIndex = 6 - TabStop = 0 'False - Top = 480 - Width = 5685 - Begin VB.Frame fraSample2 - Caption = "Sample 2" - Height = 2022 - Left = 307 - TabIndex = 8 - Tag = "Sample 2" - Top = 305 - Width = 2033 - End - End - Begin VB.PictureBox picOptions - BorderStyle = 0 'None - Height = 3780 - Index = 0 - Left = 210 - ScaleHeight = 3840.968 - ScaleMode = 0 'User - ScaleWidth = 5745.64 - TabIndex = 2 - TabStop = 0 'False - Top = 480 - Width = 5685 - Begin VB.Frame fraSample1 - Caption = "Sample 1" - Height = 2022 - Left = 208 - TabIndex = 4 - Tag = "Sample 1" - Top = 207 - Width = 2033 - End - End - Begin MSComctlLib.TabStrip tbsOptions - Height = 4245 - Left = 105 - TabIndex = 0 - Top = 120 - Width = 5895 - _ExtentX = 10398 - _ExtentY = 7488 - _Version = 393216 - BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} - NumTabs = 4 - BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} - Caption = "Group 1" - ImageVarType = 2 - EndProperty - BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} - Caption = "Group 2" - ImageVarType = 2 - EndProperty - BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628} - Caption = "Group 3" - ImageVarType = 2 - EndProperty - BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628} - Caption = "Group 4" - ImageVarType = 2 - EndProperty - EndProperty - End -End -Attribute VB_Name = "frmOptions" -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = False -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Private Sub cmdApply_Click() - 'ToDo: Add 'cmdApply_Click' code. - MsgBox "Apply Code goes here to set options w/o closing dialog!" -End Sub - - -Private Sub cmdCancel_Click() - Unload Me -End Sub - - -Private Sub cmdOK_Click() - 'ToDo: Add 'cmdOK_Click' code. - MsgBox "Code goes here to set options and close dialog!" - Unload Me -End Sub - - -Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) - Dim i As Integer - i = tbsOptions.SelectedItem.Index - 'handle ctrl+tab to move to the next tab - If (Shift And 3) = 2 And KeyCode = vbKeyTab Then - If i = tbsOptions.Tabs.Count Then - 'last tab so we need to wrap to tab 1 - Set tbsOptions.SelectedItem = tbsOptions.Tabs(1) - Else - 'increment the tab - Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1) - End If - ElseIf (Shift And 3) = 3 And KeyCode = vbKeyTab Then - If i = 1 Then - 'last tab so we need to wrap to tab 1 - Set tbsOptions.SelectedItem = tbsOptions.Tabs(tbsOptions.Tabs.Count) - Else - 'increment the tab - Set tbsOptions.SelectedItem = tbsOptions.Tabs(i - 1) - End If - End If -End Sub - - - - -Private Sub tbsOptions_Click() - - - Dim i As Integer - 'show and enable the selected tab's controls - 'and hide and disable all others - For i = 0 To tbsOptions.Tabs.Count - 1 - If i = tbsOptions.SelectedItem.Index - 1 Then - picOptions(i).Left = 210 - picOptions(i).Enabled = True - Else - picOptions(i).Left = -20000 - picOptions(i).Enabled = False - End If - Next - - -End Sub - diff --git a/ndb/src/cw/cpcc-win32/vb6/frmSplash.frx b/ndb/src/cw/cpcc-win32/vb6/frmSplash.frx deleted file mode 100644 index fee0c5c59def9107d7ecd1ac309e7482b3f79706..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 70450 zcmeI5&6VRe5QMcUcrT8?&nNrl0DN~QKKiZ*_C05?H=j3y-J`Q`3Y&opX~gCS3LqLF z$dSn6(~OE>qXkx>8W_(0{POX`>CeATr=P<6?|)psUyt9y*U#bWQ~3HPe0@0m7`~rQ z-+y?!eml8;`|sNqy`G(yuJB%S)Xe!Y2`%v|Lm1}C$1X_TMjC;6!#125wzmKS1ARbjjbUn&pF zdB))xm_J538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LG;1%Nq*Jl1V zBL4jOZyV%6KuIT1>C%kxtKoxa!`qZjFS|aOj8i}4>d`cA^>Z8Hae(~v`hMbUoq8na ztztV8F~9IU19N_2PtbdVMLlu>NW}cY^9)EQ)xD&p7=>`8yWP^AVrda7C*7S@HPxcr~THwZDx=@g$&3~@>A0f-ke0j z#=tZB$u@@`V0W@_Ae~hATI-(2Mi#Sg8`<5-Px6!e)XIR_$iTDs$?Dh@gui)N^%^?c zUF{D@C)K?g*AJGsy;qqDf9-jHHnKaCpX8^KpSpPHn&gbvkkn@4KEQkWX`uA>-dgLf zou$*NlTkYP>6M?fK52a_G4Q;8TBX)$eew(LjFe7Jq9$QmuTRoxB7pN$I%yvG^VDTlk66)IA6fLh=~&h<>mQjl=PB?E42SomBUdbuUNR-f z`Yu2D4cHJ#s_R4wit><74ea~7km_oDU~S0o=Ic|fP}1qPd`KtlBa-_F`DvhqWvz(i zC;2HgaUwf~?OfGs=vs_&%SS`d0X@W9mY?J&`KiPJ9W#&L(@*mw(^WDcomBVwxt=rYm{@+2 epX8^049HLNQ@`1C%r%L3EkDUm@>4$sPX7Z<8aQVF diff --git a/ndb/src/cw/cpcc-win32/vb6/networking.ico b/ndb/src/cw/cpcc-win32/vb6/networking.ico deleted file mode 100644 index 6bbf8022fc6b64107bd6cf6f3b2935155f04b369..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10134 zcmeI2O^6)F702Jko1G3;JgXdhnI(~>gY8QY+lOFskTHh%qR1DWt&19gwLw^r9gIL7 z2->-gn1Eq)GE0(m%;qAUg!ixq5lr0nP4*=Mfguj7fvg#gXNinEzxS&8dq%QMa!K@N ztE%hO`}p^(+OB>zBeEb%a^%P|?V|kSdm@pDEHAtM3kxE@d`cJ>#shgT5c&0@j=TQ3 z?~DBSha$(1`|)Q)uKY;*PXFAJ$WNaWc>$Z4ke4ay#|U4uDHh>R;@CCRT*~h5F0Brv z_9tnoR}?L@zhIPQgE(8H6_ z0rJ5Gk<8qN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g3u&n*4M?K5w_siy236>S#=Uuh%!s-oIv`wRNE-*m>l z?WC<;6ZQMgAhzCQVvUT));9JTJpqN-dtGaFvG29~w?=vE9=q&|C%nAdAzB{!ynUqL myPdR%O4n@dxVO_K|sQ?8kR~d)M|Ek$(dmh+-4~ diff --git a/ndb/src/cw/cpcc-win32/vb6/open folder.ico b/ndb/src/cw/cpcc-win32/vb6/open folder.ico deleted file mode 100644 index 7bb32cc83d35f38b8a19383cee4fcdb2a658dc59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10134 zcmeI1KZqRH9mju)F1`&?l2fB5B34vcO&FL;Rf2jMH>#Cta4B%1TQ;BpgCtO)KtM2C zP2q&3FbJtwb=t~BG_}-3aG=6Q7J2S(N`m?hz z@{}@}EK*`TODU7vsdyoBHx=KIzWnh(zCCdNAnUuop7q0*19_SC!%wna_}Qc{e|)Mh z-`>pbv1lFb-pwYrZzQx}zTc%2V*Iak!t3Qv%&T2<#R=Tdh6@mJZ{*pSI&BBxKEmNRG0$l0@J<=nY*a^b=Sxp?uS zT)lc#u3WhymoHzIOP4N5`Ntq1eH7%+@=U_ljePO!8+rESm-45-e@^(EQcx;N&jA zqa350->rqG%E6F>AqPVa27?5K91J-aaxmmzFqmM-!H|O?2SW}9gARrq3^^EbFyvs! z13Yl#;K&sR_XtoKih{ZTO97SwEH-7Z6a+5_RN%A#i!B4ff=&UJ0xY&H;3&XRfTI9M z0S;R#a1>xDz)*lem#zRu0fqt$joq;tUqa&ehp{cMt`4Y(U7=@7P3#Ix6+tTkRA8!z zT_LQ9T@kw?wrz*ShEM#8_!aSWiz?z*tW5=m3JewNpxef(*zDoZQtLLd1`Y8Vur=Ul zh-X`?I9P)Q9F5{&Vz%8FHDGDL(g30%pj`rBX)tV1YG5>A;Y+~}d(wcV(e*GadNt@S zzym`7LjXenLjXengI!KwXuuG_5WvuY0XG!%!4SX@z!1QIYYKcY1TX|J1ONo$H#iFz z29yeX6pRaS1oN#rh5SbTBG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ix`3}Uo_I%}6iTegIlDv#fX=DhdhEc5t$TThrdZ)Poy&$r3vj?cFTw~X|$N=4b8J&x-O zqs)f-tjZ_8K#EU>%Fq`$KGcV0ePh8Zp!jYKxsMa~Q+ -#include - -#include "driver.cpp" - - -BOOL APIENTRY DllMain( HANDLE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved - ) -{ - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} - - -BOOL INSTAPI ConfigDSN( - HWND hwndParent, - WORD fRequest, - LPCSTR lpszDriver, - LPCSTR lpszAttributes) -{ - const char* szDSN = "NDB"; - - switch(fRequest) - { - case ODBC_ADD_DSN: - SQLWriteDSNToIni(szDSN, lpszDriver); - break; - - case ODBC_CONFIG_DSN: - break; - - case ODBC_REMOVE_DSN: - SQLRemoveDSNFromIni(szDSN); - break; - } - - return TRUE; -} - - -int FAR PASCAL -DriverConnectProc(HWND hdlg, WORD wMsg, WPARAM wParam, LPARAM lParam) -{ - return FALSE; -} - -void __declspec( dllexport) FAR PASCAL LoadByOrdinal(void); -/* Entry point to cause DM to load using ordinals */ -void __declspec( dllexport) FAR PASCAL LoadByOrdinal(void) -{ -} - diff --git a/ndb/src/old_files/client/odbc/NdbOdbc.def b/ndb/src/old_files/client/odbc/NdbOdbc.def deleted file mode 100755 index 85619b91915..00000000000 --- a/ndb/src/old_files/client/odbc/NdbOdbc.def +++ /dev/null @@ -1,85 +0,0 @@ -LIBRARY NdbOdbc.DLL -VERSION 03.51.00 -EXPORTS -SQLAllocConnect -SQLAllocEnv -SQLAllocHandle -SQLAllocHandleStd -SQLAllocStmt -SQLBindCol -SQLBindParam -SQLBindParameter -SQLBrowseConnect -SQLBulkOperations -SQLCancel -SQLCloseCursor -SQLColAttribute -SQLColAttributes -SQLColumnPrivileges -SQLColumns -SQLConnect -SQLCopyDesc -SQLDataSources -SQLDescribeCol -SQLDescribeParam -SQLDisconnect -SQLDriverConnect -SQLDrivers -SQLEndTran -SQLError -SQLExecDirect -SQLExecute -SQLExtendedFetch -SQLFetch -SQLFetchScroll -SQLForeignKeys -SQLFreeConnect -SQLFreeEnv -SQLFreeHandle -SQLFreeStmt -SQLGetConnectAttr -SQLGetConnectOption -SQLGetCursorName -SQLGetData -SQLGetDescField -SQLGetDescRec -SQLGetDiagField -SQLGetDiagRec -SQLGetEnvAttr -SQLGetFunctions -SQLGetInfo -SQLGetStmtAttr -SQLGetStmtOption -SQLGetTypeInfo -SQLMoreResults -SQLNativeSql -SQLNumParams -SQLNumResultCols -SQLParamData -SQLParamOptions -SQLPrepare -SQLPrimaryKeys -SQLProcedureColumns -SQLProcedures -SQLPutData -SQLRowCount -SQLSetConnectAttr -SQLSetConnectOption -SQLSetCursorName -SQLSetDescField -SQLSetDescRec -SQLSetEnvAttr -SQLSetParam -SQLSetPos -SQLSetScrollOptions -SQLSetStmtAttr -SQLSetStmtOption -SQLSpecialColumns -SQLStatistics -SQLTablePrivileges -SQLTables -SQLTransact -DllMain -DriverConnectProc -ConfigDSN -LoadByOrdinal diff --git a/ndb/src/old_files/client/odbc/codegen/CodeGen.cpp b/ndb/src/old_files/client/odbc/codegen/CodeGen.cpp deleted file mode 100644 index 6be78b62bd9..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/CodeGen.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "CodeGen.hpp" -#include "Code_root.hpp" - -#include -#include "SimpleParser.hpp" - -void -CodeGen::prepare(Ctx& ctx) -{ - parse(ctx); - if (! ctx.ok()) - return; - analyze(ctx); - if (! ctx.ok()) - return; - describe(ctx); -} - -void -CodeGen::execute(Ctx& ctx) -{ - DescArea& ipd = m_stmtArea.descArea(Desc_usage_IPD); - if (m_stmtArea.m_unbound) { - analyze(ctx); - if (! ctx.ok()) - return; - describe(ctx); - if (! ctx.ok()) - return; - if (m_stmtArea.m_unbound) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "%u input parameters have unbound SQL type", m_stmtArea.m_unbound); - return; - } - ipd.setBound(true); - } - if (! ipd.isBound()) { - ctx_log2(("IPD changed between executes - reanalyze")); - // jdbc can change parameter length at each execute - analyze(ctx); - if (! ctx.ok()) - return; - describe(ctx); - if (! ctx.ok()) - return; - freeExec(ctx); - codegen(ctx); - if (! ctx.ok()) - return; - alloc(ctx); - if (! ctx.ok()) - return; - ipd.setBound(true); - } - if (m_stmtArea.m_execTree == 0) { - codegen(ctx); - if (! ctx.ok()) - return; - alloc(ctx); - if (! ctx.ok()) - return; - } - Executor executor(m_stmtArea); - executor.execute(ctx); -} - -void -CodeGen::fetch(Ctx& ctx) -{ - // XXX parameter types are not checked any more - ctx_assert(! m_stmtArea.m_unbound); - Executor executor(m_stmtArea); - executor.fetch(ctx); -} - -void -CodeGen::parse(Ctx& ctx) -{ - Plan_root* planRoot = new Plan_root(m_stmtArea); - SimpleParser simpleParser(ctx, m_stmtArea, planRoot); - simpleParser.yyparse(); - if (! ctx.ok()) - return; - planRoot->m_paramList.resize(1 + simpleParser.paramNumber()); - ctx_log2(("CodeGen: parse done - plan tree follows")); - if (ctx.logLevel() >= 2) - planRoot->print(ctx); - m_stmtArea.m_planTree = planRoot; -} - -void -CodeGen::analyze(Ctx& ctx) -{ - Plan_root* planRoot = static_cast(m_stmtArea.m_planTree); - ctx_assert(planRoot != 0); - Plan_base::Ctl ctl(0); - planRoot->analyze(ctx, ctl); // returns itself - if (! ctx.ok()) - return; - ctx_log2(("CodeGen: analyze done - plan tree follows")); - if (ctx.logLevel() >= 2) - planRoot->print(ctx); -} - -void -CodeGen::describe(Ctx& ctx) -{ - Plan_root* planRoot = static_cast(m_stmtArea.m_planTree); - ctx_assert(planRoot != 0); - planRoot->describe(ctx); - ctx_log2(("CodeGen: describe done")); -} - -void -CodeGen::codegen(Ctx& ctx) -{ - Plan_root* planRoot = static_cast(m_stmtArea.m_planTree); - ctx_assert(planRoot != 0); - Plan_base::Ctl ctl(0); - Exec_root* execRoot = static_cast(planRoot->codegen(ctx, ctl)); - if (! ctx.ok()) - return; - ctx_assert(execRoot != 0); - ctx_log2(("CodeGen: codegen done - code tree follows")); - if (ctx.logLevel() >= 2) - execRoot->print(ctx); - m_stmtArea.m_execTree = execRoot; -} - -void -CodeGen::alloc(Ctx& ctx) -{ - Exec_root* execRoot = static_cast(m_stmtArea.m_execTree); - ctx_assert(execRoot != 0); - Exec_base::Ctl ctl(0); - execRoot->alloc(ctx, ctl); - if (! ctx.ok()) - return; - ctx_log2(("CodeGen: alloc done")); -} - -void -CodeGen::close(Ctx& ctx) -{ - Exec_root* execRoot = static_cast(m_stmtArea.m_execTree); - if (execRoot != 0) { - execRoot->close(ctx); - ctx_log2(("CodeGen: close done")); - } -} - -void -CodeGen::free(Ctx& ctx) -{ - freePlan(ctx); - freeExec(ctx); -} - -void -CodeGen::freePlan(Ctx & ctx) -{ - if (m_stmtArea.m_planTree != 0) { - Plan_root* planRoot = static_cast(m_stmtArea.m_planTree); - ctx_assert(planRoot != 0); - unsigned count = 1 + planRoot->m_nodeList.size(); - planRoot->freeNodeList(); - delete planRoot; - m_stmtArea.m_planTree = 0; - ctx_log3(("CodeGen: freed %u plan tree nodes", count)); - } -} - -void -CodeGen::freeExec(Ctx & ctx) -{ - if (m_stmtArea.m_execTree != 0) { - Exec_root* execRoot = static_cast(m_stmtArea.m_execTree); - ctx_assert(execRoot != 0); - unsigned count = 1 + execRoot->m_nodeList.size(); - execRoot->freeNodeList(); - delete execRoot; - m_stmtArea.m_execTree = 0; - ctx_log3(("CodeGen: freed %u exec tree nodes", count)); - } -} - -// odbc support - -void -CodeGen::sqlGetData(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind) -{ - Exec_root* execRoot = static_cast(m_stmtArea.m_execTree); - ctx_assert(execRoot != 0); - execRoot->sqlGetData(ctx, columnNumber, targetType, targetValue, bufferLength, strlen_or_Ind); -} - -void -CodeGen::sqlParamData(Ctx& ctx, SQLPOINTER* value) -{ - Exec_root* execRoot = static_cast(m_stmtArea.m_execTree); - ctx_assert(execRoot != 0); - execRoot->sqlParamData(ctx, value); -} - -void -CodeGen::sqlPutData(Ctx& ctx, SQLPOINTER data, SQLINTEGER strlen_or_Ind) -{ - Exec_root* execRoot = static_cast(m_stmtArea.m_execTree); - ctx_assert(execRoot != 0); - execRoot->sqlPutData(ctx, data, strlen_or_Ind); -} diff --git a/ndb/src/old_files/client/odbc/codegen/CodeGen.hpp b/ndb/src/old_files/client/odbc/codegen/CodeGen.hpp deleted file mode 100644 index ae61dab0c2a..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/CodeGen.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_CodeGen_hpp -#define ODBC_CODEGEN_CodeGen_hpp - -#include - -class StmtArea; -class SqlField; -class ExtField; - -/** - * @class CodeGen - * @brief Compiles SQL text into ExecTree::Code - */ -class CodeGen { -public: - CodeGen(StmtArea& stmtArea); - ~CodeGen(); - // parse and analyze SQL statement - void prepare(Ctx& ctx); - // these are passed to Executor - void execute(Ctx& ctx); - void fetch(Ctx& ctx); - // close statement (mainly scan) - void close(Ctx& ctx); - // free data structures - void free(Ctx& ctx); - // odbc support - void sqlGetData(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind); - void sqlParamData(Ctx& ctx, SQLPOINTER* value); - void sqlPutData(Ctx& ctx, SQLPOINTER data, SQLINTEGER strlen_or_Ind); -private: - void parse(Ctx& ctx); - void analyze(Ctx& ctx); - void describe(Ctx& ctx); - void codegen(Ctx& ctx); - void alloc(Ctx& ctx); - void freePlan(Ctx& ctx); - void freeExec(Ctx& ctx); - StmtArea& m_stmtArea; -}; - -inline -CodeGen::CodeGen(StmtArea& stmtArea) : - m_stmtArea(stmtArea) -{ -} - -inline -CodeGen::~CodeGen() -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_base.cpp b/ndb/src/old_files/client/odbc/codegen/Code_base.cpp deleted file mode 100644 index dc02e071156..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_base.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_base.hpp" -#include "Code_root.hpp" - -// Plan_base - -Plan_base::~Plan_base() -{ -} - -StmtArea& -Plan_base::stmtArea() const -{ - ctx_assert(m_root != 0); - return m_root->m_stmtArea; -} - -DescArea& -Plan_base::descArea(DescUsage u) const -{ - return stmtArea().descArea(u); -} - -ConnArea& -Plan_base::connArea() const -{ - return stmtArea().connArea(); -} - -DictCatalog& -Plan_base::dictCatalog() const -{ - return connArea().dictCatalog(); -} - -DictSchema& -Plan_base::dictSchema() const -{ - return connArea().dictSchema(); -} - -Ndb* -Plan_base::ndbObject() const -{ - Ndb* ndb = connArea().ndbObject(); - ctx_assert(ndb != 0); - return ndb; -} - -NdbSchemaCon* -Plan_base::ndbSchemaCon() const -{ - NdbSchemaCon* ndbSchemaCon = connArea().ndbSchemaCon(); - ctx_assert(ndbSchemaCon != 0); - return ndbSchemaCon; -} - -NdbConnection* -Plan_base::ndbConnection() const -{ - NdbConnection* ndbConnection = connArea().ndbConnection(); - ctx_assert(ndbConnection != 0); - return ndbConnection; -} - -void -Plan_base::printList(Ctx& ctx, Plan_base* a[], unsigned n) -{ - for (unsigned i = 0; i < n; i++) { - if (a[i] == 0) - ctx.print(" -"); - else - a[i]->print(ctx); - } -} - -// Exec_base - -Exec_base::Code::~Code() -{ -} - -Exec_base::Data::~Data() -{ -} - -Exec_base::~Exec_base() -{ - delete m_code; // remove when code becomes shared - m_code = 0; - delete m_data; - m_data = 0; -} - -StmtArea& -Exec_base::stmtArea() const -{ - ctx_assert(m_root != 0); - return m_root->m_stmtArea; -} - -DescArea& -Exec_base::descArea(DescUsage u) const -{ - return stmtArea().descArea(u); -} - -ConnArea& -Exec_base::connArea() const -{ - return stmtArea().connArea(); -} - -DictSchema& -Exec_base::dictSchema() const -{ - return connArea().dictSchema(); -} - -Ndb* -Exec_base::ndbObject() const -{ - Ndb* ndb = connArea().ndbObject(); - ctx_assert(ndb != 0); - return ndb; -} - -NdbSchemaCon* -Exec_base::ndbSchemaCon() const -{ - NdbSchemaCon* ndbSchemaCon = connArea().ndbSchemaCon(); - ctx_assert(ndbSchemaCon != 0); - return ndbSchemaCon; -} - -NdbConnection* -Exec_base::ndbConnection() const -{ - NdbConnection* ndbConnection = connArea().ndbConnection(); - ctx_assert(ndbConnection != 0); - return ndbConnection; -} - -void -Exec_base::printList(Ctx& ctx, Exec_base* a[], unsigned n) -{ - for (unsigned i = 0; i < n; i++) { - ctx_assert(a[i] != 0); - a[i]->print(ctx); - } -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_base.hpp b/ndb/src/old_files/client/odbc/codegen/Code_base.hpp deleted file mode 100644 index c67c0ca7adb..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_base.hpp +++ /dev/null @@ -1,237 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_base_hpp -#define ODBC_CODEGEN_Code_base_hpp - -#include -#include -#include -#include -#include -#include - -class Ctx; -class ConnArea; -class StmtArea; -class DescArea; -class DictCatalog; -class DictSchema; -class ResultArea; -class ResultSet; -class SpecRow; -class Ndb; -class NdbSchemaCon; -class NdbConnection; -class NdbOperation; -class NdbScanFilter; - -class Plan_root; -class Plan_table; -class Plan_column; -class Plan_expr; -class Plan_expr_param; -class Plan_pred; -class Plan_dml_row; -class Plan_dml_column; -class Plan_ddl_column; -class Plan_ddl_constr; -class Plan_idx_column; -class Exec_root; -class Exec_base; -class Exec_query; -class Exec_expr; -class Exec_expr_row; -class Exec_expr_param; - -/** - * @class Plan_base - * @brief Base class for plan trees - */ -class Plan_base : public PlanTree { -public: - Plan_base(Plan_root* root); - virtual ~Plan_base() = 0; - // get references to StmtArea via Plan_root - StmtArea& stmtArea() const; - DescArea& descArea(DescUsage u) const; - ConnArea& connArea() const; - // catalogs - DictCatalog& dictCatalog() const; - DictSchema& dictSchema() const; - // ndb - Ndb* ndbObject() const; - NdbSchemaCon* ndbSchemaCon() const; - NdbConnection* ndbConnection() const; - // containers for Plan classes - typedef std::vector TableVector; - typedef std::vector ColumnVector; - typedef std::vector DmlColumnVector; - typedef std::vector DdlColumnVector; - typedef std::vector DdlConstrVector; - typedef std::vector IdxColumnVector; - typedef std::vector ExprVector; - typedef std::list ExprList; - typedef std::vector ExprListVector; - typedef std::list PredList; - typedef std::set TableSet; - typedef std::vector ParamVector; - // control area on the stack XXX needs to be designed - struct Ctl { - Ctl(Ctl* up); - Ctl* m_up; // up the stack - // analyze - TableVector m_tableList; // resolve column names - bool m_topand; // in top-level where clause - bool m_extra; // anything but single pk=expr - bool m_aggrok; // aggregate allowed - bool m_aggrin; // within aggregate args - bool m_const; // only constants in set clause - PredList m_topcomp; // top level comparisons - Plan_dml_row *m_dmlRow; // row type to convert to - Plan_table* m_topTable; // top level table for interpreted progs - bool m_having; // in having-predicate - // codegen - Exec_root* m_execRoot; // root of Exec tree - const Exec_query* m_execQuery; // pass to column - }; - // semantic analysis and optimization - virtual Plan_base* analyze(Ctx& ctx, Ctl& ctl) = 0; - // generate "executable" code - virtual Exec_base* codegen(Ctx& ctx, Ctl& ctl) = 0; - // misc - virtual void print(Ctx& ctx) = 0; -protected: - Plan_root* m_root; - void printList(Ctx& ctx, Plan_base* a[], unsigned n); -}; - -inline -Plan_base::Plan_base(Plan_root* root) : - m_root(root) -{ - ctx_assert(m_root != 0); -} - -inline -Plan_base::Ctl::Ctl(Ctl* up) : - m_up(up), - m_tableList(1), // 1-based - m_topand(false), - m_extra(false), - m_aggrok(false), - m_aggrin(false), - m_dmlRow(0), - m_topTable(0), - m_having(false), - m_execRoot(0), - m_execQuery(0) -{ -} - -/** - * @class Exec_base - * @brief Base class for exec trees - */ -class Exec_base : public ExecTree { -public: - class Code : public ExecTree::Code { - public: - virtual ~Code() = 0; - }; - class Data : public ExecTree::Data { - public: - virtual ~Data() = 0; - }; - Exec_base(Exec_root* root); - virtual ~Exec_base() = 0; - // get references to StmtArea via Exec_root - virtual StmtArea& stmtArea() const; - DescArea& descArea(DescUsage u) const; - ConnArea& connArea() const; - // catalogs - DictSchema& dictSchema() const; - // ndb - Ndb* ndbObject() const; - NdbSchemaCon* ndbSchemaCon() const; - NdbConnection* ndbConnection() const; - // containers for Exec classes - typedef std::vector ExprVector; - typedef std::vector ParamVector; - // control area on the stack - struct Ctl { - Ctl(Ctl* up); - Ctl* m_up; // up the stack - const Exec_query* m_query; // pass Data - ExprVector m_exprList; // pass Data - NdbOperation* m_scanOp; // scan operation - bool m_postEval; // for rownum - unsigned m_groupIndex; // for group by - bool m_groupInit; // first in group - Exec_expr_row* m_sortRow; // from sort to group by - NdbScanFilter* m_scanFilter; // scan filter - }; - // allocate and deallocate Data instances - virtual void alloc(Ctx& ctx, Ctl& ctl) = 0; - virtual void close(Ctx& ctx) = 0; - // set Code and Data - void setCode(const Code& code); - void setData(Data& data); - // misc - virtual void print(Ctx& ctx) = 0; -protected: - const Code* m_code; - Data* m_data; - Exec_root* m_root; - void printList(Ctx& ctx, Exec_base* a[], unsigned n); -}; - -inline -Exec_base::Exec_base(Exec_root* root) : - m_code(0), - m_data(0), - m_root(root) -{ - ctx_assert(m_root != 0); -} - -inline void -Exec_base::setCode(const Code& code) -{ - ctx_assert(m_code == 0); - m_code = &code; -} - -inline void -Exec_base::setData(Data& data) -{ - ctx_assert(m_data == 0); - m_data = &data; -} - -inline -Exec_base::Ctl::Ctl(Ctl* up) : - m_up(up), - m_scanOp(0), - m_postEval(false), - m_groupIndex(0), - m_groupInit(false), - m_sortRow(0), - m_scanFilter(0) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_column.cpp b/ndb/src/old_files/client/odbc/codegen/Code_column.cpp deleted file mode 100644 index c4c0480a5e7..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_column.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include "Code_column.hpp" -#include "Code_table_list.hpp" -#include "Code_table.hpp" - -// Plan_column - -Plan_column::~Plan_column() -{ -} - -void -Plan_column::analyzeColumn(Ctx& ctx, Plan_base::Ctl& ctl) -{ - if (m_resTable != 0) // done on previous pass - return; - if (! (ctl.m_tableList.size() > 1)) { - ctx.pushStatus(Sqlstate::_42000, Error::Gen, "column %s not allowed here", getPrintName()); - return; - } - unsigned resCount = 0; - for (unsigned i = 1; i < ctl.m_tableList.size(); i++) { - Plan_table* table = ctl.m_tableList[i]; - ctx_assert(table != 0); - int ret = table->resolveColumn(ctx, this); - if (ret < 0) - return; - if (ret) - resCount++; - } - if (resCount == 0) { - // XXX try to strip "schema name" from table name - for (unsigned i = 1; i < ctl.m_tableList.size(); i++) { - Plan_table* table = ctl.m_tableList[i]; - ctx_assert(table != 0); - int ret = table->resolveColumn(ctx, this, true); - if (ret < 0) - return; - if (ret) - resCount++; - } - } - if (resCount == 0) { - ctx.pushStatus(Sqlstate::_42S22, Error::Gen, "column %s not found", getPrintName()); - return; - } - if (resCount > 1) { - ctx.pushStatus(Error::Gen, "column %s is ambiguous", getPrintName()); - return; - } - // copy SQL type - m_sqlType = dictColumn().sqlType(); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_column.hpp b/ndb/src/old_files/client/odbc/codegen/Code_column.hpp deleted file mode 100644 index af0dcea690d..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_column.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_column_hpp -#define ODBC_CODEGEN_Code_column_hpp - -#include -#include -#include "Code_base.hpp" - -class DictColumn; -class Plan_table; - -/** - * @class Plan_column - * @brief Abstract base class for columns - */ -class Plan_column { -public: - enum Type { - Type_expr = 1, - Type_dml = 2, - Type_ddl = 3, // new columns in create table - Type_idx = 4 // old columns in create index - }; - Plan_column(Type type, const BaseString& name); - virtual ~Plan_column() = 0; - void analyzeColumn(Ctx& ctx, Plan_base::Ctl& ctl); - // attributes - const BaseString& getName() const; - const BaseString& getCname() const; - const char* getPrintName() const; - void setCname(const BaseString& cname); - const DictColumn& dictColumn() const; - const SqlType& sqlType() const; -protected: - friend class Plan_table; - friend class Plan_comp_op; - Type m_type; - BaseString m_name; - BaseString m_cname; - BaseString m_printName; - DictColumn* m_dictColumn; - /** - * Resolve to table and operational position (for example - * column number in scan query). - */ - Plan_table* m_resTable; - unsigned m_resPos; - SqlType m_sqlType; -}; - -inline -Plan_column::Plan_column(Type type, const BaseString& name) : - m_type(type), - m_name(name), - m_printName(name), - m_dictColumn(0), - m_resTable(0), - m_resPos(0) -{ -} - -inline const BaseString& -Plan_column::getName() const -{ - return m_name; -} - -inline const BaseString& -Plan_column::getCname() const -{ - return m_cname; -} - -inline const char* -Plan_column::getPrintName() const -{ - return m_printName.c_str(); -} - -inline void -Plan_column::setCname(const BaseString& cname) -{ - m_cname.assign(cname); - if (m_cname.empty()) - m_printName.assign(m_name); - else { - m_printName.assign(m_cname); - m_printName.append("."); - m_printName.append(m_name); - } -} - -inline const DictColumn& -Plan_column::dictColumn() const -{ - ctx_assert(m_dictColumn != 0); - return *m_dictColumn; -} - -inline const SqlType& -Plan_column::sqlType() const -{ - ctx_assert(m_sqlType.type() != SqlType::Undef); - return m_sqlType; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_comp_op.cpp b/ndb/src/old_files/client/odbc/codegen/Code_comp_op.cpp deleted file mode 100644 index 7782ed1ea2a..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_comp_op.cpp +++ /dev/null @@ -1,485 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_pred.hpp" -#include "Code_comp_op.hpp" -#include "Code_expr_conv.hpp" -#include "Code_expr_column.hpp" -#include "Code_table.hpp" -#include "Code_root.hpp" - -// Comp_op - -const char* -Comp_op::name() const -{ - switch (m_opcode) { - case Eq: - return "="; - case Noteq: - return "!="; - case Lt: - return "<"; - case Lteq: - return "<="; - case Gt: - return ">"; - case Gteq: - return ">="; - case Like: - return "like"; - case Notlike: - return "not like"; - case Isnull: - return "is null"; - case Isnotnull: - return "is not null"; - } - ctx_assert(false); - return ""; -} - -unsigned -Comp_op::arity() const -{ - switch (m_opcode) { - case Eq: - case Noteq: - case Lt: - case Lteq: - case Gt: - case Gteq: - case Like: - case Notlike: - return 2; - case Isnull: - case Isnotnull: - return 1; - } - ctx_assert(false); - return 0; -} - -// Plan_comp_op - -Plan_comp_op::~Plan_comp_op() -{ -} - -Plan_base* -Plan_comp_op::analyze(Ctx& ctx, Ctl& ctl) -{ - m_exec = 0; - const unsigned arity = m_op.arity(); - // analyze operands - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - m_expr[i]->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } - // for each operand, find type to convert to - SqlType con[1 + 2]; - if (arity == 1) { - const SqlType& t1 = m_expr[1]->sqlType(); - switch (t1.type()) { - case SqlType::Char: - case SqlType::Varchar: - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - case SqlType::Real: - case SqlType::Double: - case SqlType::Datetime: - case SqlType::Null: - case SqlType::Unbound: - con[1] = t1; - break; - default: - break; - } - if (con[1].type() == SqlType::Undef) { - char b1[40]; - t1.print(b1, sizeof(b1)); - ctx.pushStatus(Error::Gen, "type mismatch in comparison: %s %s", b1, m_op.name()); - return 0; - } - } else if (arity == 2) { - const SqlType& t1 = m_expr[1]->sqlType(); - const SqlType& t2 = m_expr[2]->sqlType(); - switch (t1.type()) { - case SqlType::Char: - switch (t2.type()) { - case SqlType::Char: - case SqlType::Varchar: - case SqlType::Null: - con[1] = t1; - con[2] = t2; - break; - case SqlType::Unbound: - con[1] = con[2] = t2; - break; - default: - break; - } - break; - case SqlType::Varchar: - switch (t2.type()) { - case SqlType::Char: - case SqlType::Varchar: - case SqlType::Null: - con[1] = t1; - con[2] = t2; - break; - case SqlType::Unbound: - con[1] = con[2] = t2; - break; - default: - break; - } - break; - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - switch (t2.type()) { - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - // conversion would mask primary key optimization - con[1] = t1; - con[2] = t2; - break; - case SqlType::Real: - case SqlType::Double: - con[1].setType(ctx, SqlType::Double); - con[2] = con[1]; - break; - case SqlType::Null: - con[1] = t1; - con[2] = t2; - break; - case SqlType::Unbound: - con[1] = con[2] = t2; - break; - default: - break; - } - break; - case SqlType::Real: - case SqlType::Double: - switch (t2.type()) { - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - case SqlType::Real: - case SqlType::Double: - con[1].setType(ctx, SqlType::Double); - con[2] = con[1]; - break; - case SqlType::Null: - con[1] = t1; - con[2] = t2; - break; - case SqlType::Unbound: - con[1] = con[2] = t2; - break; - default: - break; - } - break; - case SqlType::Datetime: - switch (t2.type()) { - case SqlType::Datetime: - con[1] = t1; - con[2] = t2; - break; - case SqlType::Unbound: - con[1] = con[2] = t2; - break; - default: - break; - } - break; - case SqlType::Null: - switch (t2.type()) { - case SqlType::Char: - case SqlType::Varchar: - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - case SqlType::Real: - case SqlType::Double: - case SqlType::Datetime: - con[1] = t1; - con[2] = t2; - break; - case SqlType::Unbound: - con[1] = con[2] = t2; - break; - default: - break; - } - break; - case SqlType::Unbound: - con[1] = con[2] = t1; - break; - default: - break; - } - if (con[1].type() == SqlType::Undef || con[2].type() == SqlType::Undef) { - char b1[40], b2[40]; - t1.print(b1, sizeof(b1)); - t2.print(b2, sizeof(b2)); - ctx.pushStatus(Error::Gen, "type mismatch in comparison: %s %s %s", b1, m_op.name(), b2); - return 0; - } - } else { - ctx_assert(false); - return 0; - } - if (! ctx.ok()) - return 0; - // insert required conversions - for (unsigned i = 1; i <= arity; i++) { - if (con[i].type() == SqlType::Unbound) { - continue; - } - Plan_expr_conv* exprConv = new Plan_expr_conv(m_root, con[i]); - m_root->saveNode(exprConv); - exprConv->setExpr(m_expr[i]); - m_expr[i] = static_cast(exprConv->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_expr[i] != 0); - } - // look for column=expr - if (ctl.m_topand && m_op.m_opcode == Comp_op::Eq) { - ctx_assert(arity == 2); - for (unsigned i = 1, j = 2; i <= 2; i++, j--) { - if (m_expr[i]->type() != Plan_expr::TypeColumn) - continue; - Plan_expr_column* column = static_cast(m_expr[i]); - if (! column->resolveEq(ctx, m_expr[j])) - ctl.m_extra = true; - } - } else { - ctl.m_extra = true; - } - // save top level comparison on list - if (ctl.m_topand) { - ctl.m_topcomp.push_back(this); - } - // table dependencies are union from operands - m_tableSet.clear(); - for (unsigned i = 1; i <= arity; i++) { - const TableSet& ts = m_expr[i]->tableSet(); - m_tableSet.insert(ts.begin(), ts.end()); - } - // set of tables for which interpreter cannot be used - m_noInterp.clear(); - // convenient -#undef ustype -#define ustype(b, n) (((b) ? 1 : 0) * 100 + (n)) - if (arity == 1) { - for (unsigned i = 1; i <= 1; i++) { - const SqlType t1 = m_expr[i]->sqlType(); - switch (m_op.m_opcode) { - case Comp_op::Isnull: - case Comp_op::Isnotnull: - if (m_expr[i]->type() == Plan_expr::TypeColumn) { - switch (ustype(t1.unSigned(), t1.type())) { - // all types accepted now - default: - { - Plan_expr_column* column = static_cast(m_expr[i]); - ctx_assert(column->m_resTable != 0); - m_interpColumn[i] = column; - continue; // ok - } - break; - } - } - break; - default: - break; - } - const TableSet& ts = m_expr[i]->tableSet(); - m_noInterp.insert(ts.begin(), ts.end()); - } - } else if (arity == 2) { - for (unsigned i = 1, j = 2; i <= 2; i++, j--) { - const SqlType t1 = m_expr[i]->sqlType(); - switch (m_op.m_opcode) { - case Comp_op::Like: - case Comp_op::Notlike: - if (i == 2) // col like val but not val like col - break; - /*FALLTHRU*/ - case Comp_op::Eq: - case Comp_op::Noteq: - case Comp_op::Lt: - case Comp_op::Lteq: - case Comp_op::Gt: - case Comp_op::Gteq: - if (m_expr[i]->type() == Plan_expr::TypeColumn) { - switch (ustype(t1.unSigned(), t1.type())) { - case ustype(false, SqlType::Char): - case ustype(false, SqlType::Varchar): - case ustype(true, SqlType::Smallint): - case ustype(true, SqlType::Integer): - case ustype(true, SqlType::Bigint): - { - Plan_expr_column* column = static_cast(m_expr[i]); - ctx_assert(column->m_resTable != 0); - const TableSet& ts = m_expr[j]->tableSet(); - if (ts.find(column->m_resTable) == ts.end()) { - // candidate for column=const - m_interpColumn[i] = column; - continue; // ok - } - } - break; - default: - break; - } - } - break; - default: - break; - } - const TableSet& ts = m_expr[i]->tableSet(); - m_noInterp.insert(ts.begin(), ts.end()); - } - } else { - ctx_assert(false); - return 0; - } -#undef ustype - return this; -} - -Exec_base* -Plan_comp_op::codegen(Ctx& ctx, Ctl& ctl) -{ - if (m_exec != 0) - return m_exec; - const unsigned arity = m_op.arity(); - Exec_comp_op* exec = new Exec_comp_op(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // create code for operands - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - Exec_expr* execExpr = static_cast(m_expr[i]->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - exec->setExpr(i, execExpr); - } - // create the code - Exec_comp_op::Code& code = *new Exec_comp_op::Code(m_op); - // interpreted column=const - if (! ctl.m_having) { - ctx_assert(ctl.m_topTable != 0); - for (unsigned i = 1; i <= arity; i++) { - Plan_expr_column* column = m_interpColumn[i]; - if (column == 0) - continue; - ctx_assert(column->m_resTable != 0); - if (column->m_resTable != ctl.m_topTable) - continue; - ctx_assert(code.m_interpColumn == 0); - code.m_interpColumn = i; - code.m_interpAttrId = column->dictColumn().getAttrId(); - ctx_log2(("can use interpreter on %s", column->getPrintName())); - } - } - exec->setCode(code); - m_exec = exec; - return exec; -} - -void -Plan_comp_op::print(Ctx& ctx) -{ - ctx.print(" [%s", m_op.name()); - Plan_base* a[] = { m_expr[1], m_expr[2] }; - printList(ctx, a, m_op.arity()); - ctx.print("]"); -} - -bool -Plan_comp_op::isGroupBy(const Plan_expr_row* row) const -{ - const unsigned arity = m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - if (! m_expr[i]->isGroupBy(row)) - return false; - } - return true; -} - -// Code_comp_op - -Exec_comp_op::Code::~Code() -{ -} - -Exec_comp_op::Data::~Data() -{ -} - -Exec_comp_op::~Exec_comp_op() -{ -} - -void -Exec_comp_op::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // allocate subexpressions - unsigned arity = code.m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - m_expr[i]->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - Data& data = *new Data; - setData(data); -} - -void -Exec_comp_op::close(Ctx& ctx) -{ - const Code& code = getCode(); - unsigned arity = code.m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - m_expr[i]->close(ctx); - } -} - -void -Exec_comp_op::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [%s", code.m_op.name()); - Exec_base* a[] = { m_expr[1], m_expr[2] }; - printList(ctx, a, code.m_op.arity()); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_comp_op.hpp b/ndb/src/old_files/client/odbc/codegen/Code_comp_op.hpp deleted file mode 100644 index 0585ab1dabf..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_comp_op.hpp +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_comp_op_hpp -#define ODBC_CODEGEN_Code_comp_op_hpp - -#include -#include -#include "Code_pred.hpp" -#include "Code_expr.hpp" -#include "Code_expr_column.hpp" - -/** - * @class Comp_op - * @brief Comparison operations - */ -struct Comp_op { - enum Opcode { - Eq = 1, // binary - Noteq, - Lt, - Lteq, - Gt, - Gteq, - Like, - Notlike, - Isnull, // unary - Isnotnull - }; - Comp_op(Opcode opcode); - const char* name() const; - unsigned arity() const; - Opcode m_opcode; -}; - -inline -Comp_op::Comp_op(Opcode opcode) : - m_opcode(opcode) -{ -} - -/** - * @class Plan_comp_op - * @brief Comparison operator node in PlanTree - */ -class Plan_comp_op : public Plan_pred { -public: - Plan_comp_op(Plan_root* root, Comp_op op); - virtual ~Plan_comp_op(); - void setExpr(unsigned i, Plan_expr* expr); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - virtual bool isGroupBy(const Plan_expr_row* row) const; -protected: - Comp_op m_op; - Plan_expr* m_expr[1 + 2]; - Plan_expr_column* m_interpColumn[1 + 2]; // candidates -}; - -inline -Plan_comp_op::Plan_comp_op(Plan_root* root, Comp_op op) : - Plan_pred(root, TypeComp), - m_op(op) -{ - m_expr[0] = m_expr[1] = m_expr[2] = 0; - m_interpColumn[0] = m_interpColumn[1] = m_interpColumn[2] = 0; -} - -inline void -Plan_comp_op::setExpr(unsigned i, Plan_expr* expr) -{ - ctx_assert(1 <= i && i <= 2); - m_expr[i] = expr; -} - -/** - * @class Exec_comp_op - * @brief Comparison operator node in ExecTree - */ -class Exec_comp_op : public Exec_pred { -public: - class Code : public Exec_pred::Code { - public: - Code(Comp_op op); - virtual ~Code(); - protected: - friend class Plan_comp_op; - friend class Exec_comp_op; - Comp_op m_op; - unsigned m_interpColumn; // 1 or 2 if interpreted column, 0 if both constant - NdbAttrId m_interpAttrId; - }; - class Data : public Exec_pred::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_comp_op; - }; - Exec_comp_op(Exec_root* root); - virtual ~Exec_comp_op(); - void alloc(Ctx& ctx, Ctl& ctl); - void execInterp(Ctx& ctx, Ctl& ctl); - void evaluate(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setExpr(unsigned i, Exec_expr* expr); -protected: - Exec_expr* m_expr[1 + 2]; -}; - -inline -Exec_comp_op::Code::Code(Comp_op op) : - m_op(op), - m_interpColumn(0), - m_interpAttrId((NdbAttrId)-1) -{ -} - -inline -Exec_comp_op::Data::Data() -{ -} - -inline -Exec_comp_op::Exec_comp_op(Exec_root* root) : - Exec_pred(root) -{ - m_expr[0] = m_expr[1] = m_expr[2] = 0; -} - -// children - -inline const Exec_comp_op::Code& -Exec_comp_op::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_comp_op::Data& -Exec_comp_op::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_comp_op::setExpr(unsigned i, Exec_expr* expr) -{ - ctx_assert(1 <= i && i <= 2 && m_expr[i] == 0); - m_expr[i] = expr; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_create_index.cpp b/ndb/src/old_files/client/odbc/codegen/Code_create_index.cpp deleted file mode 100644 index 84f319338a4..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_create_index.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_create_index.hpp" -#include "Code_root.hpp" - -// Plan_create_index - -Plan_create_index::~Plan_create_index() -{ -} - -Plan_base* -Plan_create_index::analyze(Ctx& ctx, Ctl& ctl) -{ - stmtArea().stmtInfo().setName(Stmt_name_create_index); - // analyze the table - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - // analyze the columns - ctl.m_tableList.resize(1 + 1); // indexed from 1 - ctl.m_tableList[1] = m_table; - for (unsigned i = 1, n = countColumn(); i <= n; i++) { - Plan_idx_column* column = getColumn(i); - column->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } - return this; -} - -void -Plan_create_index::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "CREATE INDEX", SQL_DIAG_CREATE_INDEX); -} - -Exec_base* -Plan_create_index::codegen(Ctx& ctx, Ctl& ctl) -{ - Exec_create_index* exec = new Exec_create_index(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - const unsigned count = countColumn(); - const char** attrList = new const char* [1 + count]; - attrList[0] = 0; // unused - for (unsigned i = 1; i <= count; i++) { - Plan_idx_column* column = getColumn(i); - const char* cname = column->getName().c_str(); - attrList[i] = strcpy(new char[strlen(cname) + 1], cname); - } - Exec_create_index::Code& code = *new Exec_create_index::Code(m_name, m_table->getName(), m_type, count, attrList); - exec->setCode(code); - code.m_fragmentType = m_fragmentType; - code.m_logging = m_logging; - return exec; -} - -void -Plan_create_index::print(Ctx& ctx) -{ - ctx.print(" [create_index name=%s table=%s type=%d", m_name.c_str(), m_table->getName().c_str(), (int)m_type); - ctx.print(" ["); - for (unsigned i = 1; i <= countColumn(); i++) { - Plan_idx_column* column = getColumn(i); - if (i > 1) - ctx.print(" "); - column->print(ctx); - } - ctx.print("]"); -} - -// Exec_create_index - -Exec_create_index::Code::~Code() -{ - for (unsigned i = 1; i <= m_attrCount; i++) { - delete[] m_attrList[i]; - m_attrList[i] = 0; - } - delete[] m_attrList; -} - -Exec_create_index::Data::~Data() -{ -} - -Exec_create_index::~Exec_create_index() -{ -} - -void -Exec_create_index::alloc(Ctx& ctx, Ctl& ctl) -{ - Data& data = *new Data; - setData(data); -} - -void -Exec_create_index::close(Ctx& ctx) -{ -} - -void -Exec_create_index::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [create_index %s]", code.m_tableName.c_str()); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_create_index.hpp b/ndb/src/old_files/client/odbc/codegen/Code_create_index.hpp deleted file mode 100644 index ebd757e1118..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_create_index.hpp +++ /dev/null @@ -1,203 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_create_index_hpp -#define ODBC_CODEGEN_Code_create_index_hpp - -#include -#include -#include -#include "Code_ddl.hpp" -#include "Code_table.hpp" -#include "Code_idx_column.hpp" - -class DictTable; -class DictColumn; - -/** - * @class Plan_create_index - * @brief Create table in PlanTree - */ -class Plan_create_index : public Plan_ddl { -public: - Plan_create_index(Plan_root* root, const BaseString& name); - virtual ~Plan_create_index(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void describe(Ctx & ctx); - void print(Ctx& ctx); - // attributes - const BaseString& getName() const; - // children - void setType(NdbDictionary::Object::Type type); - void setTable(Plan_table* table); - unsigned countColumn() const; - void addColumn(Plan_idx_column* column); - Plan_idx_column* getColumn(unsigned i) const; - void setFragmentType(NdbDictionary::Object::FragmentType fragmentType); - void setLogging(bool logging); -protected: - BaseString m_name; - NdbDictionary::Object::Type m_type; - Plan_table* m_table; - IdxColumnVector m_columnList; - NdbDictionary::Object::FragmentType m_fragmentType; - bool m_logging; -}; - -inline -Plan_create_index::Plan_create_index(Plan_root* root, const BaseString& name) : - Plan_ddl(root), - m_name(name), - m_type(NdbDictionary::Object::TypeUndefined), - m_columnList(1), - m_fragmentType(NdbDictionary::Object::FragUndefined), - m_logging(true) -{ -} - -inline const BaseString& -Plan_create_index::getName() const -{ - return m_name; -} - -// children - -inline void -Plan_create_index::setType(NdbDictionary::Object::Type type) -{ - m_type = type; -} - -inline void -Plan_create_index::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -inline unsigned -Plan_create_index::countColumn() const -{ - return m_columnList.size() - 1; -} - -inline void -Plan_create_index::addColumn(Plan_idx_column* column) -{ - ctx_assert(column != 0); - m_columnList.push_back(column); -} - -inline Plan_idx_column* -Plan_create_index::getColumn(unsigned i) const -{ - ctx_assert(1 <= i && i <= countColumn() && m_columnList[i] != 0); - return m_columnList[i]; -} - -inline void -Plan_create_index::setFragmentType(NdbDictionary::Object::FragmentType fragmentType) -{ - m_fragmentType = fragmentType; -} - -inline void -Plan_create_index::setLogging(bool logging) -{ - m_logging = logging; -} - -/** - * @class Exec_create_index - * @brief Create table in ExecTree - */ -class Exec_create_index : public Exec_ddl { -public: - class Code : public Exec_ddl::Code { - public: - Code(const BaseString& indexName, const BaseString& tableName, NdbDictionary::Object::Type type, unsigned attrCount, const char** attrList); - virtual ~Code(); - protected: - friend class Plan_create_index; - friend class Exec_create_index; - const BaseString m_indexName; - const BaseString m_tableName; - NdbDictionary::Object::Type m_type; - const unsigned m_attrCount; - const char** m_attrList; - NdbDictionary::Object::FragmentType m_fragmentType; - bool m_logging; - }; - class Data : public Exec_ddl::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_create_index; - }; - Exec_create_index(Exec_root* root); - virtual ~Exec_create_index(); - void alloc(Ctx& ctx, Ctl& ctl); - void execute(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_create_index::Code::Code(const BaseString& indexName, const BaseString& tableName, NdbDictionary::Object::Type type, unsigned attrCount, const char** attrList) : - m_indexName(indexName), - m_tableName(tableName), - m_type(type), - m_attrCount(attrCount), - m_attrList(attrList), - m_fragmentType(NdbDictionary::Object::FragUndefined), - m_logging(true) -{ -} - -inline -Exec_create_index::Data::Data() -{ -} - -inline -Exec_create_index::Exec_create_index(Exec_root* root) : - Exec_ddl(root) -{ -} - -// children - -inline const Exec_create_index::Code& -Exec_create_index::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_create_index::Data& -Exec_create_index::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_create_row.cpp b/ndb/src/old_files/client/odbc/codegen/Code_create_row.cpp deleted file mode 100644 index 5b90b658ed7..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_create_row.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_create_row.hpp" -#include "Code_root.hpp" - -Plan_create_row::~Plan_create_row() -{ -} - -Plan_base* -Plan_create_row::analyze(Ctx& ctx, Ctl& ctl) -{ - // check for duplicate column name - for (unsigned i = 1, n = countColumn(); i < n; i++) { - const BaseString& a = getColumn(i)->getName(); - for (unsigned i2 = i + 1; i2 <= n; i2++) { - const BaseString& a2 = getColumn(i2)->getName(); - if (strcmp(a.c_str(), a2.c_str()) == 0) { - ctx.pushStatus(Error::Gen, "duplicate column %s", a.c_str()); - return 0; - } - } - } - // move single-column primary key constraint to constraint list - for (unsigned i = 1, n = countColumn(); i <= n; i++) { - Plan_ddl_column* column = getColumn(i); - if (column->m_primaryKey) { - Plan_ddl_row* ddlRow = new Plan_ddl_row(m_root); - m_root->saveNode(ddlRow); - ddlRow->addColumn(column); - Plan_ddl_constr* constr = new Plan_ddl_constr(m_root); - m_root->saveNode(constr); - constr->setRow(ddlRow); - addConstr(constr); - column->m_primaryKey = false; // will be set again - } - } - // check primary key constraints - if (countConstr() < 1) { - ctx.pushStatus(Error::Gen, "table must have a primary key"); - return 0; - } - if (countConstr() > 1) { - ctx.pushStatus(Error::Gen, "table can have only one primary key"); - return 0; - } - Plan_ddl_row* ddlRow = getConstr(1)->getRow(); - for (unsigned i = 1, n = ddlRow->countColumn(); i <= n; i++) { - Plan_ddl_column* column = ddlRow->getColumn(i); - const BaseString& a = column->getName(); - bool found = false; - for (unsigned i2 = 1, n2 = countColumn(); i2 <= n2; i2++) { - Plan_ddl_column* column2 = getColumn(i2); - const BaseString& a2 = column2->getName(); - if (strcmp(a.c_str(), a2.c_str()) != 0) - continue; - if (column2->getPrimaryKey()) { - ctx.pushStatus(Error::Gen, "duplicate primary key constraint on %s", a.c_str()); - return 0; - } - column2->setPrimaryKey(); - found = true; - break; - } - if (! found) { - ctx.pushStatus(Error::Gen, "undefined primary key column %s", a.c_str()); - return 0; - } - } - // analyze column types - for (unsigned i = 1, n = countColumn(); i <= n; i++) { - getColumn(i)->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } - // check TupleId - unsigned tupleId = 0; - for (unsigned i = 1, n = countColumn(); i <= n; i++) { - Plan_ddl_column* column = getColumn(i); - if (! column->getTupleId()) - continue; - if (i != 1) { - ctx.pushStatus(Error::Gen, "tuple id column %u is not first column", i); - return 0; - } - if (tupleId != 0) { // cannot happen now since attr name is fixed - ctx.pushStatus(Error::Gen, "duplicate tuple id column %u", i); - return 0; - } - tupleId = i; - } - if (tupleId != 0) { - for (unsigned i = 1, n = countColumn(); i <= n; i++) { - Plan_ddl_column* column = getColumn(i); - if (i == tupleId) - continue; - if (! column->getPrimaryKey()) - continue; - ctx.pushStatus(Error::Gen, "cannot have both tuple id and other primary key column %u", i); - return 0; - } - } - // check auto-increment - unsigned autoIncrement = 0; - for (unsigned i = 1, n = countColumn(); i <= n; i++) { - Plan_ddl_column* column = getColumn(i); - if (! column->getAutoIncrement()) - continue; - if (autoIncrement != 0) { - ctx.pushStatus(Error::Gen, "duplicate auto-increment column %u", i); - return 0; - } - autoIncrement = i; - } - if (autoIncrement != 0) { - for (unsigned i = 1, n = countColumn(); i <= n; i++) { - Plan_ddl_column* column = getColumn(i); - if (i == autoIncrement) - continue; - if (! column->getPrimaryKey()) - continue; - ctx.pushStatus(Error::Gen, "cannot have both auto-increment column and other primary key column %u", i); - return 0; - } - } - return this; -} - -Exec_base* -Plan_create_row::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_create_row::print(Ctx& ctx) -{ - ctx.print(" [create_row"); - for (unsigned i = 1; i <= countColumn(); i++) { - Plan_base* a = m_columnList[i]; - printList(ctx, &a, 1); - } - for (unsigned i = 1; i <= countConstr(); i++) { - Plan_base* a = m_constrList[i]; - printList(ctx, &a, 1); - } -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_create_row.hpp b/ndb/src/old_files/client/odbc/codegen/Code_create_row.hpp deleted file mode 100644 index f03455ff28e..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_create_row.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_create_row_hpp -#define ODBC_CODEGEN_Code_create_row_hpp - -#include -#include -#include "Code_base.hpp" -#include "Code_ddl_column.hpp" -#include "Code_ddl_constr.hpp" - -/** - * @class Plan_create_row - * @brief Row of columns and constraints in create statement - */ -class Plan_create_row : public Plan_base { -public: - Plan_create_row(Plan_root* root); - virtual ~Plan_create_row(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - unsigned countColumn() const; - void addColumn(Plan_ddl_column* column); - Plan_ddl_column* getColumn(unsigned i) const; - unsigned countConstr() const; - void addConstr(Plan_ddl_constr* constr); - Plan_ddl_constr* getConstr(unsigned i) const; -protected: - DdlColumnVector m_columnList; - DdlConstrVector m_constrList; -}; - -inline -Plan_create_row::Plan_create_row(Plan_root* root) : - Plan_base(root), - m_columnList(1), - m_constrList(1) -{ -} - -// children - -inline unsigned -Plan_create_row::countColumn() const -{ - return m_columnList.size() - 1; -} - -inline void -Plan_create_row::addColumn(Plan_ddl_column* column) -{ - ctx_assert(column != 0); - m_columnList.push_back(column); -} - -inline Plan_ddl_column* -Plan_create_row::getColumn(unsigned i) const -{ - ctx_assert(1 <= i && i <= m_columnList.size() && m_columnList[i] != 0); - return m_columnList[i]; -} - -inline unsigned -Plan_create_row::countConstr() const -{ - return m_constrList.size() - 1; -} - -inline void -Plan_create_row::addConstr(Plan_ddl_constr* constr) -{ - ctx_assert(constr != 0); - m_constrList.push_back(constr); -} - -inline Plan_ddl_constr* -Plan_create_row::getConstr(unsigned i) const -{ - ctx_assert(1 <= i && i <= m_constrList.size() && m_constrList[i] != 0); - return m_constrList[i]; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_create_table.cpp b/ndb/src/old_files/client/odbc/codegen/Code_create_table.cpp deleted file mode 100644 index 14e4abbd7fe..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_create_table.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_create_table.hpp" -#include "Code_root.hpp" - -// Plan_create_table - -Plan_create_table::~Plan_create_table() -{ -} - -Plan_base* -Plan_create_table::analyze(Ctx& ctx, Ctl& ctl) -{ - stmtArea().stmtInfo().setName(Stmt_name_create_table); - // analyze the create row - ctx_assert(m_createRow != 0); - m_createRow->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -void -Plan_create_table::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "CREATE TABLE", SQL_DIAG_CREATE_TABLE); -} - -Exec_base* -Plan_create_table::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_createRow != 0); - Exec_create_table* exec = new Exec_create_table(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - const unsigned count = m_createRow->countColumn(); - Exec_create_table::Code::Attr* attrList = new Exec_create_table::Code::Attr[1 + count]; - unsigned tupleId = 0; - unsigned autoIncrement = 0; - for (unsigned i = 1; i <= count; i++) { - Plan_ddl_column* column = m_createRow->getColumn(i); - Exec_create_table::Code::Attr& attr = attrList[i]; - attr.m_attrName.assign(column->getName()); - attr.m_sqlType = column->sqlType(); - attr.m_tupleKey = column->getPrimaryKey(); - attr.m_tupleId = column->getTupleId(); - attr.m_autoIncrement = column->getAutoIncrement(); - if (attr.m_tupleId) - tupleId = i; - if (attr.m_autoIncrement) - autoIncrement = i; - attr.m_defaultValue = 0; - Plan_expr* expr; - if ((expr = column->getDefaultValue()) != 0) { - Exec_expr* execExpr = static_cast(expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - attr.m_defaultValue = execExpr; - } - } - Exec_create_table::Code& code = *new Exec_create_table::Code(m_name, count, attrList, tupleId, autoIncrement); - exec->setCode(code); - code.m_fragmentType = m_fragmentType; - code.m_logging = m_logging; - return exec; -} - -void -Plan_create_table::print(Ctx& ctx) -{ - ctx.print(" [create_table '%s'", m_name.c_str()); - Plan_base* a[] = { m_createRow }; - printList(ctx, a, 1); - ctx.print("]"); -} - -// Exec_create_table - -Exec_create_table::Code::~Code() -{ - delete[] m_attrList; -} - -Exec_create_table::Data::~Data() -{ -} - -Exec_create_table::~Exec_create_table() -{ -} - -void -Exec_create_table::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - const Code::Attr& attr = code.m_attrList[i]; - if (attr.m_defaultValue != 0) - attr.m_defaultValue->alloc(ctx, ctl); - } - Data& data = *new Data; - setData(data); -} - -void -Exec_create_table::close(Ctx& ctx) -{ - const Code& code = getCode(); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - const Code::Attr& attr = code.m_attrList[i]; - if (attr.m_defaultValue != 0) - attr.m_defaultValue->close(ctx); - } -} - -void -Exec_create_table::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [create_table %s]", code.m_tableName.c_str()); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_create_table.hpp b/ndb/src/old_files/client/odbc/codegen/Code_create_table.hpp deleted file mode 100644 index cbb2189d8ce..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_create_table.hpp +++ /dev/null @@ -1,178 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_create_table_hpp -#define ODBC_CODEGEN_Code_create_table_hpp - -#include -#include -#include "Code_ddl.hpp" -#include "Code_ddl_row.hpp" -#include "Code_create_row.hpp" - -class DictTable; -class DictColumn; - -/** - * @class Plan_create_table - * @brief Create table in PlanTree - */ -class Plan_create_table : public Plan_ddl { -public: - Plan_create_table(Plan_root* root, const BaseString& name); - virtual ~Plan_create_table(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void describe(Ctx & ctx); - void print(Ctx& ctx); - // attributes - const BaseString& getName() const; - // children - void setCreateRow(Plan_create_row* createRow); - void setFragmentType(NdbDictionary::Object::FragmentType fragmentType); - void setLogging(bool logging); -protected: - BaseString m_name; - Plan_create_row* m_createRow; - NdbDictionary::Object::FragmentType m_fragmentType; - bool m_logging; -}; - -inline -Plan_create_table::Plan_create_table(Plan_root* root, const BaseString& name) : - Plan_ddl(root), - m_name(name), - m_createRow(0), - m_fragmentType(NdbDictionary::Object::FragUndefined), - m_logging(true) -{ -} - -inline const BaseString& -Plan_create_table::getName() const -{ - return m_name; -} - -// children - -inline void -Plan_create_table::setCreateRow(Plan_create_row* createRow) -{ - ctx_assert(createRow != 0); - m_createRow = createRow; -} - -inline void -Plan_create_table::setFragmentType(NdbDictionary::Object::FragmentType fragmentType) -{ - m_fragmentType = fragmentType; -} - -inline void -Plan_create_table::setLogging(bool logging) -{ - m_logging = logging; -} - -/** - * @class Exec_create_table - * @brief Create table in ExecTree - */ -class Exec_create_table : public Exec_ddl { -public: - class Code : public Exec_ddl::Code { - public: - struct Attr { - Attr() : m_defaultValue(0) {} - BaseString m_attrName; - SqlType m_sqlType; - bool m_tupleKey; - bool m_tupleId; - bool m_autoIncrement; - Exec_expr* m_defaultValue; - }; - Code(const BaseString& tableName, unsigned attrCount, const Attr* attrList, unsigned tupleId, unsigned autoIncrement); - virtual ~Code(); - protected: - friend class Plan_create_table; - friend class Exec_create_table; - const BaseString m_tableName; - const unsigned m_attrCount; - const Attr* const m_attrList; - unsigned m_tupleId; - unsigned m_autoIncrement; - NdbDictionary::Object::FragmentType m_fragmentType; - bool m_logging; - }; - class Data : public Exec_ddl::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_create_table; - }; - Exec_create_table(Exec_root* root); - virtual ~Exec_create_table(); - void alloc(Ctx& ctx, Ctl& ctl); - void execute(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_create_table::Code::Code(const BaseString& tableName, unsigned attrCount, const Attr* attrList, unsigned tupleId, unsigned autoIncrement) : - m_tableName(tableName), - m_attrCount(attrCount), - m_attrList(attrList), - m_tupleId(tupleId), - m_autoIncrement(autoIncrement), - m_fragmentType(NdbDictionary::Object::FragUndefined), - m_logging(true) -{ -} - -inline -Exec_create_table::Data::Data() -{ -} - -inline -Exec_create_table::Exec_create_table(Exec_root* root) : - Exec_ddl(root) -{ -} - -// children - -inline const Exec_create_table::Code& -Exec_create_table::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_create_table::Data& -Exec_create_table::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_data_type.cpp b/ndb/src/old_files/client/odbc/codegen/Code_data_type.cpp deleted file mode 100644 index 1ff0fcebcbe..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_data_type.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "Code_data_type.hpp" - -// Plan_data_type - -Plan_data_type::~Plan_data_type() -{ -} - -Plan_base* -Plan_data_type::analyze(Ctx& ctx, Ctl& ctl) -{ - return this; -} - -Exec_base* -Plan_data_type::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_data_type::print(Ctx& ctx) -{ - ctx.print(" [data_type]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_data_type.hpp b/ndb/src/old_files/client/odbc/codegen/Code_data_type.hpp deleted file mode 100644 index 735dc05014f..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_data_type.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_data_type_hpp -#define ODBC_CODEGEN_Code_data_type_hpp - -#include -#include -#include "Code_base.hpp" - -/** - * @class Plan_data_type - * @brief Data type in DDL statement - * - * This is pure plan node. - */ -class Plan_data_type : public Plan_base { -public: - Plan_data_type(Plan_root* root, const SqlType& sqlType); - virtual ~Plan_data_type(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); -private: - friend class Plan_ddl_column; - SqlType m_sqlType; -}; - -inline -Plan_data_type::Plan_data_type(Plan_root* root, const SqlType& sqlType) : - Plan_base(root), - m_sqlType(sqlType) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_ddl.cpp b/ndb/src/old_files/client/odbc/codegen/Code_ddl.cpp deleted file mode 100644 index 2ba4291a0e8..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_ddl.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_ddl.hpp" - -// Plan_ddl - -Plan_ddl::~Plan_ddl() -{ -} - -// Exec_ddl - -Exec_ddl::Code::~Code() -{ -} - -Exec_ddl::Data::~Data() -{ -} - -Exec_ddl::~Exec_ddl() -{ -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_ddl.hpp b/ndb/src/old_files/client/odbc/codegen/Code_ddl.hpp deleted file mode 100644 index 1ceca62d55d..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_ddl.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_ddl_hpp -#define ODBC_CODEGEN_Code_ddl_hpp - -#include -#include "Code_stmt.hpp" - -/** - * @class Plan_ddl - * @brief Base class for DDL statements in PlanTree - */ -class Plan_ddl : public Plan_stmt { -public: - Plan_ddl(Plan_root* root); - virtual ~Plan_ddl() = 0; -}; - -inline -Plan_ddl::Plan_ddl(Plan_root* root) : - Plan_stmt(root) -{ -} - -/** - * @class Exec_ddl - * @brief Base class for DDL statements in ExecTree - */ -class Exec_ddl : public Exec_stmt { -public: - class Code : public Exec_stmt::Code { - public: - virtual ~Code() = 0; - }; - class Data : public Exec_stmt::Data { - public: - virtual ~Data() = 0; - }; - Exec_ddl(Exec_root* root); - virtual ~Exec_ddl() = 0; -}; - -inline -Exec_ddl::Exec_ddl(Exec_root* root) : - Exec_stmt(root) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_ddl_column.cpp b/ndb/src/old_files/client/odbc/codegen/Code_ddl_column.cpp deleted file mode 100644 index ee037e54c1f..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_ddl_column.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "Code_ddl_column.hpp" -#include "Code_expr_conv.hpp" -#include "Code_root.hpp" - -// Plan_ddl_column - -Plan_ddl_column::~Plan_ddl_column() -{ -} - -Plan_base* -Plan_ddl_column::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_type != 0); - if (! m_type->m_sqlType.nullable()) { - m_nullable = false; - } - m_sqlType = m_type->m_sqlType; - m_sqlType.nullable(m_nullable); - const BaseString& name = getName(); - if (m_unSigned) { - switch (m_sqlType.type()) { - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - break; - default: - ctx.pushStatus(Error::Gen, "invalid unsigned qualifier on column %s", name.c_str()); - return 0; - } - m_sqlType.unSigned(true); - } - if (strcmp(name.c_str(), "NDB$TID") == 0) { - if (! m_primaryKey) { - ctx.pushStatus(Error::Gen, "column %s must be a primary key", name.c_str()); - return 0; - } - if (sqlType().type() != SqlType::Bigint || ! sqlType().unSigned()) { - ctx.pushStatus(Error::Gen, "tuple id %s must have type BIGINT UNSIGNED", name.c_str()); - return 0; - } - setTupleId(); - } - if (m_autoIncrement) { - if (! m_primaryKey) { - ctx.pushStatus(Error::Gen, "auto-increment column %s must be a primary key", name.c_str()); - return 0; - } - if (sqlType().type() != SqlType::Smallint && sqlType().type() != SqlType::Integer && sqlType().type() != SqlType::Bigint) { - ctx.pushStatus(Error::Gen, "auto-increment column %s must have an integral type", name.c_str()); - return 0; - } - } - if (m_defaultValue != 0) { - if (m_primaryKey) { - ctx.pushStatus(Sqlstate::_42000, Error::Gen, "default value not allowed on primary key column %s", name.c_str()); - return 0; - } - m_defaultValue->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - // insert conversion node - Plan_expr_conv* exprConv = new Plan_expr_conv(m_root, sqlType()); - m_root->saveNode(exprConv); - exprConv->setExpr(m_defaultValue); - Plan_expr* expr = static_cast(exprConv->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(expr != 0); - m_defaultValue = expr; - } - return this; -} - -Exec_base* -Plan_ddl_column::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_ddl_column::print(Ctx& ctx) -{ - ctx.print(" [ddl_column %s key=%d id=%d]", getPrintName(), m_primaryKey, m_tupleId); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_ddl_column.hpp b/ndb/src/old_files/client/odbc/codegen/Code_ddl_column.hpp deleted file mode 100644 index 7d089d37440..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_ddl_column.hpp +++ /dev/null @@ -1,150 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_ddl_column_hpp -#define ODBC_CODEGEN_Code_ddl_column_hpp - -#include -#include "Code_column.hpp" -#include "Code_data_type.hpp" -#include "Code_expr.hpp" - -class DictColumn; -class Plan_table; - -/** - * @class Plan_ddl_column - * @brief Column in DDL statement - */ -class Plan_ddl_column : public Plan_base, public Plan_column { -public: - Plan_ddl_column(Plan_root* root, const BaseString& name); - virtual ~Plan_ddl_column(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // attributes - void setNotNull(); - void setUnSigned(); - void setPrimaryKey(); - bool getPrimaryKey() const; - void setTupleId(); - bool getTupleId() const; - void setAutoIncrement(); - bool getAutoIncrement() const; - // children - void setType(Plan_data_type* type); - void setDefaultValue(Plan_expr* defaultValue); - Plan_expr* getDefaultValue() const; -protected: - friend class Plan_create_row; - Plan_data_type* m_type; - Plan_expr* m_defaultValue; - bool m_nullable; - bool m_unSigned; - bool m_primaryKey; - bool m_tupleId; - bool m_autoIncrement; -}; - -inline -Plan_ddl_column::Plan_ddl_column(Plan_root* root, const BaseString& name) : - Plan_base(root), - Plan_column(Type_ddl, name), - m_type(0), - m_defaultValue(0), - m_nullable(true), - m_unSigned(false), - m_primaryKey(false), - m_tupleId(false), - m_autoIncrement(false) -{ -} - -inline void -Plan_ddl_column::setNotNull() -{ - m_nullable = false; -} - -inline void -Plan_ddl_column::setUnSigned() -{ - m_unSigned = true; -} - -inline void -Plan_ddl_column::setPrimaryKey() -{ - m_nullable = false; - m_primaryKey = true; -} - -inline bool -Plan_ddl_column::getPrimaryKey() const -{ - return m_primaryKey; -} - -inline void -Plan_ddl_column::setTupleId() -{ - m_nullable = false; - m_tupleId = true; -} - -inline bool -Plan_ddl_column::getTupleId() const -{ - return m_tupleId; -} - -inline void -Plan_ddl_column::setAutoIncrement() -{ - m_nullable = false; - m_autoIncrement = true; -} - -inline bool -Plan_ddl_column::getAutoIncrement() const -{ - return m_autoIncrement; -} - -// children - -inline void -Plan_ddl_column::setType(Plan_data_type* type) -{ - ctx_assert(type != 0); - m_type = type; -} - -inline void -Plan_ddl_column::setDefaultValue(Plan_expr* defaultValue) -{ - ctx_assert(defaultValue != 0); - m_defaultValue = defaultValue; -} - -inline Plan_expr* -Plan_ddl_column::getDefaultValue() const -{ - return m_defaultValue; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_ddl_constr.cpp b/ndb/src/old_files/client/odbc/codegen/Code_ddl_constr.cpp deleted file mode 100644 index 78c23e38d97..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_ddl_constr.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "Code_ddl_constr.hpp" - -// Plan_ddl_constr - -Plan_ddl_constr::~Plan_ddl_constr() -{ -} - -Plan_base* -Plan_ddl_constr::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_ddlRow != 0); - m_ddlRow->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_ddl_constr::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_ddl_constr::print(Ctx& ctx) -{ - ctx.print(" [ddl_constr"); - Plan_base* a[] = { m_ddlRow }; - printList(ctx, a, 1); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_ddl_constr.hpp b/ndb/src/old_files/client/odbc/codegen/Code_ddl_constr.hpp deleted file mode 100644 index ea7808b37cb..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_ddl_constr.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_ddl_constr_hpp -#define ODBC_CODEGEN_Code_ddl_constr_hpp - -#include -#include "Code_ddl_row.hpp" - -/** - * @class Plan_ddl_constr - * @brief Constraint in DDL statement - * - * Only unnamed primary key constraint exists. - */ -class Plan_ddl_constr : public Plan_base { -public: - Plan_ddl_constr(Plan_root* root); - virtual ~Plan_ddl_constr(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setRow(Plan_ddl_row* ddlRow); - Plan_ddl_row* getRow() const; -protected: - Plan_ddl_row* m_ddlRow; -}; - -inline -Plan_ddl_constr::Plan_ddl_constr(Plan_root* root) : - Plan_base(root) -{ -} - -// children - -inline void -Plan_ddl_constr::setRow(Plan_ddl_row* ddlRow) -{ - ctx_assert(ddlRow != 0); - m_ddlRow = ddlRow; -} - -inline Plan_ddl_row* -Plan_ddl_constr::getRow() const -{ - ctx_assert(m_ddlRow != 0); - return m_ddlRow; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_ddl_row.cpp b/ndb/src/old_files/client/odbc/codegen/Code_ddl_row.cpp deleted file mode 100644 index 87589ebbaa0..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_ddl_row.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_ddl_row.hpp" -#include "Code_ddl_column.hpp" -#include "Code_ddl_constr.hpp" - -Plan_ddl_row::~Plan_ddl_row() -{ -} - -Plan_base* -Plan_ddl_row::analyze(Ctx& ctx, Ctl& ctl) -{ - // analyze the columns - for (unsigned i = 1, n = countColumn(); i <= n; i++) { - Plan_ddl_column* column = getColumn(i); - column->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } - // node was not replaced - return this; -} - -Exec_base* -Plan_ddl_row::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_ddl_row::print(Ctx& ctx) -{ - ctx.print(" [ddl_row"); - for (unsigned i = 1, n = countColumn(); i <= n; i++) { - Plan_base* a = m_columnList[i]; - printList(ctx, &a, 1); - } -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_ddl_row.hpp b/ndb/src/old_files/client/odbc/codegen/Code_ddl_row.hpp deleted file mode 100644 index ac3eded1b2e..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_ddl_row.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_ddl_row_hpp -#define ODBC_CODEGEN_Code_ddl_row_hpp - -#include -#include "Code_base.hpp" -#include "Code_ddl_column.hpp" - -/** - * @class Plan_ddl_row - * @brief Row of columns in create statement - */ -class Plan_ddl_row : public Plan_base { -public: - Plan_ddl_row(Plan_root* root); - virtual ~Plan_ddl_row(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - unsigned countColumn() const; - void addColumn(Plan_ddl_column* column); - Plan_ddl_column* getColumn(unsigned i) const; -protected: - DdlColumnVector m_columnList; -}; - -inline -Plan_ddl_row::Plan_ddl_row(Plan_root* root) : - Plan_base(root), - m_columnList(1) -{ -} - -// children - -inline unsigned -Plan_ddl_row::countColumn() const -{ - return m_columnList.size() - 1; -} - -inline void -Plan_ddl_row::addColumn(Plan_ddl_column* column) -{ - ctx_assert(column != 0); - m_columnList.push_back(column); -} - -inline Plan_ddl_column* -Plan_ddl_row::getColumn(unsigned i) const -{ - ctx_assert(1 <= i && i <= countColumn() && m_columnList[i] != 0); - return m_columnList[i]; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_delete.cpp b/ndb/src/old_files/client/odbc/codegen/Code_delete.cpp deleted file mode 100644 index 35b3daa1aca..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_delete.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_delete.hpp" -#include "Code_delete_lookup.hpp" -#include "Code_delete_index.hpp" -#include "Code_delete_scan.hpp" -#include "Code_query_filter.hpp" -#include "Code_query_lookup.hpp" -#include "Code_query_index.hpp" -#include "Code_query_scan.hpp" -#include "Code_query_range.hpp" -#include "Code_query_repeat.hpp" -#include "Code_table.hpp" -#include "Code_root.hpp" - -Plan_delete::~Plan_delete() -{ -} - -Plan_base* -Plan_delete::analyze(Ctx& ctx, Ctl& ctl) -{ - stmtArea().stmtInfo().setName(Stmt_name_delete); - // analyze the table - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - // set name resolution scope - ctl.m_tableList.resize(1 + 1); // indexed from 1 - ctl.m_tableList[1] = m_table; - Plan_dml* stmt = 0; - if (m_pred != 0) { - // analyze the predicate - ctl.m_topand = true; - ctl.m_extra = false; - m_pred = static_cast(m_pred->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_pred != 0); - // check for key match - Plan_table::Index* indexBest = 0; - for (unsigned i = 0; i <= m_table->indexCount(); i++) { - Plan_table::Index& index = m_table->m_indexList[i]; - TableSet tsDone; - m_table->resolveSet(ctx, index, tsDone); - if (! ctx.ok()) - return 0; - if (! index.m_keyFound) - continue; - // prefer smaller rank, less unused keys - int k; - (k = (indexBest == 0)) || - (k = (indexBest->m_rank - index.m_rank)) || - (k = (indexBest->m_keyCountUnused - index.m_keyCountUnused)); - if (k > 0) - indexBest = &index; - } - if (indexBest != 0) { - const bool exactKey = indexBest->m_rank <= 1 ? m_table->exactKey(ctx, indexBest) : false; - const bool direct = ! ctl.m_extra && exactKey; - ctx_log3(("delete direct=%d: extra=%d exact=%d", direct, ctl.m_extra, exactKey)); - if (indexBest->m_rank == 0) { - // primary key - Plan_delete_lookup* deleteLookup = new Plan_delete_lookup(m_root); - m_root->saveNode(deleteLookup); - deleteLookup->setTable(m_table); - if (direct) { - // key match with no extra conditions - Plan_query_repeat* queryRepeat = new Plan_query_repeat(m_root, 1); - m_root->saveNode(queryRepeat); - deleteLookup->setQuery(queryRepeat); - } else { - // key match with extra conditions - Plan_query_lookup* queryLookup = new Plan_query_lookup(m_root); - m_root->saveNode(queryLookup); - Plan_query_filter* queryFilter = new Plan_query_filter(m_root); - m_root->saveNode(queryFilter); - queryLookup->setTable(m_table); - queryFilter->setQuery(queryLookup); - queryFilter->setPred(m_pred); - queryFilter->m_topTable = m_table; - deleteLookup->setQuery(queryFilter); - } - stmt = deleteLookup; - } else if (indexBest->m_rank == 1) { - // hash index - Plan_delete_index* deleteIndex = new Plan_delete_index(m_root); - m_root->saveNode(deleteIndex); - deleteIndex->setTable(m_table, indexBest); - if (direct) { - // key match with no extra conditions - Plan_query_repeat* queryRepeat = new Plan_query_repeat(m_root, 1); - m_root->saveNode(queryRepeat); - deleteIndex->setQuery(queryRepeat); - } else { - // key match with extra conditions - Plan_query_index* queryIndex = new Plan_query_index(m_root); - m_root->saveNode(queryIndex); - Plan_query_filter* queryFilter = new Plan_query_filter(m_root); - m_root->saveNode(queryFilter); - queryIndex->setTable(m_table, indexBest); - queryFilter->setQuery(queryIndex); - queryFilter->setPred(m_pred); - queryFilter->m_topTable = m_table; - deleteIndex->setQuery(queryFilter); - } - stmt = deleteIndex; - } else if (indexBest->m_rank == 2) { - // ordered index - Plan_delete_scan* deleteScan = new Plan_delete_scan(m_root); - m_root->saveNode(deleteScan); - Plan_query_filter* queryFilter = new Plan_query_filter(m_root); - m_root->saveNode(queryFilter); - Plan_query_range* queryRange = new Plan_query_range(m_root); - m_root->saveNode(queryRange); - queryRange->setTable(m_table, indexBest); - queryRange->setExclusive(); - queryFilter->setQuery(queryRange); - queryFilter->setPred(m_pred); - queryFilter->m_topTable = m_table; - const TableSet& ts2 = m_pred->noInterp(); - ctx_assert(ts2.size() <= 1); - if (ts2.size() == 0) { - queryRange->setInterp(m_pred); - } - deleteScan->setQuery(queryFilter); - stmt = deleteScan; - } else { - ctx_assert(false); - } - } else { - // scan delete with filter - Plan_delete_scan* deleteScan = new Plan_delete_scan(m_root); - m_root->saveNode(deleteScan); - Plan_query_filter* queryFilter = new Plan_query_filter(m_root); - m_root->saveNode(queryFilter); - Plan_query_scan* queryScan = new Plan_query_scan(m_root); - m_root->saveNode(queryScan); - queryScan->setTable(m_table); - queryScan->setExclusive(); - queryFilter->setQuery(queryScan); - queryFilter->setPred(m_pred); - queryFilter->m_topTable = m_table; - // interpeter - const TableSet& ts2 = m_pred->noInterp(); - ctx_assert(ts2.size() <= 1); - if (ts2.size() == 0) { - queryScan->setInterp(m_pred); - } - deleteScan->setQuery(queryFilter); - stmt = deleteScan; - } - } else { - // scan delete without filter - Plan_delete_scan* deleteScan = new Plan_delete_scan(m_root); - m_root->saveNode(deleteScan); - Plan_query_scan* queryScan = new Plan_query_scan(m_root); - m_root->saveNode(queryScan); - queryScan->setTable(m_table); - queryScan->setExclusive(); - deleteScan->setQuery(queryScan); - stmt = deleteScan; - } - // set base for column position offsets - m_table->m_resOff = 1; - return stmt; -} - -void -Plan_delete::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "DELETE WHERE", SQL_DIAG_DELETE_WHERE); -} - -Exec_base* -Plan_delete::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_delete::print(Ctx& ctx) -{ - ctx.print(" [delete"); - Plan_base* a[] = { m_table, m_pred }; - printList(ctx, a, 1); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_delete.hpp b/ndb/src/old_files/client/odbc/codegen/Code_delete.hpp deleted file mode 100644 index c7fa245497b..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_delete.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_delete_hpp -#define ODBC_CODEGEN_Code_delete_hpp - -#include -#include "Code_base.hpp" -#include "Code_dml.hpp" -#include "Code_table.hpp" -#include "Code_query.hpp" -#include "Code_pred.hpp" - -/** - * @class Plan_delete - * @brief Delete in PlanTree - */ -class Plan_delete : public Plan_dml { -public: - Plan_delete(Plan_root* root); - virtual ~Plan_delete(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setTable(Plan_table* table); - void setPred(Plan_pred* pred); -protected: - Plan_table* m_table; - Plan_pred* m_pred; -}; - -inline -Plan_delete::Plan_delete(Plan_root* root) : - Plan_dml(root), - m_table(0), - m_pred(0) -{ -} - -inline void -Plan_delete::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -inline void -Plan_delete::setPred(Plan_pred* pred) -{ - ctx_assert(pred != 0); - m_pred = pred; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_delete_index.cpp b/ndb/src/old_files/client/odbc/codegen/Code_delete_index.cpp deleted file mode 100644 index 8f2c3be2848..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_delete_index.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "Code_expr.hpp" -#include "Code_delete_index.hpp" -#include "Code_table.hpp" -#include "Code_root.hpp" - -Plan_delete_index::~Plan_delete_index() -{ -} - -Plan_base* -Plan_delete_index::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -void -Plan_delete_index::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "DELETE WHERE", SQL_DIAG_DELETE_WHERE); -} - -Exec_base* -Plan_delete_index::codegen(Ctx& ctx, Ctl& ctl) -{ - // create code for the query - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // set up - ctx_assert(m_table != 0 && m_index != 0); - const BaseString& tableName = m_table->getName(); - ctx_assert(m_index->m_dictIndex != 0); - const DictIndex& dictIndex = *m_index->m_dictIndex; - const BaseString& indexName = dictIndex.getName(); - const unsigned keyCount = m_index->m_keyCount; - // create the code - Exec_delete_index::Code& code = *new Exec_delete_index::Code(keyCount); - code.m_tableName = strcpy(new char[tableName.length() + 1], tableName.c_str()); - code.m_indexName = strcpy(new char[indexName.length() + 1], indexName.c_str()); - // key attributes - code.m_keyId = new NdbAttrId[1 + keyCount]; - code.m_keyId[0] = (NdbAttrId)-1; - for (unsigned k = 1; k <= keyCount; k++) { - const DictColumn* keyColumn = dictIndex.getColumn(k); - const SqlType& sqlType = keyColumn->sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_keySpecs.setEntry(k, sqlSpec); - code.m_keyId[k] = k - 1; // index column order - } - // matching expressions - ctx_assert(m_index->m_keyFound); - const ExprVector& keyEq = m_index->m_keyEq; - ctx_assert(keyEq.size() == 1 + keyCount); - code.m_keyMatch = new Exec_expr* [1 + keyCount]; - code.m_keyMatch[0] = 0; - for (unsigned k = 1; k <= keyCount; k++) { - Plan_expr* expr = keyEq[k]; - Exec_expr* execExpr = static_cast(expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - code.m_keyMatch[k] = execExpr; - } - // create the exec - Exec_delete_index* exec = new Exec_delete_index(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - exec->setQuery(execQuery); - return exec; -} - -void -Plan_delete_index::print(Ctx& ctx) -{ - ctx.print(" [delete_index"); - Plan_base* a[] = { m_query, m_table }; - printList(ctx, a, 2); - ctx.print("]"); -} - -// Exec_delete_index - -Exec_delete_index::Code::~Code() -{ - delete[] m_tableName; - delete[] m_keyId; - delete[] m_keyMatch; -} - -Exec_delete_index::Data::~Data() -{ -} - -Exec_delete_index::~Exec_delete_index() -{ -} - -void -Exec_delete_index::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // allocate the subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // allocate matching expressions - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* expr = code.m_keyMatch[k]; - ctx_assert(expr != 0); - expr->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - // create data - Data& data = *new Data; - setData(data); -} - -void -Exec_delete_index::close(Ctx& ctx) -{ - ctx_assert(m_query != 0); - m_query->close(ctx); -} - -void -Exec_delete_index::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [delete_index"); - Exec_base* a[] = { m_query }; - printList(ctx, a, 1); - printList(ctx, (Exec_base**)&code.m_keyMatch[1], code.m_keyCount); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_delete_index.hpp b/ndb/src/old_files/client/odbc/codegen/Code_delete_index.hpp deleted file mode 100644 index 1aaaa18abcb..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_delete_index.hpp +++ /dev/null @@ -1,156 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_delete_index_hpp -#define ODBC_CODEGEN_Code_delete_index_hpp - -#include -#include "Code_dml.hpp" -#include "Code_query.hpp" -#include "Code_table.hpp" - -/** - * @class Plan_delete_index - * @brief Delete by primary key - */ -class Plan_delete_index : public Plan_dml { -public: - Plan_delete_index(Plan_root* root); - virtual ~Plan_delete_index(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setQuery(Plan_query* query); - void setTable(Plan_table* table, Plan_table::Index* index); -protected: - Plan_query* m_query; - Plan_table* m_table; - Plan_table::Index* m_index; -}; - -inline -Plan_delete_index::Plan_delete_index(Plan_root* root) : - Plan_dml(root), - m_query(0), - m_table(0) -{ -} - -inline void -Plan_delete_index::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Plan_delete_index::setTable(Plan_table* table, Plan_table::Index* index) -{ - ctx_assert(table != 0 && index != 0 && index == &table->m_indexList[index->m_pos] && index->m_pos != 0); - m_table = table; - m_index = index; -} - -/** - * @class Exec_delete_index - * @brief Delete by primary key - */ -class Exec_delete_index : public Exec_dml { -public: - class Code : public Exec_dml::Code { - public: - Code(unsigned keyCount); - virtual ~Code(); - protected: - friend class Plan_delete_index; - friend class Exec_delete_index; - const char* m_tableName; - const char* m_indexName; - unsigned m_keyCount; - SqlSpecs m_keySpecs; // key types - NdbAttrId* m_keyId; - Exec_expr** m_keyMatch; // XXX pointers for now - }; - class Data : public Exec_dml::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_delete_index; - }; - Exec_delete_index(Exec_root* root); - virtual ~Exec_delete_index(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); -protected: - Exec_query* m_query; -}; - -inline -Exec_delete_index::Code::Code(unsigned keyCount) : - m_tableName(0), - m_indexName(0), - m_keyCount(keyCount), - m_keySpecs(keyCount), - m_keyId(0), - m_keyMatch(0) -{ -} - -inline -Exec_delete_index::Data::Data() -{ -} - -inline -Exec_delete_index::Exec_delete_index(Exec_root* root) : - Exec_dml(root), - m_query(0) -{ -} - -// children - -inline const Exec_delete_index::Code& -Exec_delete_index::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_delete_index::Data& -Exec_delete_index::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_delete_index::setQuery(Exec_query* query) -{ - ctx_assert(query != 0 && m_query == 0); - m_query = query; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_delete_lookup.cpp b/ndb/src/old_files/client/odbc/codegen/Code_delete_lookup.cpp deleted file mode 100644 index 4a6dec64654..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_delete_lookup.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "Code_expr.hpp" -#include "Code_delete_lookup.hpp" -#include "Code_table.hpp" -#include "Code_root.hpp" - -Plan_delete_lookup::~Plan_delete_lookup() -{ -} - -Plan_base* -Plan_delete_lookup::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -void -Plan_delete_lookup::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "DELETE WHERE", SQL_DIAG_DELETE_WHERE); -} - -Exec_base* -Plan_delete_lookup::codegen(Ctx& ctx, Ctl& ctl) -{ - // create code for the query - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // set up - ctx_assert(m_table != 0); - const BaseString& tableName = m_table->getName(); - const DictTable& dictTable = m_table->dictTable(); - const unsigned keyCount = dictTable.keyCount(); - // create the code - Exec_delete_lookup::Code& code = *new Exec_delete_lookup::Code(keyCount); - code.m_tableName = strcpy(new char[tableName.length() + 1], tableName.c_str()); - // key attributes - code.m_keyId = new NdbAttrId[1 + keyCount]; - code.m_keyId[0] = (NdbAttrId)-1; - for (unsigned k = 1; k <= keyCount; k++) { - const DictColumn* keyColumn = dictTable.getKey(k); - const SqlType& sqlType = keyColumn->sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_keySpecs.setEntry(k, sqlSpec); - code.m_keyId[k] = keyColumn->getAttrId(); - } - // matching expressions - const Plan_table::Index& index = m_table->m_indexList[0]; - ctx_assert(index.m_keyFound); - const ExprVector& keyEq = index.m_keyEq; - ctx_assert(keyEq.size() == 1 + keyCount); - code.m_keyMatch = new Exec_expr* [1 + keyCount]; - code.m_keyMatch[0] = 0; - for (unsigned k = 1; k <= keyCount; k++) { - Plan_expr* expr = keyEq[k]; - Exec_expr* execExpr = static_cast(expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - code.m_keyMatch[k] = execExpr; - } - // create the exec - Exec_delete_lookup* exec = new Exec_delete_lookup(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - exec->setQuery(execQuery); - return exec; -} - -void -Plan_delete_lookup::print(Ctx& ctx) -{ - ctx.print(" [delete_lookup"); - Plan_base* a[] = { m_query, m_table }; - printList(ctx, a, 2); - ctx.print("]"); -} - -// Exec_delete_lookup - -Exec_delete_lookup::Code::~Code() -{ - delete[] m_tableName; - delete[] m_keyId; - delete[] m_keyMatch; -} - -Exec_delete_lookup::Data::~Data() -{ -} - -Exec_delete_lookup::~Exec_delete_lookup() -{ -} - -void -Exec_delete_lookup::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // allocate the subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // allocate matching expressions - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* expr = code.m_keyMatch[k]; - ctx_assert(expr != 0); - expr->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - // create data - Data& data = *new Data; - setData(data); -} - -void -Exec_delete_lookup::close(Ctx& ctx) -{ - ctx_assert(m_query != 0); - m_query->close(ctx); -} - -void -Exec_delete_lookup::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [delete_lookup"); - Exec_base* a[] = { m_query }; - printList(ctx, a, 1); - printList(ctx, (Exec_base**)&code.m_keyMatch[1], code.m_keyCount); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_delete_lookup.hpp b/ndb/src/old_files/client/odbc/codegen/Code_delete_lookup.hpp deleted file mode 100644 index 4138baefa4c..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_delete_lookup.hpp +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_delete_lookup_hpp -#define ODBC_CODEGEN_Code_delete_lookup_hpp - -#include -#include "Code_dml.hpp" -#include "Code_query.hpp" -#include "Code_table.hpp" - -/** - * @class Plan_delete_lookup - * @brief Delete by primary key - */ -class Plan_delete_lookup : public Plan_dml { -public: - Plan_delete_lookup(Plan_root* root); - virtual ~Plan_delete_lookup(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setQuery(Plan_query* query); - void setTable(Plan_table* table); -protected: - Plan_query* m_query; - Plan_table* m_table; -}; - -inline -Plan_delete_lookup::Plan_delete_lookup(Plan_root* root) : - Plan_dml(root), - m_query(0), - m_table(0) -{ -} - -inline void -Plan_delete_lookup::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Plan_delete_lookup::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -/** - * @class Exec_delete_lookup - * @brief Delete by primary key - */ -class Exec_delete_lookup : public Exec_dml { -public: - class Code : public Exec_dml::Code { - public: - Code(unsigned keyCount); - virtual ~Code(); - protected: - friend class Plan_delete_lookup; - friend class Exec_delete_lookup; - char* m_tableName; - unsigned m_keyCount; - SqlSpecs m_keySpecs; // key types - NdbAttrId* m_keyId; - Exec_expr** m_keyMatch; // XXX pointers for now - }; - class Data : public Exec_dml::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_delete_lookup; - }; - Exec_delete_lookup(Exec_root* root); - virtual ~Exec_delete_lookup(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); -protected: - Exec_query* m_query; -}; - -inline -Exec_delete_lookup::Code::Code(unsigned keyCount) : - m_tableName(0), - m_keyCount(keyCount), - m_keySpecs(keyCount), - m_keyId(0), - m_keyMatch(0) -{ -} - -inline -Exec_delete_lookup::Data::Data() -{ -} - -inline -Exec_delete_lookup::Exec_delete_lookup(Exec_root* root) : - Exec_dml(root), - m_query(0) -{ -} - -// children - -inline const Exec_delete_lookup::Code& -Exec_delete_lookup::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_delete_lookup::Data& -Exec_delete_lookup::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_delete_lookup::setQuery(Exec_query* query) -{ - ctx_assert(query != 0 && m_query == 0); - m_query = query; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_delete_scan.cpp b/ndb/src/old_files/client/odbc/codegen/Code_delete_scan.cpp deleted file mode 100644 index fed7244a026..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_delete_scan.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_delete_scan.hpp" -#include "Code_root.hpp" - -Plan_delete_scan::~Plan_delete_scan() -{ -} - -Plan_base* -Plan_delete_scan::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -void -Plan_delete_scan::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "DELETE WHERE", SQL_DIAG_DELETE_WHERE); -} - -Exec_base* -Plan_delete_scan::codegen(Ctx& ctx, Ctl& ctl) -{ - // create code for the subquery - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // create the code - Exec_delete_scan* exec = new Exec_delete_scan(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - Exec_delete_scan::Code& code = *new Exec_delete_scan::Code; - exec->setCode(code); - exec->setQuery(execQuery); - return exec; -} - -void -Plan_delete_scan::print(Ctx& ctx) -{ - ctx.print(" [delete_scan"); - Plan_base* a[] = { m_query }; - printList(ctx, a, 1); - ctx.print("]"); -} - -// Exec_delete_scan - -Exec_delete_scan::Code::~Code() -{ -} - -Exec_delete_scan::Data::~Data() -{ -} - -Exec_delete_scan::~Exec_delete_scan() -{ -} - -void -Exec_delete_scan::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate the subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // create data - Data& data = *new Data; - setData(data); -} - -void -Exec_delete_scan::close(Ctx& ctx) -{ - ctx_assert(m_query != 0); - m_query->close(ctx); -} - -void -Exec_delete_scan::print(Ctx& ctx) -{ - ctx.print(" [delete_scan"); - Exec_base* a[] = { m_query }; - printList(ctx, a, 1); - ctx.print("]"); -} - diff --git a/ndb/src/old_files/client/odbc/codegen/Code_delete_scan.hpp b/ndb/src/old_files/client/odbc/codegen/Code_delete_scan.hpp deleted file mode 100644 index eb013a8257e..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_delete_scan.hpp +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_delete_scan_hpp -#define ODBC_CODEGEN_Code_delete_scan_hpp - -#include -#include "Code_dml.hpp" -#include "Code_query.hpp" - -/** - * @class Plan_delete_scan - * @brief Scan delete - */ -class Plan_delete_scan : public Plan_dml { -public: - Plan_delete_scan(Plan_root* root); - virtual ~Plan_delete_scan(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setQuery(Plan_query* query); -protected: - Plan_query* m_query; -}; - -inline -Plan_delete_scan::Plan_delete_scan(Plan_root* root) : - Plan_dml(root), - m_query(0) -{ -} - -inline void -Plan_delete_scan::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -/** - * @class Exec_delete_scan - * @brief Scan delete - */ -class Exec_delete_scan : public Exec_dml { -public: - class Code : public Exec_dml::Code { - public: - Code(); - virtual ~Code(); - protected: - friend class Exec_delete_scan; - }; - class Data : public Exec_dml::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_delete_scan; - }; - Exec_delete_scan(Exec_root* root); - virtual ~Exec_delete_scan(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); -protected: - Exec_query* m_query; -}; - -inline -Exec_delete_scan::Code::Code() -{ -} - -inline -Exec_delete_scan::Data::Data() -{ -} - -inline -Exec_delete_scan::Exec_delete_scan(Exec_root* root) : - Exec_dml(root), - m_query(0) -{ -} - -// children - -inline const Exec_delete_scan::Code& -Exec_delete_scan::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_delete_scan::Data& -Exec_delete_scan::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_delete_scan::setQuery(Exec_query* query) -{ - ctx_assert(query != 0 && m_query == 0); - m_query = query; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_dml.cpp b/ndb/src/old_files/client/odbc/codegen/Code_dml.cpp deleted file mode 100644 index 44fd4478646..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_dml.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_dml.hpp" - -// Plan_dml - -Plan_dml::~Plan_dml() -{ -} - -// Exec_dml - -Exec_dml::Code::~Code() -{ -} - -Exec_dml::Data::~Data() -{ -} - -Exec_dml::~Exec_dml() -{ -} - -void -Exec_dml::execute(Ctx& ctx, Ctl& ctl) -{ - execImpl(ctx, ctl); - if (m_topLevel) { - if (ctx.ok()) { - if (stmtArea().getRowCount() == 0) { - ctx.setCode(SQL_NO_DATA); - } - } - } -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_dml.hpp b/ndb/src/old_files/client/odbc/codegen/Code_dml.hpp deleted file mode 100644 index 0618f583984..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_dml.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_dml_hpp -#define ODBC_CODEGEN_Code_dml_hpp - -#include -#include -#include "Code_stmt.hpp" - -/** - * @class Plan_dml - * @brief Base class for DML statements in PlanTree - */ -class Plan_dml : public Plan_stmt { -public: - Plan_dml(Plan_root* root); - virtual ~Plan_dml() = 0; -}; - -inline -Plan_dml::Plan_dml(Plan_root* root) : - Plan_stmt(root) -{ -} - -/** - * @class Exec_dml - * @brief Base class for DML statements in ExecTree - */ -class Exec_dml : public Exec_stmt { -public: - class Code : public Exec_stmt::Code { - public: - virtual ~Code() = 0; - }; - class Data : public Exec_stmt::Data, public ResultArea { - public: - virtual ~Data() = 0; - }; - Exec_dml(Exec_root* root); - virtual ~Exec_dml() = 0; - void execute(Ctx& ctx, Ctl& ctl); -protected: - virtual void execImpl(Ctx& ctx, Ctl& ctl) = 0; -}; - -inline -Exec_dml::Exec_dml(Exec_root* root) : - Exec_stmt(root) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_dml_column.cpp b/ndb/src/old_files/client/odbc/codegen/Code_dml_column.cpp deleted file mode 100644 index 808e2ac8c4b..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_dml_column.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "Code_dml_column.hpp" - -// Plan_dml_column - -Plan_dml_column::~Plan_dml_column() -{ -} - -Plan_base* -Plan_dml_column::analyze(Ctx& ctx, Ctl& ctl) -{ - analyzeColumn(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_dml_column::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_dml_column::print(Ctx& ctx) -{ - ctx.print(" [dml_column %s]", getPrintName()); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_dml_column.hpp b/ndb/src/old_files/client/odbc/codegen/Code_dml_column.hpp deleted file mode 100644 index 0fb33944a3a..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_dml_column.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_dml_column_hpp -#define ODBC_CODEGEN_Code_dml_column_hpp - -#include -#include "Code_column.hpp" - -class DictColumn; -class Plan_table; - -/** - * @class Plan_dml_column - * @brief Column in query expression - */ -class Plan_dml_column : public Plan_base, public Plan_column { -public: - Plan_dml_column(Plan_root* root, const BaseString& name); - virtual ~Plan_dml_column(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); -}; - -inline -Plan_dml_column::Plan_dml_column(Plan_root* root, const BaseString& name) : - Plan_base(root), - Plan_column(Type_dml, name) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_dml_row.cpp b/ndb/src/old_files/client/odbc/codegen/Code_dml_row.cpp deleted file mode 100644 index ceb63a9f7b9..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_dml_row.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_dml_row.hpp" -#include "Code_dml_column.hpp" - -Plan_dml_row::~Plan_dml_row() -{ -} - -Plan_base* -Plan_dml_row::analyze(Ctx& ctx, Ctl& ctl) -{ - unsigned size = getSize(); - // analyze the columns - for (unsigned i = 1; i <= size; i++) { - Plan_dml_column* column = getColumn(i); - column->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } - // node was not replaced - return this; -} - -Exec_base* -Plan_dml_row::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_dml_row::print(Ctx& ctx) -{ - unsigned size = getSize(); - ctx.print(" [dml_row"); - for (unsigned i = 1; i <= size; i++) { - Plan_base* a = m_columnList[i]; - a == 0 ? ctx.print(" -") : a->print(ctx); - } - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_dml_row.hpp b/ndb/src/old_files/client/odbc/codegen/Code_dml_row.hpp deleted file mode 100644 index 6c7e46ba9af..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_dml_row.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_dml_row_hpp -#define ODBC_CODEGEN_Code_dml_row_hpp - -#include -#include -#include -#include "Code_base.hpp" -#include "Code_dml_column.hpp" - -class Plan_dml_column; - -/** - * @class Plan_dml_row - * @brief Row of lvalue columns in insert or update - */ -class Plan_dml_row : public Plan_base { -public: - Plan_dml_row(Plan_root* root); - virtual ~Plan_dml_row(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - unsigned getSize() const; - void addColumn(Plan_dml_column* column); - Plan_dml_column* getColumn(unsigned i) const; -protected: - DmlColumnVector m_columnList; -}; - -inline -Plan_dml_row::Plan_dml_row(Plan_root* root) : - Plan_base(root), - m_columnList(1) -{ -} - -// children - -inline unsigned -Plan_dml_row::getSize() const -{ - return m_columnList.size() - 1; -} - -inline void -Plan_dml_row::addColumn(Plan_dml_column* column) -{ - ctx_assert(column != 0); - m_columnList.push_back(column); -} - -inline Plan_dml_column* -Plan_dml_row::getColumn(unsigned i) const -{ - ctx_assert(1 <= i && i <= m_columnList.size() && m_columnList[i] != 0); - return m_columnList[i]; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_drop_index.cpp b/ndb/src/old_files/client/odbc/codegen/Code_drop_index.cpp deleted file mode 100644 index b6bae88e270..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_drop_index.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_drop_index.hpp" -#include "Code_root.hpp" - -// Plan_drop_index - -Plan_drop_index::~Plan_drop_index() -{ -} - -Plan_base* -Plan_drop_index::analyze(Ctx& ctx, Ctl& ctl) -{ - stmtArea().stmtInfo().setName(Stmt_name_drop_index); - return this; -} - -void -Plan_drop_index::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "DROP INDEX", SQL_DIAG_DROP_INDEX); -} - -Exec_base* -Plan_drop_index::codegen(Ctx& ctx, Ctl& ctl) -{ - Exec_drop_index* exec = new Exec_drop_index(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - Exec_drop_index::Code& code = *new Exec_drop_index::Code(m_name, m_tableName); - exec->setCode(code); - return exec; -} - -void -Plan_drop_index::print(Ctx& ctx) -{ - ctx.print(" [drop_index %s]", m_name.c_str()); -} - -// Exec_drop_index - -Exec_drop_index::Code::~Code() -{ -} - -Exec_drop_index::Data::~Data() -{ -} - -Exec_drop_index::~Exec_drop_index() -{ -} - -void -Exec_drop_index::alloc(Ctx& ctx, Ctl& ctl) -{ - Data& data = *new Data; - setData(data); -} - -void -Exec_drop_index::close(Ctx& ctx) -{ -} - -void -Exec_drop_index::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [drop_index %s]", code.m_indexName.c_str()); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_drop_index.hpp b/ndb/src/old_files/client/odbc/codegen/Code_drop_index.hpp deleted file mode 100644 index 99891c9a52f..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_drop_index.hpp +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_drop_index_hpp -#define ODBC_CODEGEN_Code_drop_index_hpp - -#include -#include -#include -#include "Code_ddl.hpp" - -class DictTable; -class DictColumn; - -/** - * @class Plan_drop_index - * @brief Drop index in PlanTree - */ -class Plan_drop_index : public Plan_ddl { -public: - Plan_drop_index(Plan_root* root, const BaseString& name); - Plan_drop_index(Plan_root* root, const BaseString& name, const BaseString& tableName); - virtual ~Plan_drop_index(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void describe(Ctx & ctx); - void print(Ctx& ctx); - // attributes - const BaseString& getName() const; -protected: - BaseString m_name; - BaseString m_tableName; -}; - -inline -Plan_drop_index::Plan_drop_index(Plan_root* root, const BaseString& name) : - Plan_ddl(root), - m_name(name) -{ -} - -inline -Plan_drop_index::Plan_drop_index(Plan_root* root, const BaseString& name, const BaseString& tableName) : - Plan_ddl(root), - m_name(name), - m_tableName(tableName) -{ -} - -inline const BaseString& -Plan_drop_index::getName() const -{ - return m_name; -} - -/** - * @class Exec_drop_index - * @brief Drop index in ExecTree - */ -class Exec_drop_index : public Exec_ddl { -public: - class Code : public Exec_ddl::Code { - public: - Code(const BaseString& indexName, const BaseString& tableName); - virtual ~Code(); - protected: - friend class Exec_drop_index; - const BaseString m_indexName; - const BaseString m_tableName; - }; - class Data : public Exec_ddl::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_drop_index; - }; - Exec_drop_index(Exec_root* root); - virtual ~Exec_drop_index(); - void alloc(Ctx& ctx, Ctl& ctl); - void execute(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_drop_index::Code::Code(const BaseString& indexName, const BaseString& tableName) : - m_indexName(indexName), - m_tableName(tableName) -{ -} - -inline -Exec_drop_index::Data::Data() -{ -} - -inline -Exec_drop_index::Exec_drop_index(Exec_root* root) : - Exec_ddl(root) -{ -} - -// children - -inline const Exec_drop_index::Code& -Exec_drop_index::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_drop_index::Data& -Exec_drop_index::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_drop_table.cpp b/ndb/src/old_files/client/odbc/codegen/Code_drop_table.cpp deleted file mode 100644 index f20bf9fdae0..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_drop_table.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_drop_table.hpp" -#include "Code_root.hpp" - -// Plan_drop_table - -Plan_drop_table::~Plan_drop_table() -{ -} - -Plan_base* -Plan_drop_table::analyze(Ctx& ctx, Ctl& ctl) -{ - stmtArea().stmtInfo().setName(Stmt_name_drop_table); - return this; -} - -void -Plan_drop_table::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "DROP TABLE", SQL_DIAG_DROP_TABLE); -} - -Exec_base* -Plan_drop_table::codegen(Ctx& ctx, Ctl& ctl) -{ - Exec_drop_table* exec = new Exec_drop_table(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - Exec_drop_table::Code& code = *new Exec_drop_table::Code(m_name); - exec->setCode(code); - return exec; -} - -void -Plan_drop_table::print(Ctx& ctx) -{ - ctx.print(" [drop_table %s]", m_name.c_str()); -} - -// Exec_drop_table - -Exec_drop_table::Code::~Code() -{ -} - -Exec_drop_table::Data::~Data() -{ -} - -Exec_drop_table::~Exec_drop_table() -{ -} - -void -Exec_drop_table::alloc(Ctx& ctx, Ctl& ctl) -{ - Data& data = *new Data; - setData(data); -} - -void -Exec_drop_table::close(Ctx& ctx) -{ -} - -void -Exec_drop_table::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [drop_table %s]", code.m_tableName.c_str()); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_drop_table.hpp b/ndb/src/old_files/client/odbc/codegen/Code_drop_table.hpp deleted file mode 100644 index 849a472ed94..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_drop_table.hpp +++ /dev/null @@ -1,124 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_drop_table_hpp -#define ODBC_CODEGEN_Code_drop_table_hpp - -#include -#include -#include -#include "Code_ddl.hpp" - -class DictTable; -class DictColumn; - -/** - * @class Plan_drop_table - * @brief Drop table in PlanTree - */ -class Plan_drop_table : public Plan_ddl { -public: - Plan_drop_table(Plan_root* root, const BaseString& name); - virtual ~Plan_drop_table(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void describe(Ctx & ctx); - void print(Ctx& ctx); - // attributes - const BaseString& getName() const; -protected: - BaseString m_name; -}; - -inline -Plan_drop_table::Plan_drop_table(Plan_root* root, const BaseString& name) : - Plan_ddl(root), - m_name(name) -{ -} - -inline const BaseString& -Plan_drop_table::getName() const -{ - return m_name; -} - -/** - * @class Exec_drop_table - * @brief Drop table in ExecTree - */ -class Exec_drop_table : public Exec_ddl { -public: - class Code : public Exec_ddl::Code { - public: - Code(const BaseString& tableName); - virtual ~Code(); - protected: - friend class Exec_drop_table; - const BaseString m_tableName; - }; - class Data : public Exec_ddl::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_drop_table; - }; - Exec_drop_table(Exec_root* root); - virtual ~Exec_drop_table(); - void alloc(Ctx& ctx, Ctl& ctl); - void execute(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_drop_table::Code::Code(const BaseString& tableName) : - m_tableName(tableName) -{ -} - -inline -Exec_drop_table::Data::Data() -{ -} - -inline -Exec_drop_table::Exec_drop_table(Exec_root* root) : - Exec_ddl(root) -{ -} - -// children - -inline const Exec_drop_table::Code& -Exec_drop_table::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_drop_table::Data& -Exec_drop_table::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr.cpp b/ndb/src/old_files/client/odbc/codegen/Code_expr.cpp deleted file mode 100644 index 4afa75986a0..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_expr.hpp" -#include "Code_expr_row.hpp" - -// Plan_expr - -Plan_expr::~Plan_expr() -{ -} - -bool -Plan_expr::isEqual(const Plan_expr* expr) const -{ - return false; -} - -bool -Plan_expr::isAnyEqual(const Plan_expr_row* row) const -{ - ctx_assert(row != 0); - const unsigned size = row->getSize(); - for (unsigned i = 1; i <= size; i++) { - if (isEqual(row->getExpr(i))) - return true; - } - return false; -} - -bool -Plan_expr::isGroupBy(const Plan_expr_row* row) const -{ - return false; -} - -// Exec_expr - -Exec_expr::Code::~Code() -{ -} - -Exec_expr::Data::~Data() -{ -} - -Exec_expr::~Exec_expr() -{ -} - -SqlField& -Exec_expr::Data::groupField(const SqlType& sqlType, unsigned i, bool initFlag) -{ - if (m_groupField.size() == 0) { - m_groupField.resize(1); - } - if (initFlag) { - //unsigned i2 = m_groupField.size(); - //ctx_assert(i == i2); - const SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - const SqlField sqlField(sqlSpec); - m_groupField.push_back(sqlField); - } - ctx_assert(i != 0 && i < m_groupField.size()); - return m_groupField[i]; -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr.hpp b/ndb/src/old_files/client/odbc/codegen/Code_expr.hpp deleted file mode 100644 index b6f07471b4d..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr.hpp +++ /dev/null @@ -1,219 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_expr_hpp -#define ODBC_CODEGEN_Code_expr_hpp - -#include -#include -#include "Code_base.hpp" - -class Ctx; -class Plan_expr_row; -class Exec_expr; - -/** - * @class Plan_expr - * @brief Base class for expressions in PlanTree - */ -class Plan_expr : public Plan_base { -public: - // type is convenient since RTTI cannot be used - enum Type { - TypeUndefined = 0, - TypeColumn, - TypeConst, - TypeConv, - TypeFunc, - TypeOp, - TypeParam, - TypeValue - }; - Plan_expr(Plan_root* root, Type type); - virtual ~Plan_expr() = 0; - Type type() const; - const SqlType& sqlType() const; // data type set by analyze - const TableSet& tableSet() const; - const BaseString& getAlias() const; - bool isAggr() const; - bool isBound() const; - bool isAnyEqual(const Plan_expr_row* row) const; - virtual bool isEqual(const Plan_expr* expr) const; - virtual bool isGroupBy(const Plan_expr_row* row) const; -protected: - friend class Plan_expr_row; - friend class Plan_expr_op; - friend class Plan_expr_func; - friend class Plan_comp_op; - const Type m_type; - SqlType m_sqlType; // subclass must set - BaseString m_alias; // for row expression alias - TableSet m_tableSet; // depends on these tables - bool m_isAggr; // contains an aggregate expression - bool m_isBound; // only constants and aggregates - Exec_expr* m_exec; // XXX wrong move -}; - -inline -Plan_expr::Plan_expr(Plan_root* root, Type type) : - Plan_base(root), - m_type(type), - m_isAggr(false), - m_isBound(false), - m_exec(0) -{ -} - -inline Plan_expr::Type -Plan_expr::type() const -{ - return m_type; -} - -inline const SqlType& -Plan_expr::sqlType() const -{ - ctx_assert(m_sqlType.type() != SqlType::Undef); - return m_sqlType; -} - -inline const Plan_base::TableSet& -Plan_expr::tableSet() const -{ - return m_tableSet; -} - -inline const BaseString& -Plan_expr::getAlias() const -{ - return m_alias; -} - -inline bool -Plan_expr::isAggr() const -{ - return m_isAggr; -} - -inline bool -Plan_expr::isBound() const -{ - return m_isBound; -} - -/** - * @class Exec_expr - * @brief Base class for expressions in ExecTree - */ -class Exec_expr : public Exec_base { -public: - /** - * Exec_expr::Code includes reference to SqlSpec which - * specifies data type and access method. - */ - class Code : public Exec_base::Code { - public: - Code(const SqlSpec& sqlSpec); - virtual ~Code() = 0; - const SqlSpec& sqlSpec() const; - protected: - friend class Exec_expr; - const SqlSpec& m_sqlSpec; // subclass must contain - }; - /** - * Exec_expr::Data includes reference to SqlField which - * contains specification and data address. - */ - class Data : public Exec_base::Data { - public: - Data(const SqlField& sqlField); - virtual ~Data() = 0; - const SqlField& sqlField() const; - const SqlField& groupField(unsigned i) const; - protected: - friend class Exec_expr; - const SqlField& m_sqlField; // subclass must contain - // group-by data - typedef std::vector GroupField; - GroupField m_groupField; - SqlField& groupField(const SqlType& sqlType, unsigned i, bool initFlag); - }; - Exec_expr(Exec_root* root); - virtual ~Exec_expr() = 0; - /** - * Evaluate the expression. Must be implemented by all - * subclasses. Check ctx.ok() for errors. - */ - virtual void evaluate(Ctx& ctx, Ctl& ctl) = 0; - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_expr::Code::Code(const SqlSpec& sqlSpec) : - m_sqlSpec(sqlSpec) -{ -} - -inline const SqlSpec& -Exec_expr::Code::sqlSpec() const { - return m_sqlSpec; -} - -inline -Exec_expr::Data::Data(const SqlField& sqlField) : - m_sqlField(sqlField) -{ -} - -inline const SqlField& -Exec_expr::Data::sqlField() const -{ - return m_sqlField; -} - -inline const SqlField& -Exec_expr::Data::groupField(unsigned i) const -{ - ctx_assert(i != 0 && i < m_groupField.size()); - return m_groupField[i]; -} - -inline -Exec_expr::Exec_expr(Exec_root* root) : - Exec_base(root) -{ -} - -// children - -inline const Exec_expr::Code& -Exec_expr::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_expr::Data& -Exec_expr::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_column.cpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_column.cpp deleted file mode 100644 index 17a9a502d4c..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_column.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include "Code_query.hpp" -#include "Code_table.hpp" -#include "Code_expr_column.hpp" -#include "Code_root.hpp" - -// Plan_expr_column - -Plan_expr_column::~Plan_expr_column() -{ -} - -Plan_base* -Plan_expr_column::analyze(Ctx& ctx, Ctl& ctl) -{ - m_exec = 0; - analyzeColumn(ctx, ctl); - if (! ctx.ok()) - return 0; - Plan_expr::m_sqlType = Plan_column::m_sqlType; - // depends on one table - m_tableSet.insert(m_resTable); - // not constant as set-value - ctl.m_const = false; - // set alias name - m_alias = m_name; - return this; -} - -Exec_base* -Plan_expr_column::codegen(Ctx& ctx, Ctl& ctl) -{ - if (m_exec != 0) - return m_exec; - // connect column to query column - const Exec_query* execQuery = ctl.m_execQuery; - ctx_assert(execQuery != 0); - const Exec_query::Code& codeQuery = execQuery->getCode(); - const SqlSpec sqlSpec(Plan_expr::m_sqlType, SqlSpec::Reference); - // offset in final output row - ctx_assert(m_resTable != 0 && m_resTable->m_resOff != 0 && m_resPos != 0); - unsigned resOff = m_resTable->m_resOff + (m_resPos - 1); - // create the code - Exec_expr_column* exec = new Exec_expr_column(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - Exec_expr_column::Code& code = *new Exec_expr_column::Code(sqlSpec, resOff); - exec->setCode(code); - m_exec = exec; - return exec; -} - -bool -Plan_expr_column::resolveEq(Ctx& ctx, Plan_expr* expr) -{ - ctx_assert(m_resTable != 0 && expr != 0); - return m_resTable->resolveEq(ctx, this, expr); -} - -void -Plan_expr_column::print(Ctx& ctx) -{ - ctx.print(" [expr_column %s]", getPrintName()); -} - -bool -Plan_expr_column::isEqual(const Plan_expr* expr) const -{ - ctx_assert(expr != 0); - if (expr->type() != Plan_expr::TypeColumn) - return false; - const Plan_expr_column* expr2 = static_cast(expr); - ctx_assert(m_resTable != 0 && expr2->m_resTable != 0); - if (m_resTable != expr2->m_resTable) - return false; - ctx_assert(m_dictColumn != 0 && expr2->m_dictColumn != 0); - if (m_dictColumn != expr2->m_dictColumn) - return false; - return true; -} - -bool -Plan_expr_column::isGroupBy(const Plan_expr_row* row) const -{ - if (isAnyEqual(row)) - return true; - return false; -} - -// Exec_expr_column - -Exec_expr_column::Code::~Code() -{ -} - -Exec_expr_column::Data::~Data() -{ -} - -Exec_expr_column::~Exec_expr_column() -{ -} - -void -Exec_expr_column::alloc(Ctx& ctx, Ctl& ctl) -{ - if (m_data != 0) - return; - const Code& code = getCode(); - // connect column to query column - ctx_assert(ctl.m_query != 0); - const SqlRow& sqlRow = ctl.m_query->getData().sqlRow(); - SqlField& sqlField = sqlRow.getEntry(code.m_resOff); - // create the data - Data& data = *new Data(sqlField); - setData(data); -} - -void -Exec_expr_column::evaluate(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - if (ctl.m_groupIndex != 0) { - SqlField& out = data.groupField(code.sqlSpec().sqlType(), ctl.m_groupIndex, ctl.m_groupInit); - data.sqlField().copy(ctx, out); - } -} - -void -Exec_expr_column::close(Ctx& ctx) -{ - Data& data = getData(); - data.m_groupField.clear(); -} - -void -Exec_expr_column::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [column %d]", code.m_resOff); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_column.hpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_column.hpp deleted file mode 100644 index 2ce7c441e45..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_column.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_expr_column_hpp -#define ODBC_CODEGEN_Code_expr_column_hpp - -#include -#include "Code_column.hpp" -#include "Code_expr.hpp" - -class DictColumn; -class Plan_table; - -/** - * @class Plan_expr_column - * @brief Column in query expression - */ -class Plan_expr_column : public Plan_expr, public Plan_column { -public: - Plan_expr_column(Plan_root* root, const BaseString& name); - virtual ~Plan_expr_column(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - bool resolveEq(Ctx& ctx, Plan_expr* expr); - void print(Ctx& ctx); - bool isEqual(const Plan_expr* expr) const; - bool isGroupBy(const Plan_expr_row* row) const; -}; - -inline -Plan_expr_column::Plan_expr_column(Plan_root* root, const BaseString& name) : - Plan_expr(root, TypeColumn), - Plan_column(Type_expr, name) -{ -} - -/** - * @class Exec_expr_column - * @brief Column in query expression - */ -class Exec_expr_column : public Exec_expr { -public: - class Code : public Exec_expr::Code { - public: - Code(const SqlSpec& sqlSpec, unsigned resOff); - virtual ~Code(); - protected: - friend class Exec_expr_column; - SqlSpec m_sqlSpec; - unsigned m_resOff; - }; - class Data : public Exec_expr::Data { - public: - Data(SqlField& sqlField); - virtual ~Data(); - protected: - friend class Exec_expr_column; - // set reference to SqlField in query - }; - Exec_expr_column(Exec_root* root); - virtual ~Exec_expr_column(); - void alloc(Ctx& ctx, Ctl& ctl); - void evaluate(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_expr_column::Code::Code(const SqlSpec& sqlSpec, unsigned resOff) : - Exec_expr::Code(m_sqlSpec), - m_sqlSpec(sqlSpec), - m_resOff(resOff) -{ -} - -inline -Exec_expr_column::Data::Data(SqlField& sqlField) : - Exec_expr::Data(sqlField) -{ -} - -inline -Exec_expr_column::Exec_expr_column(Exec_root* root) : - Exec_expr(root) -{ -} - -// children - -inline const Exec_expr_column::Code& -Exec_expr_column::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_expr_column::Data& -Exec_expr_column::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_const.cpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_const.cpp deleted file mode 100644 index 564d307a4f8..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_const.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_expr_const.hpp" -#include "Code_root.hpp" - -// Plan_expr_const - -Plan_expr_const::~Plan_expr_const() -{ -} - -Plan_base* -Plan_expr_const::analyze(Ctx& ctx, Ctl& ctl) -{ - m_exec = 0; - // convert data type - m_lexType.convert(ctx, m_sqlType, m_string.length()); - if (! ctx.ok()) - return 0; - // depends on no tables - // set alias name - m_alias = m_string; - // node was not changed - return this; -} - -Exec_base* -Plan_expr_const::codegen(Ctx& ctx, Ctl& ctl) -{ - if (m_exec != 0) - return m_exec; - // convert data - SqlSpec sqlSpec(m_sqlType, SqlSpec::Physical); - SqlField sqlField(sqlSpec); - LexSpec lexSpec(m_lexType); - lexSpec.convert(ctx, m_string, sqlField); - if (! ctx.ok()) - return 0; - // create code - Exec_expr_const* exec = new Exec_expr_const(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - Exec_expr_const::Code& code = *new Exec_expr_const::Code(sqlField); - exec->setCode(code); - m_exec = exec; - return exec; -} - -void -Plan_expr_const::print(Ctx& ctx) -{ - ctx.print(" [const %s]", m_string.c_str()); -} - -bool -Plan_expr_const::isEqual(const Plan_expr* expr) const -{ - ctx_assert(expr != 0); - if (expr->type() != Plan_expr::TypeConst) - return false; - const Plan_expr_const* expr2 = static_cast(expr); - if (strcmp(m_string.c_str(), expr2->m_string.c_str()) != 0) - return false; - return true; -} - -bool -Plan_expr_const::isGroupBy(const Plan_expr_row* row) const -{ - return true; -} - -// Exec_expr_const - -Exec_expr_const::Code::~Code() -{ -} - -Exec_expr_const::Data::~Data() -{ -} - -Exec_expr_const::~Exec_expr_const() -{ -} - -void -Exec_expr_const::alloc(Ctx& ctx, Ctl& ctl) -{ - if (m_data != 0) - return; - // copy the value for const correctness reasons - SqlField sqlField(getCode().m_sqlField); - Data& data = *new Data(sqlField); - setData(data); -} - -void -Exec_expr_const::evaluate(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - if (ctl.m_groupIndex != 0) { - SqlField& out = data.groupField(code.sqlSpec().sqlType(), ctl.m_groupIndex, ctl.m_groupInit); - data.sqlField().copy(ctx, out); - } -} - -void -Exec_expr_const::close(Ctx& ctx) -{ - Data& data = getData(); - data.m_groupField.clear(); -} - -void -Exec_expr_const::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" ["); - char buf[500]; - code.m_sqlField.print(buf, sizeof(buf)); - ctx.print("%s", buf); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_const.hpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_const.hpp deleted file mode 100644 index 2e26c637a23..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_const.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_expr_const_hpp -#define ODBC_CODEGEN_Code_expr_const_hpp - -#include -#include -#include "Code_expr.hpp" - -/** - * @class Plan_expr_const - * @brief Constant expression value in PlanTree - */ -class Plan_expr_const : public Plan_expr { -public: - Plan_expr_const(Plan_root* root, LexType lexType, const char* value); - virtual ~Plan_expr_const(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - bool isEqual(const Plan_expr* expr) const; - bool isGroupBy(const Plan_expr_row* row) const; -protected: - // lexical type and token set by the parser - LexType m_lexType; - BaseString m_string; -}; - -inline -Plan_expr_const::Plan_expr_const(Plan_root* root, LexType lexType, const char* value) : - Plan_expr(root, TypeConst), - m_lexType(lexType), - m_string(value) -{ -} - -/** - * @class Exec_expr_const - * @brief Constant expression value in ExecTree - */ -class Exec_expr_const : public Exec_expr { -public: - class Code : public Exec_expr::Code { - public: - Code(const SqlField& sqlField); - virtual ~Code(); - protected: - friend class Exec_expr_const; - const SqlField m_sqlField; - }; - class Data : public Exec_expr::Data { - public: - Data(SqlField& sqlField); - virtual ~Data(); - protected: - friend class Exec_expr_const; - SqlField m_sqlField; - }; - Exec_expr_const(Exec_root* root); - virtual ~Exec_expr_const(); - void alloc(Ctx& ctx, Ctl& ctl); - void evaluate(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_expr_const::Code::Code(const SqlField& sqlField) : - Exec_expr::Code(m_sqlField.sqlSpec()), - m_sqlField(sqlField) -{ -} - -inline -Exec_expr_const::Data::Data(SqlField& sqlField) : - Exec_expr::Data(m_sqlField), - m_sqlField(sqlField) -{ -} - -inline -Exec_expr_const::Exec_expr_const(Exec_root* root) : - Exec_expr(root) -{ -} - -// children - -inline const Exec_expr_const::Code& -Exec_expr_const::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_expr_const::Data& -Exec_expr_const::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_conv.cpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_conv.cpp deleted file mode 100644 index bc89482fedc..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_conv.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_expr.hpp" -#include "Code_expr_conv.hpp" -#include "Code_root.hpp" - -// Plan_expr_conv - -Plan_expr_conv::~Plan_expr_conv() -{ -} - -Plan_base* -Plan_expr_conv::analyze(Ctx& ctx, Ctl& ctl) -{ - m_exec = 0; - const SqlType& t1 = sqlType(); - ctx_assert(m_expr != 0); - m_expr->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - const SqlType& t2 = m_expr->sqlType(); - if (t2.type() == SqlType::Unbound) { - return m_expr; - } - if (t1.equal(t2)) { - return m_expr; - } - // XXX move to runtime or make table-driven - bool ok = false; - if (t2.type() == SqlType::Null) { - ok = true; - } else if (t1.type() == SqlType::Char) { - if (t2.type() == SqlType::Char) { - ok = true; - } else if (t2.type() == SqlType::Varchar) { - ok = true; - } else if (t2.type() == SqlType::Binary) { - ok = true; - } else if (t2.type() == SqlType::Varbinary) { - ok = true; - } - } else if (t1.type() == SqlType::Varchar) { - if (t2.type() == SqlType::Char) { - ok = true; - } else if (t2.type() == SqlType::Varchar) { - ok = true; - } else if (t2.type() == SqlType::Binary) { - ok = true; - } else if (t2.type() == SqlType::Varbinary) { - ok = true; - } - } else if (t1.type() == SqlType::Binary) { - if (t2.type() == SqlType::Char) { - ok = true; - } else if (t2.type() == SqlType::Varchar) { - ok = true; - } else if (t2.type() == SqlType::Binary) { - ok = true; - } else if (t2.type() == SqlType::Varbinary) { - ok = true; - } - } else if (t1.type() == SqlType::Varbinary) { - if (t2.type() == SqlType::Char) { - ok = true; - } else if (t2.type() == SqlType::Varchar) { - ok = true; - } else if (t2.type() == SqlType::Binary) { - ok = true; - } else if (t2.type() == SqlType::Varbinary) { - ok = true; - } - } else if (t1.type() == SqlType::Smallint) { - if (t2.type() == SqlType::Smallint) { - ok = true; - } else if (t2.type() == SqlType::Integer) { - ok = true; - } else if (t2.type() == SqlType::Bigint) { - ok = true; - } else if (t2.type() == SqlType::Real) { - ok = true; - } else if (t2.type() == SqlType::Double) { - ok = true; - } - } else if (t1.type() == SqlType::Integer) { - if (t2.type() == SqlType::Smallint) { - ok = true; - } else if (t2.type() == SqlType::Integer) { - ok = true; - } else if (t2.type() == SqlType::Bigint) { - ok = true; - } else if (t2.type() == SqlType::Real) { - ok = true; - } else if (t2.type() == SqlType::Double) { - ok = true; - } - } else if (t1.type() == SqlType::Bigint) { - if (t2.type() == SqlType::Smallint) { - ok = true; - } else if (t2.type() == SqlType::Integer) { - ok = true; - } else if (t2.type() == SqlType::Bigint) { - ok = true; - } else if (t2.type() == SqlType::Real) { - ok = true; - } else if (t2.type() == SqlType::Double) { - ok = true; - } - } else if (t1.type() == SqlType::Real) { - if (t2.type() == SqlType::Smallint) { - ok = true; - } else if (t2.type() == SqlType::Integer) { - ok = true; - } else if (t2.type() == SqlType::Bigint) { - ok = true; - } else if (t2.type() == SqlType::Real) { - ok = true; - } else if (t2.type() == SqlType::Double) { - ok = true; - } - } else if (t1.type() == SqlType::Double) { - if (t2.type() == SqlType::Smallint) { - ok = true; - } else if (t2.type() == SqlType::Integer) { - ok = true; - } else if (t2.type() == SqlType::Bigint) { - ok = true; - } else if (t2.type() == SqlType::Real) { - ok = true; - } else if (t2.type() == SqlType::Double) { - ok = true; - } - } else if (t1.type() == SqlType::Datetime) { - if (t2.type() == SqlType::Datetime) { - ok = true; - } - } - if (! ok) { - char b1[40], b2[40]; - t1.print(b1, sizeof(b1)); - t2.print(b2, sizeof(b2)); - ctx.pushStatus(Error::Gen, "cannot convert %s to %s", b2, b1); - return 0; - } - // depend on same tables - const TableSet& ts = m_expr->tableSet(); - m_tableSet.insert(ts.begin(), ts.end()); - // set alias - m_alias = m_expr->getAlias(); - return this; -} - -Exec_base* -Plan_expr_conv::codegen(Ctx& ctx, Ctl& ctl) -{ - if (m_exec != 0) - return m_exec; - Exec_expr_conv* exec = new Exec_expr_conv(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // create code for subexpression - ctx_assert(m_expr != 0); - Exec_expr* execExpr = static_cast(m_expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - exec->setExpr(execExpr); - // create the code - SqlSpec sqlSpec(sqlType(), SqlSpec::Physical); - Exec_expr_conv::Code& code = *new Exec_expr_conv::Code(sqlSpec); - exec->setCode(code); - m_exec = exec; - return exec; -} - -void -Plan_expr_conv::print(Ctx& ctx) -{ - ctx.print(" [expr_conv "); - char buf[100]; - m_sqlType.print(buf, sizeof(buf)); - ctx.print("%s", buf); - Plan_base* a[] = { m_expr }; - printList(ctx, a, 1); - ctx.print("]"); -} - -bool -Plan_expr_conv::isEqual(const Plan_expr* expr) const -{ - ctx_assert(expr != 0); - if (expr->type() != Plan_expr::TypeConv) - return false; - const Plan_expr_conv* expr2 = static_cast(expr); - if (! m_sqlType.equal(expr2->m_sqlType)) - return false; - ctx_assert(m_expr != 0 && expr2->m_expr != 0); - if (! m_expr->isEqual(expr2->m_expr)) - return false; - return true; -} - -bool -Plan_expr_conv::isGroupBy(const Plan_expr_row* row) const -{ - if (isAnyEqual(row)) - return true; - ctx_assert(m_expr != 0); - if (m_expr->isGroupBy(row)) - return true; - return false; -} - -// Code_expr_conv - -Exec_expr_conv::Code::~Code() -{ -} - -Exec_expr_conv::Data::~Data() -{ -} - -Exec_expr_conv::~Exec_expr_conv() -{ -} - -void -Exec_expr_conv::alloc(Ctx& ctx, Ctl& ctl) -{ - if (m_data != 0) - return; - const Code& code = getCode(); - // allocate subexpression - ctx_assert(m_expr != 0); - m_expr->alloc(ctx, ctl); - if (! ctx.ok()) - return; - SqlField sqlField(code.m_sqlSpec); - Data& data = *new Data(sqlField); - setData(data); -} - -void -Exec_expr_conv::close(Ctx& ctx) -{ - ctx_assert(m_expr != 0); - m_expr->close(ctx); - Data& data = getData(); - data.m_groupField.clear(); -} - -void -Exec_expr_conv::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [expr_conv"); - Exec_base* a[] = { m_expr }; - printList(ctx, a, sizeof(a)/sizeof(a[0])); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_conv.hpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_conv.hpp deleted file mode 100644 index 3294960c7b3..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_conv.hpp +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_expr_conv_hpp -#define ODBC_CODEGEN_Code_expr_conv_hpp - -#include -#include -#include "Code_expr.hpp" - -/** - * @class Plan_expr_conv - * @brief Data type conversion in PlanTree - * - * Inserted to convert value to another compatible type. - */ -class Plan_expr_conv : public Plan_expr { -public: - Plan_expr_conv(Plan_root* root, const SqlType& sqlType); - virtual ~Plan_expr_conv(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - bool isEqual(const Plan_expr* expr) const; - bool isGroupBy(const Plan_expr_row* row) const; - // children - void setExpr(Plan_expr* expr); -protected: - Plan_expr* m_expr; -}; - -inline -Plan_expr_conv::Plan_expr_conv(Plan_root* root, const SqlType& sqlType) : - Plan_expr(root, TypeConv), - m_expr(0) -{ - ctx_assert(sqlType.type() != SqlType::Undef); - m_sqlType = sqlType; -} - -inline void -Plan_expr_conv::setExpr(Plan_expr* expr) -{ - ctx_assert(expr != 0); - m_expr = expr; -} - -/** - * @class Exec_expr_conv - * @brief Data type conversion in ExecTree - */ -class Exec_expr_conv : public Exec_expr { -public: - class Code : public Exec_expr::Code { - public: - Code(const SqlSpec& spec); - virtual ~Code(); - protected: - friend class Exec_expr_conv; - const SqlSpec m_sqlSpec; - }; - class Data : public Exec_expr::Data { - public: - Data(const SqlField& sqlField); - virtual ~Data(); - protected: - friend class Exec_expr_conv; - SqlField m_sqlField; - }; - Exec_expr_conv(Exec_root* root); - virtual ~Exec_expr_conv(); - void alloc(Ctx& ctx, Ctl& ctl); - void evaluate(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setExpr(Exec_expr* expr); -protected: - Exec_expr* m_expr; -}; - -inline -Exec_expr_conv::Code::Code(const SqlSpec& sqlSpec) : - Exec_expr::Code(m_sqlSpec), - m_sqlSpec(sqlSpec) -{ -} - -inline -Exec_expr_conv::Data::Data(const SqlField& sqlField) : - Exec_expr::Data(m_sqlField), - m_sqlField(sqlField) -{ -} - -inline -Exec_expr_conv::Exec_expr_conv(Exec_root* root) : - Exec_expr(root), - m_expr(0) -{ -} - -// children - -inline const Exec_expr_conv::Code& -Exec_expr_conv::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_expr_conv::Data& -Exec_expr_conv::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_expr_conv::setExpr(Exec_expr* expr) -{ - ctx_assert(m_expr == 0 && expr != 0); - m_expr = expr; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_func.cpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_func.cpp deleted file mode 100644 index 96b461a72d9..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_func.cpp +++ /dev/null @@ -1,401 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_expr.hpp" -#include "Code_expr_func.hpp" -#include "Code_expr_conv.hpp" -#include "Code_root.hpp" -#include "PortDefs.h" - - -// Expr_func - -static const struct { const char* alias; const char* name; } -expr_func_alias[] = { - { "SUBSTRING", "SUBSTR" }, - { 0, 0 } -}; - -static const Expr_func -expr_func[] = { - Expr_func(Expr_func::Substr, "SUBSTR", false ), - Expr_func(Expr_func::Left, "LEFT", false ), - Expr_func(Expr_func::Right, "RIGHT", false ), - Expr_func(Expr_func::Count, "COUNT", true ), - Expr_func(Expr_func::Max, "MAX", true ), - Expr_func(Expr_func::Min, "MIN", true ), - Expr_func(Expr_func::Sum, "SUM", true ), - Expr_func(Expr_func::Avg, "AVG", true ), - Expr_func(Expr_func::Rownum, "ROWNUM", false ), - Expr_func(Expr_func::Sysdate, "SYSDATE", false ), - Expr_func(Expr_func::Undef, 0, false ) -}; - -const Expr_func& -Expr_func::find(const char* name) -{ - for (unsigned i = 0; expr_func_alias[i].alias != 0; i++) { - if (strcasecmp(expr_func_alias[i].alias, name) == 0) { - name = expr_func_alias[i].name; - break; - } - } - const Expr_func* p; - for (p = expr_func; p->m_name != 0; p++) { - if (strcasecmp(p->m_name, name) == 0) - break; - } - return *p; -} - -// Plan_expr_func - -Plan_expr_func::~Plan_expr_func() -{ - delete[] m_conv; - m_conv = 0; -} - -Plan_base* -Plan_expr_func::analyze(Ctx& ctx, Ctl& ctl) -{ - m_exec = 0; - ctx_assert(m_narg == 0 || m_args != 0); - // aggregate check - if (m_func.m_aggr) { - if (! ctl.m_aggrok) { - ctx.pushStatus(Error::Gen, "%s: invalid use of aggregate function", m_func.m_name); - return 0; - } - if (ctl.m_aggrin) { - // XXX actually possible with group-by but too hard - ctx.pushStatus(Error::Gen, "%s: nested aggregate function", m_func.m_name); - return 0; - } - ctl.m_aggrin = true; - m_isAggr = true; - m_isBound = true; - } - // analyze argument expressions - if (m_func.m_code != Expr_func::Rownum) - m_isBound = true; - for (unsigned i = 1; i <= m_narg; i++) { - Plan_expr* expr = m_args->getExpr(i); - expr = static_cast(expr->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(expr != 0); - if (expr->m_isAggr) - m_isAggr = true; - if (! m_func.m_aggr && ! expr->m_isBound) - m_isBound = false; - } - if (m_func.m_aggr) - ctl.m_aggrin = false; - // find result type and conversion types - SqlType res; - const Expr_func::Code fc = m_func.m_code; - const char* const invalidArgCount = "%s: argument count %u is invalid"; - const char* const invalidArgType = "%s: argument %u has invalid type"; - if (fc == Expr_func::Substr || fc == Expr_func::Left || fc == Expr_func::Right) { - if ((m_narg != (unsigned)2) && (m_narg != (unsigned)(fc == Expr_func::Substr ? 3 : 2))) { - ctx.pushStatus(Error::Gen, invalidArgCount, m_func.m_name, m_narg); - return 0; - } - const SqlType& t1 = m_args->getExpr(1)->sqlType(); - switch (t1.type()) { - case SqlType::Char: - { - // XXX convert to varchar for now to get length right - SqlType tx(SqlType::Varchar, t1.length()); - res = m_conv[1] = tx; - } - break; - case SqlType::Varchar: - case SqlType::Unbound: - res = m_conv[1] = t1; - break; - default: - ctx.pushStatus(Error::Gen, invalidArgType, m_func.m_name, 1); - return 0; - } - for (unsigned i = 2; i <= m_narg; i++) { - const SqlType& t2 = m_args->getExpr(i)->sqlType(); - switch (t2.type()) { - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - case SqlType::Unbound: - m_conv[i] = t2; - break; - default: - ctx.pushStatus(Error::Gen, invalidArgType, m_func.m_name, i); - return 0; - } - } - } else if (fc == Expr_func::Count) { - ctx_assert(m_args != 0); - if (m_args->getAsterisk()) { - ctx_assert(m_narg == 0); - } else { - if (m_narg != 1) { - ctx.pushStatus(Error::Gen, invalidArgCount, m_func.m_name, m_narg); - return 0; - } - m_conv[1] = m_args->getExpr(1)->sqlType(); - } - res.setType(ctx, SqlType::Bigint); - } else if (fc == Expr_func::Min || fc == Expr_func::Max) { - if (m_narg != 1) { - ctx.pushStatus(Error::Gen, invalidArgCount, m_func.m_name, m_narg); - return 0; - } - const SqlType& t1 = m_args->getExpr(1)->sqlType(); - res = m_conv[1] = t1; - } else if (fc == Expr_func::Sum) { - if (m_narg != 1) { - ctx.pushStatus(Error::Gen, invalidArgCount, m_func.m_name, m_narg); - return 0; - } - const SqlType& t1 = m_args->getExpr(1)->sqlType(); - switch (t1.type()) { - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - res.setType(ctx, SqlType::Bigint); - m_conv[1] = res; - break; - case SqlType::Real: - case SqlType::Double: - res.setType(ctx, SqlType::Double); - m_conv[1] = res; - break; - case SqlType::Unbound: - res = m_conv[1] = t1; - break; - default: - ctx.pushStatus(Error::Gen, invalidArgType, m_func.m_name, 1); - return 0; - } - } else if (fc == Expr_func::Avg) { - if (m_narg != 1) { - ctx.pushStatus(Error::Gen, invalidArgCount, m_func.m_name, m_narg); - return 0; - } - const SqlType& t1 = m_args->getExpr(1)->sqlType(); - switch (t1.type()) { - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - case SqlType::Real: - case SqlType::Double: - res.setType(ctx, SqlType::Double); - m_conv[1] = res; - break; - case SqlType::Unbound: - res = m_conv[1] = t1; - break; - default: - ctx.pushStatus(Error::Gen, invalidArgType, m_func.m_name, 1); - return 0; - } - } else if (fc == Expr_func::Rownum) { - ctx_assert(m_narg == 0 && m_args == 0); - res.setType(ctx, SqlType::Bigint); - } else if (fc == Expr_func::Sysdate) { - ctx_assert(m_narg == 0 && m_args == 0); - res.setType(ctx, SqlType::Datetime); - } else { - ctx_assert(false); - } - // insert required conversions - for (unsigned i = 1; i <= m_narg; i++) { - if (m_conv[i].type() == SqlType::Unbound) { - // parameter type not yet bound - continue; - } - Plan_expr_conv* exprConv = new Plan_expr_conv(m_root, m_conv[i]); - m_root->saveNode(exprConv); - exprConv->setExpr(m_args->getExpr(i)); - Plan_expr* expr = static_cast(exprConv->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - m_args->setExpr(i, expr); - } - // set result type - m_sqlType = res; - // set table dependencies - for (unsigned i = 1; i <= m_narg; i++) { - const TableSet& ts = m_args->getExpr(i)->tableSet(); - m_tableSet.insert(ts.begin(), ts.end()); - } - // set alias name - m_alias.assign(m_func.m_name); - if (m_narg == 0) { - if (fc == Expr_func::Count) - m_alias.append("(*)"); - } else { - m_alias.append("("); - for (unsigned i = 1; i <= m_narg; i++) { - if (i > 1) - m_alias.append(","); - m_alias.append(m_args->getExpr(i)->getAlias()); - } - m_alias.append(")"); - } - return this; -} - -Exec_base* -Plan_expr_func::codegen(Ctx& ctx, Ctl& ctl) -{ - if (m_exec != 0) - return m_exec; - Exec_expr_func* exec = new Exec_expr_func(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - SqlSpec sqlSpec(sqlType(), SqlSpec::Physical); - Exec_expr_func::Code& code = *new Exec_expr_func::Code(m_func, sqlSpec); - exec->setCode(code); - code.m_narg = m_narg; - code.m_args = new Exec_expr* [1 + m_narg]; - for (unsigned i = 0; i <= m_narg; i++) - code.m_args[i] = 0; - // create code for arguments - for (unsigned i = 1; i <= m_narg; i++) { - Plan_expr* expr = m_args->getExpr(i); - ctx_assert(expr != 0); - Exec_expr* execExpr = static_cast(expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - code.m_args[i] = execExpr; - } - m_exec = exec; - return exec; -} - -void -Plan_expr_func::print(Ctx& ctx) -{ - ctx.print(" [%s", m_func.m_name); - Plan_base* a[] = { m_args }; - printList(ctx, a, sizeof(a)/sizeof(a[1])); - ctx.print("]"); -} - -bool -Plan_expr_func::isEqual(const Plan_expr* expr) const -{ - ctx_assert(expr != 0); - if (expr->type() != Plan_expr::TypeFunc) - return false; - const Plan_expr_func* expr2 = static_cast(expr); - if (m_func.m_code != expr2->m_func.m_code) - return false; - if (m_narg != expr2->m_narg) - return false; - ctx_assert(m_args != 0 && expr2->m_args != 0); - for (unsigned i = 1; i <= m_narg; i++) { - if (! m_args->getExpr(i)->isEqual(expr2->m_args->getExpr(i))) - return false; - } - return true; -} - -bool -Plan_expr_func::isGroupBy(const Plan_expr_row* row) const -{ - if (m_func.m_aggr) - return true; - switch (m_func.m_code) { - case Expr_func::Substr: - case Expr_func::Left: - case Expr_func::Right: - ctx_assert(m_narg >= 1); - if (m_args->getExpr(1)->isGroupBy(row)) - return true; - break; - case Expr_func::Sysdate: - return true; - default: - break; - } - if (isAnyEqual(row)) - return true; - return false; -} - -// Exec_expr_func - -Exec_expr_func::Code::~Code() -{ - delete[] m_args; - m_args = 0; -} - -Exec_expr_func::Data::~Data() -{ -} - -Exec_expr_func::~Exec_expr_func() -{ -} - -void -Exec_expr_func::alloc(Ctx& ctx, Ctl& ctl) -{ - if (m_data != 0) - return; - const Code& code = getCode(); - // allocate arguments - for (unsigned i = 1; i <= code.m_narg; i++) { - ctx_assert(code.m_args != 0 && code.m_args[i] != 0); - code.m_args[i]->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - SqlField sqlField(code.m_sqlSpec); - Data& data = *new Data(sqlField); - setData(data); - ctx_assert(ctl.m_groupIndex == 0); - init(ctx, ctl); -} - -void -Exec_expr_func::close(Ctx& ctx) -{ - const Code& code = getCode(); - Data& data = getData(); - for (unsigned i = 1; i <= code.m_narg; i++) { - ctx_assert(code.m_args != 0 && code.m_args[i] != 0); - code.m_args[i]->close(ctx); - } - data.m_groupField.clear(); - Ctl ctl(0); - init(ctx, ctl); -} - -void -Exec_expr_func::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [%s", code.m_func.m_name); - for (unsigned i = 1; i <= code.m_narg; i++) { - Exec_base* a[] = { code.m_args[i] }; - printList(ctx, a, sizeof(a)/sizeof(a[0])); - } - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_func.hpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_func.hpp deleted file mode 100644 index 856d7529875..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_func.hpp +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_expr_func_hpp -#define ODBC_CODEGEN_Code_expr_func_hpp - -#include -#include -#include "Code_expr.hpp" -#include "Code_expr_row.hpp" - -/** - * @class Expr_func - * @brief Specifies a function - */ -struct Expr_func { - enum Code { - Undef = 0, - Substr, - Left, - Right, - Count, - Max, - Min, - Sum, - Avg, - Rownum, - Sysdate - }; - Expr_func(Code code, const char* name, bool aggr); - Code m_code; - const char* m_name; - bool m_aggr; - static const Expr_func& find(const char* name); -}; - -inline -Expr_func::Expr_func(Code code, const char* name, bool aggr) : - m_code(code), - m_name(name), - m_aggr(aggr) -{ -} - -/** - * @class Plan_expr_func - * @brief Function node in an expression in PlanTree - */ -class Plan_expr_func : public Plan_expr { -public: - Plan_expr_func(Plan_root* root, const Expr_func& func); - virtual ~Plan_expr_func(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - bool isEqual(const Plan_expr* expr) const; - bool isGroupBy(const Plan_expr_row* row) const; - // children - void setArgs(Plan_expr_row* args); -protected: - const Expr_func& m_func; - Plan_expr_row* m_args; - unsigned m_narg; - SqlType* m_conv; // temp work area -}; - -inline -Plan_expr_func::Plan_expr_func(Plan_root* root, const Expr_func& func) : - Plan_expr(root, TypeFunc), - m_func(func), - m_args(0), - m_narg(0), - m_conv(0) -{ -} - -inline void -Plan_expr_func::setArgs(Plan_expr_row* args) -{ - if (args == 0) { - m_args = 0; - m_narg = 0; - } else { - m_args = args; - m_narg = m_args->getSize(); - delete[] m_conv; - m_conv = new SqlType[1 + m_narg]; - } -} - -/** - * @class Exec_expr_func - * @brief Function node in an expression in ExecTree - */ -class Exec_expr_func : public Exec_expr { -public: - class Code : public Exec_expr::Code { - public: - Code(const Expr_func& func, const SqlSpec& spec); - virtual ~Code(); - protected: - friend class Plan_expr_func; - friend class Exec_expr_func; - const Expr_func& m_func; - const SqlSpec m_sqlSpec; - unsigned m_narg; - Exec_expr** m_args; // XXX pointers for now - }; - class Data : public Exec_expr::Data { - public: - Data(const SqlField& sqlField); - virtual ~Data(); - protected: - friend class Exec_expr_func; - SqlField m_sqlField; - struct Acc { // accumulators etc - SqlBigint m_count; // current row count - union { - SqlBigint m_bigint; - SqlDouble m_double; - SqlDatetime m_sysdate; - }; - }; - // group-by extra accumulators (default in entry 0) - typedef std::vector GroupAcc; - GroupAcc m_groupAcc; - }; - Exec_expr_func(Exec_root* root); - virtual ~Exec_expr_func(); - void alloc(Ctx& ctx, Ctl& ctl); - void evaluate(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -protected: - void init(Ctx &ctx, Ctl& ctl); // initialize values -}; - -inline -Exec_expr_func::Code::Code(const Expr_func& func, const SqlSpec& sqlSpec) : - Exec_expr::Code(m_sqlSpec), - m_func(func), - m_sqlSpec(sqlSpec), - m_args(0) -{ -} - -inline -Exec_expr_func::Data::Data(const SqlField& sqlField) : - Exec_expr::Data(m_sqlField), - m_sqlField(sqlField), - m_groupAcc(1) -{ -} - -inline -Exec_expr_func::Exec_expr_func(Exec_root* root) : - Exec_expr(root) -{ -} - -// children - -inline const Exec_expr_func::Code& -Exec_expr_func::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_expr_func::Data& -Exec_expr_func::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_op.cpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_op.cpp deleted file mode 100644 index 7e8314c1741..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_op.cpp +++ /dev/null @@ -1,424 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_expr.hpp" -#include "Code_expr_op.hpp" -#include "Code_expr_conv.hpp" -#include "Code_root.hpp" - -// Expr_op - -const char* -Expr_op::name() const -{ - switch (m_opcode) { - case Add: - return "+"; - case Subtract: - return "-"; - case Multiply: - return "*"; - case Divide: - return "/"; - case Plus: - return "+"; - case Minus: - return "-"; - } - ctx_assert(false); - return ""; -} - -unsigned -Expr_op::arity() const -{ - switch (m_opcode) { - case Add: - case Subtract: - case Multiply: - case Divide: - return 2; - case Plus: - case Minus: - return 1; - } - ctx_assert(false); - return 0; -} - -// Plan_expr_op - -Plan_expr_op::~Plan_expr_op() -{ -} - -Plan_base* -Plan_expr_op::analyze(Ctx& ctx, Ctl& ctl) -{ - m_exec = 0; - unsigned arity = m_op.arity(); - // analyze operands - m_isAggr = false; - m_isBound = true; - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - m_expr[i]->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - if (m_expr[i]->m_isAggr) - m_isAggr = true; - if (! m_expr[i]->m_isBound) - m_isBound = false; - } - // find result type and conversion types (currently same) - SqlType res; - SqlType con[1 + 2]; - if (arity == 1) { - const SqlType& t1 = m_expr[1]->sqlType(); - switch (t1.type()) { - case SqlType::Char: - case SqlType::Varchar: - break; - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - res.setType(ctx, SqlType::Bigint); - con[1] = res; - break; - case SqlType::Real: - case SqlType::Double: - res.setType(ctx, SqlType::Double); - con[1] = res; - break; - case SqlType::Null: - res.setType(ctx, SqlType::Null); - con[1] = res; - break; - case SqlType::Unbound: - res.setType(ctx, SqlType::Unbound); - con[1] = res; - default: - break; - } - if (con[1].type() == SqlType::Undef) { - char b1[40]; - t1.print(b1, sizeof(b1)); - ctx.pushStatus(Error::Gen, "type mismatch in operation: %s %s", m_op.name(), b1); - return 0; - } - } else if (arity == 2) { - const SqlType& t1 = m_expr[1]->sqlType(); - const SqlType& t2 = m_expr[2]->sqlType(); - switch (t1.type()) { - case SqlType::Char: // handle char types as in oracle - switch (t2.type()) { - case SqlType::Char: - res.setType(ctx, SqlType::Char, t1.length() + t2.length()); - con[1] = t1; - con[2] = t2; - break; - case SqlType::Varchar: - res.setType(ctx, SqlType::Varchar, t1.length() + t2.length()); - con[1] = t1; - con[2] = t2; - break; - case SqlType::Null: - res.setType(ctx, SqlType::Varchar, t1.length()); - con[1] = t1; - con[2] = t2; - break; - case SqlType::Unbound: - res.setType(ctx, SqlType::Unbound); - con[1] = con[2] = res; - break; - default: - break; - } - break; - case SqlType::Varchar: - switch (t2.type()) { - case SqlType::Char: - res.setType(ctx, SqlType::Varchar, t1.length() + t2.length()); - con[1] = t1; - con[2] = t2; - break; - case SqlType::Varchar: - res.setType(ctx, SqlType::Varchar, t1.length() + t2.length()); - con[1] = t1; - con[2] = t2; - break; - case SqlType::Null: - res.setType(ctx, SqlType::Varchar, t1.length()); - con[1] = t1; - con[2] = t2; - break; - case SqlType::Unbound: - res.setType(ctx, SqlType::Unbound); - con[1] = con[2] = res; - break; - default: - break; - } - break; - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - switch (t2.type()) { - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - res.setType(ctx, SqlType::Bigint); - con[1] = con[2] = res; - if (t1.unSigned() || t2.unSigned()) { - con[1].unSigned(true); - con[2].unSigned(true); - } - break; - case SqlType::Real: - case SqlType::Double: - res.setType(ctx, SqlType::Double); - con[1] = con[2] = res; - break; - case SqlType::Null: - res.setType(ctx, SqlType::Null); - con[1] = con[2] = res; - break; - case SqlType::Unbound: - res.setType(ctx, SqlType::Unbound); - con[1] = con[2] = res; - break; - default: - break; - } - break; - case SqlType::Real: - case SqlType::Double: - switch (t2.type()) { - case SqlType::Smallint: - case SqlType::Integer: - case SqlType::Bigint: - case SqlType::Real: - case SqlType::Double: - res.setType(ctx, SqlType::Double); - con[1] = con[2] = res; - break; - case SqlType::Null: - res.setType(ctx, SqlType::Null); - con[1] = con[2] = res; - break; - case SqlType::Unbound: - res.setType(ctx, SqlType::Unbound); - con[1] = con[2] = res; - break; - default: - break; - } - break; - case SqlType::Null: - switch (t2.type()) { - case SqlType::Char: - case SqlType::Varchar: - res.setType(ctx, SqlType::Varchar, t2.length()); - con[1] = con[2] = res; - break; - case SqlType::Unbound: - res.setType(ctx, SqlType::Unbound); - con[1] = con[2] = res; - break; - default: - res.setType(ctx, SqlType::Null); - con[1] = con[2] = res; - break; - } - break; - case SqlType::Unbound: - res.setType(ctx, SqlType::Unbound); - con[1] = con[2] = res; - break; - default: - break; - } - if (con[1].type() == SqlType::Undef || con[2].type() == SqlType::Undef) { - char b1[40], b2[40]; - t1.print(b1, sizeof(b1)); - t2.print(b2, sizeof(b2)); - ctx.pushStatus(Error::Gen, "type mismatch in operation: %s %s %s", b1, m_op.name(), b2); - return 0; - } - } else { - ctx_assert(false); - return 0; - } - if (! ctx.ok()) - return 0; - // insert required conversions - for (unsigned i = 1; i <= arity; i++) { - if (con[i].type() == SqlType::Undef) { - ctx.pushStatus(Error::Gen, "mismatched types in operation"); - return 0; - } - if (con[i].type() == SqlType::Unbound) { - // parameter type not yet bound - continue; - } - Plan_expr_conv* exprConv = new Plan_expr_conv(m_root, con[i]); - m_root->saveNode(exprConv); - exprConv->setExpr(m_expr[i]); - m_expr[i] = static_cast(exprConv->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_expr[i] != 0); - } - // set result type - m_sqlType = res; - // table dependencies are union from operands - for (unsigned i = 1; i <= arity; i++) { - const TableSet& ts = m_expr[i]->tableSet(); - m_tableSet.insert(ts.begin(), ts.end()); - } - // set alias name XXX misses operator precedence - if (arity == 1) { - m_alias.assign(m_op.name()); - m_alias.append(m_expr[1]->m_alias); - } else if (arity == 2) { - m_alias.assign(m_expr[1]->m_alias); - m_alias.append(m_op.name()); - m_alias.append(m_expr[2]->m_alias); - } - return this; -} - -Exec_base* -Plan_expr_op::codegen(Ctx& ctx, Ctl& ctl) -{ - if (m_exec != 0) - return m_exec; - unsigned arity = m_op.arity(); - Exec_expr_op* exec = new Exec_expr_op(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // create code for operands - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - Exec_expr* execExpr = static_cast(m_expr[i]->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - exec->setExpr(i, execExpr); - } - // create the code - SqlSpec sqlSpec(sqlType(), SqlSpec::Physical); - Exec_expr_op::Code& code = *new Exec_expr_op::Code(m_op, sqlSpec); - exec->setCode(code); - m_exec = exec; - return exec; -} - -void -Plan_expr_op::print(Ctx& ctx) -{ - ctx.print(" [%s", m_op.name()); - Plan_base* a[] = { m_expr[1], m_expr[2] }; - printList(ctx, a, m_op.arity()); - ctx.print("]"); -} - -bool -Plan_expr_op::isEqual(const Plan_expr* expr) const -{ - ctx_assert(expr != 0); - if (expr->type() != Plan_expr::TypeOp) - return false; - const Plan_expr_op* expr2 = static_cast(expr); - if (m_op.m_opcode != expr2->m_op.m_opcode) - return false; - const unsigned arity = m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - if (! m_expr[i]->isEqual(expr2->m_expr[i])) - return false; - } - return true; -} - -bool -Plan_expr_op::isGroupBy(const Plan_expr_row* row) const -{ - if (isAnyEqual(row)) - return true; - const unsigned arity = m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - if (! m_expr[i]->isGroupBy(row)) - return false; - } - return true; -} - -// Code_expr_op - -Exec_expr_op::Code::~Code() -{ -} - -Exec_expr_op::Data::~Data() -{ -} - -Exec_expr_op::~Exec_expr_op() -{ -} - -void -Exec_expr_op::alloc(Ctx& ctx, Ctl& ctl) -{ - if (m_data != 0) - return; - const Code& code = getCode(); - // allocate subexpressions - unsigned arity = code.m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - m_expr[i]->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - SqlField sqlField(code.m_sqlSpec); - Data& data = *new Data(sqlField); - setData(data); -} - -void -Exec_expr_op::close(Ctx& ctx) -{ - const Code& code = getCode(); - unsigned arity = code.m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_expr[i] != 0); - m_expr[i]->close(ctx); - } - Data& data = getData(); - data.m_groupField.clear(); -} - -void -Exec_expr_op::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [%s", code.m_op.name()); - Exec_base* a[] = { m_expr[1], m_expr[2] }; - printList(ctx, a, code.m_op.arity()); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_op.hpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_op.hpp deleted file mode 100644 index f9686cad151..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_op.hpp +++ /dev/null @@ -1,166 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_expr_op_hpp -#define ODBC_CODEGEN_Code_expr_op_hpp - -#include -#include -#include "Code_expr.hpp" - -/** - * @class Expr_op - * @brief Arithmetic and string operators - */ -struct Expr_op { - enum Opcode { - Add = 1, // binary - Subtract, - Multiply, - Divide, - Plus, // unary - Minus - }; - Expr_op(Opcode opcode); - const char* name() const; - unsigned arity() const; - Opcode m_opcode; -}; - -inline -Expr_op::Expr_op(Opcode opcode) : - m_opcode(opcode) -{ -} - -/** - * @class Plan_expr_op - * @brief Operator node in an expression in PlanTree - */ -class Plan_expr_op : public Plan_expr { -public: - Plan_expr_op(Plan_root* root, Expr_op op); - virtual ~Plan_expr_op(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - bool isEqual(const Plan_expr* expr) const; - bool isGroupBy(const Plan_expr_row* row) const; - // children - void setExpr(unsigned i, Plan_expr* expr); -protected: - Expr_op m_op; - Plan_expr* m_expr[1 + 2]; -}; - -inline -Plan_expr_op::Plan_expr_op(Plan_root* root, Expr_op op) : - Plan_expr(root, TypeOp), - m_op(op) -{ - m_expr[0] = m_expr[1] = m_expr[2] = 0; -} - -inline void -Plan_expr_op::setExpr(unsigned i, Plan_expr* expr) -{ - ctx_assert(1 <= i && i <= 2 && expr != 0); - m_expr[i] = expr; -} - -/** - * @class Exec_expr_op - * @brief Operator node in an expression in ExecTree - */ -class Exec_expr_op : public Exec_expr { -public: - class Code : public Exec_expr::Code { - public: - Code(Expr_op op, const SqlSpec& spec); - virtual ~Code(); - protected: - friend class Exec_expr_op; - Expr_op m_op; - const SqlSpec m_sqlSpec; - }; - class Data : public Exec_expr::Data { - public: - Data(const SqlField& sqlField); - virtual ~Data(); - protected: - friend class Exec_expr_op; - SqlField m_sqlField; - }; - Exec_expr_op(Exec_root* root); - virtual ~Exec_expr_op(); - void alloc(Ctx& ctx, Ctl& ctl); - void evaluate(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setExpr(unsigned i, Exec_expr* expr); -protected: - Exec_expr* m_expr[1 + 2]; -}; - -inline -Exec_expr_op::Code::Code(Expr_op op, const SqlSpec& sqlSpec) : - Exec_expr::Code(m_sqlSpec), - m_op(op), - m_sqlSpec(sqlSpec) -{ -} - -inline -Exec_expr_op::Data::Data(const SqlField& sqlField) : - Exec_expr::Data(m_sqlField), - m_sqlField(sqlField) -{ -} - -inline -Exec_expr_op::Exec_expr_op(Exec_root* root) : - Exec_expr(root) -{ - m_expr[0] = m_expr[1] = m_expr[2] = 0; -} - -// children - -inline const Exec_expr_op::Code& -Exec_expr_op::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_expr_op::Data& -Exec_expr_op::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_expr_op::setExpr(unsigned i, Exec_expr* expr) -{ - ctx_assert(1 <= i && i <= 2 && m_expr[i] == 0); - m_expr[i] = expr; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_param.cpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_param.cpp deleted file mode 100644 index 93892cae5e6..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_param.cpp +++ /dev/null @@ -1,279 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_expr_param.hpp" -#include "Code_root.hpp" - -// Plan_expr_param - -Plan_expr_param::~Plan_expr_param() -{ -} - -Plan_base* -Plan_expr_param::analyze(Ctx& ctx, Ctl& ctl) -{ - m_exec = 0; - ctx_assert(m_paramNumber != 0); - ctx_assert(m_paramNumber < m_root->m_paramList.size()); - m_root->m_paramList[m_paramNumber] = this; - m_sqlType.setType(ctx, SqlType::Unbound); - // check if type is bound now - DescArea& ipd = descArea(Desc_usage_IPD); - if (m_paramNumber <= ipd.getCount()) { - DescRec& rec = ipd.getRecord(m_paramNumber); - OdbcData descData; - rec.getField(ctx, SQL_DESC_TYPE, descData); - if (descData.type() != OdbcData::Undef) { - SQLSMALLINT desc_TYPE = descData.smallint(); - // XXX wrong but fixes sun.jdbc.odbc - if (desc_TYPE == SQL_CHAR) - desc_TYPE = SQL_VARCHAR; - if (desc_TYPE == SQL_CHAR) { - rec.getField(ctx, SQL_DESC_LENGTH, descData); - if (descData.type() != OdbcData::Undef) { - unsigned desc_LENGTH = descData.uinteger(); - m_sqlType.setType(ctx, SqlType::Char, desc_LENGTH); - } - } else if (desc_TYPE == SQL_VARCHAR) { - rec.getField(ctx, SQL_DESC_LENGTH, descData); - if (descData.type() != OdbcData::Undef) { - unsigned desc_LENGTH = descData.uinteger(); - m_sqlType.setType(ctx, SqlType::Varchar, desc_LENGTH); - } - } else if (desc_TYPE == SQL_BINARY) { - rec.getField(ctx, SQL_DESC_LENGTH, descData); - if (descData.type() != OdbcData::Undef) { - unsigned desc_LENGTH = descData.uinteger(); - m_sqlType.setType(ctx, SqlType::Binary, desc_LENGTH); - } - } else if (desc_TYPE == SQL_VARBINARY) { - rec.getField(ctx, SQL_DESC_LENGTH, descData); - if (descData.type() != OdbcData::Undef) { - unsigned desc_LENGTH = descData.uinteger(); - m_sqlType.setType(ctx, SqlType::Varbinary, desc_LENGTH); - } else { - // XXX BLOB hack - unsigned desc_LENGTH = FAKE_BLOB_SIZE; - m_sqlType.setType(ctx, SqlType::Varbinary, desc_LENGTH); - } - } else if (desc_TYPE == SQL_SMALLINT) { - m_sqlType.setType(ctx, SqlType::Smallint); - } else if (desc_TYPE == SQL_INTEGER) { - m_sqlType.setType(ctx, SqlType::Integer); - } else if (desc_TYPE == SQL_BIGINT) { - m_sqlType.setType(ctx, SqlType::Bigint); - } else if (desc_TYPE == SQL_REAL) { - m_sqlType.setType(ctx, SqlType::Real); - } else if (desc_TYPE == SQL_DOUBLE) { - m_sqlType.setType(ctx, SqlType::Double); - } else if (desc_TYPE == SQL_TYPE_TIMESTAMP) { - m_sqlType.setType(ctx, SqlType::Datetime); - // XXX BLOB hack - } else if (desc_TYPE == SQL_LONGVARBINARY) { - m_sqlType.setType(ctx, SqlType::Varbinary, (unsigned)FAKE_BLOB_SIZE); - } else { - ctx.pushStatus(Error::Gen, "parameter %u unsupported SQL type %d", m_paramNumber, (int)desc_TYPE); - return 0; - } - char buf[100]; - m_sqlType.print(buf, sizeof(buf)); - ctx_log2(("parameter %u SQL type bound to %s", m_paramNumber, buf)); - } - } - return this; -} - -void -Plan_expr_param::describe(Ctx& ctx) -{ - DescArea& ipd = descArea(Desc_usage_IPD); - if (ipd.getCount() < m_paramNumber) - ipd.setCount(ctx, m_paramNumber); - // XXX describe if possible - DescRec& rec = ipd.getRecord(m_paramNumber); -} - -Exec_base* -Plan_expr_param::codegen(Ctx& ctx, Ctl& ctl) -{ - if (m_exec != 0) - return m_exec; - SqlSpec sqlSpec(m_sqlType, SqlSpec::Physical); - // create code - Exec_expr_param* exec = new Exec_expr_param(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - ctx_assert(m_paramNumber != 0); - Exec_expr_param::Code& code = *new Exec_expr_param::Code(sqlSpec, m_paramNumber); - exec->setCode(code); - m_exec = exec; - return exec; -} - -void -Plan_expr_param::print(Ctx& ctx) -{ - ctx.print(" [param %u]", m_paramNumber); -} - -bool -Plan_expr_param::isEqual(const Plan_expr* expr) const -{ - ctx_assert(expr != 0); - if (expr->type() != Plan_expr::TypeParam) - return false; - const Plan_expr_param* expr2 = static_cast(expr); - // params are not equal ever - return false; -} - -bool -Plan_expr_param::isGroupBy(const Plan_expr_row* row) const -{ - // params are constants - return true; -} - -// Exec_expr_param - -Exec_expr_param::Code::~Code() -{ -} - -Exec_expr_param::Data::~Data() -{ - delete m_extField; - m_extField = 0; -} - -Exec_expr_param::~Exec_expr_param() -{ -} - -void -Exec_expr_param::alloc(Ctx& ctx, Ctl& ctl) -{ - if (m_data != 0) - return; - const Code& code = getCode(); - SqlField sqlField(code.sqlSpec()); - Data& data = *new Data(sqlField); - setData(data); -} - -void -Exec_expr_param::bind(Ctx& ctx) -{ - const Code& code = getCode(); - Data& data = getData(); - DescArea& apd = descArea(Desc_usage_APD); - if (apd.getCount() < code.m_paramNumber) { - ctx_log1(("parameter %u is not bound", code.m_paramNumber)); - return; - } - const unsigned paramNumber = code.m_paramNumber; - DescRec& rec = apd.getRecord(paramNumber); - OdbcData descData; - // create type - rec.getField(ctx, SQL_DESC_TYPE, descData); - if (descData.type() == OdbcData::Undef) { - ctx.pushStatus(Error::Gen, "parameter %u external type not defined", paramNumber); - return; - } - ExtType extType; - SQLSMALLINT desc_TYPE = descData.smallint(); - switch (desc_TYPE) { - case SQL_C_CHAR: - case SQL_C_SHORT: // for sun.jdbc.odbc - case SQL_C_SSHORT: - case SQL_C_USHORT: - case SQL_C_LONG: // for sun.jdbc.odbc - case SQL_C_SLONG: - case SQL_C_ULONG: - case SQL_C_SBIGINT: - case SQL_C_UBIGINT: - case SQL_C_FLOAT: - case SQL_C_DOUBLE: - case SQL_C_TYPE_TIMESTAMP: - case SQL_C_BINARY: // XXX BLOB hack - break; - default: - ctx.pushStatus(Error::Gen, "parameter %u unsupported external type %d", paramNumber, (int)desc_TYPE); - return; - } - extType.setType(ctx, static_cast(desc_TYPE)); - ExtSpec extSpec(extType); - // create data field - rec.getField(ctx, SQL_DESC_DATA_PTR, descData); - if (descData.type() == OdbcData::Undef) { - ctx.pushStatus(Error::Gen, "parameter %u data address not defined", paramNumber); - return; - } - SQLPOINTER desc_DATA_PTR = descData.pointer(); - rec.getField(ctx, SQL_DESC_OCTET_LENGTH, descData); - if (descData.type() == OdbcData::Undef) { - ctx.pushStatus(Error::Gen, "parameter %u data length not defined", paramNumber); - return; - } - SQLINTEGER desc_OCTET_LENGTH = descData.integer(); - rec.getField(ctx, SQL_DESC_INDICATOR_PTR, descData); - if (descData.type() == OdbcData::Undef) { - ctx.pushStatus(Error::Gen, "parameter %u indicator address not defined", paramNumber); - return; - } - SQLINTEGER* desc_INDICATOR_PTR = descData.integerPtr(); - ctx_log4(("parameter %u bind to 0x%x %d 0x%x", paramNumber, (unsigned)desc_DATA_PTR, (int)desc_OCTET_LENGTH, (unsigned)desc_INDICATOR_PTR)); - ExtField& extField = *new ExtField(extSpec, desc_DATA_PTR, desc_OCTET_LENGTH, desc_INDICATOR_PTR, paramNumber); - data.m_atExec = false; - if (desc_INDICATOR_PTR != 0 && *desc_INDICATOR_PTR < 0) { - if (*desc_INDICATOR_PTR == SQL_NULL_DATA) { - ; - } else if (*desc_INDICATOR_PTR == SQL_DATA_AT_EXEC) { - data.m_atExec = true; - } else if (*desc_INDICATOR_PTR <= SQL_LEN_DATA_AT_EXEC(0)) { - data.m_atExec = true; - } - } - delete data.m_extField; - data.m_extField = &extField; -} - -void -Exec_expr_param::evaluate(Ctx& ctx, Ctl& ctl) -{ - if (ctl.m_postEval) - return; - const Code& code = getCode(); - Data& data = getData(); - if (data.m_atExec) - return; - ctx_assert(data.m_extField != 0); - data.m_sqlField.copyin(ctx, *data.m_extField); -} - -void -Exec_expr_param::close(Ctx& ctx) -{ - Data& data = getData(); - data.m_extPos = -1; -} - -void -Exec_expr_param::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [param %u]", code.m_paramNumber); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_param.hpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_param.hpp deleted file mode 100644 index 783e5c087b4..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_param.hpp +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_expr_param_hpp -#define ODBC_CODEGEN_Code_expr_param_hpp - -#include -#include -#include "Code_expr.hpp" - -/** - * @class Plan_expr_param - * @brief Constant expression value in PlanTree - */ -class Plan_expr_param : public Plan_expr { -public: - Plan_expr_param(Plan_root* root, unsigned paramNumber); - virtual ~Plan_expr_param(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - bool isEqual(const Plan_expr* expr) const; - bool isGroupBy(const Plan_expr_row* row) const; -protected: - const unsigned m_paramNumber; -}; - -inline -Plan_expr_param::Plan_expr_param(Plan_root* root, unsigned paramNumber) : - Plan_expr(root, TypeParam), - m_paramNumber(paramNumber) -{ -} - -/** - * @class Exec_expr_param - * @brief Constant expression value in ExecTree - */ -class Exec_expr_param : public Exec_expr { -public: - class Code : public Exec_expr::Code { - public: - Code(const SqlSpec& sqlSpec, unsigned paramNumber); - virtual ~Code(); - protected: - friend class Plan_expr_param; - friend class Exec_expr_param; - const SqlSpec m_sqlSpec; - const unsigned m_paramNumber; - }; - class Data : public Exec_expr::Data { - public: - Data(SqlField& sqlField); - virtual ~Data(); - ExtField* extField() const; - protected: - friend class Exec_expr_param; - friend class Exec_root; - SqlField m_sqlField; - ExtField* m_extField; // input binding - bool m_atExec; // data at exec - int m_extPos; // position for SQLPutData (-1 before first call) - }; - Exec_expr_param(Exec_root* root); - virtual ~Exec_expr_param(); - void alloc(Ctx& ctx, Ctl& ctl); - void bind(Ctx& ctx); - void evaluate(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_expr_param::Code::Code(const SqlSpec& sqlSpec, unsigned paramNumber) : - Exec_expr::Code(m_sqlSpec), - m_sqlSpec(sqlSpec), - m_paramNumber(paramNumber) -{ -} - -inline -Exec_expr_param::Data::Data(SqlField& sqlField) : - Exec_expr::Data(m_sqlField), - m_sqlField(sqlField), - m_extField(0), - m_atExec(false), - m_extPos(-1) -{ -} - -inline ExtField* -Exec_expr_param::Data::extField() const -{ - return m_extField; -} - -inline -Exec_expr_param::Exec_expr_param(Exec_root* root) : - Exec_expr(root) -{ -} - -// children - -inline const Exec_expr_param::Code& -Exec_expr_param::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_expr_param::Data& -Exec_expr_param::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_row.cpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_row.cpp deleted file mode 100644 index da1751d41d1..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_row.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_expr_row.hpp" -#include "Code_expr.hpp" -#include "Code_expr_conv.hpp" -#include "Code_dml_row.hpp" -#include "Code_root.hpp" - -// Plan_expr_row - -Plan_expr_row::~Plan_expr_row() -{ -} - -Plan_base* -Plan_expr_row::analyze(Ctx& ctx, Ctl& ctl) -{ - unsigned size = getSize(); - // analyze subexpressions - m_anyAggr = false; - m_allBound = true; - for (unsigned i = 1; i <= size; i++) { - Plan_expr* expr1 = getExpr(i); - Plan_expr* expr2 = static_cast(expr1->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - setExpr(i, expr2); - if (expr2->isAggr()) - m_anyAggr = true; - if (! expr2->isBound()) - m_allBound = false; - } - // insert conversions if requested XXX ugly hack - if (ctl.m_dmlRow != 0) { - if (ctl.m_dmlRow->getSize() > getSize()) { - ctx.pushStatus(Sqlstate::_21S01, Error::Gen, "not enough values (%u > %u)", ctl.m_dmlRow->getSize(), getSize()); - return 0; - } - if (ctl.m_dmlRow->getSize() < getSize()) { - ctx.pushStatus(Sqlstate::_21S01, Error::Gen, "too many values (%u < %u)", ctl.m_dmlRow->getSize(), getSize()); - return 0; - } - for (unsigned i = 1; i <= size; i++) { - const SqlType& sqlType = ctl.m_dmlRow->getColumn(i)->sqlType(); - Plan_expr_conv* exprConv = new Plan_expr_conv(m_root, sqlType); - m_root->saveNode(exprConv); - exprConv->setExpr(getExpr(i)); - Plan_expr* expr = static_cast(exprConv->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(expr != 0); - setExpr(i, expr); - } - } - // set aliases - m_aliasList.resize(1 + size); - for (unsigned i = 1; i <= size; i++) { - if (m_aliasList[i].empty()) { - setAlias(i, getExpr(i)->getAlias()); - } - } - // node was not replaced - return this; -} - -Exec_base* -Plan_expr_row::codegen(Ctx& ctx, Ctl& ctl) -{ - unsigned size = getSize(); - Exec_expr_row* exec = new Exec_expr_row(ctl.m_execRoot, size); - ctl.m_execRoot->saveNode(exec); - SqlSpecs sqlSpecs(size); - // create code for subexpressions - for (unsigned i = 1; i <= size; i++) { - Plan_expr* planExpr = getExpr(i); - Exec_expr* execExpr = static_cast(planExpr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - exec->setExpr(i, execExpr); - const SqlSpec sqlSpec(execExpr->getCode().sqlSpec(), SqlSpec::Reference); - sqlSpecs.setEntry(i, sqlSpec); - } - // create alias list - Exec_expr_row::Code::Alias* aliasList = new Exec_expr_row::Code::Alias[1 + size]; - strcpy(aliasList[0], "?"); - for (unsigned i = 1; i <= size; i++) { - const char* s = m_aliasList[i].c_str(); - if (strlen(s) == 0) - s = getExpr(i)->getAlias().c_str(); - unsigned n = strlen(s); - if (n >= sizeof(Exec_expr_row::Code::Alias)) - n = sizeof(Exec_expr_row::Code::Alias) - 1; - strncpy(aliasList[i], s, n); - aliasList[i][n] = 0; - } - // create the code - Exec_expr_row::Code& code = *new Exec_expr_row::Code(sqlSpecs, aliasList); - exec->setCode(code); - return exec; -} - -void -Plan_expr_row::print(Ctx& ctx) -{ - const unsigned size = getSize(); - ctx.print(" [expr_row"); - for (unsigned i = 1; i <= size; i++) { - Plan_base* a = m_exprList[i]; - a == 0 ? ctx.print(" -") : a->print(ctx); - } - ctx.print("]"); -} - -bool -Plan_expr_row::isAllGroupBy(const Plan_expr_row* row) const -{ - const unsigned size = getSize(); - for (unsigned i = 1; i <= size; i++) { - if (! getExpr(i)->isGroupBy(row)) - return false; - } - return true; -} - -// Exec_expr_row - -Exec_expr_row::Code::~Code() -{ - delete[] m_aliasList; -} - -Exec_expr_row::Data::~Data() -{ -} - -Exec_expr_row::~Exec_expr_row() -{ - delete[] m_expr; -} - -void -Exec_expr_row::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate subexpressions - for (unsigned i = 1; i <= m_size; i++) { - getExpr(i)->alloc(ctx, ctl); - } - // construct SqlRow of references - const Code& code = getCode(); - SqlRow sqlRow(getCode().m_sqlSpecs); - for (unsigned i = 1; i <= m_size; i++) { - const Exec_expr::Data& dataExpr = getExpr(i)->getData(); - const SqlSpec& sqlSpec = code.m_sqlSpecs.getEntry(i); - const SqlField sqlField(sqlSpec, &dataExpr.sqlField()); - sqlRow.setEntry(i, sqlField); - } - // create the data - Data& data = *new Data(sqlRow); - setData(data); -} - -void -Exec_expr_row::evaluate(Ctx& ctx, Ctl& ctl) -{ - for (unsigned i = 1; i <= m_size; i++) { - getExpr(i)->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - } -} - -void -Exec_expr_row::close(Ctx& ctx) -{ - for (unsigned i = 1; i <= m_size; i++) { - getExpr(i)->close(ctx); - } -} - -void -Exec_expr_row::print(Ctx& ctx) -{ - ctx.print(" [expr_row"); - for (unsigned i = 1; i <= m_size; i++) { - getExpr(i)->print(ctx); - } - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_expr_row.hpp b/ndb/src/old_files/client/odbc/codegen/Code_expr_row.hpp deleted file mode 100644 index 94527931dba..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_expr_row.hpp +++ /dev/null @@ -1,272 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_expr_row_hpp -#define ODBC_CODEGEN_Code_expr_row_hpp - -#include -#include -#include -#include "Code_base.hpp" -#include "Code_expr.hpp" - -class Plan_expr; - -/** - * @class Plan_expr_row - * @brief Row of expressions in PlanTree - * - * Used for select, value, and order by rows. - */ -class Plan_expr_row : public Plan_base { -public: - Plan_expr_row(Plan_root* root); - virtual ~Plan_expr_row(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setAsterisk(); - bool getAsterisk() const; - unsigned getSize() const; - Plan_expr* getExpr(unsigned i) const; - void setExpr(unsigned i, Plan_expr* expr); - void addExpr(Plan_expr* expr); - void addExpr(Plan_expr* expr, const BaseString& alias); - void setAlias(unsigned i, const BaseString& alias); - void addExpr(Plan_expr* expr, bool asc); - bool anyAggr() const; - bool allBound() const; - bool isAllGroupBy(const Plan_expr_row* row) const; -protected: - friend class Plan_query; - friend class Plan_query_sort; - bool m_asterisk; // early plan node type - ExprVector m_exprList; - typedef std::vector AliasList; - AliasList m_aliasList; - typedef std::vector AscList; - AscList m_ascList; - bool m_anyAggr; // at least one aggreate - bool m_allBound; // all bound -}; - -inline -Plan_expr_row::Plan_expr_row(Plan_root* root) : - Plan_base(root), - m_asterisk(false), - m_exprList(1), - m_aliasList(1), - m_ascList(1), - m_anyAggr(false), - m_allBound(false) -{ -} - -// children - -inline void -Plan_expr_row::setAsterisk() -{ - m_asterisk = true; -} - -inline bool -Plan_expr_row::getAsterisk() const -{ - return m_asterisk; -} - -inline unsigned -Plan_expr_row::getSize() const -{ - ctx_assert(m_exprList.size() >= 1); - return m_exprList.size() - 1; -} - -inline void -Plan_expr_row::addExpr(Plan_expr* expr) -{ - ctx_assert(expr != 0); - addExpr(expr, expr->m_alias); -} - -inline void -Plan_expr_row::addExpr(Plan_expr* expr, const BaseString& alias) -{ - ctx_assert(expr != 0); - m_exprList.push_back(expr); - m_aliasList.push_back(alias); -} - -inline void -Plan_expr_row::addExpr(Plan_expr* expr, bool asc) -{ - ctx_assert(expr != 0); - m_exprList.push_back(expr); - m_ascList.push_back(asc); -} - -inline void -Plan_expr_row::setExpr(unsigned i, Plan_expr* expr) -{ - ctx_assert(1 <= i && i < m_exprList.size() && expr != 0); - m_exprList[i] = expr; -} - -inline Plan_expr* -Plan_expr_row::getExpr(unsigned i) const -{ - ctx_assert(1 <= i && i < m_exprList.size() && m_exprList[i] != 0); - return m_exprList[i]; -} - -inline void -Plan_expr_row::setAlias(unsigned i, const BaseString& alias) -{ - ctx_assert(1 <= i && i < m_aliasList.size()); - m_aliasList[i] = alias; -} - -inline bool -Plan_expr_row::anyAggr() const -{ - return m_anyAggr; -} - -inline bool -Plan_expr_row::allBound() const -{ - return m_allBound; -} - -/** - * @class Expr_expr_row - * @brief Row of expressions in ExecTree - */ -class Exec_expr_row : public Exec_base { -public: - class Code : public Exec_base::Code { - public: - typedef char Alias[40]; - Code(const SqlSpecs& sqlSpecs, const Alias* aliasList); - virtual ~Code(); - const SqlSpecs& sqlSpecs() const; - const char* getAlias(unsigned i) const; - protected: - friend class Exec_expr_row; - const SqlSpecs m_sqlSpecs; - const Alias* m_aliasList; - }; - class Data : public Exec_base::Data { - public: - Data(const SqlRow& sqlRow); - virtual ~Data(); - const SqlRow& sqlRow() const; - protected: - friend class Exec_expr_row; - SqlRow m_sqlRow; - }; - Exec_expr_row(Exec_root* root, unsigned size); - virtual ~Exec_expr_row(); - void alloc(Ctx& ctx, Ctl& ctl); - void evaluate(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - Exec_expr* getExpr(unsigned i) const; - void setExpr(unsigned i, Exec_expr* expr); -protected: - Exec_expr** m_expr; // numbered from 1 - unsigned m_size; -}; - -inline -Exec_expr_row::Code::Code(const SqlSpecs& sqlSpecs, const Alias* aliasList) : - m_sqlSpecs(sqlSpecs), - m_aliasList(aliasList) -{ -} - -inline const SqlSpecs& -Exec_expr_row::Code::sqlSpecs() const -{ - return m_sqlSpecs; -} - -inline const char* -Exec_expr_row::Code::getAlias(unsigned i) const -{ - ctx_assert(1 <= i && i <= m_sqlSpecs.count() && m_aliasList != 0); - return m_aliasList[i]; -} - -inline -Exec_expr_row::Data::Data(const SqlRow& sqlRow) : - m_sqlRow(sqlRow) -{ -} - -inline const SqlRow& -Exec_expr_row::Data::sqlRow() const -{ - return m_sqlRow; -} - -inline -Exec_expr_row::Exec_expr_row(Exec_root* root, unsigned size) : - Exec_base(root), - m_expr(new Exec_expr* [1 + size]), - m_size(size) -{ - m_expr[0] = (Exec_expr*)-1; - for (unsigned i = 1; i <= m_size; i++) - m_expr[i] = 0; -} - -// children - -inline const Exec_expr_row::Code& -Exec_expr_row::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_expr_row::Data& -Exec_expr_row::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline Exec_expr* -Exec_expr_row::getExpr(unsigned i) const -{ - ctx_assert(1 <= i && i <= m_size && m_expr != 0 && m_expr[i] != 0); - return m_expr[i]; -} - -inline void -Exec_expr_row::setExpr(unsigned i, Exec_expr* expr) -{ - ctx_assert(1 <= i && i <= m_size && m_expr != 0 && m_expr[i] == 0); - m_expr[i] = expr; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_idx_column.cpp b/ndb/src/old_files/client/odbc/codegen/Code_idx_column.cpp deleted file mode 100644 index 584ffef3e01..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_idx_column.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "Code_idx_column.hpp" -#include "Code_expr_conv.hpp" -#include "Code_root.hpp" - -// Plan_idx_column - -Plan_idx_column::~Plan_idx_column() -{ -} - -Plan_base* -Plan_idx_column::analyze(Ctx& ctx, Ctl& ctl) -{ - analyzeColumn(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_idx_column::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_idx_column::print(Ctx& ctx) -{ - ctx.print(" [idx_column %s]", getPrintName()); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_idx_column.hpp b/ndb/src/old_files/client/odbc/codegen/Code_idx_column.hpp deleted file mode 100644 index 209ed705b48..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_idx_column.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_idx_column_hpp -#define ODBC_CODEGEN_Code_idx_column_hpp - -#include -#include "Code_column.hpp" -#include "Code_data_type.hpp" -#include "Code_expr.hpp" - -class DictColumn; -class Plan_table; - -/** - * @class Plan_idx_column - * @brief Column in create index statement - */ -class Plan_idx_column : public Plan_base, public Plan_column { -public: - Plan_idx_column(Plan_root* root, const BaseString& name); - virtual ~Plan_idx_column(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); -protected: - friend class Plan_create_row; -}; - -inline -Plan_idx_column::Plan_idx_column(Plan_root* root, const BaseString& name) : - Plan_base(root), - Plan_column(Type_idx, name) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_insert.cpp b/ndb/src/old_files/client/odbc/codegen/Code_insert.cpp deleted file mode 100644 index c442186c181..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_insert.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_insert.hpp" -#include "Code_query_repeat.hpp" -#include "Code_query_project.hpp" -#include "Code_table.hpp" -#include "Code_root.hpp" - -// Plan_insert - -Plan_insert::~Plan_insert() -{ -} - -Plan_base* -Plan_insert::analyze(Ctx& ctx, Ctl& ctl) -{ - stmtArea().stmtInfo().setName(Stmt_name_insert); - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - // handle MySql syntax - if (m_mysqlRow != 0) { - setDmlRow(m_mysqlRow->m_dmlRow); - setExprRow(m_mysqlRow->m_exprRow); - m_mysqlRow = 0; - } - if (m_dmlRow == 0) { - // construct column list - setDmlRow(new Plan_dml_row(m_root)); - m_root->saveNode(m_dmlRow); - const DictTable& dictTable = m_table->dictTable(); - unsigned n = dictTable.getSize(); - for (unsigned i = 1; i <= n; i++) { - DictColumn* dictColumn = dictTable.getColumn(i); - Plan_dml_column* column = new Plan_dml_column(m_root, dictColumn->getName()); - m_root->saveNode(column); - m_dmlRow->addColumn(column); - } - } - // set name resolution scope - ctl.m_tableList.resize(1 + 1); // indexed from 1 - ctl.m_tableList[1] = m_table; - // analyze the dml columns - m_dmlRow->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctl.m_dmlRow = m_dmlRow; // row type to convert to - if (m_query != 0) { - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } else if (m_select == 0) { - // analyze the expression row - m_exprRow->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - // transform the row into query - Plan_query_repeat* queryRepeat = new Plan_query_repeat(m_root, 1); - m_root->saveNode(queryRepeat); - Plan_query_project* queryProject = new Plan_query_project(m_root); - m_root->saveNode(queryProject); - queryProject->setQuery(queryRepeat); - queryProject->setRow(m_exprRow); - setQuery(queryProject); - } else { - // analyze the select into query - Plan_query* query = static_cast(m_select->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - setQuery(query); - } - return this; -} - -void -Plan_insert::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "INSERT", SQL_DIAG_INSERT); -} - -Exec_base* -Plan_insert::codegen(Ctx& ctx, Ctl& ctl) -{ - // create code for the query - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // set up - ctx_assert(m_table != 0); - const BaseString& tableName = m_table->getName(); - const DictTable& dictTable = m_table->dictTable(); - const ColumnVector& columns = m_table->dmlColumns(); - ctx_assert(columns.size() > 0); - const unsigned attrCount = columns.size() - 1; - // create the code - Exec_insert::Code& code = *new Exec_insert::Code(); - code.m_insertOp = m_insertOp; - code.m_tableName = strcpy(new char[tableName.length() + 1], tableName.c_str()); - code.m_attrCount = attrCount; - code.m_attrId = new NdbAttrId[1 + attrCount]; - code.m_isKey = new bool[1 + attrCount]; - code.m_attrId[0] = (NdbAttrId)-1; - code.m_tupleId = dictTable.tupleId(); // maybe 0 - code.m_autoIncrement = dictTable.autoIncrement(); // maybe 0 - unsigned k; - if ((k = code.m_tupleId) != 0 || (k = code.m_autoIncrement) != 0) { - const DictColumn& dictColumn = *dictTable.getColumn(k); - code.m_idType = dictColumn.sqlType(); - } - for (unsigned i = 1; i <= attrCount; i++) { - Plan_column* column = columns[i]; - ctx_assert(column != 0); - const DictColumn& dictColumn = column->dictColumn(); - code.m_attrId[i] = dictColumn.getAttrId(); - code.m_isKey[i] = dictColumn.isKey(); - } - // default values XXX a mess - code.m_defaultCount = 0; - for (unsigned j = 1; j <= dictTable.getSize(); j++) { - const DictColumn& dictColumn = *dictTable.getColumn(j); - if (dictColumn.getDefaultValue() != 0 && ! code.findAttrId(dictColumn.getAttrId())) - code.m_defaultCount++; - } - if (code.m_defaultCount != 0) { - code.m_defaultId = new NdbAttrId[1 + code.m_defaultCount]; - for (unsigned i = 0, j = 1; j <= dictTable.getSize(); j++) { - const DictColumn& dictColumn = *dictTable.getColumn(j); - if (dictColumn.getDefaultValue() != 0 && ! code.findAttrId(dictColumn.getAttrId())) - code.m_defaultId[++i] = dictColumn.getAttrId(); - } - SqlSpecs sqlSpecs(code.m_defaultCount); - for (unsigned i = 0, j = 1; j <= dictTable.getSize(); j++) { - const DictColumn& dictColumn = *dictTable.getColumn(j); - if (dictColumn.getDefaultValue() != 0 && ! code.findAttrId(dictColumn.getAttrId())) { - SqlSpec sqlSpec(dictColumn.sqlType(), SqlSpec::Physical); - sqlSpecs.setEntry(++i, sqlSpec); - } - } - code.m_defaultValue = new SqlRow(sqlSpecs); - for (unsigned i = 0, j = 1; j <= dictTable.getSize(); j++) { - const DictColumn& dictColumn = *dictTable.getColumn(j); - if (dictColumn.getDefaultValue() != 0 && ! code.findAttrId(dictColumn.getAttrId())) { - const char* defaultValue = dictColumn.getDefaultValue(); - ExtType extType(ExtType::Char); - ExtSpec extSpec(extType); - SQLINTEGER ind = SQL_NTS; - ExtField extField(extSpec, (SQLPOINTER)defaultValue, 0, &ind); - SqlField& f = code.m_defaultValue->getEntry(++i); - f.copyin(ctx, extField); - if (! ctx.ok()) - return 0; - } - } - } - // create the exec - Exec_insert* exec = new Exec_insert(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - exec->setQuery(execQuery); - return exec; -} - -void -Plan_insert::print(Ctx& ctx) -{ - ctx.print(" [%s", m_insertOp == Insert_op_insert ? "insert" : "write"); - Plan_base* a[] = { m_table, m_dmlRow, m_exprRow, m_query }; - printList(ctx, a, 4); - ctx.print("]"); -} - -// Exec_insert - -Exec_insert::Code::~Code() -{ - delete[] m_tableName; - delete[] m_attrId; - delete[] m_isKey; - delete[] m_defaultId; - delete m_defaultValue; -} - -bool -Exec_insert::Code::findAttrId(NdbAttrId attrId) const -{ - for (unsigned i = 1; i <= m_attrCount; i++) { - if (m_attrId[i] == attrId) - return true; - } - return false; -} - -Exec_insert::Data::~Data() -{ -} - -Exec_insert::~Exec_insert() -{ -} - -void -Exec_insert::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate the query - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - // create data - Data& data = *new Data(); - setData(data); -} - -void -Exec_insert::close(Ctx& ctx) -{ -} - -void -Exec_insert::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx_assert(m_query != 0); - ctx.print(" [insert"); - ctx.print(" attrId="); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_attrId[i]); - } - ctx.print(" table=%s", code.m_tableName); - m_query->print(ctx); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_insert.hpp b/ndb/src/old_files/client/odbc/codegen/Code_insert.hpp deleted file mode 100644 index 748b092e33a..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_insert.hpp +++ /dev/null @@ -1,229 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_insert_hpp -#define ODBC_CODEGEN_Code_insert_hpp - -#include -#include "Code_base.hpp" -#include "Code_dml.hpp" -#include "Code_dml_row.hpp" -#include "Code_expr_row.hpp" -#include "Code_select.hpp" -#include "Code_query.hpp" -#include "Code_table.hpp" -#include "Code_set_row.hpp" - -enum Insert_op { - Insert_op_undef = 0, - Insert_op_insert = 1, - Insert_op_write = 2 -}; - -/** - * @class Plan_insert - * @brief Insert in PlanTree - * - * Insert. Becomes directly executable. - */ -class Plan_insert : public Plan_dml { -public: - Plan_insert(Plan_root* root, Insert_op insertOp); - virtual ~Plan_insert(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setTable(Plan_table* table); - Plan_dml_row* getDmlRow() const; - void setDmlRow(Plan_dml_row* dmlRow); - void setExprRow(Plan_expr_row* exprRow); - void setSelect(Plan_select* select); - void setQuery(Plan_query* query); - void setMysqlRow(Plan_set_row* mysqlRow); -protected: - Insert_op m_insertOp; - Plan_table* m_table; - Plan_dml_row* m_dmlRow; - Plan_expr_row* m_exprRow; - Plan_select* m_select; - Plan_query* m_query; - Plan_set_row* m_mysqlRow; -}; - -inline -Plan_insert::Plan_insert(Plan_root* root, Insert_op insertOp) : - Plan_dml(root), - m_insertOp(insertOp), - m_table(0), - m_dmlRow(0), - m_exprRow(0), - m_select(0), - m_query(0), - m_mysqlRow(0) -{ -} - -// children - -inline void -Plan_insert::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -inline void -Plan_insert::setDmlRow(Plan_dml_row* dmlRow) -{ - ctx_assert(dmlRow != 0); - m_dmlRow = dmlRow; -} - -inline Plan_dml_row* -Plan_insert::getDmlRow() const -{ - ctx_assert(m_dmlRow != 0); - return m_dmlRow; -} - -inline void -Plan_insert::setExprRow(Plan_expr_row* exprRow) -{ - ctx_assert(exprRow != 0); - m_exprRow = exprRow; -} - -inline void -Plan_insert::setSelect(Plan_select* select) -{ - ctx_assert(select != 0); - m_select = select; -} - -inline void -Plan_insert::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Plan_insert::setMysqlRow(Plan_set_row* mysqlRow) -{ - ctx_assert(mysqlRow != 0); - m_mysqlRow = mysqlRow; -} - -/** - * @class Exec_insert - * @brief Executable insert - */ -class Exec_insert : public Exec_dml { -public: - class Code : public Exec_dml::Code { - public: - Code(); - virtual ~Code(); - protected: - friend class Plan_insert; - friend class Exec_insert; - Insert_op m_insertOp; - char* m_tableName; - unsigned m_attrCount; - NdbAttrId* m_attrId; - bool* m_isKey; - unsigned m_tupleId; // position of tuple id - unsigned m_autoIncrement; // position of ai key - SqlType m_idType; // type of tuple id or ai key - unsigned m_defaultCount; - NdbAttrId* m_defaultId; - SqlRow* m_defaultValue; - bool findAttrId(NdbAttrId attrId) const; - }; - class Data : public Exec_dml::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_insert; - }; - Exec_insert(Exec_root* root); - virtual ~Exec_insert(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); -private: - Exec_query* m_query; -}; - -inline -Exec_insert::Code::Code() : - m_insertOp(Insert_op_undef), - m_tableName(0), - m_attrCount(0), - m_attrId(0), - m_isKey(0), - m_tupleId(0), - m_autoIncrement(0), - m_defaultCount(0), - m_defaultId(0), - m_defaultValue(0) -{ -} - -inline -Exec_insert::Data::Data() -{ -} - -inline -Exec_insert::Exec_insert(Exec_root* root) : - Exec_dml(root), - m_query(0) -{ -} - -// children - -inline const Exec_insert::Code& -Exec_insert::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_insert::Data& -Exec_insert::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_insert::setQuery(Exec_query* query) -{ - ctx_assert(m_query == 0 && query != 0); - m_query = query; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_pred.cpp b/ndb/src/old_files/client/odbc/codegen/Code_pred.cpp deleted file mode 100644 index fe7cac7606e..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_pred.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_pred.hpp" -#include "Code_pred_op.hpp" -#include "Code_root.hpp" - -// Plan_pred - -Plan_pred::~Plan_pred() -{ -} - -bool -Plan_pred::isGroupBy(const Plan_expr_row* row) const -{ - return false; -} - -Plan_pred* -Plan_pred::opAnd(Plan_pred* pred2) -{ - Plan_pred_op* predAnd = new Plan_pred_op(m_root, Pred_op::And); - m_root->saveNode(predAnd); - predAnd->setPred(1, this); - predAnd->setPred(2, pred2); - return predAnd; -} - -// Exec_pred - -Exec_pred::Code::~Code() -{ -} - -Exec_pred::Data::~Data() -{ -} - -Exec_pred::~Exec_pred() -{ -} - -Pred_value& -Exec_pred::Data::groupValue(unsigned i, bool initFlag) -{ - if (m_groupValue.size() == 0) { - m_groupValue.resize(1); - } - if (initFlag) { - //unsigned i2 = m_groupValue.size(); - //ctx_assert(i == i2); - m_groupValue.push_back(Pred_value_unknown); - } - ctx_assert(i != 0 && i < m_groupValue.size()); - return m_groupValue[i]; -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_pred.hpp b/ndb/src/old_files/client/odbc/codegen/Code_pred.hpp deleted file mode 100644 index a77c1161fa1..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_pred.hpp +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_pred_hpp -#define ODBC_CODEGEN_Code_pred_hpp - -#include -#include -#include "Code_base.hpp" - -enum Pred_value { - Pred_value_unknown = -1, - Pred_value_false = 0, - Pred_value_true = 1 -}; - -class Ctx; -class Plan_expr_row; -class Exec_pred; - -/** - * @class Plan_pred - * @brief Base class for predicates in PlanTree - * - * Predicate represents a boolean value. - */ -class Plan_pred : public Plan_base { -public: - // type is convenient since RTTI cannot be used - enum Type { - TypeUndefined = 0, - TypeComp = 1, - TypeOp = 2 - }; - Plan_pred(Plan_root* root, Type type); - virtual ~Plan_pred() = 0; - Type type() const; - const TableSet& tableSet() const; - const TableSet& noInterp() const; - virtual bool isGroupBy(const Plan_expr_row* row) const; - // helpers - Plan_pred* opAnd(Plan_pred* pred2); -protected: - const Type m_type; - TableSet m_tableSet; // depends on these tables - TableSet m_noInterp; // cannot use interpreted TUP program on these tables - Exec_pred* m_exec; // probably stupid -}; - -inline -Plan_pred::Plan_pred(Plan_root* root, Type type) : - Plan_base(root), - m_type(type), - m_exec(0) -{ -} - -inline Plan_pred::Type -Plan_pred::type() const -{ - return m_type; -} - -inline const Plan_pred::TableSet& -Plan_pred::tableSet() const -{ - return m_tableSet; -} - -inline const Plan_pred::TableSet& -Plan_pred::noInterp() const -{ - return m_noInterp; -} - -/** - * @class Exec_pred - * @brief Base class for predicates in ExecTree - */ -class Exec_pred : public Exec_base { -public: - class Code : public Exec_base::Code { - public: - Code(); - virtual ~Code() = 0; - protected: - friend class Exec_pred; - }; - class Data : public Exec_base::Data { - public: - Data(); - virtual ~Data() = 0; - Pred_value getValue() const; - Pred_value groupValue(unsigned i) const; - protected: - friend class Exec_pred; - Pred_value m_value; // the value - // group-by data - typedef std::vector GroupValue; - GroupValue m_groupValue; - Pred_value& groupValue(unsigned i, bool initFlag); - }; - Exec_pred(Exec_root* root); - virtual ~Exec_pred() = 0; - virtual void execInterp(Ctx& ctx, Ctl& ctl) = 0; - virtual void evaluate(Ctx& ctx, Ctl& ctl) = 0; - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_pred::Code::Code() -{ -} - -inline -Exec_pred::Data::Data() : - m_value(Pred_value_unknown) -{ -} - -inline Pred_value -Exec_pred::Data::getValue() const -{ - return m_value; -} - -inline Pred_value -Exec_pred::Data::groupValue(unsigned i) const -{ - ctx_assert(i != 0 && i < m_groupValue.size()); - return m_groupValue[i]; -} - -inline -Exec_pred::Exec_pred(Exec_root* root) : - Exec_base(root) -{ -} - -// children - -inline const Exec_pred::Code& -Exec_pred::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_pred::Data& -Exec_pred::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_pred_op.cpp b/ndb/src/old_files/client/odbc/codegen/Code_pred_op.cpp deleted file mode 100644 index 29736e45818..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_pred_op.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_pred.hpp" -#include "Code_pred_op.hpp" -#include "Code_root.hpp" - -// Pred_op - -const char* -Pred_op::name() const -{ - switch (m_opcode) { - case And: - return "and"; - case Or: - return "or"; - case Not: - return "not"; - } - ctx_assert(false); - return ""; -} - -unsigned -Pred_op::arity() const -{ - switch (m_opcode) { - case And: - case Or: - return 2; - case Not: - return 1; - } - ctx_assert(false); - return 0; -} - -// Plan_pred_op - -Plan_pred_op::~Plan_pred_op() -{ -} - -Plan_base* -Plan_pred_op::analyze(Ctx& ctx, Ctl& ctl) -{ - m_exec = 0; - unsigned arity = m_op.arity(); - // check if we remain in top-level AND-clause - const bool topand = ctl.m_topand; - if (m_op.m_opcode != Pred_op::And) - ctl.m_topand = false; - // analyze sub-predicates - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_pred[i] != 0); - m_pred[i]->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } - // save top level predicate on list - if (topand && ! ctl.m_topand) { - ctl.m_topcomp.push_back(this); - } - ctl.m_topand = topand; - // table dependencies are union from operands - m_tableSet.clear(); - for (unsigned i = 1; i <= arity; i++) { - const TableSet& ts = m_pred[i]->tableSet(); - m_tableSet.insert(ts.begin(), ts.end()); - } - // set of tables for which interpreter cannot be used - m_noInterp.clear(); - for (unsigned i = 1; i <= arity; i++) { - const TableSet& ts = m_pred[i]->noInterp(); - m_noInterp.insert(ts.begin(), ts.end()); - } - return this; -} - -Exec_base* -Plan_pred_op::codegen(Ctx& ctx, Ctl& ctl) -{ - if (m_exec != 0) - return m_exec; - unsigned arity = m_op.arity(); - Exec_pred_op* exec = new Exec_pred_op(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // create code for operands - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_pred[i] != 0); - Exec_pred* execPred = static_cast(m_pred[i]->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execPred != 0); - exec->setPred(i, execPred); - } - // create the code - Exec_pred_op::Code& code = *new Exec_pred_op::Code(m_op); - exec->setCode(code); - m_exec = exec; - return exec; -} - -void -Plan_pred_op::print(Ctx& ctx) -{ - ctx.print(" [%s", m_op.name()); - Plan_base* a[] = { m_pred[1], m_pred[2] }; - printList(ctx, a, m_op.arity()); - ctx.print("]"); -} - -bool -Plan_pred_op::isGroupBy(const Plan_expr_row* row) const -{ - const unsigned arity = m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_pred[i] != 0); - if (! m_pred[i]->isGroupBy(row)) - return false; - } - return true; -} - -// Code_pred_op - -Exec_pred_op::Code::~Code() -{ -} - -Exec_pred_op::Data::~Data() -{ -} - -Exec_pred_op::~Exec_pred_op() -{ -} - -void -Exec_pred_op::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // allocate sub-predicates - unsigned arity = code.m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_pred[i] != 0); - m_pred[i]->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - Data& data = *new Data; - setData(data); -} - -void -Exec_pred_op::close(Ctx& ctx) -{ - const Code& code = getCode(); - unsigned arity = code.m_op.arity(); - for (unsigned i = 1; i <= arity; i++) { - ctx_assert(m_pred[i] != 0); - m_pred[i]->close(ctx); - } -} - -void -Exec_pred_op::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [%s", code.m_op.name()); - Exec_base* a[] = { m_pred[1], m_pred[2] }; - printList(ctx, a, code.m_op.arity()); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_pred_op.hpp b/ndb/src/old_files/client/odbc/codegen/Code_pred_op.hpp deleted file mode 100644 index 9130bc3cb81..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_pred_op.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_pred_op_hpp -#define ODBC_CODEGEN_Code_pred_op_hpp - -#include -#include -#include "Code_pred.hpp" - -/** - * @class Pred_op - * @brief Boolean operators - */ -struct Pred_op { - enum Opcode { - And = 1, // binary - Or, - Not // unary - }; - Pred_op(Opcode opcode); - const char* name() const; - unsigned arity() const; - Opcode m_opcode; -}; - -inline -Pred_op::Pred_op(Opcode opcode) : - m_opcode(opcode) -{ -} - -/** - * @class Plan_pred_op - * @brief Operator node in a predicate in PlanTree - */ -class Plan_pred_op : public Plan_pred { -public: - Plan_pred_op(Plan_root* root, Pred_op op); - virtual ~Plan_pred_op(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - bool isGroupBy(const Plan_expr_row* row) const; - // children - void setPred(unsigned i, Plan_pred* pred); -protected: - friend class Plan_pred; - Pred_op m_op; - Plan_pred* m_pred[1 + 2]; -}; - -inline -Plan_pred_op::Plan_pred_op(Plan_root* root, Pred_op op) : - Plan_pred(root, TypeOp), - m_op(op) -{ - m_pred[0] = m_pred[1] = m_pred[2] = 0; -} - -inline void -Plan_pred_op::setPred(unsigned i, Plan_pred* pred) -{ - ctx_assert(1 <= i && i <= m_op.arity() && pred != 0); - m_pred[i] = pred; -} - -/** - * @class Exec_pred_op - * @brief Operator node in a predicate in ExecTree - */ -class Exec_pred_op : public Exec_pred { -public: - class Code : public Exec_pred::Code { - public: - Code(Pred_op op); - virtual ~Code(); - protected: - friend class Exec_pred_op; - Pred_op m_op; - }; - class Data : public Exec_pred::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_pred_op; - }; - Exec_pred_op(Exec_root* root); - virtual ~Exec_pred_op(); - void alloc(Ctx& ctx, Ctl& ctl); - void execInterp(Ctx& ctx, Ctl& ctl); - void evaluate(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setPred(unsigned i, Exec_pred* pred); -protected: - Exec_pred* m_pred[1 + 2]; -}; - -inline -Exec_pred_op::Code::Code(Pred_op op) : - m_op(op) -{ -} - -inline -Exec_pred_op::Data::Data() -{ -} - -inline -Exec_pred_op::Exec_pred_op(Exec_root* root) : - Exec_pred(root) -{ - m_pred[0] = m_pred[1] = m_pred[2] = 0; -} - -// children - -inline const Exec_pred_op::Code& -Exec_pred_op::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_pred_op::Data& -Exec_pred_op::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_pred_op::setPred(unsigned i, Exec_pred* pred) -{ - ctx_assert(1 <= i && i <= 2 && m_pred[i] == 0); - m_pred[i] = pred; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query.cpp deleted file mode 100644 index 9e983942601..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_query.hpp" -#include "Code_query_project.hpp" -#include "Code_query_count.hpp" - -// Plan_query - -Plan_query::~Plan_query() -{ -} - -Plan_expr_row* -Plan_query::getRow() -{ - ctx_assert(false); - return 0; -} - -void -Plan_query::describe(Ctx& ctx) -{ - const Plan_expr_row* exprRow = getRow(); - const unsigned count = exprRow->getSize(); - // create IRD - DescArea& ird = descArea(Desc_usage_IRD); - ird.setCount(ctx, count); - for (unsigned i = 1; i <= count; i++) { - DescRec& rec = ird.getRecord(i); - const Plan_expr* expr = exprRow->m_exprList[i]; - const SqlType& sqlType = expr->sqlType(); - // data type - SQLSMALLINT desc_TYPE = sqlType.type(); - rec.setField(SQL_DESC_TYPE, desc_TYPE); - SQLSMALLINT desc_CONCISE_TYPE = desc_TYPE; - rec.setField(SQL_DESC_CONCISE_TYPE, desc_CONCISE_TYPE); - SQLSMALLINT desc_DESC_DATETIME_INTERVAL_CODE = 0; - rec.setField(SQL_DESC_DATETIME_INTERVAL_CODE, desc_DESC_DATETIME_INTERVAL_CODE); - // nullable - SQLSMALLINT desc_NULLABLE = sqlType.nullable() ? SQL_NULLABLE : SQL_NO_NULLS; - rec.setField(SQL_DESC_NULLABLE, desc_NULLABLE); - // unsigned - SQLSMALLINT desc_UNSIGNED; - switch (sqlType.type()) { - case SQL_SMALLINT: - case SQL_INTEGER: - case SQL_BIGINT: - desc_UNSIGNED = sqlType.unSigned() ? SQL_TRUE : SQL_FALSE; - break; - default: - desc_UNSIGNED = SQL_TRUE; // thus spake microsoft - break; - } - rec.setField(SQL_DESC_UNSIGNED, desc_UNSIGNED); - // sizes - SQLUINTEGER desc_LENGTH = sqlType.length(); - rec.setField(SQL_DESC_LENGTH, desc_LENGTH); - SQLINTEGER desc_OCTET_LENGTH = sqlType.size(); - rec.setField(SQL_DESC_OCTET_LENGTH, desc_OCTET_LENGTH); - SQLINTEGER desc_DISPLAY_SIZE = sqlType.displaySize(); - rec.setField(SQL_DESC_DISPLAY_SIZE, desc_DISPLAY_SIZE); - // name - ctx_assert(i < exprRow->m_aliasList.size()); - const char* desc_NAME = exprRow->m_aliasList[i].c_str(); - rec.setField(SQL_DESC_NAME, desc_NAME); - } - ctx_log3(("describe %u columns done", count)); - stmtArea().setFunction(ctx, "SELECT CURSOR", SQL_DIAG_SELECT_CURSOR); -} - -// Exec_query - -Exec_query::Code::~Code() -{ -} - -Exec_query::Data::~Data() -{ - delete m_extRow; - m_extRow = 0; - delete[] m_extPos; - m_extPos = 0; -} - -Exec_query::~Exec_query() -{ -} - -const Exec_query* -Exec_query::getRawQuery() const -{ - ctx_assert(false); - return 0; -} - -void -Exec_query::bind(Ctx& ctx) -{ - const Code& code = getCode(); - const SqlSpecs& sqlSpecs = code.sqlSpecs(); - const unsigned count = sqlSpecs.count(); - // read ARD - DescArea& ard = descArea(Desc_usage_ARD); - const unsigned ardCount = ard.getCount(); - // create specification row - ExtSpecs extSpecs(count); - for (unsigned i = 1; i <= count; i++) { - ExtType extType; - if (i <= ardCount) { - OdbcData descData; - DescRec& rec = ard.getRecord(i); - // check for unbound column - rec.getField(ctx, SQL_DESC_DATA_PTR, descData); - SQLPOINTER desc_DATA_PTR = descData.type() != OdbcData::Undef ? descData.pointer() : 0; - if (desc_DATA_PTR == 0) { - extType.setType(ctx, ExtType::Unbound); - } else { - rec.getField(ctx, SQL_DESC_TYPE, descData); - if (descData.type() == OdbcData::Undef) { - ctx.pushStatus(Error::Gen, "query column %u: external type not defined", i); - return; - } - SQLSMALLINT desc_TYPE = descData.smallint(); - if (desc_TYPE == SQL_C_DEFAULT) { - if (i <= code.m_sqlSpecs.count()) - desc_TYPE = code.m_sqlSpecs.getEntry(i).sqlType().sqlcdefault(ctx); - } - switch (desc_TYPE) { - case SQL_C_CHAR: - case SQL_C_BINARY: - case SQL_C_SHORT: // for sun.jdbc.odbc - case SQL_C_SSHORT: - case SQL_C_USHORT: - case SQL_C_LONG: // for sun.jdbc.odbc - case SQL_C_SLONG: - case SQL_C_ULONG: - case SQL_C_SBIGINT: - case SQL_C_UBIGINT: - case SQL_C_FLOAT: - case SQL_C_DOUBLE: - case SQL_C_TYPE_TIMESTAMP: - break; - default: - ctx.pushStatus(Error::Gen, "query column %u: unsupported external type %d", i, (int)desc_TYPE); - return; - } - extType.setType(ctx, static_cast(desc_TYPE)); - } - } else { - extType.setType(ctx, ExtType::Unbound); - } - const ExtSpec extSpec(extType); - extSpecs.setEntry(i, extSpec); - } - // create data row - ExtRow& extRow = *new ExtRow(extSpecs); - unsigned boundCount = 0; - for (unsigned i = 1; i <= count; i++) { - const ExtSpec& extSpec = extSpecs.getEntry(i); - if (extSpec.extType().type() != ExtType::Unbound) { - OdbcData descData; - DescRec& rec = ard.getRecord(i); - rec.getField(ctx, SQL_DESC_DATA_PTR, descData); - SQLPOINTER desc_DATA_PTR = descData.type() != OdbcData::Undef ? descData.pointer() : 0; - rec.getField(ctx, SQL_DESC_OCTET_LENGTH, descData); - SQLINTEGER desc_OCTET_LENGTH = descData.type() != OdbcData::Undef ? descData.integer() : 0; - rec.getField(ctx, SQL_DESC_INDICATOR_PTR, descData); - SQLINTEGER* desc_INDICATOR_PTR = descData.type() != OdbcData::Undef ? descData.integerPtr() : 0; - ctx_log4(("column %u: bind to 0x%x %d 0x%x", i, (unsigned)desc_DATA_PTR, (int)desc_OCTET_LENGTH, (unsigned)desc_INDICATOR_PTR)); - ExtField extField(extSpec, desc_DATA_PTR, desc_OCTET_LENGTH, desc_INDICATOR_PTR, i); - extRow.setEntry(i, extField); - boundCount++; - } else { - ExtField extField(extSpec, i); - extRow.setEntry(i, extField); - } - } - Data& data = getData(); - delete data.m_extRow; - data.m_extRow = &extRow; - ctx_log3(("bound %u out of %u columns", boundCount, count)); -} - -// execute and fetch - -void -Exec_query::execute(Ctx& ctx, Ctl& ctl) -{ - Data& data = getData(); - execImpl(ctx, ctl); - if (! ctx.ok()) - return; - data.initState(); - if (m_topLevel) { - stmtArea().setRowCount(ctx, data.getCount()); - } -} - -bool -Exec_query::fetch(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - if (data.fetch(ctx, ctl)) { - if (m_topLevel) { - stmtArea().setRowCount(ctx, data.getCount()); - } - if (data.m_extRow != 0) { - data.sqlRow().copyout(ctx, *data.m_extRow); - if (! ctx.ok()) - return false; - } - if (data.m_extPos != 0) { - const unsigned count = code.sqlSpecs().count(); - for (unsigned i = 0; i <= count; i++) { - data.m_extPos[i] = 0; - } - } - return true; - } - if (m_topLevel) { - stmtArea().setRowCount(ctx, data.getCount()); - if (ctx.ok()) { - ctx.setCode(SQL_NO_DATA); - } - } - return false; -} - -// odbc support - -void -Exec_query::sqlGetData(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind) -{ - const Code& code = getCode(); - Data& data = getData(); - const SqlSpecs& sqlSpecs = code.m_sqlSpecs; - const unsigned count = sqlSpecs.count(); - if (columnNumber == 0 || columnNumber > count) { - ctx.pushStatus(Sqlstate::_07009, Error::Gen, "column index %u is not within 1 to %u", (unsigned)columnNumber, count); - return; - } - // create positions array on first use - if (data.m_extPos == 0) { - data.m_extPos = new int[1 + count]; - for (unsigned i = 0; i <= count; i++) { - data.m_extPos[i] = 0; - } - } - if (targetType == SQL_ARD_TYPE) { - // get type from ARD - DescArea& ard = descArea(Desc_usage_ARD); - const unsigned ardCount = ard.getCount(); - if (columnNumber <= ardCount) { - OdbcData descData; - DescRec& rec = ard.getRecord(columnNumber); - rec.getField(ctx, SQL_DESC_CONCISE_TYPE, descData); - if (descData.type() != OdbcData::Undef) { - targetType = descData.smallint(); - } - } - if (targetType == SQL_ARD_TYPE) { - ctx.pushStatus(Sqlstate::_07009, Error::Gen, "output column %u type not bound - cannot use SQL_ARD_TYPE", (unsigned)columnNumber); - return; - } - } - ExtType extType; - if (targetValue != 0) { - extType.setType(ctx, static_cast(targetType)); - // check if supported - if (! ctx.ok()) - return; - } else { - extType.setType(ctx, ExtType::Unbound); - } - ExtSpec extSpec(extType); - ExtField extField(extSpec, targetValue, bufferLength, strlen_or_Ind, columnNumber); - // copy out and update position - extField.setPos(data.m_extPos[columnNumber]); - const SqlRow& sqlRow = data.sqlRow(); - const SqlField& sqlField = sqlRow.getEntry(columnNumber); - sqlField.copyout(ctx, extField); - data.m_extPos[columnNumber] = extField.getPos(); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query.hpp deleted file mode 100644 index 97f98f859ff..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query.hpp +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_hpp -#define ODBC_CODEGEN_Code_query_hpp - -#include -#include -#include -#include "Code_stmt.hpp" - -class Plan_expr_row; -class Plan_table; -class Exec_expr_row; - -/** - * @class Plan_query - * @brief Base class for queries in PlanTree - */ -class Plan_query : public Plan_stmt { -public: - Plan_query(Plan_root* root); - virtual ~Plan_query() = 0; - void describe(Ctx& ctx); - virtual Plan_expr_row* getRow(); -}; - -inline -Plan_query::Plan_query(Plan_root* root) : - Plan_stmt(root) -{ -} - -/** - * @class Exec_query - * @brief Base class for executable queries. - * - * Executable queriable statement. - */ -class Exec_query : public Exec_stmt { -public: - class Code : public Exec_stmt::Code { - public: - Code(const SqlSpecs& sqlSpecs); - virtual ~Code() = 0; - const SqlSpecs& sqlSpecs() const; - protected: - friend class Exec_query; - const SqlSpecs& m_sqlSpecs; // subclass must contain - }; - class Data : public Exec_stmt::Data, public ResultSet { - public: - Data(Exec_query* node, const SqlRow& sqlRow); - virtual ~Data() = 0; - const SqlRow& sqlRow() const; - ExtRow* extRow() const; - bool fetchImpl(Ctx& ctx, Ctl& ctl); - protected: - friend class Exec_query; - Exec_query* const m_node; - ExtRow* m_extRow; // output bindings - int* m_extPos; // positions for SQLGetData - }; - Exec_query(Exec_root* root); - virtual ~Exec_query() = 0; - void bind(Ctx& ctx); - void execute(Ctx& ctx, Ctl& ctl); - bool fetch(Ctx& ctx, Ctl& ctl); - // children - const Code& getCode() const; - Data& getData() const; - virtual const Exec_query* getRawQuery() const; - // odbc support - void sqlGetData(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind); -protected: - friend class Data; - virtual void execImpl(Ctx& ctx, Ctl& ctl) = 0; - virtual bool fetchImpl(Ctx& ctx, Ctl& ctl) = 0; -}; - -inline -Exec_query::Code::Code(const SqlSpecs& sqlSpecs) : - m_sqlSpecs(sqlSpecs) -{ -} - -inline const SqlSpecs& -Exec_query::Code::sqlSpecs() const -{ - return m_sqlSpecs; -} - -inline -Exec_query::Data::Data(Exec_query* node, const SqlRow& sqlRow) : - ResultSet(sqlRow), - m_node(node), - m_extRow(0), - m_extPos(0) -{ -} - -inline const SqlRow& -Exec_query::Data::sqlRow() const -{ - return static_cast(m_dataRow); -} - -inline ExtRow* -Exec_query::Data::extRow() const -{ - return m_extRow; -} - -inline bool -Exec_query::Data::fetchImpl(Ctx& ctx, Ctl& ctl) -{ - return m_node->fetchImpl(ctx, ctl); -} - -inline -Exec_query::Exec_query(Exec_root* root) : - Exec_stmt(root) -{ -} - -// children - -inline const Exec_query::Code& -Exec_query::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query::Data& -Exec_query::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_count.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_count.cpp deleted file mode 100644 index f52c41df802..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_count.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_query_count.hpp" -#include "Code_column.hpp" -#include "Code_expr_row.hpp" -#include "Code_root.hpp" - -// Plan_query_count - -Plan_query_count::~Plan_query_count() -{ -} - -Plan_expr_row* -Plan_query_count::getRow() -{ - ctx_assert(m_exprRow != 0); - return m_exprRow; -} - -Plan_base* -Plan_query_count::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_exprRow != 0); - ctl.m_aggrok = true; - ctl.m_aggrin = false; - m_exprRow->analyze(ctx, ctl); - ctl.m_aggrok = false; - if (! ctx.ok()) - return 0; - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_query_count::codegen(Ctx& ctx, Ctl& ctl) -{ - // create code for the subquery - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // create code for the row based on query code - ctx_assert(m_exprRow != 0); - ctl.m_execQuery = execQuery; - Exec_expr_row* execRow = static_cast(m_exprRow->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execRow != 0); - Exec_query_count* exec = new Exec_query_count(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // re-use SqlSpecs from the row - const SqlSpecs& sqlSpecs = execRow->getCode().sqlSpecs(); - Exec_query_count::Code& code = *new Exec_query_count::Code(sqlSpecs); - exec->setCode(code); - exec->setQuery(execQuery); - exec->setRow(execRow); - return exec; -} - -void -Plan_query_count::print(Ctx& ctx) -{ - ctx.print(" [query_count"); - Plan_base* a[] = { m_query, m_exprRow }; - printList(ctx, a, sizeof(a)/sizeof(a[0])); - ctx.print("]"); -} - -// Exec_query_count - -Exec_query_count::Code::~Code() -{ -} - -Exec_query_count::Data::~Data() -{ -} - -Exec_query_count::~Exec_query_count() -{ -} - -const Exec_query* -Exec_query_count::getRawQuery() const -{ - ctx_assert(m_query != 0); - return m_query; -} - -void -Exec_query_count::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate the subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - // allocate the row based on subquery data - ctx_assert(m_exprRow != 0); - ctl.m_query = m_query; - m_exprRow->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // re-use SqlRow from the expression row - const SqlRow& sqlRow = m_exprRow->getData().sqlRow(); - Data& data = *new Data(this, sqlRow); - setData(data); -} - -void -Exec_query_count::execImpl(Ctx& ctx, Ctl& ctl) -{ - Data& data = getData(); - // zero counters - ctx_assert(m_exprRow != 0); - m_exprRow->close(ctx); - data.m_done = false; - // execute the subquery - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); -} - -bool -Exec_query_count::fetchImpl(Ctx& ctx, Ctl& ctl) -{ - Data& data = getData(); - // returns one row only - if (data.m_done) - return false; - ctx_assert(m_query != 0 && m_exprRow != 0); - while (m_query->fetch(ctx, ctl)) { - // accumulate values - m_exprRow->evaluate(ctx, ctl); - if (! ctx.ok()) - return false; - } - data.m_done = true; - return true; -} - -void -Exec_query_count::close(Ctx& ctx) -{ - ctx_assert(m_query != 0); - m_query->close(ctx); - ctx_assert(m_exprRow != 0); - m_exprRow->close(ctx); -} - -void -Exec_query_count::print(Ctx& ctx) -{ - ctx.print(" [query_count"); - Exec_base* a[] = { m_query }; - printList(ctx, a, 1); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_count.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_count.hpp deleted file mode 100644 index a094eba4519..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_count.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_count_hpp -#define ODBC_CODEGEN_Code_query_count_hpp - -#include -#include "Code_query.hpp" -#include "Code_expr_row.hpp" -#include "Code_root.hpp" - -class Ctx; - -/** - * @class Plan_query_count - * @brief Select count and other aggregates (no group by) - */ -class Plan_query_count : public Plan_query { -public: - Plan_query_count(Plan_root* root); - virtual ~Plan_query_count(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setQuery(Plan_query* query); - void setRow(Plan_expr_row* exprRow); -protected: - Plan_expr_row* getRow(); - Plan_query* m_query; - Plan_expr_row* m_exprRow; -}; - -inline -Plan_query_count::Plan_query_count(Plan_root* root) : - Plan_query(root), - m_query(0), - m_exprRow(0) -{ -} - -// children - -inline void -Plan_query_count::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Plan_query_count::setRow(Plan_expr_row* exprRow) -{ - ctx_assert(exprRow != 0); - m_exprRow = exprRow; -} - -/** - * @class Exec_query_count - * @brief Select count and other aggregates (no group by) - */ -class Exec_query_count : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(const SqlSpecs& sqlSpecs); - virtual ~Code(); - protected: - friend class Exec_query_count; - // sets reference to Sqlspecs from the row - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_count* node, const SqlRow& sqlRow); - virtual ~Data(); - protected: - friend class Exec_query_count; - // sets reference to SqlRow from the row - bool m_done; // returns one row - }; - Exec_query_count(Exec_root* root); - virtual ~Exec_query_count(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); - void setRow(Exec_expr_row* exprRow); - const Exec_query* getRawQuery() const; -protected: - Exec_query* m_query; - Exec_expr_row* m_exprRow; -}; - -inline -Exec_query_count::Code::Code(const SqlSpecs& sqlSpecs) : - Exec_query::Code(sqlSpecs) -{ -} - -inline -Exec_query_count::Data::Data(Exec_query_count* node, const SqlRow& sqlRow) : - Exec_query::Data(node, sqlRow) -{ -} - -inline -Exec_query_count::Exec_query_count(Exec_root* root) : - Exec_query(root), - m_query(0), - m_exprRow(0) -{ -} - -// children - -inline const Exec_query_count::Code& -Exec_query_count::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_count::Data& -Exec_query_count::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_query_count::setQuery(Exec_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Exec_query_count::setRow(Exec_expr_row* exprRow) -{ - ctx_assert(m_exprRow == 0 && exprRow != 0); - m_exprRow = exprRow; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_distinct.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_distinct.cpp deleted file mode 100644 index 4cbfbfe812d..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_distinct.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_query_distinct.hpp" -#include "Code_root.hpp" - -// Plan_query_distinct - -Plan_query_distinct::~Plan_query_distinct() -{ -} - -Plan_expr_row* -Plan_query_distinct::getRow() -{ - ctx_assert(m_query != 0); - return m_query->getRow(); -} - -Plan_base* -Plan_query_distinct::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_query_distinct::codegen(Ctx& ctx, Ctl& ctl) -{ - // create code for the subquery - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // the exec node - Exec_query_distinct* exec = new Exec_query_distinct(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // re-use SqlSpecs from subquery - const Exec_query::Code& codeQuery = execQuery->getCode(); - const SqlSpecs& sqlSpecs = codeQuery.sqlSpecs(); - Exec_query_distinct::Code& code = *new Exec_query_distinct::Code(sqlSpecs); - exec->setCode(code); - exec->setQuery(execQuery); - return exec; -} - -void -Plan_query_distinct::print(Ctx& ctx) -{ - ctx.print(" [query_distinct"); - Plan_base* a[] = { m_query }; - printList(ctx, a, 1); - ctx.print("]"); -} - -// Exec_query_distinct - -Exec_query_distinct::Code::~Code() -{ -} - -Exec_query_distinct::Data::~Data() -{ - for (DistinctList::iterator i = m_groupList.begin(); i != m_groupList.end(); i++) { - delete (*i).first; - } -} - -Exec_query_distinct::~Exec_query_distinct() -{ -} - -const Exec_query* -Exec_query_distinct::getRawQuery() const -{ - ctx_assert(m_query != 0); - return m_query->getRawQuery(); -} - -void -Exec_query_distinct::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - Data& data = *new Data(this, getCode().sqlSpecs()); - setData(data); -} - -void -Exec_query_distinct::execImpl(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); -} - -bool -DistinctLess::operator()(const SqlRow* s1, const SqlRow* s2) const -{ - ctx_assert(s1 != 0 && s2 != 0); - const SqlRow& r1 = *s1; - const SqlRow& r2 = *s2; - for (unsigned i = 1; i <= r1.count(); i++) { - const SqlField& f1 = r1.getEntry(i); - const SqlField& f2 = r2.getEntry(i); - // nulls last is default in oracle - const bool f1null = f1.sqlNull(); - const bool f2null = f2.sqlNull(); - if (f1null && f2null) - continue; - if (! f1null && f2null) - return true; - if (f1null && ! f2null) - return false; - if (f1.less(f2)) - return true; - if (f2.less(f1)) - return false; - } - return false; -} - -bool -Exec_query_distinct::fetchImpl(Ctx& ctx, Ctl& ctl) -{ - Data& data = getData(); - ctx_assert(m_query != 0); - if (! data.m_grouped) { - // read and group all rows - while (m_query->fetch(ctx, ctl)) { - const SqlRow* dataRow = &m_query->getData().sqlRow(); - DistinctList::iterator i = data.m_groupList.find(dataRow); - if (i != data.m_groupList.end()) - continue; - unsigned index = data.m_count++; - dataRow = dataRow->copy(); - const DistinctList::value_type groupPair(dataRow, index); - data.m_groupList.insert(groupPair); - data.m_groupVector.push_back(dataRow); - } - if (! ctx.ok()) - return false; - data.m_index = 0; - data.m_grouped = true; - } - ctx_assert(data.m_count == data.m_groupVector.size()); - if (data.m_index < data.m_count) { - const SqlRow* currRow = data.m_groupVector[data.m_index]; - // make our SqlRow reference to it - for (unsigned i = 1; i <= data.m_sqlRow.count(); i++) { - const SqlField& currField = currRow->getEntry(i); - SqlSpec sqlSpec(currField.sqlSpec(), SqlSpec::Reference); - SqlField sqlField(sqlSpec, &currField); - data.m_sqlRow.setEntry(i, sqlField); - } - data.m_index++; - return true; - } - return false; -} - -void -Exec_query_distinct::close(Ctx& ctx) -{ - Data& data = getData(); - ctx_assert(m_query != 0); - m_query->close(ctx); - data.m_grouped = false; - data.m_count = 0; - for (DistinctList::iterator i = data.m_groupList.begin(); i != data.m_groupList.end(); i++) { - delete (*i).first; - } - data.m_groupList.clear(); - data.m_groupVector.clear(); -} - -void -Exec_query_distinct::print(Ctx& ctx) -{ - ctx.print(" [query_distinct"); - Exec_base* a[] = { m_query }; - printList(ctx, a, 1); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_distinct.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_distinct.hpp deleted file mode 100644 index 62c46bda901..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_distinct.hpp +++ /dev/null @@ -1,165 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_distinct_hpp -#define ODBC_CODEGEN_Code_query_distinct_hpp - -#include -#include -#include "Code_query.hpp" -#include "Code_expr_row.hpp" -#include "Code_pred.hpp" - -/** - * @class Plan_query_distinct - * @brief Group-by node in PlanTree - */ -class Plan_query_distinct : public Plan_query { -public: - Plan_query_distinct(Plan_root* root); - virtual ~Plan_query_distinct(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setQuery(Plan_query* query); - Plan_expr_row* getRow(); -protected: - Plan_query* m_query; -}; - -inline -Plan_query_distinct::Plan_query_distinct(Plan_root* root) : - Plan_query(root), - m_query(0) -{ -} - -// children - -inline void -Plan_query_distinct::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -/** - * Distinct preserves order of input rows so we use 2 data structures: - * map = index and vector = row (index >= 0). - */ - -class Exec_query_distinct; - -struct DistinctLess : std::binary_function { - bool operator()(const SqlRow* s1, const SqlRow* s2) const; -}; - -typedef std::map DistinctList; - -typedef std::vector DistinctVector; - -/** - * @class Exec_query_distinct - * @brief Group-by node in ExecTree - */ -class Exec_query_distinct : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(const SqlSpecs& sqlSpecs); - virtual ~Code(); - protected: - friend class Exec_query_distinct; - // sets reference to Sqlspecs from subquery - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_distinct* node, const SqlSpecs& sqlSpecs); - virtual ~Data(); - protected: - friend class Exec_query_distinct; - SqlRow m_sqlRow; // current row - bool m_grouped; // fetch and group-by done - unsigned m_count; - DistinctList m_groupList; - DistinctVector m_groupVector; - unsigned m_index; - }; - Exec_query_distinct(Exec_root* root); - virtual ~Exec_query_distinct(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); - const Exec_query* getRawQuery() const; -protected: - friend class Exec_query; - Exec_query* m_query; -}; - -inline -Exec_query_distinct::Code::Code(const SqlSpecs& sqlSpecs) : - Exec_query::Code(sqlSpecs) -{ -} - -inline -Exec_query_distinct::Data::Data(Exec_query_distinct* node, const SqlSpecs& sqlSpecs) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlSpecs), - m_grouped(false), - m_count(0), - m_index(0) -{ -} - -inline -Exec_query_distinct::Exec_query_distinct(Exec_root* root) : - Exec_query(root), - m_query(0) -{ -} - -// children - -inline const Exec_query_distinct::Code& -Exec_query_distinct::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_distinct::Data& -Exec_query_distinct::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_query_distinct::setQuery(Exec_query* query) -{ - ctx_assert(m_query == 0 && query != 0); - m_query = query; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_filter.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_filter.cpp deleted file mode 100644 index 934a24d182d..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_filter.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_query_filter.hpp" -#include "Code_query_join.hpp" -#include "Code_query_scan.hpp" -#include "Code_root.hpp" - -// Plan_query_filter - -Plan_query_filter::~Plan_query_filter() -{ -} - -Plan_base* -Plan_query_filter::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_pred != 0); - m_pred->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_query_filter::codegen(Ctx& ctx, Ctl& ctl) -{ - // generate code for the subquery - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // create code for the predicate based on query code - Exec_pred* execPred = 0; - ctl.m_execQuery = execQuery; - ctx_assert(m_topTable != 0); - ctl.m_topTable = m_topTable; - ctx_assert(m_pred != 0); - execPred = static_cast(m_pred->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execPred != 0); - ctl.m_topTable = 0; - // re-use SqlSpecs from subquery - const Exec_query::Code& codeQuery = execQuery->getCode(); - const SqlSpecs& sqlSpecs = codeQuery.sqlSpecs(); - Exec_query_filter* exec = new Exec_query_filter(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - Exec_query_filter::Code& code = *new Exec_query_filter::Code(sqlSpecs); - exec->setCode(code); - exec->setQuery(execQuery); - exec->setPred(execPred); - return exec; -} - -void -Plan_query_filter::print(Ctx& ctx) -{ - ctx.print(" [query_filter"); - Plan_base* a[] = { m_query, m_pred }; - printList(ctx, a, 2); - ctx.print("]"); -} - -// Exec_query_filter - -Exec_query_filter::Code::~Code() -{ -} - -Exec_query_filter::Data::~Data() -{ -} - -Exec_query_filter::~Exec_query_filter() -{ -} - -void -Exec_query_filter::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate the subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // allocate the predicate - ctl.m_query = m_query; - ctx_assert(m_pred != 0); - m_pred->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // re-use SqlRow from subquery - Exec_query::Data& dataQuery = m_query->getData(); - Data& data = *new Data(this, dataQuery.sqlRow()); - setData(data); -} - -void -Exec_query_filter::execImpl(Ctx& ctx, Ctl& ctl) -{ - // execute subquery - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); -} - -bool -Exec_query_filter::fetchImpl(Ctx& ctx, Ctl& ctl) -{ - // invoke fetch on subquery until predicate is true - ctx_assert(m_query != 0); - while (m_query->fetch(ctx, ctl)) { - ctx_assert(m_pred != 0); - m_pred->evaluate(ctx, ctl); - if (! ctx.ok()) - return false; - if (m_pred->getData().getValue() == Pred_value_true) { - ctl.m_postEval = true; - m_pred->evaluate(ctx, ctl); - ctl.m_postEval = false; - return true; - } - } - return false; -} - -void -Exec_query_filter::close(Ctx& ctx) -{ - ctx_assert(m_query != 0); - m_query->close(ctx); - ctx_assert(m_pred != 0); - m_pred->close(ctx); -} - -void -Exec_query_filter::print(Ctx& ctx) -{ - ctx.print(" [query_filter"); - Exec_base* a[] = { m_query, m_pred }; - printList(ctx, a, 2); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_filter.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_filter.hpp deleted file mode 100644 index 60cbf0f86a7..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_filter.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_filter_hpp -#define ODBC_CODEGEN_Code_query_filter_hpp - -#include -#include "Code_query.hpp" -#include "Code_table_list.hpp" -#include "Code_pred.hpp" - -/** - * @class Plan_query_filter - * @brief Filter node in PlanTree - */ -class Plan_query_filter : public Plan_query { -public: - Plan_query_filter(Plan_root* root); - virtual ~Plan_query_filter(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setQuery(Plan_query* query); - void setPred(Plan_pred* pred); -protected: - friend class Plan_select; - friend class Plan_update; - friend class Plan_delete; - Plan_query* m_query; - Plan_pred* m_pred; - Plan_table* m_topTable; // top level table for interpreted progs -}; - -inline -Plan_query_filter::Plan_query_filter(Plan_root* root) : - Plan_query(root), - m_query(0), - m_pred(0), - m_topTable(0) -{ -} - -// children - -inline void -Plan_query_filter::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Plan_query_filter::setPred(Plan_pred* pred) -{ - ctx_assert(pred != 0); - m_pred = pred; -} - -/** - * @class Exec_query_filter - * @brief Filter node in ExecTree - */ -class Exec_query_filter : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(const SqlSpecs& sqlSpecs); - virtual ~Code(); - protected: - friend class Exec_query_filter; - // sets reference to SqlSpecs from subquery - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_filter* node, const SqlRow& sqlRow); - virtual ~Data(); - protected: - friend class Exec_query_filter; - // sets reference to SqlRow from subquery - }; - Exec_query_filter(Exec_root* root); - virtual ~Exec_query_filter(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); - void setPred(Exec_pred* pred); -protected: - Exec_query* m_query; - Exec_pred* m_pred; -}; - -inline -Exec_query_filter::Code::Code(const SqlSpecs& sqlSpecs) : - Exec_query::Code(sqlSpecs) -{ -} - -inline -Exec_query_filter::Data::Data(Exec_query_filter* node, const SqlRow& sqlRow) : - Exec_query::Data(node, sqlRow) -{ -} - -inline -Exec_query_filter::Exec_query_filter(Exec_root* root) : - Exec_query(root), - m_query(0), - m_pred(0) -{ -} - -// children - -inline const Exec_query_filter::Code& -Exec_query_filter::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_filter::Data& -Exec_query_filter::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_query_filter::setQuery(Exec_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Exec_query_filter::setPred(Exec_pred* pred) -{ - ctx_assert(pred != 0); - m_pred = pred; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_group.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_group.cpp deleted file mode 100644 index c3019efaa85..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_group.cpp +++ /dev/null @@ -1,301 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_query_group.hpp" -#include "Code_root.hpp" - -// Plan_query_group - -Plan_query_group::~Plan_query_group() -{ -} - -Plan_expr_row* -Plan_query_group::getRow() -{ - ctx_assert(m_dataRow != 0); - return m_dataRow; -} - -Plan_base* -Plan_query_group::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_dataRow != 0); - m_dataRow->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_groupRow != 0); - m_groupRow->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - if (m_havingPred != 0) { - ctl.m_having = true; - m_havingPred->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctl.m_having = false; - } - return this; -} - -Exec_base* -Plan_query_group::codegen(Ctx& ctx, Ctl& ctl) -{ - // create code for the subquery - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // create code for the rows based on query code - ctl.m_execQuery = execQuery; - ctx_assert(m_dataRow != 0); - Exec_expr_row* execDataRow = static_cast(m_dataRow->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execDataRow != 0); - ctx_assert(m_groupRow != 0); - Exec_expr_row* execGroupRow = static_cast(m_groupRow->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execGroupRow != 0); - Exec_pred* execHavingPred = 0; - if (m_havingPred != 0) { - ctl.m_having = true; - execHavingPred = static_cast(m_havingPred->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execHavingPred != 0); - ctl.m_having = false; - } - // the exec node - Exec_query_group* exec = new Exec_query_group(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // re-use SqlSpecs from data row - const SqlSpecs& sqlSpecs = execDataRow->getCode().sqlSpecs(); - Exec_query_group::Code& code = *new Exec_query_group::Code(sqlSpecs); - exec->setCode(code); - exec->setQuery(execQuery); - exec->setDataRow(execDataRow); - exec->setGroupRow(execGroupRow); - if (execHavingPred != 0) - exec->setHavingPred(execHavingPred); - return exec; -} - -void -Plan_query_group::print(Ctx& ctx) -{ - ctx.print(" [query_group"); - Plan_base* a[] = { m_query, m_dataRow, m_groupRow }; - printList(ctx, a, 3); - ctx.print("]"); -} - -// Exec_query_group - -Exec_query_group::Code::~Code() -{ -} - -Exec_query_group::Data::~Data() -{ - for (GroupList::iterator i = m_groupList.begin(); i != m_groupList.end(); i++) { - delete (*i).first; - } -} - -Exec_query_group::~Exec_query_group() -{ -} - -const Exec_query* -Exec_query_group::getRawQuery() const -{ - ctx_assert(m_query != 0); - return m_query; -} - -void -Exec_query_group::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // allocate rows based on subquery data - ctl.m_query = m_query; - ctx_assert(m_dataRow != 0); - m_dataRow->alloc(ctx, ctl); - if (! ctx.ok()) - return; - ctx_assert(m_groupRow != 0); - m_groupRow->alloc(ctx, ctl); - if (! ctx.ok()) - return; - if (m_havingPred != 0) { - m_havingPred->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - Data& data = *new Data(this, getCode().sqlSpecs()); - setData(data); -} - -void -Exec_query_group::execImpl(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); -} - -bool -GroupLess::operator()(const SqlRow* s1, const SqlRow* s2) const -{ - ctx_assert(s1 != 0 && s2 != 0); - const SqlRow& r1 = *s1; - const SqlRow& r2 = *s2; - for (unsigned i = 1; i <= r1.count(); i++) { - const SqlField& f1 = r1.getEntry(i); - const SqlField& f2 = r2.getEntry(i); - // nulls last is default in oracle - const bool f1null = f1.sqlNull(); - const bool f2null = f2.sqlNull(); - if (f1null && f2null) - continue; - if (! f1null && f2null) - return true; - if (f1null && ! f2null) - return false; - if (f1.less(f2)) - return true; - if (f2.less(f1)) - return false; - } - return false; -} - -bool -Exec_query_group::fetchImpl(Ctx& ctx, Ctl& ctl) -{ - Data& data = getData(); - ctx_assert(m_query != 0 && m_groupRow != 0); - if (! data.m_grouped) { - // read and group all rows - while (m_query->fetch(ctx, ctl)) { - // evaluate and insert group-by values - m_groupRow->evaluate(ctx, ctl); - if (! ctx.ok()) - return false; - const SqlRow* groupRow = 0; - unsigned index = 0; - bool init; - GroupList::iterator i = data.m_groupList.find(&m_groupRow->getData().sqlRow()); - if (i == data.m_groupList.end()) { - groupRow = m_groupRow->getData().sqlRow().copy(); - index = ++data.m_count; - const GroupList::value_type groupPair(groupRow, index); - data.m_groupList.insert(groupPair); - init = true; - } else { - groupRow = (*i).first; - index = (*i).second; - ctx_assert(groupRow != 0 && index != 0); - init = false; - } - // evaluate rows saving expression values at index position - ctl.m_groupIndex = index; - ctl.m_groupInit = init; - m_dataRow->evaluate(ctx, ctl); - if (! ctx.ok()) - return false; - if (m_havingPred != 0) { - m_havingPred->evaluate(ctx, ctl); - if (! ctx.ok()) - return false; - } - if (ctl.m_sortRow != 0) { - ctl.m_sortRow->evaluate(ctx, ctl); - if (! ctx.ok()) - return false; - } - ctl.m_groupIndex = 0; - } - if (! ctx.ok()) - return false; - data.m_iterator = data.m_groupList.begin(); - data.m_grouped = true; - } - while (data.m_iterator != data.m_groupList.end()) { - const SqlRow* groupRow = (*data.m_iterator).first; - const unsigned index = (*data.m_iterator).second; - ctx_assert(groupRow != 0 && index != 0); - if (m_havingPred != 0) { - Pred_value v = m_havingPred->getData().groupValue(index); - if (v != Pred_value_true) { - data.m_iterator++; - continue; - } - } - // make our SqlRow reference to the saved values - for (unsigned i = 1; i <= data.m_sqlRow.count(); i++) { - const SqlField& currField = m_dataRow->getExpr(i)->getData().groupField(index); - SqlSpec sqlSpec(currField.sqlSpec(), SqlSpec::Reference); - SqlField sqlField(sqlSpec, &currField); - data.m_sqlRow.setEntry(i, sqlField); - } - // send group index up for possible order by - ctl.m_groupIndex = index; - data.m_iterator++; - return true; - } - return false; -} - -void -Exec_query_group::close(Ctx& ctx) -{ - Data& data = getData(); - ctx_assert(m_query != 0); - m_query->close(ctx); - ctx_assert(m_dataRow != 0); - m_dataRow->close(ctx); - ctx_assert(m_groupRow != 0); - m_groupRow->close(ctx); - if (m_havingPred != 0) - m_havingPred->close(ctx); - data.m_grouped = false; - data.m_count = 0; - for (GroupList::iterator i = data.m_groupList.begin(); i != data.m_groupList.end(); i++) { - delete (*i).first; - } - data.m_groupList.clear(); -} - -void -Exec_query_group::print(Ctx& ctx) -{ - ctx.print(" [query_group"); - Exec_base* a[] = { m_query, m_dataRow, m_groupRow }; - printList(ctx, a, 3); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_group.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_group.hpp deleted file mode 100644 index e79022c5284..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_group.hpp +++ /dev/null @@ -1,221 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_group_hpp -#define ODBC_CODEGEN_Code_query_group_hpp - -#include -#include -#include "Code_query.hpp" -#include "Code_expr_row.hpp" -#include "Code_pred.hpp" - -/** - * @class Plan_query_group - * @brief Group-by node in PlanTree - */ -class Plan_query_group : public Plan_query { -public: - Plan_query_group(Plan_root* root); - virtual ~Plan_query_group(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setQuery(Plan_query* query); - void setDataRow(Plan_expr_row* dataRow); - void setGroupRow(Plan_expr_row* groupRow); - void setHavingPred(Plan_pred* havingPred); - Plan_expr_row* getRow(); -protected: - Plan_query* m_query; - Plan_expr_row* m_dataRow; - Plan_expr_row* m_groupRow; - Plan_pred* m_havingPred; -}; - -inline -Plan_query_group::Plan_query_group(Plan_root* root) : - Plan_query(root), - m_query(0), - m_dataRow(0), - m_groupRow(0), - m_havingPred(0) -{ -} - -// children - -inline void -Plan_query_group::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Plan_query_group::setDataRow(Plan_expr_row* dataRow) -{ - ctx_assert(dataRow != 0); - m_dataRow = dataRow; -} - -inline void -Plan_query_group::setGroupRow(Plan_expr_row* groupRow) -{ - ctx_assert(groupRow != 0); - m_groupRow = groupRow; -} - -inline void -Plan_query_group::setHavingPred(Plan_pred* havingPred) -{ - ctx_assert(havingPred != 0); - m_havingPred = havingPred; -} - -/** - * Group-by uses a std::map. Key is values grouped by. Data is unique index - * (starting at 1) into arrays in expression data. - */ - -class Exec_query_group; - -struct GroupLess : std::binary_function { - bool operator()(const SqlRow* s1, const SqlRow* s2) const; -}; - -typedef std::map GroupList; - -/** - * @class Exec_query_group - * @brief Group-by node in ExecTree - */ -class Exec_query_group : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(const SqlSpecs& sqlSpecs); - virtual ~Code(); - protected: - friend class Exec_query_group; - // sets reference to Sqlspecs from subquery - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_group* node, const SqlSpecs& sqlSpecs); - virtual ~Data(); - protected: - friend class Exec_query_group; - SqlRow m_sqlRow; // current row - bool m_grouped; // fetch and group-by done - unsigned m_count; - GroupList m_groupList; - GroupList::iterator m_iterator; - }; - Exec_query_group(Exec_root* root); - virtual ~Exec_query_group(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); - void setDataRow(Exec_expr_row* dataRow); - void setGroupRow(Exec_expr_row* groupRow); - void setHavingPred(Exec_pred* havingPred); - const Exec_query* getRawQuery() const; -protected: - friend class Exec_query; - Exec_query* m_query; - Exec_expr_row* m_dataRow; - Exec_expr_row* m_groupRow; - Exec_pred* m_havingPred; -}; - -inline -Exec_query_group::Code::Code(const SqlSpecs& sqlSpecs) : - Exec_query::Code(sqlSpecs) -{ -} - -inline -Exec_query_group::Data::Data(Exec_query_group* node, const SqlSpecs& sqlSpecs) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlSpecs), - m_grouped(false), - m_count(0) -{ -} - -inline -Exec_query_group::Exec_query_group(Exec_root* root) : - Exec_query(root), - m_query(0), - m_dataRow(0), - m_groupRow(0), - m_havingPred(0) -{ -} - -// children - -inline const Exec_query_group::Code& -Exec_query_group::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_group::Data& -Exec_query_group::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_query_group::setQuery(Exec_query* query) -{ - ctx_assert(m_query == 0 && query != 0); - m_query = query; -} - -inline void -Exec_query_group::setDataRow(Exec_expr_row* dataRow) -{ - ctx_assert(m_dataRow == 0 && dataRow != 0); - m_dataRow = dataRow; -} - -inline void -Exec_query_group::setGroupRow(Exec_expr_row* groupRow) -{ - ctx_assert(m_groupRow == 0 && groupRow != 0); - m_groupRow = groupRow; -} - -inline void -Exec_query_group::setHavingPred(Exec_pred* havingPred) -{ - ctx_assert(m_havingPred == 0 && havingPred != 0); - m_havingPred = havingPred; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_index.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_index.cpp deleted file mode 100644 index ee19d6123cc..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_index.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_query_index.hpp" -#include "Code_column.hpp" -#include "Code_expr.hpp" -#include "Code_root.hpp" - -// Plan_query_index - -Plan_query_index::~Plan_query_index() -{ -} - -Plan_base* -Plan_query_index::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_query_index::codegen(Ctx& ctx, Ctl& ctl) -{ - // set up - ctx_assert(m_table != 0 && m_index != 0); - const BaseString& tableName = m_table->getName(); - ctx_assert(m_index->m_dictIndex != 0); - const DictIndex& dictIndex = *m_index->m_dictIndex; - const BaseString& indexName = dictIndex.getName(); - const unsigned keyCount = m_index->m_keyCount; - const ColumnVector& columns = m_table->exprColumns(); - ctx_assert(columns.size() > 0); - const unsigned attrCount = columns.size() - 1; - // create the code - Exec_query_index::Code& code = *new Exec_query_index::Code(keyCount, attrCount); - code.m_tableName = strcpy(new char[tableName.length() + 1], tableName.c_str()); - code.m_indexName = strcpy(new char[indexName.length() + 1], indexName.c_str()); - // key attributes - code.m_keyId = new NdbAttrId[1 + keyCount]; - code.m_keyId[0] = (NdbAttrId)-1; - for (unsigned k = 1; k <= keyCount; k++) { - const DictColumn* keyColumn = dictIndex.getColumn(k); - const SqlType& sqlType = keyColumn->sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_keySpecs.setEntry(k, sqlSpec); - code.m_keyId[k] = k - 1; // index column order - } - // matching expressions - ctx_assert(m_index->m_keyFound); - const ExprVector& keyEq = m_index->m_keyEq; - ctx_assert(keyEq.size() == 1 + keyCount); - code.m_keyMatch = new Exec_expr* [1 + keyCount]; - code.m_keyMatch[0] = 0; - for (unsigned k = 1; k <= keyCount; k++) { - Plan_expr* expr = keyEq[k]; - Exec_expr* execExpr = static_cast(expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - code.m_keyMatch[k] = execExpr; - } - // queried attributes - code.m_attrId = new NdbAttrId[1 + attrCount]; - code.m_attrId[0] = (NdbAttrId)-1; - for (unsigned i = 1; i <= attrCount; i++) { - Plan_column* column = columns[i]; - ctx_assert(column != 0); - const DictColumn& dictColumn = column->dictColumn(); - const SqlType& sqlType = dictColumn.sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_sqlSpecs.setEntry(i, sqlSpec); - code.m_attrId[i] = dictColumn.getAttrId(); - } - // create the exec - Exec_query_index* exec = new Exec_query_index(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - return exec; -} - -void -Plan_query_index::print(Ctx& ctx) -{ - ctx.print(" [query_index"); - Plan_base* a[] = { m_table }; - printList(ctx, a, 1); - ctx.print("]"); -} - -// Exec_query_index - -Exec_query_index::Code::~Code() -{ - delete[] m_tableName; - delete[] m_keyId; - delete[] m_keyMatch; - delete[] m_attrId; -} - -Exec_query_index::Data::~Data() -{ - delete[] m_recAttr; -} - -Exec_query_index::~Exec_query_index() -{ -} - -void -Exec_query_index::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // create data - Data& data = *new Data(this, code.sqlSpecs()); - setData(data); - // allocate matching expressions - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* expr = code.m_keyMatch[k]; - ctx_assert(expr != 0); - expr->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - // needed for isNULL - data.m_recAttr = new NdbRecAttr* [1 + code.m_attrCount]; - for (unsigned i = 0; i <= code.m_attrCount; i++) { - data.m_recAttr[i] = 0; - } -} - -void -Exec_query_index::close(Ctx& ctx) -{ - Data& data = getData(); - if (data.m_con != 0) { - Ndb* const ndb = ndbObject(); - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - data.m_done = true; - ctx_log2(("lookup closed at statement close")); - } -} - -void -Exec_query_index::print(Ctx& ctx) -{ - ctx.print(" [query_index"); - if (m_code != 0) { - const Code& code = getCode(); - ctx.print(" keyId="); - for (unsigned i = 1; i <= code.m_keyCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_keyId[i]); - } - ctx.print(" attrId="); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_attrId[i]); - } - ctx.print(" table=%s", code.m_tableName); - } - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_index.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_index.hpp deleted file mode 100644 index 87affd50580..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_index.hpp +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_index_hpp -#define ODBC_CODEGEN_Code_query_index_hpp - -#include -#include "Code_query.hpp" -#include "Code_table.hpp" - -class Ctx; -class StmtArea; -class NdbConnection; -class NdbOperation; -class NdbRecAttr; - -/** - * @class Plan_query_index - * @brief Full select (no where clause) - */ -class Plan_query_index : public Plan_query { -public: - Plan_query_index(Plan_root* root); - virtual ~Plan_query_index(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setTable(Plan_table* table, Plan_table::Index* index); -protected: - Plan_table* m_table; - Plan_table::Index* m_index; -}; - -inline -Plan_query_index::Plan_query_index(Plan_root* root) : - Plan_query(root), - m_table(0), - m_index(0) -{ -} - -// children - -inline void -Plan_query_index::setTable(Plan_table* table, Plan_table::Index* index) -{ - ctx_assert(table != 0 && index != 0 && index == &table->m_indexList[index->m_pos] && index->m_pos != 0); - m_table = table; - m_index = index; -} - -/** - * @class Exec_query_index - * @brief Full select (no where clause) - */ -class Exec_query_index : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(unsigned keyCount, unsigned attrCount); - virtual ~Code(); - protected: - friend class Plan_query_index; - friend class Exec_query_index; - const char* m_tableName; - const char* m_indexName; - unsigned m_keyCount; - SqlSpecs m_keySpecs; // key types - NdbAttrId* m_keyId; - Exec_expr** m_keyMatch; // XXX pointers for now - unsigned m_attrCount; - SqlSpecs m_sqlSpecs; - NdbAttrId* m_attrId; - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_index* node, const SqlSpecs& sqlSpecs); - virtual ~Data(); - protected: - friend class Exec_query_index; - SqlRow m_sqlRow; - NdbConnection* m_con; - NdbOperation* m_op; - NdbRecAttr** m_recAttr; - bool m_done; // returns one row - }; - Exec_query_index(Exec_root* root); - virtual ~Exec_query_index(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_query_index::Code::Code(unsigned keyCount, unsigned attrCount) : - Exec_query::Code(m_sqlSpecs), - m_tableName(0), - m_indexName(0), - m_keyCount(keyCount), - m_keySpecs(keyCount), - m_keyId(0), - m_attrCount(attrCount), - m_sqlSpecs(attrCount), - m_attrId(0) -{ -} - -inline -Exec_query_index::Data::Data(Exec_query_index* node, const SqlSpecs& sqlSpecs) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlSpecs), - m_con(0), - m_op(0), - m_recAttr(0), - m_done(false) -{ -} - -inline -Exec_query_index::Exec_query_index(Exec_root* root) : - Exec_query(root) -{ -} - -// children - -inline const Exec_query_index::Code& -Exec_query_index::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_index::Data& -Exec_query_index::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_join.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_join.cpp deleted file mode 100644 index 89aafe13610..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_join.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_query.hpp" -#include "Code_query_join.hpp" -#include "Code_query_scan.hpp" -#include "Code_root.hpp" - -// Plan_query_join - -Plan_query_join::~Plan_query_join() -{ -} - -Plan_base* -Plan_query_join::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_inner != 0); - m_inner->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_outer != 0); - m_outer->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_query_join::codegen(Ctx& ctx, Ctl& ctl) -{ - // generate code for subqueries - ctx_assert(m_inner != 0); - Exec_query* execInner = static_cast(m_inner->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execInner != 0); - ctx_assert(m_outer != 0); - ctl.m_execQuery = execInner; - Exec_query* execOuter = static_cast(m_outer->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execOuter != 0); - // combine sql specs from subqueries - const SqlSpecs& specsInner = execInner->getCode().sqlSpecs(); - const SqlSpecs& specsOuter = execOuter->getCode().sqlSpecs(); - SqlSpecs sqlSpecs(specsInner.count() + specsOuter.count()); - for (unsigned i = 1; i <= specsInner.count(); i++) { - const SqlSpec sqlSpec(specsInner.getEntry(i), SqlSpec::Reference); - sqlSpecs.setEntry(i, sqlSpec); - } - for (unsigned i = 1; i <= specsOuter.count(); i++) { - const SqlSpec sqlSpec(specsOuter.getEntry(i), SqlSpec::Reference); - sqlSpecs.setEntry(specsInner.count() + i, sqlSpec); - } - // create the code - Exec_query_join* exec = new Exec_query_join(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setInner(execInner); - exec->setOuter(execOuter); - Exec_query_join::Code& code = *new Exec_query_join::Code(sqlSpecs); - exec->setCode(code); - return exec; -} - -void -Plan_query_join::print(Ctx& ctx) -{ - ctx.print(" [query_join"); - Plan_base* a[] = { m_inner, m_outer }; - printList(ctx, a, 2); - ctx.print("]"); -} - -// Exec_query_join - -Exec_query_join::Code::~Code() -{ -} - -Exec_query_join::Data::~Data() -{ -} - -Exec_query_join::~Exec_query_join() -{ -} - -void -Exec_query_join::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate the subqueries - ctx_assert(m_inner != 0); - m_inner->alloc(ctx, ctl); - if (! ctx.ok()) - return; - ctx_assert(m_outer != 0); - ctl.m_query = m_inner; - m_outer->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // combine data rows from subqueries - const Code& code = getCode(); - const SqlRow& rowInner = m_inner->getData().sqlRow(); - const SqlRow& rowOuter = m_outer->getData().sqlRow(); - SqlRow sqlRow(code.m_sqlSpecs); - for (unsigned i = 1; i <= rowInner.count(); i++) { - const SqlSpec& sqlSpec = code.m_sqlSpecs.getEntry(i); - const SqlField sqlField(sqlSpec, &rowInner.getEntry(i)); - sqlRow.setEntry(i, sqlField); - } - for (unsigned i = 1; i <= rowOuter.count(); i++) { - const SqlSpec& sqlSpec = code.m_sqlSpecs.getEntry(rowInner.count() + i); - const SqlField sqlField(sqlSpec, &rowOuter.getEntry(i)); - sqlRow.setEntry(rowInner.count() + i, sqlField); - } - // create the data - Data& data = *new Data(this, sqlRow); - setData(data); -} - -void -Exec_query_join::execImpl(Ctx& ctx, Ctl& ctl) -{ - // execute only inner query - ctx_assert(m_inner != 0); - m_inner->execute(ctx, ctl); -} - -bool -Exec_query_join::fetchImpl(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_inner != 0); - ctx_assert(m_outer != 0); - if (getData().getState() == ResultSet::State_init) { - // fetch first row from inner - if (! m_inner->fetch(ctx, ctl)) - return false; - } - while (1) { - if (m_outer->getData().getState() == ResultSet::State_end) { - // execute or re-execute outer - Ctl ctl(0); - m_outer->close(ctx); - if (! ctx.ok()) - return false; - m_outer->execute(ctx, ctl); - if (! ctx.ok()) - return false; - } - if (! m_outer->fetch(ctx, ctl)) { - if (! ctx.ok()) - return false; - // fetch next row from inner - if (! m_inner->fetch(ctx, ctl)) - return false; - } - else - return true; - } -} - -void -Exec_query_join::close(Ctx& ctx) -{ - ctx_assert(m_inner != 0); - m_inner->close(ctx); - ctx_assert(m_outer != 0); - m_outer->close(ctx); -} - -void -Exec_query_join::print(Ctx& ctx) -{ - ctx.print(" [query_join"); - Exec_base* a[] = { m_inner, m_outer }; - printList(ctx, a, 2); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_join.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_join.hpp deleted file mode 100644 index f6ac9205329..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_join.hpp +++ /dev/null @@ -1,159 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_join_hpp -#define ODBC_CODEGEN_Code_query_join_hpp - -#include -#include "Code_query.hpp" -#include "Code_table_list.hpp" -#include "Code_pred.hpp" - -/** - * @class Plan_query_join - * @brief Filter node in PlanTree - */ -class Plan_query_join : public Plan_query { -public: - Plan_query_join(Plan_root* root); - virtual ~Plan_query_join(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setInner(Plan_query* query); - void setOuter(Plan_query* query); -protected: - Plan_query* m_inner; - Plan_query* m_outer; -}; - -inline -Plan_query_join::Plan_query_join(Plan_root* root) : - Plan_query(root), - m_inner(0), - m_outer(0) -{ -} - -// children - -inline void -Plan_query_join::setInner(Plan_query* query) -{ - ctx_assert(query != 0); - m_inner = query; -} - -inline void -Plan_query_join::setOuter(Plan_query* query) -{ - ctx_assert(query != 0); - m_outer = query; -} - -/** - * @class Exec_query_join - * @brief Filter node in ExecTree - */ -class Exec_query_join : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(const SqlSpecs& sqlSpecs); - virtual ~Code(); - protected: - friend class Exec_query_join; - SqlSpecs m_sqlSpecs; - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_join* node, const SqlRow& sqlRow); - virtual ~Data(); - protected: - friend class Exec_query_join; - SqlRow m_sqlRow; - }; - Exec_query_join(Exec_root* root); - virtual ~Exec_query_join(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setInner(Exec_query* query); - void setOuter(Exec_query* query); -protected: - Exec_query* m_inner; - Exec_query* m_outer; -}; - -inline -Exec_query_join::Code::Code(const SqlSpecs& sqlSpecs) : - Exec_query::Code(m_sqlSpecs), - m_sqlSpecs(sqlSpecs) -{ -} - -inline -Exec_query_join::Data::Data(Exec_query_join* node, const SqlRow& sqlRow) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlRow) -{ -} - -inline -Exec_query_join::Exec_query_join(Exec_root* root) : - Exec_query(root), - m_inner(0), - m_outer(0) -{ -} - -// children - -inline const Exec_query_join::Code& -Exec_query_join::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_join::Data& -Exec_query_join::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_query_join::setInner(Exec_query* query) -{ - ctx_assert(query != 0); - m_inner = query; -} - -inline void -Exec_query_join::setOuter(Exec_query* query) -{ - ctx_assert(query != 0); - m_outer = query; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_lookup.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_lookup.cpp deleted file mode 100644 index bad4199190b..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_lookup.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_query_lookup.hpp" -#include "Code_column.hpp" -#include "Code_expr.hpp" -#include "Code_root.hpp" - -// Plan_query_lookup - -Plan_query_lookup::~Plan_query_lookup() -{ -} - -Plan_base* -Plan_query_lookup::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_query_lookup::codegen(Ctx& ctx, Ctl& ctl) -{ - // set up - ctx_assert(m_table != 0); - const BaseString& tableName = m_table->getName(); - const DictTable& dictTable = m_table->dictTable(); - const unsigned keyCount = dictTable.keyCount(); - const ColumnVector& columns = m_table->exprColumns(); - ctx_assert(columns.size() > 0); - const unsigned attrCount = columns.size() - 1; - // create the code - Exec_query_lookup::Code& code = *new Exec_query_lookup::Code(keyCount, attrCount); - code.m_tableName = strcpy(new char[tableName.length() + 1], tableName.c_str()); - // key attributes - code.m_keyId = new NdbAttrId[1 + keyCount]; - code.m_keyId[0] = (NdbAttrId)-1; - for (unsigned k = 1; k <= keyCount; k++) { - const DictColumn* keyColumn = dictTable.getKey(k); - const SqlType& sqlType = keyColumn->sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_keySpecs.setEntry(k, sqlSpec); - code.m_keyId[k] = keyColumn->getAttrId(); - } - // matching expressions - const Plan_table::Index& index = m_table->m_indexList[0]; - ctx_assert(index.m_keyFound); - const ExprVector& keyEq = index.m_keyEq; - ctx_assert(keyEq.size() == 1 + keyCount); - code.m_keyMatch = new Exec_expr* [1 + keyCount]; - code.m_keyMatch[0] = 0; - for (unsigned k = 1; k <= keyCount; k++) { - Plan_expr* expr = keyEq[k]; - Exec_expr* execExpr = static_cast(expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - code.m_keyMatch[k] = execExpr; - } - // queried attributes - code.m_attrId = new NdbAttrId[1 + attrCount]; - code.m_attrId[0] = (NdbAttrId)-1; - for (unsigned i = 1; i <= attrCount; i++) { - Plan_column* column = columns[i]; - ctx_assert(column != 0); - const DictColumn& dictColumn = column->dictColumn(); - const SqlType& sqlType = dictColumn.sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_sqlSpecs.setEntry(i, sqlSpec); - code.m_attrId[i] = dictColumn.getAttrId(); - } - // create the exec - Exec_query_lookup* exec = new Exec_query_lookup(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - return exec; -} - -void -Plan_query_lookup::print(Ctx& ctx) -{ - ctx.print(" [query_lookup"); - Plan_base* a[] = { m_table }; - printList(ctx, a, 1); - ctx.print("]"); -} - -// Exec_query_lookup - -Exec_query_lookup::Code::~Code() -{ - delete[] m_tableName; - delete[] m_keyId; - delete[] m_keyMatch; - delete[] m_attrId; -} - -Exec_query_lookup::Data::~Data() -{ - delete[] m_recAttr; -} - -Exec_query_lookup::~Exec_query_lookup() -{ -} - -void -Exec_query_lookup::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // create data - Data& data = *new Data(this, code.sqlSpecs()); - setData(data); - // allocate matching expressions - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* expr = code.m_keyMatch[k]; - ctx_assert(expr != 0); - expr->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - // needed for isNULL - data.m_recAttr = new NdbRecAttr* [1 + code.m_attrCount]; - for (unsigned i = 0; i <= code.m_attrCount; i++) { - data.m_recAttr[i] = 0; - } -} - -void -Exec_query_lookup::close(Ctx& ctx) -{ - Data& data = getData(); - if (data.m_con != 0) { - Ndb* const ndb = ndbObject(); - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - data.m_done = true; - ctx_log2(("lookup closed at statement close")); - } -} - -void -Exec_query_lookup::print(Ctx& ctx) -{ - ctx.print(" [query_lookup"); - if (m_code != 0) { - const Code& code = getCode(); - ctx.print(" keyId="); - for (unsigned i = 1; i <= code.m_keyCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_keyId[i]); - } - ctx.print(" attrId="); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_attrId[i]); - } - ctx.print(" table=%s", code.m_tableName); - } - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_lookup.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_lookup.hpp deleted file mode 100644 index e66623d4030..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_lookup.hpp +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_lookup_hpp -#define ODBC_CODEGEN_Code_query_lookup_hpp - -#include -#include "Code_query.hpp" -#include "Code_table.hpp" - -class Ctx; -class StmtArea; -class NdbConnection; -class NdbOperation; -class NdbRecAttr; - -/** - * @class Plan_query_lookup - * @brief Full select (no where clause) - */ -class Plan_query_lookup : public Plan_query { -public: - Plan_query_lookup(Plan_root* root); - virtual ~Plan_query_lookup(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setTable(Plan_table* table); -protected: - Plan_table* m_table; -}; - -inline -Plan_query_lookup::Plan_query_lookup(Plan_root* root) : - Plan_query(root), - m_table(0) -{ -} - -// children - -inline void -Plan_query_lookup::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -/** - * @class Exec_query_lookup - * @brief Full select (no where clause) - */ -class Exec_query_lookup : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(unsigned keyCount, unsigned attrCount); - virtual ~Code(); - protected: - friend class Plan_query_lookup; - friend class Exec_query_lookup; - char* m_tableName; - unsigned m_keyCount; - SqlSpecs m_keySpecs; // key types - NdbAttrId* m_keyId; - Exec_expr** m_keyMatch; // XXX pointers for now - unsigned m_attrCount; - SqlSpecs m_sqlSpecs; - NdbAttrId* m_attrId; - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_lookup* node, const SqlSpecs& sqlSpecs); - virtual ~Data(); - protected: - friend class Exec_query_lookup; - SqlRow m_sqlRow; - NdbConnection* m_con; - NdbOperation* m_op; - NdbRecAttr** m_recAttr; - bool m_done; // returns one row - }; - Exec_query_lookup(Exec_root* root); - virtual ~Exec_query_lookup(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_query_lookup::Code::Code(unsigned keyCount, unsigned attrCount) : - Exec_query::Code(m_sqlSpecs), - m_tableName(0), - m_keyCount(keyCount), - m_keySpecs(keyCount), - m_keyId(0), - m_attrCount(attrCount), - m_sqlSpecs(attrCount), - m_attrId(0) -{ -} - -inline -Exec_query_lookup::Data::Data(Exec_query_lookup* node, const SqlSpecs& sqlSpecs) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlSpecs), - m_con(0), - m_op(0), - m_recAttr(0), - m_done(false) -{ -} - -inline -Exec_query_lookup::Exec_query_lookup(Exec_root* root) : - Exec_query(root) -{ -} - -// children - -inline const Exec_query_lookup::Code& -Exec_query_lookup::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_lookup::Data& -Exec_query_lookup::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_project.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_project.cpp deleted file mode 100644 index 54043ce3d5d..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_project.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_query_project.hpp" -#include "Code_root.hpp" - -// Plan_query_project - -Plan_query_project::~Plan_query_project() -{ -} - -Plan_base* -Plan_query_project::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_exprRow != 0); - ctl.m_aggrok = true; - ctl.m_aggrin = false; - m_exprRow->analyze(ctx, ctl); - ctl.m_aggrok = false; - if (! ctx.ok()) - return 0; - return this; -} - -Plan_expr_row* -Plan_query_project::getRow() -{ - ctx_assert(m_exprRow != 0); - return m_exprRow; -} - -Exec_base* -Plan_query_project::codegen(Ctx& ctx, Ctl& ctl) -{ - // create code for the subquery - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // create code for the row based on query code - ctx_assert(m_exprRow != 0); - ctl.m_execQuery = execQuery; - Exec_expr_row* execRow = static_cast(m_exprRow->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execRow != 0); - Exec_query_project* exec = new Exec_query_project(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // re-use SqlSpecs from the row - const SqlSpecs& sqlSpecs = execRow->getCode().sqlSpecs(); - Exec_query_project::Code& code = *new Exec_query_project::Code(sqlSpecs); - code.m_limitOff = m_limitOff; - code.m_limitCnt = m_limitCnt; - exec->setCode(code); - exec->setQuery(execQuery); - exec->setRow(execRow); - return exec; -} - -void -Plan_query_project::print(Ctx& ctx) -{ - ctx.print(" [query_project"); - Plan_base* a[] = { m_query, m_exprRow }; - printList(ctx, a, 2); - ctx.print("]"); -} - -// Exec_query_project - -Exec_query_project::Code::~Code() -{ -} - -Exec_query_project::Data::~Data() -{ -} - -Exec_query_project::~Exec_query_project() -{ -} - -const Exec_query* -Exec_query_project::getRawQuery() const -{ - ctx_assert(m_query != 0); - return m_query; -} - -void -Exec_query_project::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate the subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // allocate the row based on subquery data - ctx_assert(m_exprRow != 0); - ctl.m_query = m_query; - m_exprRow->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // re-use SqlRow from the expression row - const SqlRow& sqlRow = m_exprRow->getData().sqlRow(); - Data& data = *new Data(this, sqlRow); - setData(data); -} - -void -Exec_query_project::execImpl(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); -} - -bool -Exec_query_project::fetchImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - ctx_assert(m_query != 0); - while (1) { - if (! m_query->fetch(ctx, ctl)) - return false; - ctx_assert(m_exprRow != 0); - m_exprRow->evaluate(ctx, ctl); - if (! ctx.ok()) - return false; - ctl.m_postEval = true; - m_exprRow->evaluate(ctx, ctl); - ctl.m_postEval = false; - const int n = ++data.m_cnt; - const int o = code.m_limitOff <= 0 ? 0 : code.m_limitOff; - const int c = code.m_limitCnt; - if (n <= o) - continue; - if (c < 0) - break; - if (n - o <= c) - break; - return false; - } - return true; -} - -void -Exec_query_project::close(Ctx& ctx) -{ - Data& data = getData(); - data.m_cnt = 0; - ctx_assert(m_query != 0); - m_query->close(ctx); - ctx_assert(m_exprRow != 0); - m_exprRow->close(ctx); -} - -void -Exec_query_project::print(Ctx& ctx) -{ - ctx.print(" [query_project"); - Exec_base* a[] = { m_query, m_exprRow }; - printList(ctx, a, 2); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_project.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_project.hpp deleted file mode 100644 index 545685ab9df..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_project.hpp +++ /dev/null @@ -1,178 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_project_hpp -#define ODBC_CODEGEN_Code_query_project_hpp - -#include -#include "Code_query.hpp" -#include "Code_expr_row.hpp" - -/** - * @class Plan_query_project - * @brief Project node in PlanTree - */ -class Plan_query_project : public Plan_query { -public: - Plan_query_project(Plan_root* root); - virtual ~Plan_query_project(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setQuery(Plan_query* query); - void setRow(Plan_expr_row* exprRow); - void setLimit(int off, int cnt); -protected: - Plan_expr_row* getRow(); - Plan_query* m_query; - Plan_expr_row* m_exprRow; - int m_limitOff; - int m_limitCnt; -}; - -inline -Plan_query_project::Plan_query_project(Plan_root* root) : - Plan_query(root), - m_query(0), - m_exprRow(0), - m_limitOff(0), - m_limitCnt(-1) -{ -} - -// children - -inline void -Plan_query_project::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Plan_query_project::setRow(Plan_expr_row* exprRow) -{ - ctx_assert(exprRow != 0); - m_exprRow = exprRow; -} - -inline void -Plan_query_project::setLimit(int off, int cnt) -{ - m_limitOff = off; - m_limitCnt = cnt; -} - -/** - * @class Exec_query_project - * @brief Project node in ExecTree - */ -class Exec_query_project : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(const SqlSpecs& sqlSpecs); - virtual ~Code(); - protected: - friend class Plan_query_project; - friend class Exec_query_project; - // sets reference to Sqlspecs from the row - int m_limitOff; - int m_limitCnt; - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_project* node, const SqlRow& sqlRow); - virtual ~Data(); - protected: - friend class Exec_query_project; - // sets reference to SqlRow from the row - unsigned m_cnt; - }; - Exec_query_project(Exec_root* root); - virtual ~Exec_query_project(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); - void setRow(Exec_expr_row* exprRow); - const Exec_query* getRawQuery() const; -protected: - friend class Exec_query; - Exec_query* m_query; - Exec_expr_row* m_exprRow; -}; - -inline -Exec_query_project::Code::Code(const SqlSpecs& sqlSpecs) : - Exec_query::Code(sqlSpecs), - m_limitOff(0), - m_limitCnt(-1) -{ -} - -inline -Exec_query_project::Data::Data(Exec_query_project* node, const SqlRow& sqlRow) : - Exec_query::Data(node, sqlRow), - m_cnt(0) -{ -} - -inline -Exec_query_project::Exec_query_project(Exec_root* root) : - Exec_query(root), - m_query(0), - m_exprRow(0) -{ -} - -// children - -inline const Exec_query_project::Code& -Exec_query_project::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_project::Data& -Exec_query_project::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_query_project::setQuery(Exec_query* query) -{ - ctx_assert(m_query == 0 && query != 0); - m_query = query; -} - -inline void -Exec_query_project::setRow(Exec_expr_row* exprRow) -{ - ctx_assert(m_exprRow == 0 && exprRow != 0); - m_exprRow = exprRow; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_range.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_range.cpp deleted file mode 100644 index 5d29c5af315..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_range.cpp +++ /dev/null @@ -1,211 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_query_range.hpp" -#include "Code_column.hpp" -#include "Code_expr.hpp" -#include "Code_root.hpp" - -// Plan_query_range - -Plan_query_range::~Plan_query_range() -{ -} - -Plan_base* -Plan_query_range::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_query_range::codegen(Ctx& ctx, Ctl& ctl) -{ - // set up - ctx_assert(m_table != 0 && m_index != 0); - const BaseString& tableName = m_table->getName(); - ctx_assert(m_index->m_dictIndex != 0); - const DictIndex& dictIndex = *m_index->m_dictIndex; - const BaseString& indexName = dictIndex.getName(); - const unsigned keyCount = m_index->m_keyCountUsed; - const ColumnVector& columns = m_table->exprColumns(); - ctx_assert(columns.size() > 0); - const unsigned attrCount = columns.size() - 1; - // create the code - Exec_query_range::Code& code = *new Exec_query_range::Code(keyCount, attrCount); - code.m_tableName = strcpy(new char[tableName.length() + 1], tableName.c_str()); - code.m_indexName = strcpy(new char[indexName.length() + 1], indexName.c_str()); - code.m_exclusive = m_exclusive; - // key attributes - code.m_keyId = new NdbAttrId[1 + keyCount]; - code.m_keyId[0] = (NdbAttrId)-1; - for (unsigned k = 1; k <= keyCount; k++) { - const DictColumn* keyColumn = dictIndex.getColumn(k); - const SqlType& sqlType = keyColumn->sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_keySpecs.setEntry(k, sqlSpec); - code.m_keyId[k] = k - 1; // index column order - } - // matching expressions - ctx_assert(m_index->m_keyFound); - const ExprVector& keyEq = m_index->m_keyEq; - // check size matches - ctx_assert(keyEq.size() == 1 + keyCount); - code.m_keyMatch = new Exec_expr* [1 + keyCount]; - code.m_keyMatch[0] = 0; - for (unsigned k = 1; k <= keyCount; k++) { - Plan_expr* expr = keyEq[k]; - Exec_expr* execExpr = static_cast(expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - code.m_keyMatch[k] = execExpr; - } - // queried attributes - code.m_attrId = new NdbAttrId[1 + attrCount]; - code.m_attrId[0] = (NdbAttrId)-1; - for (unsigned i = 1; i <= attrCount; i++) { - Plan_column* column = columns[i]; - ctx_assert(column != 0); - const DictColumn& dictColumn = column->dictColumn(); - const SqlType& sqlType = dictColumn.sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_sqlSpecs.setEntry(i, sqlSpec); - code.m_attrId[i] = dictColumn.getAttrId(); - } - // create the exec - Exec_query_range* exec = new Exec_query_range(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - // interpreter - ctl.m_execQuery = exec; - Exec_pred* execInterp = 0; - ctl.m_topTable = m_table; - if (m_interp != 0) { - execInterp = static_cast(m_interp->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execInterp != 0); - } - ctl.m_topTable = 0; - if (m_interp != 0) - exec->setInterp(execInterp); - return exec; -} - -void -Plan_query_range::print(Ctx& ctx) -{ - ctx.print(" [query_range"); - Plan_base* a[] = { m_table }; - printList(ctx, a, 1); - ctx.print("]"); -} - -// Exec_query_range - -Exec_query_range::Code::~Code() -{ - delete[] m_tableName; - delete[] m_keyId; - delete[] m_keyMatch; - delete[] m_attrId; -} - -Exec_query_range::Data::~Data() -{ - delete[] m_recAttr; -} - -Exec_query_range::~Exec_query_range() -{ -} - -void -Exec_query_range::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // create data - Data& data = *new Data(this, code.sqlSpecs()); - setData(data); - // allocate matching expressions - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* expr = code.m_keyMatch[k]; - ctx_assert(expr != 0); - expr->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } - // needed for isNULL - data.m_recAttr = new NdbRecAttr* [1 + code.m_attrCount]; - for (unsigned i = 0; i <= code.m_attrCount; i++) { - data.m_recAttr[i] = 0; - } - // parallel - data.m_parallel = code.m_exclusive ? 1 : 240; // best supported - // interpreter - if (m_interp != 0) { - //m_interp->alloc(ctx, ctl); XXX - if (! ctx.ok()) - return; - } -} - -void -Exec_query_range::close(Ctx& ctx) -{ - Data& data = getData(); - if (data.m_con != 0) { - Ndb* const ndb = ndbObject(); - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - data.m_done = true; - ctx_log2(("lookup closed at statement close")); - } - // if (m_interp != 0) - // m_interp->close(ctx); -} - -void -Exec_query_range::print(Ctx& ctx) -{ - ctx.print(" [query_range"); - if (m_code != 0) { - const Code& code = getCode(); - ctx.print(" keyId="); - for (unsigned i = 1; i <= code.m_keyCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_keyId[i]); - } - ctx.print(" attrId="); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_attrId[i]); - } - ctx.print(" table=%s", code.m_tableName); - } - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_range.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_range.hpp deleted file mode 100644 index 4438189522c..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_range.hpp +++ /dev/null @@ -1,186 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_range_hpp -#define ODBC_CODEGEN_Code_query_range_hpp - -#include -#include "Code_query.hpp" -#include "Code_table.hpp" -#include "Code_pred.hpp" - -class Ctx; -class StmtArea; -class NdbConnection; -class NdbOperation; -class NdbRecAttr; - -/* - * Range scan via ordered index. We implement only the case of equality - * on an initial sequence of index keys. - */ - -class Plan_query_range : public Plan_query { -public: - Plan_query_range(Plan_root* root); - virtual ~Plan_query_range(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - void setTable(Plan_table* table, Plan_table::Index* index); - void setInterp(Plan_pred* interp); - void setExclusive(); -protected: - Plan_table* m_table; - Plan_table::Index* m_index; - Plan_pred* m_interp; - bool m_exclusive; -}; - -inline -Plan_query_range::Plan_query_range(Plan_root* root) : - Plan_query(root), - m_table(0), - m_index(0), - m_interp(0), - m_exclusive(false) -{ -} - -inline void -Plan_query_range::setTable(Plan_table* table, Plan_table::Index* index) -{ - ctx_assert(table != 0 && index != 0 && index == &table->m_indexList[index->m_pos] && index->m_pos != 0); - m_table = table; - m_index = index; -} - -inline void -Plan_query_range::setInterp(Plan_pred* interp) -{ - ctx_assert(interp != 0); - m_interp = interp; -} - -inline void -Plan_query_range::setExclusive() -{ - m_exclusive = true; -} - -class Exec_query_range : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(unsigned keyCount, unsigned attrCount); - virtual ~Code(); - protected: - friend class Plan_query_range; - friend class Exec_query_range; - const char* m_tableName; - const char* m_indexName; - unsigned m_keyCount; - SqlSpecs m_keySpecs; // key types - NdbAttrId* m_keyId; - Exec_expr** m_keyMatch; // XXX pointers for now - unsigned m_attrCount; - SqlSpecs m_sqlSpecs; - NdbAttrId* m_attrId; - bool m_exclusive; - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_range* node, const SqlSpecs& sqlSpecs); - virtual ~Data(); - protected: - friend class Exec_query_range; - SqlRow m_sqlRow; - NdbConnection* m_con; - NdbOperation* m_op; - NdbRecAttr** m_recAttr; - unsigned m_parallel; - bool m_done; // if no match possible due to range - }; - Exec_query_range(Exec_root* root); - virtual ~Exec_query_range(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - const Code& getCode() const; - Data& getData() const; - void setInterp(Exec_pred* interp); -protected: - Exec_pred* m_interp; -}; - -inline -Exec_query_range::Code::Code(unsigned keyCount, unsigned attrCount) : - Exec_query::Code(m_sqlSpecs), - m_tableName(0), - m_indexName(0), - m_keyCount(keyCount), - m_keySpecs(keyCount), - m_keyId(0), - m_attrCount(attrCount), - m_sqlSpecs(attrCount), - m_attrId(0), - m_exclusive(false) -{ -} - -inline -Exec_query_range::Data::Data(Exec_query_range* node, const SqlSpecs& sqlSpecs) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlSpecs), - m_con(0), - m_op(0), - m_recAttr(0), - m_parallel(1), - m_done(false) -{ -} - -inline -Exec_query_range::Exec_query_range(Exec_root* root) : - Exec_query(root), - m_interp(0) -{ -} - -inline const Exec_query_range::Code& -Exec_query_range::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_range::Data& -Exec_query_range::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_query_range::setInterp(Exec_pred* interp) -{ - ctx_assert(interp != 0); - m_interp = interp; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_repeat.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_repeat.cpp deleted file mode 100644 index 8b295a97916..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_repeat.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_query_repeat.hpp" -#include "Code_root.hpp" - -// Plan_query_repeat - -Plan_query_repeat::~Plan_query_repeat() -{ -} - -Plan_base* -Plan_query_repeat::analyze(Ctx& ctx, Ctl& ctl) -{ - return this; -} - -Exec_base* -Plan_query_repeat::codegen(Ctx& ctx, Ctl& ctl) -{ - Exec_query_repeat* exec = new Exec_query_repeat(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // SqlSpecs is empty - const SqlSpecs sqlSpecs(0); - Exec_query_repeat::Code& code = *new Exec_query_repeat::Code(sqlSpecs, m_forever, m_maxcount); - exec->setCode(code); - return exec; -} - -void -Plan_query_repeat::print(Ctx& ctx) -{ - ctx.print(" [query_repeat"); - if (! m_forever) - ctx.print(" %ld", (long)m_maxcount); - ctx.print("]"); -} - -// Exec_query_repeat - -Exec_query_repeat::Code::~Code() -{ -} - -Exec_query_repeat::Data::~Data() -{ -} - -Exec_query_repeat::~Exec_query_repeat() -{ -} - -void -Exec_query_repeat::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // SqlRow is empty - Data& data = *new Data(this, code.sqlSpecs()); - setData(data); -} - -void -Exec_query_repeat::execImpl(Ctx& ctx, Ctl& ctl) -{ - Data& data = getData(); - data.m_count = 0; -} - -bool -Exec_query_repeat::fetchImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - // fetch until count is up - if (code.m_forever || data.m_count < code.m_maxcount) { - data.m_count++; - return true; - } - return false; -} - -void -Exec_query_repeat::close(Ctx& ctx) -{ -} - -void -Exec_query_repeat::print(Ctx& ctx) -{ - const Code& code = getCode(); - ctx.print(" [query_repeat"); - if (! code.m_forever) - ctx.print(" %ld", (long)code.m_maxcount); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_repeat.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_repeat.hpp deleted file mode 100644 index 90d6ef55104..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_repeat.hpp +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_repeat_hpp -#define ODBC_CODEGEN_Code_query_repeat_hpp - -#include -#include "Code_query.hpp" -#include "Code_expr_row.hpp" - -/** - * @class Plan_query_repeat - * @brief Constant query node in PlanTree - */ -class Plan_query_repeat : public Plan_query { -public: - Plan_query_repeat(Plan_root* root); - Plan_query_repeat(Plan_root* root, CountType maxcount); - virtual ~Plan_query_repeat(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); -private: - bool m_forever; - CountType m_maxcount; -}; - -inline -Plan_query_repeat::Plan_query_repeat(Plan_root* root) : - Plan_query(root), - m_forever(true), - m_maxcount(0) -{ -} - -inline -Plan_query_repeat::Plan_query_repeat(Plan_root* root, CountType maxcount) : - Plan_query(root), - m_forever(false), - m_maxcount(maxcount) -{ -} - -/** - * @class Exec_query_repeat - * @brief Constant query node in ExecTree - */ -class Exec_query_repeat : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(const SqlSpecs& sqlSpecs, bool forever, CountType maxcount); - virtual ~Code(); - protected: - friend class Exec_query_repeat; - SqlSpecs m_sqlSpecs; - bool m_forever; - CountType m_maxcount; - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_repeat* node, const SqlSpecs& sqlSpecs); - virtual ~Data(); - protected: - friend class Exec_query_repeat; - SqlRow m_sqlRow; - CountType m_count; - }; - Exec_query_repeat(Exec_root* root); - virtual ~Exec_query_repeat(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_query_repeat::Code::Code(const SqlSpecs& sqlSpecs, bool forever, CountType maxcount) : - Exec_query::Code(m_sqlSpecs), - m_sqlSpecs(sqlSpecs), - m_forever(forever), - m_maxcount(maxcount) -{ -} - -inline -Exec_query_repeat::Data::Data(Exec_query_repeat* node, const SqlSpecs& sqlSpecs) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlSpecs), - m_count(0) -{ -} - -inline -Exec_query_repeat::Exec_query_repeat(Exec_root* root) : - Exec_query(root) -{ -} - -// children - -inline const Exec_query_repeat::Code& -Exec_query_repeat::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_repeat::Data& -Exec_query_repeat::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_scan.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_scan.cpp deleted file mode 100644 index 1c0f58980e5..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_scan.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include "Code_query_scan.hpp" -#include "Code_column.hpp" -#include "Code_root.hpp" - -// Plan_query_scan - -Plan_query_scan::~Plan_query_scan() -{ -} - -Plan_base* -Plan_query_scan::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - if (m_interp != 0) { - m_interp = static_cast(m_interp->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_interp != 0); - } - return this; -} - -Exec_base* -Plan_query_scan::codegen(Ctx& ctx, Ctl& ctl) -{ - // set up - ctx_assert(m_table != 0); - const BaseString& tableName = m_table->getName(); - const DictTable& dictTable = m_table->dictTable(); - const ColumnVector& columns = m_table->exprColumns(); - ctx_assert(columns.size() > 0); - const unsigned attrCount = columns.size() - 1; - // create the code - Exec_query_scan::Code& code = *new Exec_query_scan::Code(attrCount); - code.m_tableName = strcpy(new char[tableName.length() + 1], tableName.c_str()); - code.m_exclusive = m_exclusive; - // queried attributes - code.m_attrId = new NdbAttrId[1 + attrCount]; - code.m_attrId[0] = (NdbAttrId)-1; - for (unsigned i = 1; i <= attrCount; i++) { - Plan_column* column = columns[i]; - ctx_assert(column != 0); - const DictColumn& dictColumn = column->dictColumn(); - const SqlType& sqlType = dictColumn.sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_sqlSpecs.setEntry(i, sqlSpec); - code.m_attrId[i] = dictColumn.getAttrId(); - } - // create the exec - Exec_query_scan* exec = new Exec_query_scan(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - // interpreter - Exec_pred* execInterp = 0; - ctl.m_execQuery = exec; - ctl.m_topTable = m_table; - if (m_interp != 0) { - execInterp = static_cast(m_interp->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execInterp != 0); - } - ctl.m_topTable = 0; - if (m_interp != 0) - exec->setInterp(execInterp); - return exec; -} - -void -Plan_query_scan::print(Ctx& ctx) -{ - ctx.print(" [query_scan"); - Plan_base* a[] = { m_table, m_interp }; - printList(ctx, a, 2); - ctx.print("]"); -} - -// Exec_query_scan - -Exec_query_scan::Code::~Code() -{ - delete[] m_tableName; - delete[] m_attrId; -} - -Exec_query_scan::Data::~Data() -{ - delete[] m_recAttr; -} - -Exec_query_scan::~Exec_query_scan() -{ -} - -void -Exec_query_scan::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // create data - Data& data = *new Data(this, code.sqlSpecs()); - // needed for isNULL - data.m_recAttr = new NdbRecAttr* [1 + code.m_attrCount]; - for (unsigned i = 0; i <= code.m_attrCount; i++) { - data.m_recAttr[i] = 0; - } - data.m_parallel = code.m_exclusive ? 1 : 240; // best supported - setData(data); - // interpreter - ctl.m_query = this; - if (m_interp != 0) { - //m_interp->alloc(ctx, ctl); XXX - if (! ctx.ok()) - return; - } -} - -void -Exec_query_scan::close(Ctx& ctx) -{ - Data& data = getData(); - if (data.m_con != 0) { - Ndb* const ndb = ndbObject(); - int ret = data.m_con->stopScan(); - if (ret == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "stopScan"); - } - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - ctx_log2(("scan closed at statement close")); - } - if (m_interp != 0) - m_interp->close(ctx); -} - -void -Exec_query_scan::print(Ctx& ctx) -{ - ctx.print(" [query_scan"); - if (m_code != 0) { - const Code& code = getCode(); - ctx.print(" attrId="); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_attrId[i]); - } - ctx.print(" table=%s", code.m_tableName); - } - if (m_interp != 0) - m_interp->print(ctx); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_scan.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_scan.hpp deleted file mode 100644 index d6d1630ddf8..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_scan.hpp +++ /dev/null @@ -1,174 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_scan_hpp -#define ODBC_CODEGEN_Code_query_scan_hpp - -#include -#include "Code_query.hpp" -#include "Code_table.hpp" -#include "Code_pred.hpp" - -class Ctx; -class StmtArea; -class NdbConnection; -class NdbOperation; -class NdbRecAttr; - -/* - * Table scan. - */ - -class Plan_query_scan : public Plan_query { -public: - Plan_query_scan(Plan_root* root); - virtual ~Plan_query_scan(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - void setTable(Plan_table* table); - void setInterp(Plan_pred* interp); - void setExclusive(); -protected: - Plan_table* m_table; - Plan_pred* m_interp; - bool m_exclusive; // exclusive -}; - -inline -Plan_query_scan::Plan_query_scan(Plan_root* root) : - Plan_query(root), - m_table(0), - m_interp(0), - m_exclusive(false) -{ -} - -inline void -Plan_query_scan::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -inline void -Plan_query_scan::setInterp(Plan_pred* interp) -{ - ctx_assert(interp != 0); - m_interp = interp; -} - -inline void -Plan_query_scan::setExclusive() -{ - m_exclusive = true; -} - -class Exec_query_scan : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(unsigned attrCount); - virtual ~Code(); - protected: - friend class Plan_query_scan; - friend class Exec_query_scan; - char* m_tableName; - unsigned m_attrCount; - SqlSpecs m_sqlSpecs; - NdbAttrId* m_attrId; - bool m_exclusive; - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_scan* node, const SqlSpecs& sqlSpecs); - virtual ~Data(); - protected: - friend class Exec_query_scan; - SqlRow m_sqlRow; - NdbConnection* m_con; - NdbOperation* m_op; - NdbRecAttr** m_recAttr; - unsigned m_parallel; // parallelism could be runtime option - }; - Exec_query_scan(Exec_root* root); - virtual ~Exec_query_scan(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setInterp(Exec_pred* interp); -protected: - Exec_pred* m_interp; -}; - -inline -Exec_query_scan::Code::Code(unsigned attrCount) : - Exec_query::Code(m_sqlSpecs), - m_tableName(0), - m_attrCount(attrCount), - m_sqlSpecs(attrCount), - m_attrId(0), - m_exclusive(false) -{ -} - -inline -Exec_query_scan::Data::Data(Exec_query_scan* node, const SqlSpecs& sqlSpecs) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlSpecs), - m_con(0), - m_op(0), - m_recAttr(0), - m_parallel(1) -{ -} - -inline -Exec_query_scan::Exec_query_scan(Exec_root* root) : - Exec_query(root), - m_interp(0) -{ -} - -// children - -inline const Exec_query_scan::Code& -Exec_query_scan::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_scan::Data& -Exec_query_scan::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_query_scan::setInterp(Exec_pred* interp) -{ - ctx_assert(interp != 0); - m_interp = interp; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_sort.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_sort.cpp deleted file mode 100644 index 4ea6db8c4e2..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_sort.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_query_sort.hpp" -#include "Code_root.hpp" - -// Plan_query_sort - -Plan_query_sort::~Plan_query_sort() -{ -} - -Plan_expr_row* -Plan_query_sort::getRow() -{ - ctx_assert(m_query != 0); - return m_query->getRow(); -} - -Plan_base* -Plan_query_sort::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_sortRow != 0); - m_sortRow->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_query_sort::codegen(Ctx& ctx, Ctl& ctl) -{ - // create code for the subquery - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // create code for the row based on query code - ctx_assert(m_sortRow != 0); - ctl.m_execQuery = execQuery->getRawQuery(); - Exec_expr_row* execRow = static_cast(m_sortRow->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execRow != 0); - Exec_query_sort* exec = new Exec_query_sort(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - // re-use SqlSpecs from subquery - const Exec_query::Code& codeQuery = execQuery->getCode(); - const SqlSpecs& sqlSpecs = codeQuery.sqlSpecs(); - // make asc - unsigned size = m_sortRow->getSize(); - bool* asc = new bool[1 + size]; - for (unsigned i = 1; i <= size; i++) { - asc[i] = m_sortRow->m_ascList[i]; - } - Exec_query_sort::Code& code = *new Exec_query_sort::Code(sqlSpecs, asc); - exec->setCode(code); - exec->setQuery(execQuery); - exec->setRow(execRow); - return exec; -} - -void -Plan_query_sort::print(Ctx& ctx) -{ - ctx.print(" [query_sort"); - Plan_base* a[] = { m_query, m_sortRow }; - printList(ctx, a, 2); - ctx.print("]"); -} - -// Exec_query_sort - -Exec_query_sort::Code::~Code() -{ -} - -Exec_query_sort::Data::~Data() -{ - for (unsigned i = 0; i < m_sortList.size(); i++) { - SortItem& sortItem = m_sortList[i]; - delete sortItem.m_dataRow; - delete sortItem.m_sortRow; - } -} - -Exec_query_sort::~Exec_query_sort() -{ -} - -void -Exec_query_sort::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // allocate sort row based on subquery data - ctx_assert(m_sortRow != 0); - ctl.m_query = m_query->getRawQuery(); - m_sortRow->alloc(ctx, ctl); - if (! ctx.ok()) - return; - Data& data = *new Data(this, getCode().sqlSpecs()); - setData(data); -} - -void -Exec_query_sort::execImpl(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_query != 0 && m_sortRow != 0); - ctl.m_sortRow = m_sortRow; - m_query->execute(ctx, ctl); -} - -bool -SortLess::operator()(SortItem s1, SortItem s2) const -{ - const Exec_query_sort::Code& code = m_node->getCode(); - const SqlRow& r1 = *s1.m_sortRow; - const SqlRow& r2 = *s2.m_sortRow; - for (unsigned i = 1; i <= r1.count(); i++) { - const SqlField& f1 = r1.getEntry(i); - const SqlField& f2 = r2.getEntry(i); - // nulls last is default in oracle - bool f1null = f1.sqlNull(); - bool f2null = f2.sqlNull(); - if (f1null && f2null) - continue; - if (! f1null && f2null) - return code.getAsc(i) ? true : false; - if (f1null && ! f2null) - return code.getAsc(i) ? false : true; - if (f1.less(f2)) - return code.getAsc(i) ? true : false; - if (f2.less(f1)) - return code.getAsc(i) ? false : true; - } - return false; -} - -bool -Exec_query_sort::fetchImpl(Ctx& ctx, Ctl& ctl) -{ - Data& data = getData(); - ctx_assert(m_query != 0 && m_sortRow != 0); - ctl.m_sortRow = m_sortRow; - if (! data.m_sorted) { - // read and cache all rows - data.m_count = 0; - while (m_query->fetch(ctx, ctl)) { - const SqlRow* dataRow = m_query->getData().sqlRow().copy(); - const SqlRow* sortRow = 0; - if (ctl.m_groupIndex == 0) { - // evaluate sort row - m_sortRow->evaluate(ctx, ctl); - if (! ctx.ok()) - return false; - sortRow = m_sortRow->getData().sqlRow().copy(); - } else { - // evaluate done by group-by - SqlRow tmpSortRow(m_sortRow->getCode().sqlSpecs()); - for (unsigned i = 1; i <= tmpSortRow.count(); i++) { - tmpSortRow.setEntry(i, m_sortRow->getExpr(i)->getData().groupField(ctl.m_groupIndex)); - } - sortRow = tmpSortRow.copy(); - } - SortItem sortItem(dataRow, sortRow); - data.m_sortList.push_back(sortItem); - data.m_count++; - } - data.m_index = 0; - if (! ctx.ok()) - return false; - // sort the rows XXX use iterated stable_sort - SortLess sortLess(this); - std::sort(data.m_sortList.begin(), data.m_sortList.end(), sortLess); - data.m_sorted = true; - } - if (data.m_index < data.m_count) { - // make our SqlRow reference to current row - const SqlRow& currRow = *data.m_sortList[data.m_index].m_dataRow; - for (unsigned i = 1; i <= data.m_sqlRow.count(); i++) { - const SqlField& currField = currRow.getEntry(i); - SqlSpec sqlSpec(currField.sqlSpec(), SqlSpec::Reference); - SqlField sqlField(sqlSpec, &currField); - data.m_sqlRow.setEntry(i, sqlField); - } - data.m_index++; - return true; - } - return false; -} - -void -Exec_query_sort::close(Ctx& ctx) -{ - Data& data = getData(); - ctx_assert(m_query != 0); - m_query->close(ctx); - data.m_sorted = false; - for (unsigned i = 0; i < data.m_sortList.size(); i++) { - SortItem& sortItem = data.m_sortList[i]; - delete sortItem.m_dataRow; - delete sortItem.m_sortRow; - } - data.m_sortList.clear(); - data.m_count = 0; - data.m_index = 0; -} - -void -Exec_query_sort::print(Ctx& ctx) -{ - ctx.print(" [query_sort"); - Exec_base* a[] = { m_query, m_sortRow }; - printList(ctx, a, 2); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_sort.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_sort.hpp deleted file mode 100644 index d1aa03d9aef..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_sort.hpp +++ /dev/null @@ -1,208 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_sort_hpp -#define ODBC_CODEGEN_Code_query_sort_hpp - -#include -#include -#include "Code_query.hpp" -#include "Code_expr_row.hpp" - -/** - * @class Plan_query_sort - * @brief Project node in PlanTree - */ -class Plan_query_sort : public Plan_query { -public: - Plan_query_sort(Plan_root* root); - virtual ~Plan_query_sort(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setQuery(Plan_query* query); - void setRow(Plan_expr_row* sortRow); -protected: - Plan_expr_row* getRow(); - Plan_query* m_query; - Plan_expr_row* m_sortRow; -}; - -inline -Plan_query_sort::Plan_query_sort(Plan_root* root) : - Plan_query(root), - m_query(0), - m_sortRow(0) -{ -} - -// children - -inline void -Plan_query_sort::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -inline void -Plan_query_sort::setRow(Plan_expr_row* sortRow) -{ - ctx_assert(sortRow != 0); - m_sortRow = sortRow; -} - -/** - * Item to sort includes data row and sort row. - */ -struct SortItem { - SortItem(const SqlRow* dataRow, const SqlRow* sortRow); - const SqlRow* m_dataRow; // copy of fetched row from subquery - const SqlRow* m_sortRow; // copy of values to sort on -}; - -typedef std::vector SortList; - -class Exec_query_sort; - -struct SortLess : std::binary_function { - SortLess(const Exec_query_sort* node); - const Exec_query_sort* m_node; - bool operator()(SortItem s1, SortItem s2) const; -}; - -inline -SortItem::SortItem(const SqlRow* dataRow, const SqlRow* sortRow) : - m_dataRow(dataRow), - m_sortRow(sortRow) -{ -} - -inline -SortLess::SortLess(const Exec_query_sort* node) : - m_node(node) -{ -} - -/** - * @class Exec_query_sort - * @brief Project node in ExecTree - */ -class Exec_query_sort : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(const SqlSpecs& sqlSpecs, bool* asc); - virtual ~Code(); - bool getAsc(unsigned i) const; - protected: - friend class Exec_query_sort; - const bool* const m_asc; - // sets reference to Sqlspecs from subquery - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_sort* node, const SqlSpecs& sqlSpecs); - virtual ~Data(); - protected: - friend class Exec_query_sort; - SqlRow m_sqlRow; // current row - bool m_sorted; // fetch and sort done - SortList m_sortList; - unsigned m_count; // number of rows - unsigned m_index; // current fetch index - }; - Exec_query_sort(Exec_root* root); - virtual ~Exec_query_sort(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); - void setRow(Exec_expr_row* sortRow); -protected: - friend class Exec_query; - Exec_query* m_query; - Exec_expr_row* m_sortRow; -}; - -inline -Exec_query_sort::Code::Code(const SqlSpecs& sqlSpecs, bool* asc) : - Exec_query::Code(sqlSpecs), - m_asc(asc) -{ -} - -inline bool -Exec_query_sort::Code::getAsc(unsigned i) const -{ - return m_asc[i]; -} - -inline -Exec_query_sort::Data::Data(Exec_query_sort* node, const SqlSpecs& sqlSpecs) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlSpecs), - m_sorted(false), - m_count(0), - m_index(0) -{ -} - -inline -Exec_query_sort::Exec_query_sort(Exec_root* root) : - Exec_query(root), - m_query(0), - m_sortRow(0) -{ -} - -// children - -inline const Exec_query_sort::Code& -Exec_query_sort::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_sort::Data& -Exec_query_sort::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_query_sort::setQuery(Exec_query* query) -{ - ctx_assert(m_query == 0 && query != 0); - m_query = query; -} - -inline void -Exec_query_sort::setRow(Exec_expr_row* sortRow) -{ - ctx_assert(m_sortRow == 0 && sortRow != 0); - m_sortRow = sortRow; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_sys.cpp b/ndb/src/old_files/client/odbc/codegen/Code_query_sys.cpp deleted file mode 100644 index affe3dc1264..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_sys.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include "Code_query_sys.hpp" -#include "Code_column.hpp" -#include "Code_root.hpp" - -// Plan_query_sys - -Plan_query_sys::~Plan_query_sys() -{ -} - -Plan_base* -Plan_query_sys::analyze(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -Exec_base* -Plan_query_sys::codegen(Ctx& ctx, Ctl& ctl) -{ - // set up - ctx_assert(m_table != 0); - const DictTable& dictTable = m_table->dictTable(); - const ColumnVector& columns = m_table->exprColumns(); - ctx_assert(columns.size() > 0); - const unsigned attrCount = columns.size() - 1; - // create the code - Exec_query_sys::Code& code = *new Exec_query_sys::Code(attrCount); - code.m_sysId = dictTable.sysId(); - // queried attributes - code.m_attrId = new NdbAttrId[1 + attrCount]; - code.m_attrId[0] = (NdbAttrId)-1; - for (unsigned i = 1; i <= attrCount; i++) { - Plan_column* column = columns[i]; - ctx_assert(column != 0); - const DictColumn& dictColumn = column->dictColumn(); - const SqlType& sqlType = dictColumn.sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_sqlSpecs.setEntry(i, sqlSpec); - code.m_attrId[i] = dictColumn.getAttrId(); - } - // create the exec - Exec_query_sys* exec = new Exec_query_sys(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - return exec; -} - -void -Plan_query_sys::print(Ctx& ctx) -{ - ctx.print(" [query_sys"); - Plan_base* a[] = { m_table }; - printList(ctx, a, 1); - ctx.print("]"); -} - -// Exec_query_sys - -Exec_query_sys::Code::~Code() -{ - delete[] m_attrId; -} - -Exec_query_sys::Data::~Data() -{ -} - -Exec_query_sys::~Exec_query_sys() -{ -} - -void -Exec_query_sys::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // create data - Data& data = *new Data(this, code.sqlSpecs()); - setData(data); -} - -void -Exec_query_sys::close(Ctx& ctx) -{ - Data& data = getData(); - data.m_rowPos = 0; - data.m_tablePos = 0; - data.m_attrPos = 0; - data.m_keyPos = 0; -} - -void -Exec_query_sys::print(Ctx& ctx) -{ - ctx.print(" [query_sys"); - if (m_code != 0) { - const Code& code = getCode(); - ctx.print(" attrId="); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_attrId[i]); - } - ctx.print(" sysId=%u", (unsigned)code.m_sysId); - } - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_query_sys.hpp b/ndb/src/old_files/client/odbc/codegen/Code_query_sys.hpp deleted file mode 100644 index 8eb069d0413..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_query_sys.hpp +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_query_sys_hpp -#define ODBC_CODEGEN_Code_query_sys_hpp - -#include -#include -#include "Code_query.hpp" -#include "Code_table.hpp" - -class Ctx; -class StmtArea; -class NdbConnection; -class NdbOperation; -class NdbRecAttr; - -/** - * @class Plan_query_sys - * @brief Full select (no where clause) - */ -class Plan_query_sys : public Plan_query { -public: - Plan_query_sys(Plan_root* root); - virtual ~Plan_query_sys(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setTable(Plan_table* table); -protected: - Plan_table* m_table; -}; - -inline -Plan_query_sys::Plan_query_sys(Plan_root* root) : - Plan_query(root), - m_table(0) -{ -} - -// children - -inline void -Plan_query_sys::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -/** - * @class Exec_query_sys - * @brief Full select (no where clause) - */ -class Exec_query_sys : public Exec_query { -public: - class Code : public Exec_query::Code { - public: - Code(unsigned attrCount); - virtual ~Code(); - protected: - friend class Plan_query_sys; - friend class Exec_query_sys; - DictSys::Id m_sysId; - unsigned m_attrCount; - SqlSpecs m_sqlSpecs; - NdbAttrId* m_attrId; - }; - class Data : public Exec_query::Data { - public: - Data(Exec_query_sys* node, const SqlSpecs& sqlSpecs); - virtual ~Data(); - protected: - friend class Exec_query_sys; - SqlRow m_sqlRow; - // for typeinfo - unsigned m_rowPos; - // for tables and columns - NdbDictionary::Dictionary::List m_objectList; - unsigned m_tablePos; - unsigned m_attrPos; - unsigned m_keyPos; - }; - Exec_query_sys(Exec_root* root); - virtual ~Exec_query_sys(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - bool fetchImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; -}; - -inline -Exec_query_sys::Code::Code(unsigned attrCount) : - Exec_query::Code(m_sqlSpecs), - m_sysId(DictSys::Undef), - m_attrCount(attrCount), - m_sqlSpecs(attrCount), - m_attrId(0) -{ -} - -inline -Exec_query_sys::Data::Data(Exec_query_sys* node, const SqlSpecs& sqlSpecs) : - Exec_query::Data(node, m_sqlRow), - m_sqlRow(sqlSpecs) -{ -} - -inline -Exec_query_sys::Exec_query_sys(Exec_root* root) : - Exec_query(root) -{ -} - -// children - -inline const Exec_query_sys::Code& -Exec_query_sys::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_query_sys::Data& -Exec_query_sys::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_root.cpp b/ndb/src/old_files/client/odbc/codegen/Code_root.cpp deleted file mode 100644 index 4f45bdffdaf..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_root.cpp +++ /dev/null @@ -1,307 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "Code_root.hpp" -#include "Code_stmt.hpp" -#include "Code_query.hpp" -#include "Code_expr_param.hpp" -#include "Code_root.hpp" - -// Plan_root - -Plan_root::~Plan_root() -{ -} - -Plan_base* -Plan_root::analyze(Ctx& ctx, Ctl& ctl) -{ - // analyze statement - ctx_assert(m_stmt != 0); - m_stmt = static_cast(m_stmt->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_stmt != 0); - // analyze parameters - ctx_assert(m_paramList.size() > 0); - const unsigned paramCount = m_paramList.size() - 1; - DescArea& ipd = descArea(Desc_usage_IPD); - ipd.setCount(ctx, paramCount); - for (unsigned i = 1; i <= paramCount; i++) { - Plan_expr_param* param = m_paramList[i]; - ctx_assert(param != 0); - // analyze the parameter - param->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } - // must return self - return this; -} - -void -Plan_root::describe(Ctx& ctx) -{ - // describe statement - ctx_assert(m_stmt != 0); - m_stmt->describe(ctx); - // describe parameters - ctx_assert(m_paramList.size() > 0); - const unsigned paramCount = m_paramList.size() - 1; - DescArea& ipd = descArea(Desc_usage_IPD); - ipd.setCount(ctx, paramCount); - unsigned unbound = 0; - for (unsigned i = 1; i <= paramCount; i++) { - Plan_expr_param* param = m_paramList[i]; - ctx_assert(param != 0); - // describe the parameter - param->describe(ctx); - // check if SQL type is bound - ctx_assert(param->sqlType().type() != SqlType::Undef); - if (param->sqlType().type() == SqlType::Unbound) - unbound++; - } - if (unbound > 0) - ctx_log2(("%u out of %u params have unbound SQL type", unbound, paramCount)); - m_stmtArea.m_unbound = unbound; -} - -Exec_base* -Plan_root::codegen(Ctx& ctx, Ctl& ctl) -{ - Exec_root* execRoot = new Exec_root(m_stmtArea); - Exec_root::Code& code = *new Exec_root::Code; - execRoot->setCode(code); - // set root in helper struct - ctl.m_execRoot = execRoot; - // generate code for the statement - ctx_assert(m_stmt != 0); - Exec_stmt* execStmt = static_cast(m_stmt->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - execRoot->setStmt(execStmt); - // create parameters list - execRoot->m_paramList.resize(m_paramList.size()); - for (unsigned i = 1; i < m_paramList.size(); i++) { - Plan_expr_param* param = m_paramList[i]; - ctx_assert(param != 0); - Exec_expr_param* execParam = static_cast(param->codegen(ctx, ctl)); - ctx_assert(execParam != 0); - execRoot->m_paramList[i] = execParam; - } - return execRoot; -} - -void -Plan_root::print(Ctx& ctx) -{ - ctx.print("[root"); - Plan_base* a[] = { m_stmt }; - printList(ctx, a, 1); - ctx.print("]\n"); -} - -void -Plan_root::saveNode(Plan_base* node) -{ - ctx_assert(node != 0); - m_nodeList.push_back(node); -} - -void -Plan_root::freeNodeList() -{ - for (NodeList::iterator i = m_nodeList.begin(); i != m_nodeList.end(); i++) { - Plan_base* node = *i; - *i = 0; - delete node; - } - m_nodeList.clear(); -} - -// Exec_root - -Exec_root::Code::~Code() -{ -} - -Exec_root::Data::~Data() -{ -} - -Exec_root::~Exec_root() -{ -} - -StmtArea& -Exec_root::stmtArea() const -{ - return m_stmtArea; -} - -void -Exec_root::alloc(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_stmt != 0); - m_stmt->alloc(ctx, ctl); -} - -void -Exec_root::bind(Ctx& ctx) -{ - // bind output cols - ctx_assert(m_stmt != 0); - m_stmt->bind(ctx); - // bind input params - for (unsigned i = 1; i < m_paramList.size(); i++) { - Exec_expr_param* param = m_paramList[i]; - ctx_assert(param != 0); - param->bind(ctx); - if (! ctx.ok()) - return; - } -} - -void -Exec_root::execute(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_stmt != 0); - // check if data is needed - for (unsigned i = 1; i < m_paramList.size(); i++) { - Exec_expr_param* param = m_paramList[i]; - ctx_assert(param != 0); - Exec_expr_param::Data& paramData = param->getData(); - if (paramData.m_atExec && paramData.m_extPos == -1) { - ctx.setCode(SQL_NEED_DATA); - return; - } - } - m_stmt->execute(ctx, ctl); -} - -void -Exec_root::fetch(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(m_stmt != 0); - Exec_query* query = static_cast(m_stmt); - ctx_assert(query != 0); - query->fetch(ctx, ctl); -} - -void -Exec_root::close(Ctx& ctx) -{ - ctx_assert(m_stmt != 0); - m_stmt->close(ctx); - for (unsigned i = 1; i < m_paramList.size(); i++) { - Exec_expr_param* param = m_paramList[i]; - ctx_assert(param != 0); - param->close(ctx); - } -} - -void -Exec_root::print(Ctx& ctx) -{ - ctx.print("[root"); - Exec_base* a[] = { m_stmt }; - printList(ctx, a, sizeof(a)/sizeof(a[0])); - ctx.print("]\n"); -} - -void -Exec_root::saveNode(Exec_base* node) -{ - ctx_assert(node != 0); - m_nodeList.push_back(node); -} - -void -Exec_root::freeNodeList() -{ - for (NodeList::iterator i = m_nodeList.begin(); i != m_nodeList.end(); i++) { - Exec_base* node = *i; - *i = 0; - delete node; - } - m_nodeList.clear(); -} - -// odbc support - -void -Exec_root::sqlGetData(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind) -{ - ctx_assert(m_stmt != 0); - Exec_query* query = static_cast(m_stmt); - ctx_assert(query != 0); - query->sqlGetData(ctx, columnNumber, targetType, targetValue, bufferLength, strlen_or_Ind); -} - -void -Exec_root::sqlParamData(Ctx& ctx, SQLPOINTER* value) -{ - ctx_assert(m_paramList.size() > 0); - unsigned count = m_paramList.size() - 1; - for (unsigned i = 1; i <= count; i++) { - Exec_expr_param* param = m_paramList[i]; - ctx_assert(param != 0); - Exec_expr_param::Data& paramData = param->getData(); - if (! paramData.m_atExec || paramData.m_extPos >= 0) - continue; - ctx_assert(paramData.m_extField != 0); - ExtField& extField = *paramData.m_extField; - if (value != 0) - *value = extField.m_dataPtr; - m_paramData = i; - ctx.setCode(SQL_NEED_DATA); - return; - } -} - -void -Exec_root::sqlPutData(Ctx& ctx, SQLPOINTER data, SQLINTEGER strlen_or_Ind) -{ - ctx_assert(m_paramList.size() > 0); - unsigned count = m_paramList.size() - 1; - unsigned i = m_paramData; - if (i == 0) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "missing call to SQLParamData"); - return; - } - if (i > count) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "parameter %u out of range 1 to %u", i, count); - return; - } - Exec_expr_param* param = m_paramList[i]; - ctx_assert(param != 0); - Exec_expr_param::Data& paramData = param->getData(); - if (! paramData.m_atExec) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "parameter %u not marked for data-at-exec", i); - return; - } - ctx_assert(paramData.m_extField != 0); - ExtField extField(paramData.m_extField->extSpec(), data, 0, &strlen_or_Ind, i); - if (paramData.m_extPos == -1) - paramData.m_extPos = 0; - extField.setPos(paramData.m_extPos); - // copy in and update position - SqlField& sqlField = paramData.m_sqlField; - sqlField.copyin(ctx, extField); - paramData.m_extPos = extField.getPos(); - ctx_log4(("parameter %u data received", i)); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_root.hpp b/ndb/src/old_files/client/odbc/codegen/Code_root.hpp deleted file mode 100644 index 4f0f96725e3..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_root.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_root_hpp -#define ODBC_CODEGEN_Code_root_hpp - -#include -#include -#include "Code_base.hpp" -#include "Code_stmt.hpp" - -class SqlField; -class ExtField; - -/** - * @class Plan_root - * @brief Root node above top level statement node - */ -class Plan_root : public Plan_base { -public: - Plan_root(StmtArea& stmtArea); - virtual ~Plan_root(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setStmt(Plan_stmt* stmt); - // save and free nodes - void saveNode(Plan_base* node); - void freeNodeList(); -private: - friend class CodeGen; - friend class Plan_base; - friend class Plan_expr_param; - StmtArea& m_stmtArea; - Plan_stmt* m_stmt; - ParamVector m_paramList; - typedef std::list NodeList; - NodeList m_nodeList; -}; - -inline -Plan_root::Plan_root(StmtArea& stmtArea) : - Plan_base(this), - m_stmtArea(stmtArea), - m_stmt(0) -{ -} - -inline void -Plan_root::setStmt(Plan_stmt* stmt) -{ - ctx_assert(stmt != 0); - m_stmt = stmt; -} - -/** - * @class Exec_root - * @brief Root node above top level statement node - */ -class Exec_root : public Exec_base { -public: - class Code : public Exec_base::Code { - public: - Code(); - virtual ~Code(); - }; - class Data : public Exec_base::Data { - public: - Data(); - virtual ~Data(); - }; - Exec_root(StmtArea& stmtArea); - virtual ~Exec_root(); - StmtArea& stmtArea() const; - void alloc(Ctx& ctx, Ctl& ctl); - void bind(Ctx& ctx); - void execute(Ctx& ctx, Ctl& ctl); - void fetch(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setStmt(Exec_stmt* stmt); - // save and free nodes - void saveNode(Exec_base* node); - void freeNodeList(); - // odbc support - void sqlGetData(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind); - void sqlParamData(Ctx& ctx, SQLPOINTER* value); - void sqlPutData(Ctx& ctx, SQLPOINTER data, SQLINTEGER strlen_or_Ind); -private: - friend class Plan_root; - friend class Exec_base; - friend class CodeGen; - StmtArea& m_stmtArea; - Exec_stmt* m_stmt; - ParamVector m_paramList; - unsigned m_paramData; // position of SQLParamData - typedef std::list NodeList; - NodeList m_nodeList; -}; - -inline -Exec_root::Code::Code() -{ -} - -inline -Exec_root::Data::Data() -{ -} - -inline -Exec_root::Exec_root(StmtArea& stmtArea) : - Exec_base(this), - m_stmtArea(stmtArea), - m_stmt(0), - m_paramData(0) -{ -} - -// children - -inline const Exec_root::Code& -Exec_root::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_root::Data& -Exec_root::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_root::setStmt(Exec_stmt* stmt) -{ - ctx_assert(stmt != 0); - m_stmt = stmt; - m_stmt->m_topLevel = true; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_select.cpp b/ndb/src/old_files/client/odbc/codegen/Code_select.cpp deleted file mode 100644 index 611b491968d..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_select.cpp +++ /dev/null @@ -1,406 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_select.hpp" -#include "Code_query_lookup.hpp" -#include "Code_query_index.hpp" -#include "Code_query_scan.hpp" -#include "Code_query_range.hpp" -#include "Code_query_sys.hpp" -#include "Code_query_project.hpp" -#include "Code_query_filter.hpp" -#include "Code_query_join.hpp" -#include "Code_query_count.hpp" -#include "Code_query_sort.hpp" -#include "Code_query_group.hpp" -#include "Code_query_distinct.hpp" -#include "Code_expr_column.hpp" -#include "Code_expr_const.hpp" -#include "Code_pred_op.hpp" -#include "Code_root.hpp" - -Plan_select::~Plan_select() -{ -} - -Plan_base* -Plan_select::analyze(Ctx& ctx, Ctl& ctl) -{ - stmtArea().stmtInfo().setName(Stmt_name_select); - // analyze tables - ctx_assert(m_tableList != 0); - for (unsigned i = 1; i <= m_tableList->countTable(); i++) { - Plan_table* table = m_tableList->getTable(i); - table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } - ctx_assert(m_exprRow != 0); - if (m_exprRow->getAsterisk()) { - // expand unqualified asterisk to table-qualified columns - setRow(new Plan_expr_row(m_root)); - m_root->saveNode(m_exprRow); - for (unsigned i = 1; i <= m_tableList->countTable(); i++) { - const Plan_table* table = m_tableList->getTable(i); - const DictTable& dictTable = table->dictTable(); - for (unsigned i = 1; i <= dictTable.getSize(); i++) { - DictColumn* dictColumn = dictTable.getColumn(i); - Plan_expr_column* column = new Plan_expr_column(m_root, dictColumn->getName()); - m_root->saveNode(column); - column->setCname(table->getCname()); - m_exprRow->addExpr(column); - } - } - } - // set name resolution scope - ctl.m_tableList = m_tableList->m_tableList; - ctx_assert(ctl.m_tableList.size() >= 1 + 1); - ctl.m_aggrin = false; - // analyze select row - ctl.m_aggrok = true; - ctx_assert(m_exprRow != 0); - m_exprRow = static_cast(m_exprRow->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_exprRow != 0); - // analyze group by row - ctl.m_aggrok = false; - if (m_groupRow != 0) { - m_groupRow = static_cast(m_groupRow->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_groupRow != 0); - } - // analyze having predicate - ctl.m_aggrok = true; - if (m_havingPred != 0) { - m_havingPred = static_cast(m_havingPred->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_havingPred != 0); - } - // ana|yze order by row - ctl.m_aggrok = true; - if (m_sortRow != 0) { - m_sortRow = static_cast(m_sortRow->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_sortRow != 0); - } - // analyze the predicate - ctl.m_aggrok = false; - ctl.m_topand = true; - ctl.m_extra = false; - if (m_pred != 0) { - m_pred = static_cast(m_pred->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_pred != 0); - } - // check if group by required - if (m_exprRow->anyAggr() && ! m_exprRow->allBound() && m_groupRow == 0) { - ctx.pushStatus(Error::Gen, "missing GROUP BY clause"); - return 0; - } - // in special cases add "group by 1" - if (m_groupRow == 0) { - bool addgb = false; - if (m_havingPred != 0) { - // allowed by oracle but nearly useless - addgb = true; - } else if (m_exprRow->anyAggr() && m_sortRow != 0) { - // allowed by oracle but useless - ctx_assert(m_exprRow->allBound()); - addgb = true; - } - if (addgb) { - ctx_log2(("adding 'group by 1'")); - m_groupRow = new Plan_expr_row(m_root); - m_root->saveNode(m_groupRow); - LexType type(LexType::Integer); - Plan_expr* expr = new Plan_expr_const(m_root, type, "1"); - m_root->saveNode(expr); - m_groupRow->addExpr(expr); - m_groupRow = static_cast(m_groupRow->analyze(ctx, ctl)); - ctx_assert(ctx.ok()); - ctx_assert(m_groupRow != 0); - } - } - // check group by allowed - if (m_groupRow != 0) { - if (! m_exprRow->isAllGroupBy(m_groupRow)) { - ctx.pushStatus(Error::Gen, "invalid GROUP BY expression in SELECT list"); - return 0; - } - if (m_havingPred != 0) { - if (! m_havingPred->isGroupBy(m_groupRow)) { - ctx.pushStatus(Error::Gen, "invalid GROUP BY expression in HAVING clause"); - return 0; - } - } - if (m_sortRow != 0) { - if (! m_sortRow->isAllGroupBy(m_groupRow)) { - ctx.pushStatus(Error::Gen, "invalid GROUP BY expression in ORDER BY clause"); - return 0; - } - } - } - // log top level predicate - { - unsigned n = 0; - for (PredList::iterator i = ctl.m_topcomp.begin(); i != ctl.m_topcomp.end(); i++) - ctx_log2(("top level pred %u: count tables = %u, not interp = %u", - ++n, - (unsigned)(*i)->tableSet().size(), - (unsigned)(*i)->noInterp().size())); - } - // compose the raw query from lookups and scans - Plan_query* queryRaw = 0; - TableVector tableVector(1); - TableSet tsDone; - while (tableVector.size() < ctl.m_tableList.size()) { - Plan_table* tableBest = 0; - Plan_table::Index* indexBest = 0; - for (unsigned n = 1; n < ctl.m_tableList.size(); n++) { - Plan_table* table = ctl.m_tableList[n]; - if (tsDone.find(table) != tsDone.end()) - continue; - // get system table out of the way - if (table->dictTable().sysId()) { - tableBest = table; - break; - } - // find best match for primary key or index - for (unsigned i = 0; i <= table->indexCount(); i++) { - Plan_table::Index& index = table->m_indexList[i]; - table->resolveSet(ctx, index, tsDone); - if (! ctx.ok()) - return 0; - if (! index.m_keyFound) - continue; - // prefer smaller dependency set, smaller rank, less unused keys - int k; - (k = (indexBest == 0)) || - (k = (indexBest->m_keySet.size() - index.m_keySet.size())) || - (k = (indexBest->m_rank - index.m_rank)) || - (k = (indexBest->m_keyCountUnused - index.m_keyCountUnused)); - if (k > 0) { - tableBest = table; - indexBest = &index; - } - } - } - Plan_query* queryNext = 0; - Plan_table* tableNext = 0; - Plan_query_scan* queryScan = 0; // for pushing interpreted program - Plan_query_range* queryRange = 0; // ditto - if (tableBest == 0) { - // scan first unprocessed table - for (unsigned n = 1; n < ctl.m_tableList.size(); n++) { - Plan_table* table = ctl.m_tableList[n]; - if (tsDone.find(table) != tsDone.end()) - continue; - tableNext = table; - break; - } - ctx_assert(tableNext != 0); - queryScan = new Plan_query_scan(m_root); - m_root->saveNode(queryScan); - queryScan->setTable(tableNext); - queryNext = queryScan; - ctx_log2(("optim: scan %s", tableNext->getPrintName())); - } else if (tableBest->dictTable().sysId()) { - // "scan" system table - tableNext = tableBest; - Plan_query_sys* querySys = new Plan_query_sys(m_root); - m_root->saveNode(querySys); - querySys->setTable(tableNext); - queryNext = querySys; - ctx_log2(("optim: scan %s", tableNext->getPrintName())); - } else if (indexBest->m_keySet.size() > 0) { - // scan first table this one depends on - const TableSet& keySet = indexBest->m_keySet; - for (unsigned n = 1; n < ctl.m_tableList.size(); n++) { - Plan_table* table = ctl.m_tableList[n]; - if (keySet.find(table) == keySet.end()) - continue; - ctx_assert(tsDone.find(table) == tsDone.end()); - tableNext = table; - break; - } - ctx_assert(tableNext != 0); - queryScan = new Plan_query_scan(m_root); - m_root->saveNode(queryScan); - queryScan->setTable(tableNext); - queryNext = queryScan; - ctx_log2(("optim: scan %s for %s", tableNext->getPrintName(), tableBest->getPrintName())); - } else if (indexBest->m_rank == 0) { - // primary key depends only on processed tables - tableNext = tableBest; - Plan_query_lookup* queryLookup = new Plan_query_lookup(m_root); - m_root->saveNode(queryLookup); - queryLookup->setTable(tableNext); - queryNext = queryLookup; - ctx_log2(("optim: lookup %s", tableNext->getPrintName())); - } else if (indexBest->m_rank == 1) { - // hash index key depends only on processed tables - tableNext = tableBest; - Plan_query_index* queryIndex = new Plan_query_index(m_root); - m_root->saveNode(queryIndex); - queryIndex->setTable(tableNext, indexBest); - queryNext = queryIndex; - ctx_log2(("optim: lookup %s via index %s", tableNext->getPrintName(), indexBest->m_dictIndex->getName().c_str())); - } else if (indexBest->m_rank == 2) { - // ordered index key depends only on processed tables - tableNext = tableBest; - queryRange = new Plan_query_range(m_root); - m_root->saveNode(queryRange); - queryRange->setTable(tableNext, indexBest); - queryNext = queryRange; - ctx_log2(("optim: range scan %s via index %s", tableNext->getPrintName(), indexBest->m_dictIndex->getName().c_str())); - } else { - ctx_assert(false); - } - if (queryRaw == 0) { - queryRaw = queryNext; - } else { - Plan_query_join* queryJoin = new Plan_query_join(m_root); - m_root->saveNode(queryJoin); - queryJoin->setInner(queryRaw); - queryJoin->setOuter(queryNext); - queryRaw = queryJoin; - } - tableVector.push_back(tableNext); - tsDone.insert(tableNext); - // push down part of top level predicate to table scan or range scan - Plan_pred* predPush = 0; - Plan_pred* predInterp = 0; - PredList::iterator i = ctl.m_topcomp.begin(); - while (i != ctl.m_topcomp.end()) { - const TableSet& ts = (*i)->tableSet(); - if (! std::includes(tsDone.begin(), tsDone.end(), ts.begin(), ts.end())) { - i++; - continue; - } - predPush = predPush == 0 ? *i : predPush->opAnd(*i); - if (queryScan != 0) { - const TableSet& ts2 = (*i)->noInterp(); - if (ts2.find(tableNext) == ts2.end()) - predInterp = predInterp == 0 ? *i : predInterp->opAnd(*i); - } - if (queryRange != 0) { - const TableSet& ts2 = (*i)->noInterp(); - if (ts2.find(tableNext) == ts2.end()) - predInterp = predInterp == 0 ? *i : predInterp->opAnd(*i); - } - // remove it from top level predicate - PredList::iterator j = i; - i++; - ctl.m_topcomp.erase(j); - } - if (predPush != 0) { - Plan_query_filter* queryPush = new Plan_query_filter(m_root); - m_root->saveNode(queryPush); - queryPush->setQuery(queryRaw); - queryPush->setPred(predPush); - queryPush->m_topTable = tableNext; - queryRaw = queryPush; - } - if (predInterp != 0) { - if (queryScan != 0) - queryScan->setInterp(predInterp); - else if (queryRange != 0) - queryRange->setInterp(predInterp); - else - ctx_assert(false); - } - } - ctx_assert(ctl.m_topcomp.empty()); - // set base for column position offsets - for (unsigned n = 1; n < tableVector.size(); n++) { - Plan_table* table = tableVector[n]; - if (n == 1) { - table->m_resOff = 1; - } else { - Plan_table* tablePrev = tableVector[n - 1]; - table->m_resOff = tablePrev->m_resOff + tablePrev->m_exprColumns.size() - 1; - } - } - // next level up is one of project, count, group by - Plan_query* queryTop; - if (m_groupRow == 0) { - if (! m_exprRow->anyAggr()) { - Plan_query_project* queryProject = new Plan_query_project(m_root); - m_root->saveNode(queryProject); - queryProject->setQuery(queryRaw); - queryProject->setRow(m_exprRow); - queryProject->setLimit(m_limitOff, m_limitCnt); - queryTop = queryProject; - } else { - ctx_assert(m_exprRow->allBound()); - Plan_query_count* queryCount = new Plan_query_count(m_root); - m_root->saveNode(queryCount); - queryCount->setQuery(queryRaw); - queryCount->setRow(m_exprRow); - queryTop = queryCount; - } - } else { - Plan_query_group* queryGroup = new Plan_query_group(m_root); - m_root->saveNode(queryGroup); - queryGroup->setQuery(queryRaw); - queryGroup->setDataRow(m_exprRow); - queryGroup->setGroupRow(m_groupRow); - if (m_havingPred != 0) - queryGroup->setHavingPred(m_havingPred); - queryTop = queryGroup; - } - // optional sort becomes new top level - if (m_sortRow != 0) { - Plan_query_sort* querySort = new Plan_query_sort(m_root); - m_root->saveNode(querySort); - querySort->setQuery(queryTop); - querySort->setRow(m_sortRow); - queryTop = querySort; - } - // optional distinct becomes new top level - if (m_distinct) { - Plan_query_distinct* queryDistinct = new Plan_query_distinct(m_root); - m_root->saveNode(queryDistinct); - queryDistinct->setQuery(queryTop); - queryTop = queryDistinct; - } - // return top node - return queryTop; -} - -Exec_base* -Plan_select::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_select::print(Ctx& ctx) -{ - ctx.print(" [select"); - Plan_base* a[] = { m_tableList, m_exprRow, m_pred, m_groupRow, m_havingPred }; - printList(ctx, a, 5); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_select.hpp b/ndb/src/old_files/client/odbc/codegen/Code_select.hpp deleted file mode 100644 index eaa9b801f29..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_select.hpp +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_select_hpp -#define ODBC_CODEGEN_Code_select_hpp - -#include -#include "Code_stmt.hpp" -#include "Code_expr_row.hpp" -#include "Code_table_list.hpp" -#include "Code_pred.hpp" - -/** - * @class Plan_select - * @brief General select in PlanTree - * - * General select. An initial PlanTree node. - */ -class Plan_select : public Plan_stmt { -public: - Plan_select(Plan_root* root); - virtual ~Plan_select(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setList(Plan_table_list* tableList); - void setRow(Plan_expr_row* exprRow); - void setPred(Plan_pred* pred); - void setSort(Plan_expr_row* sortRow); - void setDistinct(bool distinct); - void setGroup(Plan_expr_row* groupRow); - void setHaving(Plan_pred* havingPred); - void setLimit(int off, int cnt); -protected: - Plan_table_list* m_tableList; - Plan_expr_row* m_exprRow; - Plan_pred* m_pred; - Plan_expr_row* m_sortRow; - bool m_distinct; - Plan_expr_row* m_groupRow; - Plan_pred* m_havingPred; - int m_limitOff; - int m_limitCnt; -}; - -inline -Plan_select::Plan_select(Plan_root* root) : - Plan_stmt(root), - m_tableList(0), - m_exprRow(0), - m_pred(0), - m_sortRow(0), - m_distinct(false), - m_groupRow(0), - m_havingPred(0), - m_limitOff(0), - m_limitCnt(-1) -{ -} - -// children - -inline void -Plan_select::setList(Plan_table_list* tableList) -{ - ctx_assert(tableList != 0); - m_tableList = tableList; -} - -inline void -Plan_select::setRow(Plan_expr_row* exprRow) -{ - ctx_assert(exprRow != 0); - m_exprRow = exprRow; -} - -inline void -Plan_select::setPred(Plan_pred* pred) -{ - ctx_assert(pred != 0); - m_pred = pred; -} - -inline void -Plan_select::setSort(Plan_expr_row* sortRow) -{ - ctx_assert(sortRow != 0); - m_sortRow = sortRow; -} - -inline void -Plan_select::setDistinct(bool distinct) -{ - m_distinct = distinct; -} - -inline void -Plan_select::setGroup(Plan_expr_row* groupRow) -{ - ctx_assert(groupRow != 0); - m_groupRow = groupRow; -} - -inline void -Plan_select::setHaving(Plan_pred* havingPred) -{ - ctx_assert(havingPred != 0); - m_havingPred = havingPred; -} - -inline void -Plan_select::setLimit(int off, int cnt) -{ - m_limitOff = off; - m_limitCnt = cnt; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_set_row.cpp b/ndb/src/old_files/client/odbc/codegen/Code_set_row.cpp deleted file mode 100644 index dd13ba0c3f7..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_set_row.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_set_row.hpp" -#include "Code_dml_column.hpp" - -Plan_set_row::~Plan_set_row() -{ -} - -Plan_base* -Plan_set_row::analyze(Ctx& ctx, Ctl& ctl) -{ - return this; -} - -Exec_base* -Plan_set_row::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_set_row::print(Ctx& ctx) -{ - ctx.print(" [set_row"); - Plan_base* a[] = { m_dmlRow, m_exprRow }; - printList(ctx, a, 2); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_set_row.hpp b/ndb/src/old_files/client/odbc/codegen/Code_set_row.hpp deleted file mode 100644 index 10d62826ac7..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_set_row.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_set_row_hpp -#define ODBC_CODEGEN_Code_set_row_hpp - -#include -#include -#include -#include "Code_base.hpp" -#include "Code_dml_row.hpp" -#include "Code_expr_row.hpp" -#include "Code_root.hpp" - -/** - * @class Plan_set_row - * @brief Row of column assigments in update - * - * Used only in parse. The column and expression rows are moved - * to the update node immediately after parse. - */ -class Plan_set_row : public Plan_base { -public: - Plan_set_row(Plan_root* root); - virtual ~Plan_set_row(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void addColumn(Plan_dml_column* column); - void addExpr(Plan_expr* expr); -protected: - friend class Plan_update; - friend class Plan_insert; // for MySql - Plan_dml_row* m_dmlRow; - Plan_expr_row* m_exprRow; -}; - -inline -Plan_set_row::Plan_set_row(Plan_root* root) : - Plan_base(root) -{ - m_dmlRow = new Plan_dml_row(root); - root->saveNode(m_dmlRow); - m_exprRow = new Plan_expr_row(root); - root->saveNode(m_exprRow); -} - -// children - -inline void -Plan_set_row::addColumn(Plan_dml_column* column) -{ - m_dmlRow->addColumn(column); -} - -inline void -Plan_set_row::addExpr(Plan_expr* expr) -{ - m_exprRow->addExpr(expr); -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_stmt.cpp b/ndb/src/old_files/client/odbc/codegen/Code_stmt.cpp deleted file mode 100644 index d790f667b84..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_stmt.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_stmt.hpp" - -// Plan_stmt - -Plan_stmt::~Plan_stmt() -{ -} - -// XXX remove -void -Plan_stmt::describe(Ctx& ctx) -{ - ctx_log1(("unimplemented describe")); -} - -// Exec_stmt - -Exec_stmt::Code::~Code() -{ -} - -Exec_stmt::Data::~Data() -{ -} - -Exec_stmt::~Exec_stmt() -{ -} - -void -Exec_stmt::bind(Ctx& ctx) -{ -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_stmt.hpp b/ndb/src/old_files/client/odbc/codegen/Code_stmt.hpp deleted file mode 100644 index 20b7fb965fb..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_stmt.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_stmt_hpp -#define ODBC_CODEGEN_Code_stmt_hpp - -#include -#include -#include "Code_base.hpp" - -class Ctx; - -/** - * @class Plan_stmt - * @brief Base class for statements in PlanTree - * - * A statement is a complete or partial SQL statement which can - * be optimized into executable statements Exec_stmt. - */ -class Plan_stmt : public Plan_base { -public: - Plan_stmt(Plan_root* root); - virtual ~Plan_stmt() = 0; - virtual void describe(Ctx& ctx); -}; - -inline -Plan_stmt::Plan_stmt(Plan_root* root) : - Plan_base(root) -{ -} - -/** - * @class Exec_stmt - * @brief Base class for statements in ExecTree - */ -class Exec_stmt : public Exec_base { -public: - class Code : public Exec_base::Code { - public: - virtual ~Code() = 0; - }; - class Data : public Exec_base::Data { - public: - virtual ~Data() = 0; - }; - Exec_stmt(Exec_root* root); - virtual ~Exec_stmt() = 0; - virtual void bind(Ctx& ctx); - virtual void execute(Ctx& ctx, Ctl& ctl) = 0; -protected: - friend class Exec_root; - bool m_topLevel; -}; - -inline -Exec_stmt::Exec_stmt(Exec_root* root) : - Exec_base(root), - m_topLevel(false) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_table.cpp b/ndb/src/old_files/client/odbc/codegen/Code_table.cpp deleted file mode 100644 index ee3c2a2ed07..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_table.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include "Code_table.hpp" -#include "Code_column.hpp" -#include "Code_expr_column.hpp" - -Plan_table::~Plan_table() -{ -} - -Plan_base* -Plan_table::analyze(Ctx& ctx, Ctl& ctl) -{ - if (m_dictTable != 0) // already done - return this; - DictTable* table = dictSchema().findTable(m_name); - if (table == 0) { - table = dictSchema().loadTable(ctx, m_name); - if (table == 0) { - ctx.pushStatus(Sqlstate::_42S02, Error::Gen, "table %s not found", m_name.c_str()); - return 0; - } - } - m_dictTable = table; - // indexes - m_indexList.resize(1 + m_dictTable->indexCount()); - for (unsigned i = 0; i <= indexCount(); i++) { - Index& index = m_indexList[i]; - index.m_pos = i; - if (index.m_pos == 0) { - index.m_keyCount = m_dictTable->keyCount(); - index.m_rank = 0; - } else { - index.m_dictIndex = m_dictTable->getIndex(i); - index.m_keyCount = index.m_dictIndex->getSize(); - if (index.m_dictIndex->getType() == NdbDictionary::Object::UniqueHashIndex) { - index.m_rank = 1; - } else if (index.m_dictIndex->getType() == NdbDictionary::Object::OrderedIndex) { - index.m_rank = 2; - } else { - ctx_assert(false); - } - } - index.m_keyEqList.resize(1 + index.m_keyCount); - } - return this; -} - -int -Plan_table::resolveColumn(Ctx& ctx, Plan_column* column, bool stripSchemaName) -{ - ctx_assert(column != 0); - bool dml, unq; - switch (column->m_type) { - case Plan_column::Type_expr: - dml = false; - unq = false; - break; - case Plan_column::Type_dml: - dml = true; - unq = true; - break; - case Plan_column::Type_idx: - dml = false; - unq = true; - break; - default: - ctx_assert(false); - break; - } - ColumnVector& columns = ! dml ? m_exprColumns : m_dmlColumns; - const BaseString& name = column->m_name; - const BaseString& cname = column->m_cname; - ctx_log3(("resolve %s column %s in table %s", ! dml ? "expr" : "dml", column->getPrintName(), getPrintName())); - // find column in table - DictColumn* dictColumn = dictTable().findColumn(name); - if (dictColumn == 0) - return 0; - // qualified column must match table correlation name - if (! cname.empty()) { - const char* str; - if (! m_cname.empty()) { - str = m_cname.c_str(); - } else { - str = m_name.c_str(); - if (stripSchemaName && strrchr(str, '.') != 0) - str = strrchr(str, '.') + 1; - } - if (strcmp(cname.c_str(), str) != 0) - return 0; - } - // find in positional list or add to it - unsigned resPos; - for (resPos = 1; resPos < columns.size(); resPos++) { - if (strcmp(columns[resPos]->getName().c_str(), name.c_str()) != 0) - continue; - // these columns must be unique - if (unq) { - ctx.pushStatus(Error::Gen, "duplicate column %s", column->getName().c_str()); - return -1; - } - break; - } - if (resPos >= columns.size()) { - columns.push_back(column); - } - ctx_log3(("resolve to attrId %u pos %u", (unsigned)dictColumn->getAttrId(), resPos)); - column->m_dictColumn = dictColumn; - column->m_resTable = this; - column->m_resPos = resPos; - // found - return 1; -} - -bool -Plan_table::resolveEq(Ctx& ctx, Plan_expr_column* column, Plan_expr* expr) -{ - ctx_assert(m_dictTable != 0); - const TableSet& ts = expr->tableSet(); - TableSet::const_iterator i = ts.find(this); - if (i != ts.end()) - return false; - unsigned found = 0; - for (unsigned i = 0; i <= indexCount(); i++) { - Index& index = m_indexList[i]; - for (unsigned n = 1, cnt = 0; n <= index.m_keyCount; n++) { - const DictColumn* dictColumn = 0; - if (index.m_pos == 0) { - ctx_assert(m_dictTable != 0); - dictColumn = m_dictTable->getKey(n); - } else { - ctx_assert(index.m_dictIndex != 0); - dictColumn = index.m_dictIndex->getColumn(n); - } - if (dictColumn != &column->dictColumn()) - continue; - ctx_assert(++cnt == 1); - index.m_keyEqList[n].push_back(expr); - if (index.m_pos == 0) - ctx_log2(("%s: found match to primary key column %s pos %u", getPrintName(), column->getPrintName(), n)); - else - ctx_log2(("%s: found match to index %s column %s pos %u", getPrintName(), index.m_dictIndex->getName().c_str(), column->getPrintName(), n)); - found++; - } - } - return (found != 0); -} - -void -Plan_table::resolveSet(Ctx& ctx, Index& index, const TableSet& tsDone) -{ - index.m_keyFound = false; - ExprVector keyEq; - keyEq.resize(1 + index.m_keyCount); - resolveSet(ctx, index, tsDone, keyEq, 1); -} - -void -Plan_table::resolveSet(Ctx& ctx, Index& index, const TableSet& tsDone, ExprVector& keyEq, unsigned n) -{ - if (n <= index.m_keyCount) { - // building up combinations - ExprList& keyEqList = index.m_keyEqList[n]; - for (ExprList::iterator i = keyEqList.begin(); i != keyEqList.end(); i++) { - keyEq[n] = *i; - resolveSet(ctx, index, tsDone, keyEq, n + 1); - } - if (! keyEqList.empty() || index.m_rank <= 1 || n == 1) - return; - // ordered index with maximal initial key match - } - TableSet keySet; - for (unsigned i = 1; i <= n - 1; i++) { - const TableSet& tableSet = keyEq[i]->tableSet(); - for (TableSet::const_iterator j = tableSet.begin(); j != tableSet.end(); j++) { - if (tsDone.find(*j) == tsDone.end()) - keySet.insert(*j); - } - } - if (! index.m_keyFound || index.m_keySet.size() > keySet.size()) { - index.m_keyFound = true; - index.m_keyEq = keyEq; - index.m_keySet = keySet; - index.m_keyCountUsed = n - 1; - index.m_keyCountUnused = index.m_keyCount - index.m_keyCountUsed; - // set matching size - index.m_keyEq.resize(1 + index.m_keyCountUsed); - } -} - -bool -Plan_table::exactKey(Ctx& ctx, const Index* indexKey) const -{ - ctx_assert(indexKey != 0 && indexKey == &m_indexList[indexKey->m_pos]); - for (unsigned i = 0; i <= indexCount(); i++) { - const Index& index = m_indexList[i]; - const ExprListVector& keyEqList = index.m_keyEqList; - for (unsigned n = 1; n <= index.m_keyCount; n++) { - if (index.m_pos == indexKey->m_pos) { - ctx_assert(keyEqList[n].size() >= 1); - if (keyEqList[n].size() > 1) { - ctx_log2(("index %u not exact: column %u has %u > 1 matches", - indexKey->m_pos, - n, - (unsigned)keyEqList[n].size())); - return false; - } - } else { - if (keyEqList[n].size() > 0) { - ctx_log2(("index %u not exact: index %u column %u has %u > 0 matches", - indexKey->m_pos, - index.m_pos, - n, - (unsigned)keyEqList[n].size())); - return false; - } - } - } - } - ctx_log2(("index %u is exact", indexKey->m_pos)); - return true; -} - -Exec_base* -Plan_table::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_table::print(Ctx& ctx) -{ - ctx.print(" [table %s]", getPrintName()); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_table.hpp b/ndb/src/old_files/client/odbc/codegen/Code_table.hpp deleted file mode 100644 index 8a95b8fa26c..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_table.hpp +++ /dev/null @@ -1,202 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_table_hpp -#define ODBC_CODEGEN_Code_table_hpp - -#include -#include -#include "Code_base.hpp" - -class DictTable; -class DictColumn; -class DictIndex; -class Plan_query_filter; -class Plan_query_lookup; -class Plan_query_range; -class Plan_column; -class Plan_expr_column; -class Plan_select; -class Plan_delete; -class Plan_delete_lookup; -class Plan_update; -class Plan_update_lookup; - -/** - * @class Plan_table - * @brief Table node in PlanTree - * - * This is a pure Plan node. Final executable nodes have table - * information built-in. - */ -class Plan_table : public Plan_base { -public: - Plan_table(Plan_root* root, const BaseString& name); - virtual ~Plan_table(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // attributes - const BaseString& getName() const; - const BaseString& getCname() const; - const char* getPrintName() const; - void setCname(const BaseString& cname); - const DictTable& dictTable() const; - unsigned indexCount() const; - // resolve - const ColumnVector& exprColumns() const; - const ColumnVector& dmlColumns() const; -protected: - friend class Plan_column; - friend class Plan_query_filter; - friend class Plan_query_lookup; - friend class Plan_query_index; - friend class Plan_query_range; - friend class Plan_expr_column; - friend class Plan_select; - friend class Plan_delete; - friend class Plan_delete_lookup; - friend class Plan_delete_index; - friend class Plan_update; - friend class Plan_update_lookup; - friend class Plan_update_index; - BaseString m_name; - BaseString m_cname; - BaseString m_printName; - DictTable* m_dictTable; - /* - * Resolve column. Returns 1 on found, 0 on not found, and -1 on error. - * Modifies both table and column data. - */ - int resolveColumn(Ctx& ctx, Plan_column* column, bool stripSchemaName = false); - ColumnVector m_exprColumns; - ColumnVector m_dmlColumns; - /* - * Offset for resolved columns in join. This is sum over m_exprColumns - * lengths for all preceding tables. - */ - unsigned m_resOff; - /* - * Each column in primary key and unique hash index has list of - * expressions it is set equal to in the where-clause (at top level). - */ - bool resolveEq(Ctx& ctx, Plan_expr_column* column, Plan_expr* expr); - /* - * Index struct for primary key and indexes. - */ - struct Index { - Index() : - m_pos(0), - m_keyFound(false), - m_dictIndex(0), - m_rank(~0), - m_keyCount(0), - m_keyCountUsed(0) { - } - unsigned m_pos; - ExprListVector m_keyEqList; - bool m_keyFound; - ExprVector m_keyEq; - TableSet m_keySet; - const DictIndex* m_dictIndex; // for index only - unsigned m_rank; // 0-pk 1-hash index 2-ordered index - unsigned m_keyCount; // number of columns - unsigned m_keyCountUsed; // may be less for ordered index - unsigned m_keyCountUnused; // m_keyCount - m_keyCountUsed - }; - typedef std::vector IndexList; // primary key is entry 0 - IndexList m_indexList; - /* - * Find set of additional tables (maybe empty) required to resolve the key - * columns. - */ - void resolveSet(Ctx& ctx, Index& index, const TableSet& tsDone); - void resolveSet(Ctx& ctx, Index& index, const TableSet& tsDone, ExprVector& keyEq, unsigned n); - /* - * Check for exactly one key or index match. - */ - bool exactKey(Ctx& ctx, const Index* indexKey) const; -}; - -inline -Plan_table::Plan_table(Plan_root* root, const BaseString& name) : - Plan_base(root), - m_name(name), - m_printName(name), - m_dictTable(0), - m_exprColumns(1), // 1-based - m_dmlColumns(1), // 1-based - m_resOff(0), - m_indexList(1) -{ -} - -inline const BaseString& -Plan_table::getName() const -{ - return m_name; -} - -inline const BaseString& -Plan_table::getCname() const -{ - return m_cname; -} - -inline const char* -Plan_table::getPrintName() const -{ - return m_printName.c_str(); -} - -inline void -Plan_table::setCname(const BaseString& cname) -{ - m_cname.assign(cname); - m_printName.assign(m_name); - if (! m_cname.empty()) { - m_printName.append(" "); - m_printName.append(m_cname); - } -} - -inline const DictTable& -Plan_table::dictTable() const -{ - ctx_assert(m_dictTable != 0); - return *m_dictTable; -} - -inline unsigned -Plan_table::indexCount() const -{ - ctx_assert(m_indexList.size() > 0); - return m_indexList.size() - 1; -} - -inline const Plan_table::ColumnVector& -Plan_table::exprColumns() const -{ - return m_exprColumns; -} - -inline const Plan_table::ColumnVector& -Plan_table::dmlColumns() const -{ - return m_dmlColumns; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_table_list.cpp b/ndb/src/old_files/client/odbc/codegen/Code_table_list.cpp deleted file mode 100644 index ea9f4fdc26e..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_table_list.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Code_table_list.hpp" - -Plan_table_list::~Plan_table_list() -{ -} - -Plan_base* -Plan_table_list::analyze(Ctx& ctx, Ctl& ctl) -{ - // analyze the tables - for (unsigned i = 1, n = countTable(); i <= n; i++) { - Plan_table* table = getTable(i); - table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - } - // node was not replaced - return this; -} - -Exec_base* -Plan_table_list::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_table_list::print(Ctx& ctx) -{ - ctx.print(" [table_list"); - for (unsigned i = 1, n = countTable(); i <= n; i++) { - Plan_base* a[] = { m_tableList[i] }; - printList(ctx, a, 1); - } - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_table_list.hpp b/ndb/src/old_files/client/odbc/codegen/Code_table_list.hpp deleted file mode 100644 index 47989166cac..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_table_list.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_table_list_hpp -#define ODBC_CODEGEN_Code_table_list_hpp - -#include -#include "Code_base.hpp" -#include "Code_table.hpp" - -/** - * @class Plan_table_list - * @brief List of tables in select statement - */ -class Plan_table_list : public Plan_base { -public: - Plan_table_list(Plan_root* root); - virtual ~Plan_table_list(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - unsigned countTable() const; - void addTable(Plan_table* table); - Plan_table* getTable(unsigned i) const; -protected: - friend class Plan_select; - TableVector m_tableList; -}; - -inline -Plan_table_list::Plan_table_list(Plan_root* root) : - Plan_base(root), - m_tableList(1) -{ -} - -// children - -inline unsigned -Plan_table_list::countTable() const -{ - return m_tableList.size() - 1; -} - -inline void -Plan_table_list::addTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_tableList.push_back(table); -} - -inline Plan_table* -Plan_table_list::getTable(unsigned i) const -{ - ctx_assert(1 <= i && i <= countTable() && m_tableList[i] != 0); - return m_tableList[i]; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_update.cpp b/ndb/src/old_files/client/odbc/codegen/Code_update.cpp deleted file mode 100644 index 0b33cd628b4..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_update.cpp +++ /dev/null @@ -1,246 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_update.hpp" -#include "Code_update_lookup.hpp" -#include "Code_update_index.hpp" -#include "Code_update_scan.hpp" -#include "Code_table.hpp" -#include "Code_query_project.hpp" -#include "Code_query_filter.hpp" -#include "Code_query_scan.hpp" -#include "Code_query_lookup.hpp" -#include "Code_query_index.hpp" -#include "Code_query_range.hpp" -#include "Code_query_repeat.hpp" -#include "Code_root.hpp" - -// Plan_update - -Plan_update::~Plan_update() -{ -} - -Plan_base* -Plan_update::analyze(Ctx& ctx, Ctl& ctl) -{ - stmtArea().stmtInfo().setName(Stmt_name_update); - // analyze the table - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - // get column and expression rows - ctx_assert(m_setRow != 0); - setDmlRow(m_setRow->m_dmlRow); - setExprRow(m_setRow->m_exprRow); - m_setRow = 0; - // implied by parse - ctx_assert(m_dmlRow->getSize() == m_exprRow->getSize()); - // set name resolution scope - ctl.m_tableList.resize(1 + 1); // indexed from 1 - ctl.m_tableList[1] = m_table; - // analyze the rows - m_dmlRow->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctl.m_dmlRow = m_dmlRow; // row type to convert to - ctl.m_const = true; // set to constants - m_exprRow->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - bool setConst = ctl.m_const; - ctl.m_dmlRow = 0; - Plan_dml* stmt = 0; - // top level query is a project - Plan_query_project* queryProject = new Plan_query_project(m_root); - m_root->saveNode(queryProject); - queryProject->setRow(m_exprRow); - if (m_pred != 0) { - // analyze the predicate - ctl.m_topand = true; - ctl.m_extra = false; - m_pred = static_cast(m_pred->analyze(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(m_pred != 0); - // check for key match - Plan_table::Index* indexBest = 0; - for (unsigned i = 0; i <= m_table->indexCount(); i++) { - Plan_table::Index& index = m_table->m_indexList[i]; - TableSet tsDone; - m_table->resolveSet(ctx, index, tsDone); - if (! ctx.ok()) - return 0; - if (! index.m_keyFound) - continue; - // prefer smaller rank, less unused keys - int k; - (k = (indexBest == 0)) || - (k = (indexBest->m_rank - index.m_rank)) || - (k = (indexBest->m_keyCountUnused - index.m_keyCountUnused)); - if (k > 0) - indexBest = &index; - } - if (indexBest != 0) { - const bool exactKey = indexBest->m_rank <= 1 ? m_table->exactKey(ctx, indexBest) : false; - const bool direct = setConst && ! ctl.m_extra && exactKey; - ctx_log3(("update direct=%d: const=%d extra=%d exact=%d", direct, setConst, ctl.m_extra, exactKey)); - if (indexBest->m_rank == 0) { - // primary key - Plan_update_lookup* updateLookup = new Plan_update_lookup(m_root); - m_root->saveNode(updateLookup); - updateLookup->setTable(m_table); - updateLookup->setDmlRow(m_dmlRow); - if (direct) { - // constant values and exact key match - Plan_query_repeat* queryRepeat = new Plan_query_repeat(m_root, 1); - m_root->saveNode(queryRepeat); - queryProject->setQuery(queryRepeat); - } else { - // more conditions or non-constant values - Plan_query_lookup* queryLookup = new Plan_query_lookup(m_root); - m_root->saveNode(queryLookup); - Plan_query_filter* queryFilter = new Plan_query_filter(m_root); - m_root->saveNode(queryFilter); - queryLookup->setTable(m_table); - queryFilter->setQuery(queryLookup); - queryFilter->setPred(m_pred); - queryFilter->m_topTable = m_table; - queryProject->setQuery(queryFilter); - } - updateLookup->setQuery(queryProject); - stmt = updateLookup; - } else if (indexBest->m_rank == 1) { - // hash index - Plan_update_index* updateIndex = new Plan_update_index(m_root); - m_root->saveNode(updateIndex); - updateIndex->setTable(m_table, indexBest); - updateIndex->setDmlRow(m_dmlRow); - if (direct) { - // constant values and exact key match - Plan_query_repeat* queryRepeat = new Plan_query_repeat(m_root, 1); - m_root->saveNode(queryRepeat); - queryProject->setQuery(queryRepeat); - } else { - // more conditions or non-constant values - Plan_query_index* queryIndex = new Plan_query_index(m_root); - m_root->saveNode(queryIndex); - Plan_query_filter* queryFilter = new Plan_query_filter(m_root); - m_root->saveNode(queryFilter); - queryIndex->setTable(m_table, indexBest); - queryFilter->setQuery(queryIndex); - queryFilter->setPred(m_pred); - queryFilter->m_topTable = m_table; - queryProject->setQuery(queryFilter); - } - updateIndex->setQuery(queryProject); - stmt = updateIndex; - } else if (indexBest->m_rank == 2) { - // ordered index - Plan_update_scan* updateScan = new Plan_update_scan(m_root); - m_root->saveNode(updateScan); - updateScan->setTable(m_table); - updateScan->setDmlRow(m_dmlRow); - Plan_query_range* queryRange = new Plan_query_range(m_root); - m_root->saveNode(queryRange); - queryRange->setTable(m_table, indexBest); - queryRange->setExclusive(); - Plan_query_filter* queryFilter = new Plan_query_filter(m_root); - m_root->saveNode(queryFilter); - queryFilter->setQuery(queryRange); - queryFilter->setPred(m_pred); - queryFilter->m_topTable = m_table; - // interpeter - const TableSet& ts2 = m_pred->noInterp(); - ctx_assert(ts2.size() <= 1); - if (ts2.size() == 0) { - queryRange->setInterp(m_pred); - } - queryProject->setQuery(queryFilter); - updateScan->setQuery(queryProject); - stmt = updateScan; - } else { - ctx_assert(false); - } - } else { - // scan update with filter - Plan_update_scan* updateScan = new Plan_update_scan(m_root); - m_root->saveNode(updateScan); - updateScan->setTable(m_table); - updateScan->setDmlRow(m_dmlRow); - Plan_query_scan* queryScan = new Plan_query_scan(m_root); - m_root->saveNode(queryScan); - queryScan->setTable(m_table); - queryScan->setExclusive(); - Plan_query_filter* queryFilter = new Plan_query_filter(m_root); - m_root->saveNode(queryFilter); - queryFilter->setQuery(queryScan); - queryFilter->setPred(m_pred); - queryFilter->m_topTable = m_table; - // interpeter - const TableSet& ts2 = m_pred->noInterp(); - ctx_assert(ts2.size() <= 1); - if (ts2.size() == 0) { - queryScan->setInterp(m_pred); - } - queryProject->setQuery(queryFilter); - updateScan->setQuery(queryProject); - stmt = updateScan; - } - } else { - // scan update without filter - Plan_update_scan* updateScan = new Plan_update_scan(m_root); - m_root->saveNode(updateScan); - updateScan->setTable(m_table); - updateScan->setDmlRow(m_dmlRow); - Plan_query_scan* queryScan = new Plan_query_scan(m_root); - m_root->saveNode(queryScan); - queryScan->setTable(m_table); - queryScan->setExclusive(); - queryProject->setQuery(queryScan); - updateScan->setQuery(queryProject); - stmt = updateScan; - } - // set base for column position offsets - m_table->m_resOff = 1; - return stmt; -} - -void -Plan_update::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "UPDATE WHERE", SQL_DIAG_UPDATE_WHERE); -} - -Exec_base* -Plan_update::codegen(Ctx& ctx, Ctl& ctl) -{ - ctx_assert(false); - return 0; -} - -void -Plan_update::print(Ctx& ctx) -{ - ctx.print(" [update"); - Plan_base* a[] = { m_table, m_setRow, m_dmlRow, m_exprRow }; - printList(ctx, a, 4); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_update.hpp b/ndb/src/old_files/client/odbc/codegen/Code_update.hpp deleted file mode 100644 index 380b651518b..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_update.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_update_hpp -#define ODBC_CODEGEN_Code_update_hpp - -#include -#include "Code_base.hpp" -#include "Code_dml.hpp" -#include "Code_set_row.hpp" -#include "Code_table.hpp" -#include "Code_pred.hpp" -#include "Code_query.hpp" - -/** - * @class Plan_update - * @brief Update in PlanTree - */ -class Plan_update : public Plan_dml { -public: - Plan_update(Plan_root* root); - virtual ~Plan_update(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - void print(Ctx& ctx); - // children - void setTable(Plan_table* table); - void setRow(Plan_set_row* setRow); - void setDmlRow(Plan_dml_row* dmlRow); - void setExprRow(Plan_expr_row* exprRow); - void setPred(Plan_pred* pred); -protected: - Plan_table* m_table; - Plan_set_row* m_setRow; - Plan_dml_row* m_dmlRow; - Plan_expr_row* m_exprRow; - Plan_pred* m_pred; -}; - -inline -Plan_update::Plan_update(Plan_root* root) : - Plan_dml(root), - m_table(0), - m_setRow(0), - m_dmlRow(0), - m_exprRow(0), - m_pred(0) -{ -} - -// children - -inline void -Plan_update::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -inline void -Plan_update::setRow(Plan_set_row* setRow) -{ - ctx_assert(setRow != 0); - m_setRow = setRow; -} - -inline void -Plan_update::setDmlRow(Plan_dml_row* dmlRow) -{ - ctx_assert(dmlRow != 0); - m_dmlRow = dmlRow; -} - -inline void -Plan_update::setExprRow(Plan_expr_row* exprRow) -{ - ctx_assert(exprRow != 0); - m_exprRow = exprRow; -} - -inline void -Plan_update::setPred(Plan_pred* pred) -{ - ctx_assert(pred != 0); - m_pred = pred; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_update_index.cpp b/ndb/src/old_files/client/odbc/codegen/Code_update_index.cpp deleted file mode 100644 index 6f74db0d913..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_update_index.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_dml_column.hpp" -#include "Code_expr.hpp" -#include "Code_update_index.hpp" -#include "Code_table.hpp" -#include "Code_root.hpp" - -// Plan_update_index - -Plan_update_index::~Plan_update_index() -{ -} - -Plan_base* -Plan_update_index::analyze(Ctx& ctx, Ctl& ctl) -{ - ctl.m_dmlRow = m_dmlRow; // row type to convert to - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -void -Plan_update_index::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "UPDATE WHERE", SQL_DIAG_UPDATE_WHERE); -} - -Exec_base* -Plan_update_index::codegen(Ctx& ctx, Ctl& ctl) -{ - // generate code for the query - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // set up - ctx_assert(m_table != 0 && m_index != 0); - const BaseString& tableName = m_table->getName(); - ctx_assert(m_index->m_dictIndex != 0); - const DictIndex& dictIndex = *m_index->m_dictIndex; - const BaseString& indexName = dictIndex.getName(); - const unsigned keyCount = m_index->m_keyCount; - const ColumnVector& columns = m_table->dmlColumns(); - ctx_assert(columns.size() > 0); - const unsigned attrCount = columns.size() - 1; - // create the code - Exec_update_index::Code& code = *new Exec_update_index::Code(keyCount); - code.m_tableName = strcpy(new char[tableName.length() + 1], tableName.c_str()); - code.m_indexName = strcpy(new char[indexName.length() + 1], indexName.c_str()); - // key attributes - code.m_keyId = new NdbAttrId[1 + keyCount]; - code.m_keyId[0] = (NdbAttrId)-1; - for (unsigned k = 1; k <= keyCount; k++) { - const DictColumn* keyColumn = dictIndex.getColumn(k); - const SqlType& sqlType = keyColumn->sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_keySpecs.setEntry(k, sqlSpec); - code.m_keyId[k] = k - 1; // index column order - } - // matching expressions - ctx_assert(m_index->m_keyFound); - const ExprVector& keyEq = m_index->m_keyEq; - ctx_assert(keyEq.size() == 1 + keyCount); - code.m_keyMatch = new Exec_expr* [1 + keyCount]; - code.m_keyMatch[0] = 0; - for (unsigned k = 1; k <= keyCount; k++) { - Plan_expr* expr = keyEq[k]; - Exec_expr* execExpr = static_cast(expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - code.m_keyMatch[k] = execExpr; - } - // updated attributes - code.m_attrCount = attrCount; - code.m_attrId = new NdbAttrId[1 + attrCount]; - code.m_attrId[0] = (NdbAttrId)-1; - for (unsigned i = 1; i <= attrCount; i++) { - Plan_column* column = columns[i]; - ctx_assert(column != 0); - const DictColumn& dictColumn = column->dictColumn(); - code.m_attrId[i] = dictColumn.getAttrId(); - } - // create the exec - Exec_update_index* exec = new Exec_update_index(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - exec->setQuery(execQuery); - return exec; -} - -void -Plan_update_index::print(Ctx& ctx) -{ - ctx.print(" [update_index"); - Plan_base* a[] = { m_table, m_query }; - printList(ctx, a, sizeof(a)/sizeof(a[0])); - ctx.print("]"); -} - -// Exec_delete - -Exec_update_index::Code::~Code() -{ - delete[] m_tableName; - delete[] m_keyId; - delete[] m_keyMatch; - delete[] m_attrId; -} - -Exec_update_index::Data::~Data() -{ -} - -Exec_update_index::~Exec_update_index() -{ -} - -void -Exec_update_index::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // allocate the subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // create data - Data& data = *new Data; - setData(data); - // allocate matching expressions - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* expr = code.m_keyMatch[k]; - ctx_assert(expr != 0); - expr->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } -} - -void -Exec_update_index::close(Ctx& ctx) -{ - ctx_assert(m_query != 0); - m_query->close(ctx); -} - -void -Exec_update_index::print(Ctx& ctx) -{ - ctx.print(" [update_index"); - if (m_code != 0) { - const Code& code = getCode(); - ctx.print(" keyId="); - for (unsigned i = 1; i <= code.m_keyCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_keyId[i]); - } - ctx.print(" attrId="); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_attrId[i]); - } - } - Exec_base* a[] = { m_query }; - printList(ctx, a, 1); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_update_index.hpp b/ndb/src/old_files/client/odbc/codegen/Code_update_index.hpp deleted file mode 100644 index bbad822650a..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_update_index.hpp +++ /dev/null @@ -1,171 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_update_index_hpp -#define ODBC_CODEGEN_Code_update_index_hpp - -#include -#include "Code_base.hpp" -#include "Code_dml.hpp" -#include "Code_table.hpp" -#include "Code_query.hpp" - -/** - * @class Plan_update_index - * @brief Update in PlanTree - */ -class Plan_update_index : public Plan_dml { -public: - Plan_update_index(Plan_root* root); - virtual ~Plan_update_index(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setTable(Plan_table* table, Plan_table::Index* index); - void setDmlRow(Plan_dml_row* dmlRow); - void setQuery(Plan_query* query); -protected: - Plan_table* m_table; - Plan_table::Index* m_index; - Plan_dml_row* m_dmlRow; - Plan_query* m_query; -}; - -inline -Plan_update_index::Plan_update_index(Plan_root* root) : - Plan_dml(root), - m_table(0), - m_dmlRow(0), - m_query(0) -{ -} - -inline void -Plan_update_index::setTable(Plan_table* table, Plan_table::Index* index) -{ - ctx_assert(table != 0 && index != 0 && index == &table->m_indexList[index->m_pos] && index->m_pos != 0); - m_table = table; - m_index = index; -} - -inline void -Plan_update_index::setDmlRow(Plan_dml_row* dmlRow) -{ - ctx_assert(dmlRow != 0); - m_dmlRow = dmlRow; -} - -inline void -Plan_update_index::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -/** - * @class Exec_update_index - * @brief Insert in ExecTree - */ -class Exec_update_index : public Exec_dml { -public: - class Code : public Exec_dml::Code { - public: - Code(unsigned keyCount); - virtual ~Code(); - protected: - friend class Plan_update_index; - friend class Exec_update_index; - const char* m_tableName; - const char* m_indexName; - unsigned m_keyCount; - SqlSpecs m_keySpecs; // key types - NdbAttrId* m_keyId; - Exec_expr** m_keyMatch; // XXX pointers for now - unsigned m_attrCount; - NdbAttrId* m_attrId; - }; - class Data : public Exec_dml::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_update_index; - }; - Exec_update_index(Exec_root* root); - virtual ~Exec_update_index(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); -protected: - Exec_query* m_query; -}; - -inline -Exec_update_index::Code::Code(unsigned keyCount) : - m_tableName(0), - m_indexName(0), - m_keyCount(keyCount), - m_keySpecs(keyCount), - m_keyId(0), - m_keyMatch(0), - m_attrCount(0), - m_attrId(0) -{ -} - -inline -Exec_update_index::Data::Data() -{ -} - -inline -Exec_update_index::Exec_update_index(Exec_root* root) : - Exec_dml(root), - m_query(0) -{ -} - -// children - -inline const Exec_update_index::Code& -Exec_update_index::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_update_index::Data& -Exec_update_index::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_update_index::setQuery(Exec_query* query) -{ - ctx_assert(query != 0 && m_query == 0); - m_query = query; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_update_lookup.cpp b/ndb/src/old_files/client/odbc/codegen/Code_update_lookup.cpp deleted file mode 100644 index 7525fb72692..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_update_lookup.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_dml_column.hpp" -#include "Code_expr.hpp" -#include "Code_update_lookup.hpp" -#include "Code_table.hpp" -#include "Code_root.hpp" - -// Plan_update_lookup - -Plan_update_lookup::~Plan_update_lookup() -{ -} - -Plan_base* -Plan_update_lookup::analyze(Ctx& ctx, Ctl& ctl) -{ - ctl.m_dmlRow = m_dmlRow; // row type to convert to - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -void -Plan_update_lookup::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "UPDATE WHERE", SQL_DIAG_UPDATE_WHERE); -} - -Exec_base* -Plan_update_lookup::codegen(Ctx& ctx, Ctl& ctl) -{ - // generate code for the query - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // set up - ctx_assert(m_table != 0); - const BaseString& tableName = m_table->getName(); - const DictTable& dictTable = m_table->dictTable(); - const unsigned keyCount = dictTable.keyCount(); - const ColumnVector& columns = m_table->dmlColumns(); - ctx_assert(columns.size() > 0); - const unsigned attrCount = columns.size() - 1; - // create the code - Exec_update_lookup::Code& code = *new Exec_update_lookup::Code(keyCount); - code.m_tableName = strcpy(new char[tableName.length() + 1], tableName.c_str()); - // key attributes - code.m_keyId = new NdbAttrId[1 + keyCount]; - code.m_keyId[0] = (NdbAttrId)-1; - for (unsigned k = 1; k <= keyCount; k++) { - const DictColumn* keyColumn = dictTable.getKey(k); - const SqlType& sqlType = keyColumn->sqlType(); - SqlSpec sqlSpec(sqlType, SqlSpec::Physical); - code.m_keySpecs.setEntry(k, sqlSpec); - code.m_keyId[k] = keyColumn->getAttrId(); - } - // matching expressions - const Plan_table::Index& index = m_table->m_indexList[0]; - ctx_assert(index.m_keyFound); - const ExprVector& keyEq = index.m_keyEq; - ctx_assert(keyEq.size() == 1 + keyCount); - code.m_keyMatch = new Exec_expr* [1 + keyCount]; - code.m_keyMatch[0] = 0; - for (unsigned k = 1; k <= keyCount; k++) { - Plan_expr* expr = keyEq[k]; - Exec_expr* execExpr = static_cast(expr->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execExpr != 0); - code.m_keyMatch[k] = execExpr; - } - // updated attributes - code.m_attrCount = attrCount; - code.m_attrId = new NdbAttrId[1 + attrCount]; - code.m_attrId[0] = (NdbAttrId)-1; - for (unsigned i = 1; i <= attrCount; i++) { - Plan_column* column = columns[i]; - ctx_assert(column != 0); - const DictColumn& dictColumn = column->dictColumn(); - code.m_attrId[i] = dictColumn.getAttrId(); - } - // create the exec - Exec_update_lookup* exec = new Exec_update_lookup(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - exec->setQuery(execQuery); - return exec; -} - -void -Plan_update_lookup::print(Ctx& ctx) -{ - ctx.print(" [update_lookup"); - Plan_base* a[] = { m_table, m_query }; - printList(ctx, a, sizeof(a)/sizeof(a[0])); - ctx.print("]"); -} - -// Exec_delete - -Exec_update_lookup::Code::~Code() -{ - delete[] m_tableName; - delete[] m_keyId; - delete[] m_keyMatch; - delete[] m_attrId; -} - -Exec_update_lookup::Data::~Data() -{ -} - -Exec_update_lookup::~Exec_update_lookup() -{ -} - -void -Exec_update_lookup::alloc(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - // allocate the subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // create data - Data& data = *new Data; - setData(data); - // allocate matching expressions - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* expr = code.m_keyMatch[k]; - ctx_assert(expr != 0); - expr->alloc(ctx, ctl); - if (! ctx.ok()) - return; - } -} - -void -Exec_update_lookup::close(Ctx& ctx) -{ - ctx_assert(m_query != 0); - m_query->close(ctx); -} - -void -Exec_update_lookup::print(Ctx& ctx) -{ - ctx.print(" [update_lookup"); - if (m_code != 0) { - const Code& code = getCode(); - ctx.print(" keyId="); - for (unsigned i = 1; i <= code.m_keyCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_keyId[i]); - } - ctx.print(" attrId="); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_attrId[i]); - } - } - Exec_base* a[] = { m_query }; - printList(ctx, a, 1); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_update_lookup.hpp b/ndb/src/old_files/client/odbc/codegen/Code_update_lookup.hpp deleted file mode 100644 index fc4341880dd..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_update_lookup.hpp +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_update_lookup_hpp -#define ODBC_CODEGEN_Code_update_lookup_hpp - -#include -#include "Code_base.hpp" -#include "Code_dml.hpp" -#include "Code_table.hpp" -#include "Code_query.hpp" - -/** - * @class Plan_update_lookup - * @brief Update in PlanTree - */ -class Plan_update_lookup : public Plan_dml { -public: - Plan_update_lookup(Plan_root* root); - virtual ~Plan_update_lookup(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setTable(Plan_table* table); - void setDmlRow(Plan_dml_row* dmlRow); - void setQuery(Plan_query* query); -protected: - Plan_table* m_table; - Plan_dml_row* m_dmlRow; - Plan_query* m_query; -}; - -inline -Plan_update_lookup::Plan_update_lookup(Plan_root* root) : - Plan_dml(root), - m_table(0), - m_dmlRow(0), - m_query(0) -{ -} - -inline void -Plan_update_lookup::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -inline void -Plan_update_lookup::setDmlRow(Plan_dml_row* dmlRow) -{ - ctx_assert(dmlRow != 0); - m_dmlRow = dmlRow; -} - -inline void -Plan_update_lookup::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -/** - * @class Exec_update_lookup - * @brief Insert in ExecTree - */ -class Exec_update_lookup : public Exec_dml { -public: - class Code : public Exec_dml::Code { - public: - Code(unsigned keyCount); - virtual ~Code(); - protected: - friend class Plan_update_lookup; - friend class Exec_update_lookup; - char* m_tableName; - unsigned m_keyCount; - SqlSpecs m_keySpecs; // key types - NdbAttrId* m_keyId; - Exec_expr** m_keyMatch; // XXX pointers for now - unsigned m_attrCount; - NdbAttrId* m_attrId; - }; - class Data : public Exec_dml::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_update_lookup; - }; - Exec_update_lookup(Exec_root* root); - virtual ~Exec_update_lookup(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); -protected: - Exec_query* m_query; -}; - -inline -Exec_update_lookup::Code::Code(unsigned keyCount) : - m_tableName(0), - m_keyCount(keyCount), - m_keySpecs(keyCount), - m_keyId(0), - m_keyMatch(0), - m_attrCount(0), - m_attrId(0) -{ -} - -inline -Exec_update_lookup::Data::Data() -{ -} - -inline -Exec_update_lookup::Exec_update_lookup(Exec_root* root) : - Exec_dml(root), - m_query(0) -{ -} - -// children - -inline const Exec_update_lookup::Code& -Exec_update_lookup::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_update_lookup::Data& -Exec_update_lookup::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_update_lookup::setQuery(Exec_query* query) -{ - ctx_assert(query != 0 && m_query == 0); - m_query = query; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Code_update_scan.cpp b/ndb/src/old_files/client/odbc/codegen/Code_update_scan.cpp deleted file mode 100644 index 9fac1728469..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_update_scan.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "Code_dml_column.hpp" -#include "Code_update_scan.hpp" -#include "Code_table.hpp" -#include "Code_root.hpp" - -// Plan_update_scan - -Plan_update_scan::~Plan_update_scan() -{ -} - -Plan_base* -Plan_update_scan::analyze(Ctx& ctx, Ctl& ctl) -{ - ctl.m_dmlRow = m_dmlRow; // row type to convert to - ctx_assert(m_query != 0); - m_query->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - ctx_assert(m_table != 0); - m_table->analyze(ctx, ctl); - if (! ctx.ok()) - return 0; - return this; -} - -void -Plan_update_scan::describe(Ctx& ctx) -{ - stmtArea().setFunction(ctx, "UPDATE WHERE", SQL_DIAG_UPDATE_WHERE); -} - -Exec_base* -Plan_update_scan::codegen(Ctx& ctx, Ctl& ctl) -{ - // generate code for the query - ctx_assert(m_query != 0); - Exec_query* execQuery = static_cast(m_query->codegen(ctx, ctl)); - if (! ctx.ok()) - return 0; - ctx_assert(execQuery != 0); - // set up - ctx_assert(m_table != 0); - const ColumnVector& columns = m_table->dmlColumns(); - ctx_assert(columns.size() > 0); - const unsigned attrCount = columns.size() - 1; - // create the code - Exec_update_scan::Code& code = *new Exec_update_scan::Code(); - // updated attributes - code.m_attrCount = attrCount; - code.m_attrId = new NdbAttrId[1 + attrCount]; - code.m_attrId[0] = (NdbAttrId)-1; - for (unsigned i = 1; i <= attrCount; i++) { - Plan_column* column = columns[i]; - ctx_assert(column != 0); - const DictColumn& dictColumn = column->dictColumn(); - code.m_attrId[i] = dictColumn.getAttrId(); - } - // create the exec - Exec_update_scan* exec = new Exec_update_scan(ctl.m_execRoot); - ctl.m_execRoot->saveNode(exec); - exec->setCode(code); - exec->setQuery(execQuery); - return exec; -} - -void -Plan_update_scan::print(Ctx& ctx) -{ - ctx.print(" [update_scan"); - Plan_base* a[] = { m_table, m_query }; - printList(ctx, a, sizeof(a)/sizeof(a[0])); - ctx.print("]"); -} - -// Exec_delete - -Exec_update_scan::Code::~Code() -{ - delete[] m_attrId; -} - -Exec_update_scan::Data::~Data() -{ -} - -Exec_update_scan::~Exec_update_scan() -{ -} - -void -Exec_update_scan::alloc(Ctx& ctx, Ctl& ctl) -{ - // allocate the subquery - ctx_assert(m_query != 0); - m_query->alloc(ctx, ctl); - if (! ctx.ok()) - return; - // create data - Data& data = *new Data; - setData(data); -} - -void -Exec_update_scan::close(Ctx& ctx) -{ - ctx_assert(m_query != 0); - m_query->close(ctx); -} - -void -Exec_update_scan::print(Ctx& ctx) -{ - ctx.print(" [update_scan"); - if (m_code != 0) { - const Code& code = getCode(); - ctx.print(" attrId="); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - if (i > 1) - ctx.print(","); - ctx.print("%u", (unsigned)code.m_attrId[i]); - } - } - Exec_base* a[] = { m_query }; - printList(ctx, a, 1); - ctx.print("]"); -} diff --git a/ndb/src/old_files/client/odbc/codegen/Code_update_scan.hpp b/ndb/src/old_files/client/odbc/codegen/Code_update_scan.hpp deleted file mode 100644 index d742883e561..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Code_update_scan.hpp +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_Code_update_scan_hpp -#define ODBC_CODEGEN_Code_update_scan_hpp - -#include -#include "Code_base.hpp" -#include "Code_dml.hpp" -#include "Code_table.hpp" -#include "Code_pred.hpp" -#include "Code_query.hpp" - -/** - * @class Plan_update_scan - * @brief Update in PlanTree - */ -class Plan_update_scan : public Plan_dml { -public: - Plan_update_scan(Plan_root* root); - virtual ~Plan_update_scan(); - Plan_base* analyze(Ctx& ctx, Ctl& ctl); - void describe(Ctx& ctx); - Exec_base* codegen(Ctx& ctx, Ctl& ctl); - void print(Ctx& ctx); - // children - void setTable(Plan_table* table); - void setDmlRow(Plan_dml_row* dmlRow); - void setQuery(Plan_query* query); -protected: - Plan_table* m_table; - Plan_dml_row* m_dmlRow; - Plan_query* m_query; -}; - -inline -Plan_update_scan::Plan_update_scan(Plan_root* root) : - Plan_dml(root), - m_table(0), - m_dmlRow(0), - m_query(0) -{ -} - -// children - -inline void -Plan_update_scan::setTable(Plan_table* table) -{ - ctx_assert(table != 0); - m_table = table; -} - -inline void -Plan_update_scan::setDmlRow(Plan_dml_row* dmlRow) -{ - ctx_assert(dmlRow != 0); - m_dmlRow = dmlRow; -} - -inline void -Plan_update_scan::setQuery(Plan_query* query) -{ - ctx_assert(query != 0); - m_query = query; -} - -/** - * @class Exec_update_scan - * @brief Insert in ExecTree - */ -class Exec_update_scan : public Exec_dml { -public: - class Code : public Exec_dml::Code { - public: - Code(); - virtual ~Code(); - protected: - friend class Plan_update_scan; - friend class Exec_update_scan; - unsigned m_attrCount; - NdbAttrId* m_attrId; - }; - class Data : public Exec_dml::Data { - public: - Data(); - virtual ~Data(); - protected: - friend class Exec_update_scan; - }; - Exec_update_scan(Exec_root* root); - virtual ~Exec_update_scan(); - void alloc(Ctx& ctx, Ctl& ctl); - void execImpl(Ctx& ctx, Ctl& ctl); - void close(Ctx& ctx); - void print(Ctx& ctx); - // children - const Code& getCode() const; - Data& getData() const; - void setQuery(Exec_query* query); -protected: - Exec_query* m_query; -}; - -inline -Exec_update_scan::Code::Code() : - m_attrCount(0), - m_attrId(0) -{ -} - -inline -Exec_update_scan::Data::Data() -{ -} - -inline -Exec_update_scan::Exec_update_scan(Exec_root* root) : - Exec_dml(root), - m_query(0) -{ -} - -// children - -inline const Exec_update_scan::Code& -Exec_update_scan::getCode() const -{ - const Code* code = static_cast(m_code); - return *code; -} - -inline Exec_update_scan::Data& -Exec_update_scan::getData() const -{ - Data* data = static_cast(m_data); - return *data; -} - -inline void -Exec_update_scan::setQuery(Exec_query* query) -{ - ctx_assert(query != 0 && m_query == 0); - m_query = query; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/Makefile b/ndb/src/old_files/client/odbc/codegen/Makefile deleted file mode 100644 index 49e5439556d..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/Makefile +++ /dev/null @@ -1,104 +0,0 @@ -include .defs.mk - -TYPE = * - -NONPIC_ARCHIVE = N - -PIC_ARCHIVE = Y - -ARCHIVE_TARGET = odbccodegen - -SOURCES = \ - SimpleScan.lpp \ - SimpleGram.ypp \ - SimpleParser.cpp \ - CodeGen.cpp \ - Code_base.cpp \ - Code_root.cpp \ - Code_stmt.cpp \ - Code_query.cpp \ - Code_dml.cpp \ - Code_ddl.cpp \ - Code_select.cpp \ - Code_pred.cpp \ - Code_pred_op.cpp \ - Code_comp_op.cpp \ - Code_query_project.cpp \ - Code_query_filter.cpp \ - Code_query_join.cpp \ - Code_query_lookup.cpp \ - Code_query_index.cpp \ - Code_query_scan.cpp \ - Code_query_range.cpp \ - Code_query_sys.cpp \ - Code_query_repeat.cpp \ - Code_query_count.cpp \ - Code_query_sort.cpp \ - Code_query_group.cpp \ - Code_query_distinct.cpp \ - Code_expr_row.cpp \ - Code_expr.cpp \ - Code_expr_op.cpp \ - Code_expr_func.cpp \ - Code_expr_conv.cpp \ - Code_expr_column.cpp \ - Code_expr_const.cpp \ - Code_expr_param.cpp \ - Code_update.cpp \ - Code_update_lookup.cpp \ - Code_update_index.cpp \ - Code_update_scan.cpp \ - Code_set_row.cpp \ - Code_insert.cpp \ - Code_dml_row.cpp \ - Code_dml_column.cpp \ - Code_delete.cpp \ - Code_delete_lookup.cpp \ - Code_delete_index.cpp \ - Code_delete_scan.cpp \ - Code_column.cpp \ - Code_table_list.cpp \ - Code_table.cpp \ - Code_create_table.cpp \ - Code_create_index.cpp \ - Code_create_row.cpp \ - Code_ddl_row.cpp \ - Code_ddl_column.cpp \ - Code_ddl_constr.cpp \ - Code_idx_column.cpp \ - Code_data_type.cpp \ - Code_drop_table.cpp \ - Code_drop_index.cpp - -ifeq ($(NDB_OS),WIN32) -CCFLAGS += -I$(call fixpath,.) - -_libs:: FlexLexer.h unistd.h - -endif - -include ../Extra.mk -include $(NDB_TOP)/Epilogue.mk - -ifeq ($(NDB_OS),LINUX) -FLEXHACK = perl -i -pe 's/\bisatty\b/ouencunbwdb2y1bdc/g' -BISONHACK = perl -i -pe 's/^\s*__attribute__\s*\(\(.*\)\)//' -endif - -ifeq ($(NDB_OS),MACOSX) -FLEXHACK = perl -i -pe 's/\bisatty\b/ouencunbwdb2y1bdc/g' -BISONHACK = perl -i -pe 's/^\s*__attribute__\s*\(\(.*\)\)//' -endif - -ifeq ($(NDB_OS),SOLARIS) -BISONHACK = perl -i -pe 's/^\s*__attribute__\s*\(\(.*\)\)//' -endif - -ifeq ($(NDB_OS),WIN32) -unistd.h: - touch unistd.h - -FlexLexer.h: - cp /usr/include/FlexLexer.h . - -endif diff --git a/ndb/src/old_files/client/odbc/codegen/SimpleGram.ypp b/ndb/src/old_files/client/odbc/codegen/SimpleGram.ypp deleted file mode 100644 index 07d8017e5ed..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/SimpleGram.ypp +++ /dev/null @@ -1,1649 +0,0 @@ -%{ - -#include -#include -#include -#include "CodeGen.hpp" -#include -#include "SimpleParser.hpp" - -/* redefine globals after headers */ -#define yyparse SimpleParser_yyparse -#if YYDEBUG -#define yydebug SimpleParser_yydebug -#endif - -#define YYLEX_PARAM simpleParserPtr -#define YYPARSE_PARAM simpleParserPtr -#define simpleParser (*static_cast(simpleParserPtr)) - -static int yylex(YYSTYPE* lvalp, void* simpleParserPtr); - -#define yyerror(s) simpleParser.parseError(s) - -#if YYDEBUG -// does not work in bison 1.75 -#undef stderr -#define stderr 0 -#define YYFPRINTF simpleParser.ctx().print -#endif - -// scanner states - -#define pushState(sc) simpleParser.pushState(sc) -#define popState() simpleParser.popState() - -#define StateEval SimpleParser_stateEval -#define StateType SimpleParser_stateType -#define StatePhys SimpleParser_statePhys -extern int SimpleParser_stateEval; -extern int SimpleParser_stateType; -extern int SimpleParser_statePhys; - -struct LimitPair { int off; int cnt; }; - -struct PhysAttr { int storage; int logging; }; - -%} - -%defines -%pure-parser -%verbose - -%union { - Plan_root* m_root; - Plan_stmt* m_stmt; - Plan_select* m_select; - Insert_op m_insert_op; - Plan_insert* m_insert; - Plan_update* m_update; - Plan_delete* m_delete; - Plan_create_table* m_create_table; - Plan_create_index* m_create_index; - NdbDictionary::Object::Type m_index_type; - Plan_create_row* m_create_row; - Plan_ddl_row* m_ddl_row; - Plan_ddl_column* m_ddl_column; - Plan_ddl_constr* m_ddl_constr; - Plan_idx_column* m_idx_column; - Plan_data_type* m_data_type; - Plan_drop_table* m_drop_table; - Plan_drop_index* m_drop_index; - Plan_set_row* m_set_row; - Plan_expr_row* m_expr_row; - bool m_asc_desc; - Plan_pred* m_pred; - Pred_op::Opcode m_pred_opcode; - Comp_op::Opcode m_comp_opcode; - Plan_expr* m_expr; - Expr_op::Opcode m_expr_opcode; - Plan_dml_row* m_dml_row; - Plan_dml_column* m_dml_column; - Plan_table* m_table; - Plan_table_list* m_table_list; - const char* m_string; - struct LimitPair* m_limit; - int m_signed_integer; - bool m_distinct; - struct PhysAttr* m_phys_attr; - NdbDictionary::Object::FragmentType m_storage_attr; - bool m_logging_attr; - SqlType::Type m_sql_type; -} - -/* keywords */ -%token - T_AND - T_ASC - T_AUTO_INCREMENT - T_BIGINT - T_BINARY - T_BLOB - T_BY - T_CHAR - T_CLOB - T_CONSTRAINT - T_CREATE - T_DATETIME - T_DEFAULT - T_DELETE - T_DESC - T_DISTINCT - T_DOUBLE - T_DROP - T_FLOAT - T_FOREIGN - T_FROM - T_GROUP - T_HASH - T_HAVING - T_IN - T_INDEX - T_INSERT - T_INT - T_INTEGER - T_INTO - T_IS - T_KEY - T_LARGE - T_LIKE - T_LIMIT - T_LOGGING - T_LONGBLOB - T_LONGCLOB - T_MEDIUM - T_NOLOGGING - T_NOT - T_NULL - T_OFFSET - T_ON - T_OR - T_ORDER - T_PRECISION - T_PRIMARY - T_REAL - T_REFERENCES - T_ROWNUM - T_SELECT - T_SET - T_SINGLE - T_SMALL - T_SMALLINT - T_STORAGE - T_SYSDATE - T_TABLE - T_UNIQUE - T_UNSIGNED - T_UPDATE - T_VALUES - T_VARBINARY - T_VARCHAR - T_WHERE - T_WRITE - -/* identifiers and constants */ -%token - T_IDENTIFIER - T_LINTEGER - T_LDECIMAL - T_LREAL - T_STRING - -/* expressions and predicates */ -%token - T_PLUS - T_MINUS - T_TIMES - T_DIVIDE - T_EQ - T_NOTEQ - T_LT - T_LTEQ - T_GT - T_GTEQ - T_QUES - -/* common special symbols */ -%token - T_PERIOD - T_COMMA - T_PARENLEFT - T_PARENRIGHT - T_ASTERISK - T_ASSIGN - -%type root -%type stmt -%type stmt_select -%type stmt_insert -%type insert_op -%type stmt_update -%type stmt_delete -%type create_table -%type create_index -%type index_type -%type create_row -%type create_column -%type create_constr -%type idx_column -%type data_type -%type ddl_row -%type ddl_column -%type drop_table -%type drop_index -%type asc_desc -%type set_row -%type expr_row -%type sort_row -%type where_clause -%type order_clause -%type pred -%type pred1 -%type pred1_op -%type pred2 -%type pred2_op -%type pred3 -%type pred3_op -%type pred4 -%type comp_op -%type expr -%type expr1 -%type expr1_op -%type expr2 -%type expr2_op -%type expr3 -%type expr3_op -%type expr4 -%type expr_column -%type dml_row -%type dml_column -%type value_row -%type value_expr -%type table -%type table_list -%type dot_identifier -%type limit_clause -%type signed_integer -%type distinct_clause -%type group_clause -%type having_clause -%type phys_attr -%type phys_attr2 -%type storage_attr -%type logging_attr -%type blob_type - -%% - -root: - stmt - { - Plan_root* root = simpleParser.root(); - root->setStmt($1); - } - ; -stmt: - stmt_select - { - $$ = $1; - } - | - stmt_insert - { - $$ = $1; - } - | - stmt_update - { - $$ = $1; - } - | - stmt_delete - { - $$ = $1; - } - | - create_table - { - $$ = $1; - } - | - create_index - { - $$ = $1; - } - | - drop_table - { - $$ = $1; - } - | - drop_index - { - $$ = $1; - } - ; -stmt_select: - T_SELECT distinct_clause expr_row T_FROM table_list where_clause group_clause having_clause order_clause limit_clause - { - Plan_root* root = simpleParser.root(); - Plan_select* stmt = new Plan_select(root); - root->saveNode(stmt); - stmt->setDistinct($2); - stmt->setRow($3); - stmt->setList($5); - if ($6 != 0) - stmt->setPred($6); - if ($7 != 0) - stmt->setGroup($7); - if ($8 != 0) - stmt->setHaving($8); - if ($9 != 0) - stmt->setSort($9); - if ($10 != 0) { - stmt->setLimit($10->off, $10->cnt); - delete $10; - } - $$ = stmt; - } - ; -stmt_insert: - insert_op T_INTO table T_VALUES T_PARENLEFT value_row T_PARENRIGHT - { - Plan_root* root = simpleParser.root(); - Plan_insert* stmt = new Plan_insert(root, $1); - root->saveNode(stmt); - stmt->setTable($3); - stmt->setExprRow($6); - $$ = stmt; - } - | - insert_op T_INTO table T_PARENLEFT dml_row T_PARENRIGHT T_VALUES T_PARENLEFT value_row T_PARENRIGHT - { - Plan_root* root = simpleParser.root(); - Plan_insert* stmt = new Plan_insert(root, $1); - root->saveNode(stmt); - stmt->setTable($3); - stmt->setDmlRow($5); - stmt->setExprRow($9); - $$ = stmt; - } - | - insert_op T_INTO table stmt_select - { - Plan_root* root = simpleParser.root(); - Plan_insert* stmt = new Plan_insert(root, $1); - root->saveNode(stmt); - stmt->setTable($3); - stmt->setSelect($4); - $$ = stmt; - } - | - insert_op T_INTO table T_PARENLEFT dml_row T_PARENRIGHT stmt_select - { - Plan_root* root = simpleParser.root(); - Plan_insert* stmt = new Plan_insert(root, $1); - root->saveNode(stmt); - stmt->setTable($3); - stmt->setDmlRow($5); - stmt->setSelect($7); - $$ = stmt; - } - | - insert_op T_INTO table T_SET set_row - { - Plan_root* root = simpleParser.root(); - Plan_insert* stmt = new Plan_insert(root, $1); - root->saveNode(stmt); - stmt->setTable($3); - stmt->setMysqlRow($5); - $$ = stmt; - } - ; -insert_op: - T_INSERT - { - $$ = Insert_op_insert; - } - | - T_WRITE - { - $$ = Insert_op_write; - } - ; -stmt_update: - T_UPDATE table T_SET set_row where_clause - { - Plan_root* root = simpleParser.root(); - Plan_update* stmt = new Plan_update(root); - root->saveNode(stmt); - stmt->setTable($2); - stmt->setRow($4); - if ($5 != 0) - stmt->setPred($5); - $$ = stmt; - } - ; -stmt_delete: - T_DELETE T_FROM table where_clause - { - Plan_root* root = simpleParser.root(); - Plan_delete* stmt = new Plan_delete(root); - root->saveNode(stmt); - stmt->setTable($3); - if ($4 != 0) - stmt->setPred($4); - $$ = stmt; - } - ; -create_table: - T_CREATE T_TABLE dot_identifier T_PARENLEFT create_row T_PARENRIGHT phys_attr - { - Plan_root* root = simpleParser.root(); - Plan_create_table* stmt = new Plan_create_table(root, $3); - root->saveNode(stmt); - delete[] $3; - stmt->setCreateRow($5); - if ($7->storage != -1) - stmt->setFragmentType((NdbDictionary::Object::FragmentType)$7->storage); - if ($7->logging != -1) - stmt->setLogging($7->logging); - delete $7; - $$ = stmt; - } - ; -create_row: - create_column - { - Plan_root* root = simpleParser.root(); - Plan_create_row* createRow = new Plan_create_row(root); - root->saveNode(createRow); - createRow->addColumn($1); - $$ = createRow; - } - | - create_constr - { - Plan_root* root = simpleParser.root(); - Plan_create_row* createRow = new Plan_create_row(root); - root->saveNode(createRow); - createRow->addConstr($1); - $$ = createRow; - } - | - create_row T_COMMA create_column - { - Plan_create_row* createRow = $1; - createRow->addColumn($3); - $$ = createRow; - } - | - create_row T_COMMA create_constr - { - Plan_create_row* createRow = $1; - createRow->addConstr($3); - $$ = createRow; - } - | - create_row T_COMMA create_ignore - { - $$ = $1; - } - ; -create_column: - T_IDENTIFIER { pushState(StateType); } data_type { popState(); } - { - Plan_root* root = simpleParser.root(); - Plan_ddl_column* ddlColumn = new Plan_ddl_column(root, $1); - root->saveNode(ddlColumn); - delete[] $1; - ddlColumn->setType($3); - simpleParser.curr(ddlColumn); - } - create_column_rest - { - $$ = simpleParser.curr((Plan_ddl_column*)0); - } - ; -data_type: - T_CHAR T_PARENLEFT T_LINTEGER T_PARENRIGHT dummy_binary - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(simpleParser.ctx(), SqlType::Char, atoi($3), true); - delete[] $3; - if (! simpleParser.ctx().ok()) { - YYABORT; - } - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_BINARY T_PARENLEFT T_LINTEGER T_PARENRIGHT - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(simpleParser.ctx(), SqlType::Binary, atoi($3), true); - delete[] $3; - if (! simpleParser.ctx().ok()) { - YYABORT; - } - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_VARCHAR T_PARENLEFT T_LINTEGER T_PARENRIGHT dummy_binary - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(simpleParser.ctx(), SqlType::Varchar, atoi($3), true); - delete[] $3; - if (! simpleParser.ctx().ok()) { - YYABORT; - } - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_VARBINARY T_PARENLEFT T_LINTEGER T_PARENRIGHT - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(simpleParser.ctx(), SqlType::Varbinary, atoi($3), true); - delete[] $3; - if (! simpleParser.ctx().ok()) { - YYABORT; - } - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_SMALLINT - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(SqlType::Smallint, true); - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_INTEGER - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(SqlType::Integer, true); - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_INT - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(SqlType::Integer, true); - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_BIGINT - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(SqlType::Bigint, true); - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_REAL - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(SqlType::Real, true); - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_FLOAT - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(SqlType::Double, true); - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_DOUBLE T_PRECISION - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(SqlType::Double, true); - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - T_DATETIME - { - Plan_root* root = simpleParser.root(); - SqlType sqlType(SqlType::Datetime, true); - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - | - blob_type - { - Plan_root* root = simpleParser.root(); - SqlType sqlType($1, true); - Plan_data_type* dataType = new Plan_data_type(root, sqlType); - root->saveNode(dataType); - $$ = dataType; - } - ; -dummy_binary: - /* empty */ - | - T_BINARY - ; -blob_type: - T_BLOB - { - $$ = SqlType::Blob; - } - | - T_LONGBLOB - { - $$ = SqlType::Blob; - } - | - T_CLOB - { - $$ = SqlType::Clob; - } - | - T_LONGCLOB - { - $$ = SqlType::Clob; - } - ; -create_column_rest: - /* empty */ - | - data_constr_list - ; -data_constr_list: - data_constr - | - data_constr_list data_constr - ; -data_constr: - T_NULL - | - T_NOT T_NULL - { - Plan_ddl_column* ddlColumn = simpleParser.curr((Plan_ddl_column*)0); - ddlColumn->setNotNull(); - } - | - T_UNSIGNED - { - Plan_ddl_column* ddlColumn = simpleParser.curr((Plan_ddl_column*)0); - ddlColumn->setUnSigned(); - } - | - T_PRIMARY T_KEY - { - Plan_ddl_column* ddlColumn = simpleParser.curr((Plan_ddl_column*)0); - ddlColumn->setPrimaryKey(); - } - | - T_AUTO_INCREMENT - { - Plan_ddl_column* ddlColumn = simpleParser.curr((Plan_ddl_column*)0); - ddlColumn->setAutoIncrement(); - } - | - T_DEFAULT expr - { - Plan_ddl_column* ddlColumn = simpleParser.curr((Plan_ddl_column*)0); - ddlColumn->setDefaultValue($2); - } - ; -create_constr: - T_PRIMARY T_KEY T_PARENLEFT ddl_row T_PARENRIGHT - { - Plan_root* root = simpleParser.root(); - Plan_ddl_constr* ddlConstr = new Plan_ddl_constr(root); - root->saveNode(ddlConstr); - ddlConstr->setRow($4); - $$ = ddlConstr; - } - | - T_CONSTRAINT dot_identifier T_PRIMARY T_KEY T_PARENLEFT ddl_row T_PARENRIGHT - { - Plan_root* root = simpleParser.root(); - Plan_ddl_constr* ddlConstr = new Plan_ddl_constr(root); - root->saveNode(ddlConstr); - ddlConstr->setRow($6); - $$ = ddlConstr; - } - ; -create_ignore: - T_INDEX dot_identifier T_PARENLEFT ddl_row T_PARENRIGHT - | - T_FOREIGN T_KEY T_PARENLEFT ddl_row T_PARENRIGHT T_REFERENCES dot_identifier T_PARENLEFT ddl_row T_PARENRIGHT - ; -ddl_row: - ddl_column - { - Plan_root* root = simpleParser.root(); - Plan_ddl_row* ddlRow = new Plan_ddl_row(root); - root->saveNode(ddlRow); - ddlRow->addColumn($1); - $$ = ddlRow; - } - | - ddl_row T_COMMA ddl_column - { - Plan_ddl_row* ddlRow = $1; - ddlRow->addColumn($3); - $$ = ddlRow; - } - ; -ddl_column: - T_IDENTIFIER - { - Plan_root* root = simpleParser.root(); - Plan_ddl_column* column = new Plan_ddl_column(root, $1); - root->saveNode(column); - delete[] $1; - $$ = column; - } - ; -create_index: - T_CREATE index_type T_INDEX dot_identifier T_ON table - { - Plan_root* root = simpleParser.root(); - Plan_create_index* stmt = new Plan_create_index(root, $4); - root->saveNode(stmt); - delete[] $4; - stmt->setType($2); - stmt->setTable($6); - simpleParser.curr(stmt); - } - T_PARENLEFT idx_row T_PARENRIGHT phys_attr - { - $$ = simpleParser.curr((Plan_create_index*)0); - if ($11->storage != -1) - $$->setFragmentType((NdbDictionary::Object::FragmentType)$11->storage); - if ($11->logging != -1) - $$->setLogging($11->logging); - delete $11; - } - ; -index_type: - T_HASH - { - $$ = NdbDictionary::Object::HashIndex; - } - | - T_UNIQUE T_HASH - { - $$ = NdbDictionary::Object::UniqueHashIndex; - } - | - /* empty */ - { - $$ = NdbDictionary::Object::OrderedIndex; - } - | - T_UNIQUE - { - $$ = NdbDictionary::Object::UniqueOrderedIndex; - } - ; -idx_row: - idx_column - { - } - | - idx_row T_COMMA idx_column - { - } - ; -idx_column: - T_IDENTIFIER - { - Plan_root* root = simpleParser.root(); - Plan_idx_column* column = new Plan_idx_column(root, $1); - root->saveNode(column); - delete[] $1; - Plan_create_index* stmt = simpleParser.curr((Plan_create_index*)0); - stmt->addColumn(column); - } - ; -phys_attr: - { pushState(StatePhys); } phys_attr2 { popState(); } - { - $$ = $2; - } - ; -phys_attr2: - /* empty */ - { - $$ = new PhysAttr(); - $$->storage = $$->logging = -1; - } - | - phys_attr2 storage_attr - { - if ($1->storage != -1 && $1->storage != $2) { - simpleParser.ctx().pushStatus(Sqlstate::_42000, Error::Gen, "conflicting STORAGE clauses"); - YYABORT; - } - $$->storage = $2; - } - | - phys_attr2 logging_attr - { - if ($1->logging != -1 && $1->logging != $2) { - simpleParser.ctx().pushStatus(Sqlstate::_42000, Error::Gen, "conflicting LOGGING clauses"); - YYABORT; - } - $$->logging = $2; - } - ; -logging_attr: - T_LOGGING - { - $$ = true; - } - | - T_NOLOGGING - { - $$ = false; - } - ; -storage_attr: - T_STORAGE T_PARENLEFT T_SINGLE T_PARENRIGHT - { - $$ = NdbDictionary::Object::FragSingle; - } - | - T_STORAGE T_PARENLEFT T_SMALL T_PARENRIGHT - { - $$ = NdbDictionary::Object::FragAllSmall; - } - | - T_STORAGE T_PARENLEFT T_MEDIUM T_PARENRIGHT - { - $$ = NdbDictionary::Object::FragAllMedium; - } - | - T_STORAGE T_PARENLEFT T_LARGE T_PARENRIGHT - { - $$ = NdbDictionary::Object::FragAllLarge; - } - ; -drop_table: - T_DROP T_TABLE dot_identifier - { - Plan_root* root = simpleParser.root(); - Plan_drop_table* stmt = new Plan_drop_table(root, $3); - root->saveNode(stmt); - delete[] $3; - $$ = stmt; - } - ; -drop_index: - T_DROP T_INDEX dot_identifier - { - Plan_root* root = simpleParser.root(); - Plan_drop_index* stmt = new Plan_drop_index(root, $3); - root->saveNode(stmt); - delete[] $3; - $$ = stmt; - } - | - T_DROP T_INDEX dot_identifier T_ON dot_identifier - { - Plan_root* root = simpleParser.root(); - Plan_drop_index* stmt = new Plan_drop_index(root, $3, $5); - root->saveNode(stmt); - delete[] $3; - delete[] $5; - $$ = stmt; - } - ; -distinct_clause: - /* empty */ - { - $$ = false; - } - | - T_DISTINCT - { - $$ = true; - } - ; -where_clause: - /* empty */ - { - $$ = 0; - } - | - T_WHERE pred - { - $$ = $2; - } - ; -group_clause: - /* empty */ - { - $$ = 0; - } - | - T_GROUP T_BY value_row - { - $$ = $3; - } - ; -having_clause: - /* empty */ - { - $$ = 0; - } - | - T_HAVING pred - { - $$ = $2; - } - ; -order_clause: - /* empty */ - { - $$ = 0; - } - | - T_ORDER T_BY sort_row - { - $$ = $3; - } - ; -limit_clause: - /* empty */ - { - $$ = 0; - } - | - T_LIMIT signed_integer - { - LimitPair* p = new LimitPair; - p->off = 0; - p->cnt = $2; - $$ = p; - } - | - T_LIMIT signed_integer T_COMMA signed_integer - { - LimitPair* p = new LimitPair; - p->off = $2, - p->cnt = $4; - $$ = p; - } - | - T_LIMIT signed_integer T_OFFSET signed_integer - { - LimitPair* p = new LimitPair; - p->off = $4; - p->cnt = $2; - $$ = p; - } - ; -signed_integer: - T_LINTEGER - { - $$ = atoi($1); - delete[] $1; - } - | - T_MINUS T_LINTEGER - { - $$ = (-1) * atoi($2); - delete[] $2; - } - ; -set_row: - dml_column T_ASSIGN expr - { - Plan_root* root = simpleParser.root(); - Plan_set_row* row = new Plan_set_row(root); - root->saveNode(row); - row->addColumn($1); - row->addExpr($3); - $$ = row; - } - | - set_row T_COMMA dml_column T_ASSIGN expr - { - Plan_set_row* row = $1; - row->addColumn($3); - row->addExpr($5); - $$ = row; - } - ; -dml_row: - dml_column - { - Plan_root* root = simpleParser.root(); - Plan_dml_row* row = new Plan_dml_row(root); - root->saveNode(row); - row->addColumn($1); - $$ = row; - } - | - dml_row T_COMMA dml_column - { - Plan_dml_row* row = $1; - row->addColumn($3); - $$ = row; - } - ; -dml_column: - T_IDENTIFIER - { - Plan_root* root = simpleParser.root(); - Plan_dml_column* column = new Plan_dml_column(root, $1); - root->saveNode(column); - delete[] $1; - $$ = column; - } - ; -value_row: - value_expr - { - Plan_root* root = simpleParser.root(); - Plan_expr_row* row = new Plan_expr_row(root); - root->saveNode(row); - row->addExpr($1); - $$ = row; - } - | - value_row T_COMMA value_expr - { - Plan_expr_row* row = $1; - row->addExpr($3); - $$ = row; - } - ; -value_expr: - expr - { - $$ = $1; - } - ; -sort_row: - expr asc_desc - { - Plan_root* root = simpleParser.root(); - Plan_expr_row* row = new Plan_expr_row(root); - root->saveNode(row); - row->addExpr($1, $2); - $$ = row; - } - | - sort_row T_COMMA expr asc_desc - { - Plan_expr_row* row = $1; - row->addExpr($3, $4); - $$ = row; - } - ; -asc_desc: - /* empty */ - { - $$ = true; - } - | - T_ASC - { - $$ = true; - } - | - T_DESC - { - $$ = false; - } - ; -expr_row: - T_ASTERISK - { - Plan_root* root = simpleParser.root(); - Plan_expr_row* row = new Plan_expr_row(root); - root->saveNode(row); - row->setAsterisk(); - $$ = row; - } - | - T_TIMES /* XXX fix scanner state */ - { - Plan_root* root = simpleParser.root(); - Plan_expr_row* row = new Plan_expr_row(root); - root->saveNode(row); - row->setAsterisk(); - $$ = row; - } - | - expr - { - Plan_root* root = simpleParser.root(); - Plan_expr_row* row = new Plan_expr_row(root); - root->saveNode(row); - row->addExpr($1); - $$ = row; - } - | - expr T_IDENTIFIER - { - Plan_root* root = simpleParser.root(); - Plan_expr_row* row = new Plan_expr_row(root); - root->saveNode(row); - row->addExpr($1, BaseString($2)); - $$ = row; - } - | - expr_row T_COMMA expr - { - Plan_expr_row* row = $1; - row->addExpr($3); - $$ = row; - } - | - expr_row T_COMMA expr T_IDENTIFIER - { - Plan_expr_row* row = $1; - row->addExpr($3, BaseString($4)); - $$ = row; - } - ; -pred: - { pushState(StateEval); } pred1 { popState(); } - { - $$ = $2; - } - ; -pred1: - pred2 - { - $$ = $1; - } - | - pred1 pred1_op pred2 - { - Plan_root* root = simpleParser.root(); - Pred_op op($2); - Plan_pred_op* pred = new Plan_pred_op(root, op); - root->saveNode(pred); - pred->setPred(1, $1); - pred->setPred(2, $3); - $$ = pred; - } - ; -pred1_op: - T_OR - { - $$ = Pred_op::Or; - } - ; -pred2: - pred3 - { - $$ = $1; - } - | - pred2 pred2_op pred3 - { - Plan_root* root = simpleParser.root(); - Pred_op op($2); - Plan_pred_op* pred = new Plan_pred_op(root, op); - root->saveNode(pred); - pred->setPred(1, $1); - pred->setPred(2, $3); - $$ = pred; - } - ; -pred2_op: - T_AND - { - $$ = Pred_op::And; - } - ; -pred3: - pred4 - { - $$ = $1; - } - | - pred3_op pred3 - { - Plan_root* root = simpleParser.root(); - Pred_op op($1); - Plan_pred_op* pred = new Plan_pred_op(root, op); - root->saveNode(pred); - pred->setPred(1, $2); - $$ = pred; - } - ; -pred3_op: - T_NOT - { - $$ = Pred_op::Not; - } - ; -pred4: - T_PARENLEFT pred1 T_PARENRIGHT - { - $$ = $2; - } - | - expr1 comp_op expr1 - { - Plan_root* root = simpleParser.root(); - Comp_op op($2); - Plan_comp_op* comp = new Plan_comp_op(root, op); - root->saveNode(comp); - comp->setExpr(1, $1); - comp->setExpr(2, $3); - $$ = comp; - } - | - expr1 T_IS T_NULL - { - Plan_root* root = simpleParser.root(); - Comp_op op(Comp_op::Isnull); - Plan_comp_op* comp = new Plan_comp_op(root, op); - root->saveNode(comp); - comp->setExpr(1, $1); - $$ = comp; - } - | - expr1 T_IS T_NOT T_NULL - { - Plan_root* root = simpleParser.root(); - Comp_op op(Comp_op::Isnotnull); - Plan_comp_op* comp = new Plan_comp_op(root, op); - root->saveNode(comp); - comp->setExpr(1, $1); - $$ = comp; - } - | - expr1 T_IN T_PARENLEFT value_row T_PARENRIGHT - { - Plan_root* root = simpleParser.root(); - Plan_pred* predOut = 0; // hack directly into Or of Eq - Plan_expr* exprLeft = $1; - Plan_expr_row* row = $4; - for (unsigned i = row->getSize(); i >= 1; i--) { - Plan_expr* exprRight = row->getExpr(i); - Plan_comp_op* comp = new Plan_comp_op(root, Comp_op::Eq); - root->saveNode(comp); - comp->setExpr(1, exprLeft); - comp->setExpr(2, exprRight); - if (predOut == 0) { - predOut = comp; - } else { - Plan_pred_op* pred = new Plan_pred_op(root, Pred_op::Or); - root->saveNode(pred); - pred->setPred(1, predOut); - pred->setPred(2, comp); - predOut = pred; - } - } - $$ = predOut; - } - | - expr1 T_NOT T_IN T_PARENLEFT value_row T_PARENRIGHT - { - Plan_root* root = simpleParser.root(); - Plan_pred* predOut = 0; // hack directly into And of Noteq - Plan_expr* exprLeft = $1; - Plan_expr_row* row = $5; - for (unsigned i = row->getSize(); i >= 1; i--) { - Plan_expr* exprRight = row->getExpr(i); - Plan_comp_op* comp = new Plan_comp_op(root, Comp_op::Noteq); - root->saveNode(comp); - comp->setExpr(1, exprLeft); - comp->setExpr(2, exprRight); - if (predOut == 0) { - predOut = comp; - } else { - Plan_pred_op* pred = new Plan_pred_op(root, Pred_op::And); - root->saveNode(pred); - pred->setPred(1, predOut); - pred->setPred(2, comp); - predOut = pred; - } - } - $$ = predOut; - } - ; -comp_op: - T_EQ - { - $$ = Comp_op::Eq; - } - | - T_NOTEQ - { - $$ = Comp_op::Noteq; - } - | - T_LT - { - $$ = Comp_op::Lt; - } - | - T_LTEQ - { - $$ = Comp_op::Lteq; - } - | - T_GT - { - $$ = Comp_op::Gt; - } - | - T_GTEQ - { - $$ = Comp_op::Gteq; - } - | - T_LIKE - { - $$ = Comp_op::Like; - } - | - T_NOT T_LIKE - { - $$ = Comp_op::Notlike; - } - ; -expr: - { pushState(StateEval); } expr1 { popState(); } - { - $$ = $2; - } - ; -expr1: - expr2 - { - $$ = $1; - } - | - expr1 expr1_op expr2 - { - Plan_root* root = simpleParser.root(); - Expr_op op($2); - Plan_expr_op* expr = new Plan_expr_op(root, op); - root->saveNode(expr); - expr->setExpr(1, $1); - expr->setExpr(2, $3); - $$ = expr; - } - ; -expr1_op: - T_PLUS - { - $$ = Expr_op::Add; - } - | - T_MINUS - { - $$ = Expr_op::Subtract; - } - ; -expr2: - expr3 - { - $$ = $1; - } - | - expr2 expr2_op expr3 - { - Plan_root* root = simpleParser.root(); - Expr_op op($2); - Plan_expr_op* expr = new Plan_expr_op(root, op); - root->saveNode(expr); - expr->setExpr(1, $1); - expr->setExpr(2, $3); - $$ = expr; - } - ; -expr2_op: - T_TIMES - { - $$ = Expr_op::Multiply; - } - | - T_DIVIDE - { - $$ = Expr_op::Divide; - } - ; -expr3: - expr4 - { - $$ = $1; - } - | - expr3_op expr3 - { - Plan_root* root = simpleParser.root(); - Expr_op op($1); - Plan_expr_op* expr = new Plan_expr_op(root, op); - root->saveNode(expr); - expr->setExpr(1, $2); - $$ = expr; - } - ; -expr3_op: - T_PLUS - { - $$ = Expr_op::Plus; - } - | - T_MINUS - { - $$ = Expr_op::Minus; - } - ; -expr4: - T_PARENLEFT expr1 T_PARENRIGHT - { - $$ = $2; - } - | - T_IDENTIFIER T_PARENLEFT expr_row T_PARENRIGHT - { - Plan_root* root = simpleParser.root(); - const Expr_func& spec = Expr_func::find($1); - if (spec.m_name == 0) { - simpleParser.ctx().pushStatus(Sqlstate::_42000, Error::Gen, "unknown function %s", $1); - delete[] $1; - YYABORT; - } - Plan_expr_func* func = new Plan_expr_func(root, spec); - root->saveNode(func); - delete[] $1; - func->setArgs($3); - $$ = func; - } - | - T_ROWNUM - { - Plan_root* root = simpleParser.root(); - const Expr_func& spec = Expr_func::find("ROWNUM"); - ctx_assert(spec.m_name != 0); - Plan_expr_func* func = new Plan_expr_func(root, spec); - root->saveNode(func); - func->setArgs(0); - $$ = func; - } - | - T_SYSDATE - { - Plan_root* root = simpleParser.root(); - const Expr_func& spec = Expr_func::find("SYSDATE"); - ctx_assert(spec.m_name != 0); - Plan_expr_func* func = new Plan_expr_func(root, spec); - root->saveNode(func); - func->setArgs(0); - $$ = func; - } - | - expr_column - { - $$ = $1; - } - | - T_STRING - { - Plan_root* root = simpleParser.root(); - LexType lexType(LexType::Char); - Plan_expr_const* expr = new Plan_expr_const(root, lexType, $1); - root->saveNode(expr); - delete[] $1; - $$ = expr; - } - | - T_LINTEGER - { - Plan_root* root = simpleParser.root(); - LexType lexType(LexType::Integer); - Plan_expr_const* expr = new Plan_expr_const(root, lexType, $1); - root->saveNode(expr); - delete[] $1; - $$ = expr; - } - | - T_LDECIMAL - { - Plan_root* root = simpleParser.root(); - LexType lexType(LexType::Float); - Plan_expr_const* expr = new Plan_expr_const(root, lexType, $1); - root->saveNode(expr); - delete[] $1; - $$ = expr; - } - | - T_LREAL - { - Plan_root* root = simpleParser.root(); - LexType lexType(LexType::Float); - Plan_expr_const* expr = new Plan_expr_const(root, lexType, $1); - root->saveNode(expr); - delete[] $1; - $$ = expr; - } - | - T_NULL - { - Plan_root* root = simpleParser.root(); - LexType lexType(LexType::Null); - Plan_expr_const* expr = new Plan_expr_const(root, lexType, ""); - root->saveNode(expr); - $$ = expr; - } - | - T_QUES - { - Plan_root* root = simpleParser.root(); - unsigned paramNumber = simpleParser.paramNumber(); - ctx_assert(paramNumber != 0); - Plan_expr_param* expr = new Plan_expr_param(root, paramNumber); - root->saveNode(expr); - $$ = expr; - } - ; -expr_column: - T_IDENTIFIER - { - Plan_root* root = simpleParser.root(); - Plan_expr_column* column = new Plan_expr_column(root, $1); - root->saveNode(column); - delete[] $1; - $$ = column; - } - | - T_IDENTIFIER T_PERIOD T_IDENTIFIER - { - Plan_root* root = simpleParser.root(); - Plan_expr_column* column = new Plan_expr_column(root, $3); - root->saveNode(column); - delete[] $3; - column->setCname($1); - $$ = column; - } - | - T_IDENTIFIER T_PERIOD T_IDENTIFIER T_PERIOD T_IDENTIFIER - { - Plan_root* root = simpleParser.root(); - BaseString str; - str.append($1); - str.append("."); - str.append($3); - delete[] $1; - delete[] $3; - Plan_expr_column* column = new Plan_expr_column(root, $5); - root->saveNode(column); - delete[] $5; - column->setCname(str); - $$ = column; - } - ; -table_list: - table - { - Plan_root* root = simpleParser.root(); - Plan_table_list* tableList = new Plan_table_list(root); - root->saveNode(tableList); - tableList->addTable($1); - $$ = tableList; - } - | - table_list T_COMMA table - { - Plan_table_list* tableList = $1; - tableList->addTable($3); - $$ = tableList; - } - ; -table: - dot_identifier - { - Plan_root* root = simpleParser.root(); - Plan_table* table = new Plan_table(root, $1); - root->saveNode(table); - delete[] $1; - $$ = table; - } - | - dot_identifier T_IDENTIFIER - { - Plan_root* root = simpleParser.root(); - Plan_table* table = new Plan_table(root, $1); - root->saveNode(table); - delete[] $1; - table->setCname($2); - delete[] $2; - $$ = table; - } - ; -dot_identifier: - T_IDENTIFIER - { - $$ = $1; - } - | - T_IDENTIFIER T_PERIOD T_IDENTIFIER - { - char* s = new char[strlen($1) + 1 + strlen($3) + 1]; - strcpy(s, $1); - strcat(s, "."); - strcat(s, $3); - delete[] $1; - delete[] $3; - $$ = s; - } - ; - -%% - -static int -yylex(YYSTYPE* lvalp, void* simpleParserPtr) -{ - int ret = simpleParser.yylex(); - *lvalp = simpleParser.yylval(); - return ret; -} - -/* vim: set filetype=yacc: */ diff --git a/ndb/src/old_files/client/odbc/codegen/SimpleParser.cpp b/ndb/src/old_files/client/odbc/codegen/SimpleParser.cpp deleted file mode 100644 index a2418f49e37..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/SimpleParser.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include "SimpleParser.hpp" - -SimpleParser::~SimpleParser() -{ -} - -#ifdef NDB_WIN32 -static NdbMutex & parse_mutex = * NdbMutex_Create(); -#else -static NdbMutex parse_mutex = NDB_MUTEX_INITIALIZER; -#endif - -void -SimpleParser::yyparse() -{ - Ctx& ctx = this->ctx(); - NdbMutex_Lock(&parse_mutex); - ctx_log2(("parse: %s", stmtArea().sqlText().c_str())); -#if YYDEBUG - SimpleParser_yydebug = (m_ctx.logLevel() >= 5); -#endif - SimpleParser_yyparse((void*)this); - NdbMutex_Unlock(&parse_mutex); -} - -void -SimpleParser::pushState(int sc) -{ - yy_push_state(sc); - m_stacksize++; -} - -void -SimpleParser::popState() -{ - ctx_assert(m_stacksize > 0); - yy_pop_state(); - m_stacksize--; -} - -void -SimpleParser::parseError(const char* msg) -{ - ctx().pushStatus(Sqlstate::_42000, Error::Gen, "%s at '%*s' position %u", msg, yyleng, yytext, m_parsePos - yyleng); -} - -int -SimpleParser::LexerInput(char* buf, int max_size) -{ - const BaseString& text = stmtArea().sqlText(); - int n = 0; - const char* const t = text.c_str(); - const unsigned m = text.length(); - while (n < max_size && m_textPos < m) { - buf[n++] = t[m_textPos++]; - m_parsePos++; // XXX simple hack - break; - } - return n; -} - -// XXX just a catch-all (scanner should match all input) -void -SimpleParser::LexerOutput(const char* buf, int size) -{ - if (! ctx().ok()) - return; - const char* msg = "unrecognized input"; - ctx().pushStatus(Sqlstate::_42000, Error::Gen, "%s at '%*s' position %u", msg, size, buf, m_parsePos); -} - -void -SimpleParser::LexerError(const char* msg) -{ - ctx().pushStatus(Sqlstate::_42000, Error::Gen, "%s at '%*s' position %u", msg, yyleng, yytext, m_parsePos); -} diff --git a/ndb/src/old_files/client/odbc/codegen/SimpleParser.hpp b/ndb/src/old_files/client/odbc/codegen/SimpleParser.hpp deleted file mode 100644 index abadae8f905..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/SimpleParser.hpp +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_SimpleParser_hpp -#define ODBC_CODEGEN_SimpleParser_hpp - -#include -#include "Code_root.hpp" -#include "Code_stmt.hpp" -#include "Code_select.hpp" -#include "Code_pred.hpp" -#include "Code_pred_op.hpp" -#include "Code_comp_op.hpp" -#include "Code_expr_row.hpp" -#include "Code_expr.hpp" -#include "Code_expr_op.hpp" -#include "Code_expr_func.hpp" -#include "Code_expr_column.hpp" -#include "Code_expr_const.hpp" -#include "Code_expr_param.hpp" -#include "Code_update.hpp" -#include "Code_set_row.hpp" -#include "Code_insert.hpp" -#include "Code_dml_row.hpp" -#include "Code_dml_column.hpp" -#include "Code_delete.hpp" -#include "Code_table_list.hpp" -#include "Code_table.hpp" -#include "Code_create_table.hpp" -#include "Code_create_index.hpp" -#include "Code_ddl_row.hpp" -#include "Code_ddl_column.hpp" -#include "Code_ddl_constr.hpp" -#include "Code_data_type.hpp" -#include "Code_drop_table.hpp" -#include "Code_drop_index.hpp" - -#include "SimpleGram.tab.hpp" - -class StmtArea; -class Plan_root; - -class SimpleParser : public yyFlexLexer { -public: - SimpleParser(Ctx& ctx, StmtArea& stmtArea, Plan_root* root); - ~SimpleParser(); - Ctx& ctx(); - StmtArea& stmtArea(); - Plan_root* root(); - void yyparse(); // calls real yyparse - int yylex(); // generated by flex - YYSTYPE yylval(); - void pushState(int sc); // push start condition - void popState(); // pop start condition - unsigned paramNumber() const; - void parseError(const char* msg); - // parser helpers - to avoid creating new Plan tree types - Plan_ddl_column* curr(Plan_ddl_column* p); - Plan_create_index* curr(Plan_create_index* p); -protected: - virtual int LexerInput(char* buf, int max_size); - virtual void LexerOutput(const char* buf, int size); - virtual void LexerError(const char* msg); -private: - Ctx& m_ctx; - StmtArea& m_stmtArea; - Plan_root* const m_root; - unsigned m_textPos; // position in sql text - unsigned m_parsePos; // parse position, to report error - YYSTYPE m_yylval; // token value - BaseString m_string; // storage for edited string token - unsigned m_stacksize; // state stack size - unsigned m_paramNumber; // parameter number - // parser helpers - Plan_ddl_column* m_ddl_column; - Plan_create_index* m_create_index; -}; - -extern int SimpleParser_yyparse(void* simpleParserPtr); -#if YYDEBUG -extern int SimpleParser_yydebug; -#endif - -inline -SimpleParser::SimpleParser(Ctx& ctx, StmtArea& stmtArea, Plan_root* root) : - m_ctx(ctx), - m_stmtArea(stmtArea), - m_root(root), - m_textPos(0), - m_parsePos(0), - m_stacksize(0), - m_paramNumber(0), - // parser helpers - m_ddl_column(0) -{ -} - -inline Ctx& -SimpleParser::ctx() -{ - return m_ctx; -} - -inline StmtArea& -SimpleParser::stmtArea() -{ - return m_stmtArea; -} - -inline Plan_root* -SimpleParser::root() -{ - return m_root; -} - -inline YYSTYPE -SimpleParser::yylval() -{ - return m_yylval; -} - -inline unsigned -SimpleParser::paramNumber() const -{ - return m_paramNumber; -} - -// parser helpers - -inline Plan_ddl_column* -SimpleParser::curr(Plan_ddl_column* p) -{ - if (p != 0) - m_ddl_column = p; - ctx_assert(m_ddl_column != 0); - return m_ddl_column; -} - -inline Plan_create_index* -SimpleParser::curr(Plan_create_index* p) -{ - if (p != 0) - m_create_index = p; - ctx_assert(m_create_index != 0); - return m_create_index; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/codegen/SimpleScan.lpp b/ndb/src/old_files/client/odbc/codegen/SimpleScan.lpp deleted file mode 100644 index 29aa876f669..00000000000 --- a/ndb/src/old_files/client/odbc/codegen/SimpleScan.lpp +++ /dev/null @@ -1,243 +0,0 @@ -%{ -#include -#include "SimpleParser.hpp" - -struct SqlKeyword { - const char* m_name; - int m_value; - int m_state; - static const SqlKeyword* find(Ctx& ctx, const char* name, int state); -}; - -%} - -%option c++ -%option yyclass="SimpleParser" -%option stack -%option noyywrap - -space [\040\t\n\r\f] -digit [0-9] -letter [A-Za-z_] -special ("$") -identifier ({letter}({letter}|{digit}|{special})*) -integer {digit}++ -decimal (({digit}*\.{digit}+)|({digit}+\.{digit}*)) -real ((({digit}*\.{digit}+)|({digit}+\.{digit}*)|({digit}+))([Ee][-+]?{digit}+)) - -%s StateEval -%s StateType -%s StatePhys -%x StateString -%x StateQuoted - -%% - -{space} { - } -{identifier} { - const SqlKeyword* key = SqlKeyword::find(m_ctx, (char*)yytext, YYSTATE); - if (key != 0) - return key->m_value; - for (unsigned char* a = (unsigned char*)yytext; *a != 0; a++) { - if (islower(*a)) - *a = toupper(*a); - } - m_yylval.m_string = strcpy(new char[yyleng + 1], yytext); - return T_IDENTIFIER; - } -{integer} { - m_yylval.m_string = strcpy(new char[yyleng + 1], yytext); - return T_LINTEGER; - } -{decimal} { - m_yylval.m_string = strcpy(new char[yyleng + 1], yytext); - return T_LDECIMAL; - } -{real} { - m_yylval.m_string = strcpy(new char[yyleng + 1], yytext); - return T_LREAL; - } -"--".* { - } -"/*" { - int c = 0, d; - while (1) { - d = c; - if ((c = yyinput()) == EOF) { - parseError("unterminated comment"); - yyterminate(); - } - if (d == '*' && c == '/') - break; - } - } -{ -"+" return T_PLUS; -"-" return T_MINUS; -"*" return T_TIMES; -"/" return T_DIVIDE; -"=" return T_EQ; -"!=" return T_NOTEQ; -"^=" return T_NOTEQ; -"<>" return T_NOTEQ; -"<" return T_LT; -"<=" return T_LTEQ; -">" return T_GT; -">=" return T_GTEQ; -"?" m_paramNumber++; return T_QUES; -} - -"." return T_PERIOD; -"," return T_COMMA; -"(" return T_PARENLEFT; -")" return T_PARENRIGHT; -"*" return T_ASTERISK; -"=" return T_ASSIGN; - -"'" { - pushState(StateString); - m_string.assign(""); - } -{ -[^']* { - m_string.append(yytext); - } -"''" { - m_string.append("'"); - } -"'" { - m_yylval.m_string = strcpy(new char[m_string.length() + 1], m_string.c_str()); - popState(); - return T_STRING; - } -} - -\" { - pushState(StateQuoted); - m_string.assign(""); - } -{ -[^"]* { - m_string.append(yytext); - } -\\\" { - m_string.append("\""); - } -\" { - m_yylval.m_string = strcpy(new char[m_string.length() + 1], m_string.c_str()); - popState(); - return T_IDENTIFIER; - } -} - -%% - -// scan states -int SimpleParser_stateEval = StateEval; -int SimpleParser_stateType = StateType; -int SimpleParser_statePhys = StatePhys; - -// keep sorted - -static const SqlKeyword sqlKeyword[] = { - { "AND", T_AND, -1 }, - { "ASC", T_ASC, -1 }, - { "AUTO_INCREMENT", T_AUTO_INCREMENT, -1 }, - { "BIGINT", T_BIGINT, StateType }, - { "BINARY", T_BINARY, StateType }, - { "BLOB", T_BLOB, StateType }, - { "BY", T_BY, -1 }, - { "CHAR", T_CHAR, StateType }, - { "CLOB", T_CLOB, StateType }, - { "CONSTRAINT", T_CONSTRAINT, -1 }, - { "CREATE", T_CREATE, -1 }, - { "DATETIME", T_DATETIME, StateType }, - { "DEFAULT", T_DEFAULT, -1 }, - { "DELETE", T_DELETE, -1 }, - { "DESC", T_DESC, -1 }, - { "DISTINCT", T_DISTINCT, -1 }, - { "DOUBLE", T_DOUBLE, StateType }, - { "DROP", T_DROP, -1 }, - { "FLOAT", T_FLOAT, StateType }, - { "FOREIGN", T_FOREIGN, -1 }, - { "FROM", T_FROM, -1 }, - { "GROUP", T_GROUP, -1 }, - { "HASH", T_HASH, -1 }, - { "HAVING", T_HAVING, -1 }, - { "IN", T_IN, -1 }, - { "INDEX", T_INDEX, -1 }, - { "INSERT", T_INSERT, -1 }, - { "INT", T_INT, StateType }, - { "INTEGER", T_INTEGER, StateType }, - { "INTO", T_INTO, -1 }, - { "IS", T_IS, -1 }, - { "KEY", T_KEY, -1 }, - { "LARGE", T_LARGE, StatePhys }, - { "LIKE", T_LIKE, -1 }, - { "LIMIT", T_LIMIT, -1 }, - { "LOGGING", T_LOGGING, StatePhys }, - { "LONGBLOB", T_LONGBLOB, StateType }, - { "LONGCLOB", T_LONGCLOB, StateType }, - { "MEDIUM", T_MEDIUM, StatePhys }, - { "NOLOGGING", T_NOLOGGING, StatePhys }, - { "NOT", T_NOT, -1 }, - { "NULL", T_NULL, -1 }, - { "OFFSET", T_OFFSET, -1 }, - { "ON", T_ON, -1 }, - { "OR", T_OR, -1 }, - { "ORDER", T_ORDER, -1 }, - { "PRECISION", T_PRECISION, StateType }, - { "PRIMARY", T_PRIMARY, -1 }, - { "REAL", T_REAL, StateType }, - { "REFERENCES", T_REFERENCES, -1 }, - { "ROWNUM", T_ROWNUM, -1 }, - { "SELECT", T_SELECT, -1 }, - { "SET", T_SET, -1 }, - { "SINGLE", T_SINGLE, StatePhys }, - { "SMALL", T_SMALL, StatePhys }, - { "SMALLINT", T_SMALLINT, StateType }, - { "STORAGE", T_STORAGE, StatePhys }, - { "SYSDATE", T_SYSDATE, -1 }, - { "TABLE", T_TABLE, -1 }, - { "UNIQUE", T_UNIQUE, -1 }, - { "UNSIGNED", T_UNSIGNED, -1 }, - { "UPDATE", T_UPDATE, -1 }, - { "VALUES", T_VALUES, -1 }, - { "VARBINARY", T_VARBINARY, StateType }, - { "VARCHAR", T_VARCHAR, StateType }, - { "WHERE", T_WHERE, -1 }, - { "WRITE", T_WRITE, -1 } -}; - -static const unsigned sqlKeywordCount = sizeof(sqlKeyword) / sizeof(sqlKeyword[0]); - -const SqlKeyword* -SqlKeyword::find(Ctx& ctx, const char* name, int state) -{ - ctx_log4(("find keyword '%s' lex state = %d", name, state)); - const unsigned maxlen = 99; - char buf[maxlen + 1]; - char* a = buf; - const char* b = name; - while (*b != 0) { - if (a >= buf + maxlen) // will not be found - break; - char c = *b++; - if ('a' <= c && c <= 'z') // locale independent - c -= 'a' - 'A'; - *a++ = c; - } - *a = 0; - for (unsigned i = 0; i < sqlKeywordCount; i++) { - const SqlKeyword* key = &sqlKeyword[i]; - if (strcmp(key->m_name, buf) == 0) { - if (key->m_state != -1 && key->m_state != state) - return 0; - return key; - } - } - return 0; -} - -/* vim: set filetype=lex: */ diff --git a/ndb/src/old_files/client/odbc/common/AttrArea.cpp b/ndb/src/old_files/client/odbc/common/AttrArea.cpp deleted file mode 100644 index ff9e085a7f6..00000000000 --- a/ndb/src/old_files/client/odbc/common/AttrArea.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "AttrArea.hpp" - -// AttrSpec - -// AttrField - -// AttrArea - -AttrArea::AttrArea(const AttrSpec* specList) : - m_specList(specList) -{ -} - -AttrArea::~AttrArea() -{ -} - -const AttrSpec& -AttrArea::findSpec(int id) const -{ - const AttrSpec* p; - for (p = m_specList; p->m_mode != Attr_mode_undef; p++) { - if (p->m_id == id) - break; - } - return *p; -} - -void -AttrArea::setAttr(Ctx& ctx, int id, const OdbcData& data) -{ - const AttrSpec& spec = findSpec(id); - if (spec.m_mode == Attr_mode_undef) { - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "undefined attribute id %d", id); - return; - } - ctx_assert(spec.m_type == data.type()); - ctx_assert(spec.m_set != 0); - spec.m_set(ctx, m_handle, data); - if (! ctx.ok()) - return; - Fields::iterator iter; - if (ctx.logLevel() >= 3) { - char buf[100]; - data.print(buf, sizeof(buf)); - ctx_log3(("attr handle 0x%x set id %d = %s", (unsigned)m_handle, id, buf)); - } - iter = m_fields.find(id); - if (iter != m_fields.end()) { - AttrField& field = (*iter).second; - field.setData(data); - return; - } - AttrField field(spec, data); - m_fields.insert(Fields::value_type(id, field)); -} - -void -AttrArea::getAttr(Ctx& ctx, int id, OdbcData& data) -{ - const AttrSpec& spec = findSpec(id); - if (spec.m_mode == Attr_mode_undef) { - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "undefined attribute id %d", id); - return; - } - Fields::iterator iter; - iter = m_fields.find(id); - if (iter != m_fields.end()) { - AttrField& field = (*iter).second; - data.setValue(field.getData()); - return; - } - ctx_assert(spec.m_default != 0); - spec.m_default(ctx, m_handle, data); -} diff --git a/ndb/src/old_files/client/odbc/common/AttrArea.hpp b/ndb/src/old_files/client/odbc/common/AttrArea.hpp deleted file mode 100644 index 050cce719bf..00000000000 --- a/ndb/src/old_files/client/odbc/common/AttrArea.hpp +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_HANDLES_AttrArea_hpp -#define ODBC_HANDLES_AttrArea_hpp - -#include -#include -#include "OdbcData.hpp" - -class HandleBase; - -enum AttrMode { - Attr_mode_undef, - Attr_mode_readonly, - Attr_mode_writeonly, - Attr_mode_readwrite -}; - -/** - * @struct AttrSpec - * @brief Attribute specifier - * - * Each handle class has a list of attribute specifiers. - */ -struct AttrSpec { - int m_id; // SQL_ATTR_ identifier - OdbcData::Type m_type; // data type - AttrMode m_mode; // access mode, undef indicates end of list - /** - * Callback for checks and side effects. Called before the - * attribute is stored. May set error status. - */ - typedef void CallbackSet(Ctx& ctx, HandleBase* self, const OdbcData& data); - CallbackSet* m_set; - /** - * Callback to set default value. May set error status. - */ - typedef void CallbackDefault(Ctx& ctx, HandleBase* self, OdbcData& data); - CallbackDefault* m_default; -}; - -/** - * @class AttrField - * @brief Attribute value (stored as OdbcData) - */ -class AttrField { -public: - AttrField(const AttrSpec& attrSpec, const OdbcData& data); - AttrField(const AttrField& field); - ~AttrField(); - void setData(const OdbcData& data); - const OdbcData& getData(); -private: - const AttrSpec& m_spec; - OdbcData m_data; -}; - -inline -AttrField::AttrField(const AttrSpec& spec, const OdbcData& data) : - m_spec(spec), - m_data(data) -{ -} - -inline -AttrField::AttrField(const AttrField& field) : - m_spec(field.m_spec), - m_data(field.m_data) -{ -} - -inline -AttrField::~AttrField() -{ -} - -inline void -AttrField::setData(const OdbcData& data) -{ - ctx_assert(m_spec.m_type == data.type()); - m_data.setValue(data); -} - -inline const OdbcData& -AttrField::getData() -{ - ctx_assert(m_data.type() != OdbcData::Undef); - return m_data; -} - -/** - * @class AttrArea - * @brief Handle attributes - * - * Each handle instance has a list of attribute values stored - * under an AttrArea. Callbacks to handle code provide for - * default values, extra checks, and side-effects. - */ -class AttrArea { -public: - AttrArea(const AttrSpec* specList); - ~AttrArea(); - void setHandle(HandleBase* handle); - const AttrSpec& findSpec(int id) const; - void setAttr(Ctx& ctx, int id, const OdbcData& data); - void getAttr(Ctx& ctx, int id, OdbcData& data); -private: - HandleBase* m_handle; - const AttrSpec* const m_specList; - typedef std::map Fields; - Fields m_fields; -}; - -inline void -AttrArea::setHandle(HandleBase* handle) -{ - ctx_assert(handle != 0); - m_handle = handle; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/CodeTree.cpp b/ndb/src/old_files/client/odbc/common/CodeTree.cpp deleted file mode 100644 index ebe4840c5f6..00000000000 --- a/ndb/src/old_files/client/odbc/common/CodeTree.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "CodeTree.hpp" - -// PlanTree - -PlanTree::~PlanTree() -{ -} - -// ExecTree - -ExecTree::Code::~Code() -{ -} - -ExecTree::Data::~Data() -{ -} - -ExecTree::~ExecTree() -{ -} diff --git a/ndb/src/old_files/client/odbc/common/CodeTree.hpp b/ndb/src/old_files/client/odbc/common/CodeTree.hpp deleted file mode 100644 index 1b0ae3199af..00000000000 --- a/ndb/src/old_files/client/odbc/common/CodeTree.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_CODEGEN_CodeTree_hpp -#define ODBC_CODEGEN_CodeTree_hpp - -#include - -/* - * Intermediary statement evalution plan. Starts as parse tree. Final - * format maps directly to ExecTree. - */ -class PlanTree { -public: - virtual ~PlanTree() = 0; -}; - -/* - * Executable code and runtime data. Currently looks like PlanTree. - * Later may change code format to linear "byte code" and move execution - * to a SQL block in NDB kernel. - */ -class ExecTree { -public: - class Code { - public: - virtual ~Code() = 0; - }; - class Data { - public: - virtual ~Data() = 0; - }; - virtual ~ExecTree() = 0; -}; - -#endif diff --git a/ndb/src/old_files/client/odbc/common/ConnArea.cpp b/ndb/src/old_files/client/odbc/common/ConnArea.cpp deleted file mode 100644 index d4d3be52a3c..00000000000 --- a/ndb/src/old_files/client/odbc/common/ConnArea.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "ConnArea.hpp" - -ConnArea::ConnArea() : - m_state(Free), - m_ndbObject(0), - m_ndbSchemaCon(0), - m_ndbConnection(0), - m_useSchemaCon(0), - m_useConnection(0), - m_autocommit(true), - m_uncommitted(false) -{ - // initialize connection catalog - m_catalog = new DictCatalog(*this); - m_schema = new DictSchema(*this, "NDB"); - m_catalog->addSchema(m_schema); -} - -ConnArea::~ConnArea() -{ - delete m_catalog; -} - -bool -ConnArea::useSchemaCon(Ctx& ctx, bool use) -{ - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "not connected"); - return false; - } - Ndb* ndb = m_ndbObject; - ctx_assert(ndb != 0); - NdbSchemaCon* scon = m_ndbSchemaCon; - if (use) { - if (scon == 0) { - ctx_assert(m_useSchemaCon == 0); - scon = ndb->startSchemaTransaction(); - if (scon == 0) { - ctx.pushStatus(ndb, scon, 0, "startSchemaTransaction"); - return false; - } - m_ndbSchemaCon = scon; - } - m_useSchemaCon++; - } else { - ctx_assert(scon != 0 && m_useSchemaCon != 0); - if (--m_useSchemaCon == 0) { - ndb->closeSchemaTransaction(scon); - m_ndbSchemaCon = 0; - } - } - return true; -} - -bool -ConnArea::useConnection(Ctx& ctx, bool use) -{ - ctx_log3(("useConnection: count before=%u on-off=%d", m_useConnection, (int)use)); - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "not connected"); - return false; - } - Ndb* ndb = m_ndbObject; - ctx_assert(ndb != 0); - NdbConnection* tcon = m_ndbConnection; - if (use) { - if (tcon == 0) { - ctx_assert(m_useConnection == 0); - tcon = ndb->startTransaction(); - if (tcon == 0) { - ctx.pushStatus(ndb, tcon, 0, "startTransaction"); - return false; - } - m_ndbConnection = tcon; - m_state = Transacting; - ctx_log2(("transaction opened")); - } - m_useConnection++; - } else { - ctx_assert(tcon != 0 && m_useConnection != 0); - if (--m_useConnection == 0) { - ndb->closeTransaction(tcon); - m_ndbConnection = 0; - m_uncommitted = false; - m_state = Connected; - ctx_log2(("transaction closed")); - } - } - return true; -} diff --git a/ndb/src/old_files/client/odbc/common/ConnArea.hpp b/ndb/src/old_files/client/odbc/common/ConnArea.hpp deleted file mode 100644 index 36367a39bae..00000000000 --- a/ndb/src/old_files/client/odbc/common/ConnArea.hpp +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_ConnArea_hpp -#define ODBC_COMMON_ConnArea_hpp - -#include - -class Ctx; -class Ndb; -class NdbSchemaCon; -class NdbConnection; -class DictCatalog; -class DictSchema; - -/** - * @class ConnArea - * @brief Public part of connection handle - */ -class ConnArea { -public: - // state between ODBC function calls - enum State { - Free = 1, // not in use, no Ndb object - Connected = 2, // has Ndb object but no Ndb connection - Transacting = 3 // has Ndb connection - }; - State getState() const; - DictCatalog& dictCatalog() const; - DictSchema& dictSchema() const; - Ndb* ndbObject() const; - NdbSchemaCon* ndbSchemaCon() const; - NdbConnection* ndbConnection() const; - // called from StmtArea - bool useSchemaCon(Ctx& ctx, bool use); - bool useConnection(Ctx& ctx, bool use); - // these just get and set the flag - no semantics - bool autocommit() const; - void autocommit(bool flag); - bool uncommitted() const; - void uncommitted(bool flag); -protected: - ConnArea(); - ~ConnArea(); - State m_state; - DictCatalog* m_catalog; - DictSchema* m_schema; - Ndb* m_ndbObject; - NdbSchemaCon* m_ndbSchemaCon; - NdbConnection* m_ndbConnection; - unsigned m_useSchemaCon; - unsigned m_useConnection; - bool m_autocommit; - bool m_uncommitted; // has uncommitted changes -}; - -inline ConnArea::State -ConnArea::getState() const -{ - return m_state; -} - -inline DictCatalog& -ConnArea::dictCatalog() const -{ - ctx_assert(m_catalog != 0); - return *m_catalog; -} - -inline DictSchema& -ConnArea::dictSchema() const -{ - ctx_assert(m_schema != 0); - return *m_schema; -} - -inline Ndb* -ConnArea::ndbObject() const -{ - ctx_assert(m_ndbObject != 0); - return m_ndbObject; -} - -inline NdbSchemaCon* -ConnArea::ndbSchemaCon() const -{ - ctx_assert(m_ndbSchemaCon != 0); - return m_ndbSchemaCon; -} - -inline NdbConnection* -ConnArea::ndbConnection() const -{ - ctx_assert(m_ndbConnection != 0); - return m_ndbConnection; -} - -inline bool -ConnArea::autocommit() const -{ - return m_autocommit; -} - -inline void -ConnArea::autocommit(bool flag) -{ - m_autocommit = flag; -} - -inline bool -ConnArea::uncommitted() const -{ - return m_uncommitted; -} - -inline void -ConnArea::uncommitted(bool flag) -{ - m_uncommitted = flag; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/Ctx.cpp b/ndb/src/old_files/client/odbc/common/Ctx.cpp deleted file mode 100644 index d6faa5cba77..00000000000 --- a/ndb/src/old_files/client/odbc/common/Ctx.cpp +++ /dev/null @@ -1,355 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "DiagArea.hpp" - -// ctor - -Ctx::Ctx() : - m_diagArea(0) // create on demand -{ - const char* p; - if ((p = getenv("NDB_ODBC_TRACE")) != 0) - m_logLevel = atoi(p); - if ((p = getenv("NDB_ODBC_TRACE_FILE")) != 0 && *p != 0) - strcpy(m_szTraceFile, p); -} - -Ctx::~Ctx() -{ - delete m_diagArea; - m_diagArea = 0; -} - -// handle exceptions - -CtxAssert::CtxAssert(const char* file, int line) : - m_file(file), - m_line(line) -{ - const char* p; - if ((p = getenv("NDB_ODBC_DEBUG")) != 0 && atoi(p) != 0) { - char buf[200]; - snprintf(buf, sizeof(buf), "%s, line %d: assert failed\n", m_file, m_line); - if ((p = getenv("NDB_ODBC_TRACE_FILE")) != 0 && *p != 0) { - FILE* pFile = fopen(p, "a"); - fprintf(pFile, buf); - fflush(pFile); - fclose(pFile); - } else { - fprintf(stderr, buf); - fflush(stderr); - } - abort(); - exit(1); - } -} - -void -Ctx::handleEx(CtxAssert& ctxAssert) -{ - pushStatus(Sqlstate::_IM001, Error::Gen, "exception at %s line %d", ctxAssert.m_file, ctxAssert.m_line); -} - -// logging methods - -int Ctx::m_logLevel = 0; -char Ctx::m_szTraceFile[MAX_PATH]; - -void -Ctx::log(const char* fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - if (m_szTraceFile[0]) { - FILE* pFile = fopen(m_szTraceFile, "a"); - fprintf(pFile, "[NdbOdbc] "); - vfprintf(pFile, fmt, ap); - fprintf(pFile, "\n"); - fflush(pFile); - fclose(pFile); - } else { - printf("[NdbOdbc] "); - vprintf(fmt, ap); - printf("\n"); - fflush(stdout); - } - va_end(ap); -} - -void -Ctx::logSqlEnter(const char* sqlFunction) -{ - Ctx& ctx = *this; - snprintf(m_sqlFunction, sizeof(m_sqlFunction), "%s", sqlFunction); - ctx_log3(("%s", m_sqlFunction)); -} - -void -Ctx::logSqlExit() -{ - Ctx& ctx = *this; - if (m_diagArea == 0) { - ctx_log3(("%s ret=%d", m_sqlFunction, getCode())); - return; - } - int logLevel = diagArea().numStatus() != 0 ? 2 : 3; - ctx_logN(logLevel, ("%s ret=%d diag=%d", m_sqlFunction, diagArea().getCode(), diagArea().numStatus())); - for (unsigned i = 1; i <= diagArea().numStatus(); i++) { - OdbcData state; - OdbcData message; - diagArea().getRecord(ctx, i, SQL_DIAG_SQLSTATE, state); - diagArea().getRecord(ctx, i, SQL_DIAG_MESSAGE_TEXT, message); - ctx_logN(logLevel, ("diag %u: %s - %s", i, state.sqlstate().state(), message.sqlchar())); - } -} - -void -Ctx::print(const char* fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - if (m_szTraceFile[0]) { - FILE* pFile = fopen(m_szTraceFile, "a"); - vfprintf(pFile, fmt, ap); - unsigned n = strlen(fmt); - if (n > 0 && fmt[n-1] == '\n') - fflush(pFile); - fclose(pFile); - } else { - vprintf(fmt, ap); - unsigned n = strlen(fmt); - if (n > 0 && fmt[n-1] == '\n') - fflush(stdout); - } - va_end(ap); -} - -void -Ctx::print(int level, const char* fmt, ...) -{ - if (level > m_logLevel) - return; - va_list ap; - va_start(ap, fmt); - if (m_szTraceFile[0]) { - FILE* pFile = fopen(m_szTraceFile, "a"); - vfprintf(pFile, fmt, ap); - unsigned n = strlen(fmt); - if (n > 0 && fmt[n-1] == '\n') - fflush(pFile); - fclose(pFile); - } else { - vprintf(fmt, ap); - unsigned n = strlen(fmt); - if (n > 0 && fmt[n-1] == '\n') - fflush(stdout); - } - va_end(ap); -} - -// diagnostics - -static const unsigned MessageSize = 512; - -DiagArea& -Ctx::diagArea() const -{ - ctx_assert(m_diagArea != 0); - return *m_diagArea; -} - -DiagArea& -Ctx::diagArea() -{ - if (m_diagArea == 0) - m_diagArea = new DiagArea; - return *m_diagArea; -} - -SQLRETURN -Ctx::getCode() const -{ - if (m_diagArea == 0) - return SQL_SUCCESS; - return diagArea().getCode(); -} - -void -Ctx::setCode(SQLRETURN ret) -{ - diagArea().setCode(ret); -} - -void -Ctx::pushStatus(const Sqlstate& state, SQLINTEGER code, const char* fmt, ...) -{ - char message[MessageSize]; - va_list ap; - va_start(ap, fmt); - vsnprintf(message, sizeof(message), fmt, ap); - va_end(ap); - Error error(state); - error.m_status = NdbError::PermanentError; - error.m_classification = NdbError::ApplicationError; - error.m_code = code; - error.m_message = message; - error.m_sqlFunction = m_sqlFunction; - diagArea().pushStatus(error); -} - -void -Ctx::pushStatus(SQLINTEGER code, const char* fmt, ...) -{ - char message[MessageSize]; - va_list ap; - va_start(ap, fmt); - vsnprintf(message, sizeof(message), fmt, ap); - va_end(ap); - Error error(Sqlstate::_IM000); - error.m_status = NdbError::PermanentError; - error.m_classification = NdbError::ApplicationError; - error.m_code = code; - error.m_message = message; - error.m_sqlFunction = m_sqlFunction; - diagArea().pushStatus(error); -} - -void -Ctx::pushStatus(const NdbError& ndbError, const char* fmt, ...) -{ - char message[MessageSize]; - va_list ap; - va_start(ap, fmt); - snprintf(message, sizeof(message), "%s", ndbError.message); - snprintf(message + strlen(message), sizeof(message) - strlen(message), "%s", " - at "); - vsnprintf(message + strlen(message), sizeof(message) - strlen(message), fmt, ap); - va_end(ap); - Error error(Sqlstate::_IM000); - error.m_status = ndbError.status; - error.m_classification = ndbError.classification; - error.m_code = ndbError.code; - error.m_message = message; - error.m_sqlFunction = m_sqlFunction; - diagArea().pushStatus(error); -} - -void -Ctx::pushStatus(const Ndb* ndb, const char* fmt, ...) -{ - char message[MessageSize]; - va_list ap; - va_start(ap, fmt); - vsnprintf(message, sizeof(message), fmt, ap); - va_end(ap); - bool found = false; - if (ndb != 0) { - const NdbError& ndbError = ndb->getNdbError(); - if (ndbError.code != 0) { - pushStatus(ndbError, "%s", message); - found = true; - } - } - if (! found) { - pushStatus(Error::Gen, "unknown NDB error"); - } -} - -void -Ctx::pushStatus(const Ndb* ndb, const NdbConnection* tcon, const NdbOperation* op, const char* fmt, ...) -{ - char message[MessageSize]; - va_list ap; - va_start(ap, fmt); - vsnprintf(message, sizeof(message), fmt, ap); - va_end(ap); - bool found = false; - if (op != 0) { - const NdbError& ndbError = op->getNdbError(); - if (ndbError.code != 0) { - pushStatus(ndbError, "%s", message); - found = true; - } - } - if (tcon != 0) { - const NdbError& ndbError = tcon->getNdbError(); - if (ndbError.code != 0) { - pushStatus(ndbError, "%s", message); - found = true; - } - } - if (ndb != 0) { - const NdbError& ndbError = ndb->getNdbError(); - if (ndbError.code != 0) { - pushStatus(ndbError, "%s", message); - found = true; - } - } - if (! found) { - pushStatus(Error::Gen, "unknown NDB error"); - } -} - -void -Ctx::pushStatus(const Ndb* ndb, const NdbSchemaCon* scon, const NdbSchemaOp* op, const char* fmt, ...) -{ - char message[MessageSize]; - va_list ap; - va_start(ap, fmt); - vsnprintf(message, sizeof(message), fmt, ap); - va_end(ap); - bool found = false; - if (op != 0) { - const NdbError& ndbError = op->getNdbError(); - if (ndbError.code != 0) { - pushStatus(ndbError, "%s", message); - found = true; - } - } - if (scon != 0) { - const NdbError& ndbError = scon->getNdbError(); - if (ndbError.code != 0) { - pushStatus(ndbError, "%s", message); - found = true; - } - } - if (ndb != 0) { - const NdbError& ndbError = ndb->getNdbError(); - if (ndbError.code != 0) { - pushStatus(ndbError, "%s", message); - found = true; - } - } - if (! found) { - pushStatus(Error::Gen, "unknown NDB error"); - } -} - -// check for error - -bool -Ctx::ok() -{ - if (m_diagArea == 0) - return true; - if (diagArea().getCode() == SQL_SUCCESS) - return true; - if (diagArea().getCode() == SQL_SUCCESS_WITH_INFO) - return true; - return false; -} diff --git a/ndb/src/old_files/client/odbc/common/Ctx.hpp b/ndb/src/old_files/client/odbc/common/Ctx.hpp deleted file mode 100644 index d25d45ff0c7..00000000000 --- a/ndb/src/old_files/client/odbc/common/Ctx.hpp +++ /dev/null @@ -1,182 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_Ctx_hpp -#define ODBC_COMMON_Ctx_hpp - -#include - -class Ndb; -class NdbConnection; -class NdbOperation; -class NdbSchemaCon; -class NdbSchemaOp; -class NdbError; - -class Sqlstate; -class DiagArea; -class CtxOwner; - -#ifndef MAX_PATH -#define MAX_PATH 1024 -#endif - -/** - * @class Error - * @brief Sql state, error codes, and message - */ -struct Error { - enum { - Gen = NDB_ODBC_ERROR_MIN + 1 // unclassified - }; - explicit Error(const Sqlstate& sqlstate); - const Sqlstate& m_sqlstate; - int m_status; - int m_classification; - int m_code; - const char* m_message; - const char* m_sqlFunction; - bool driverError() const; -}; - -inline -Error::Error(const Sqlstate& sqlstate) : - m_sqlstate(sqlstate), - m_status(0), - m_classification(0), - m_code(0), - m_sqlFunction(0) -{ -} - -inline bool -Error::driverError() const -{ - return NDB_ODBC_ERROR_MIN <= m_code && m_code < NDB_ODBC_ERROR_MAX; -} - -#define ctx_assert(x) \ - do { if (x) break; throw CtxAssert(__FILE__, __LINE__); } while (0) - -/** - * @class Assert - * @brief Assert thrown - */ -class CtxAssert { -public: - CtxAssert(const char* file, int line); - const char* const m_file; - const int m_line; -}; - -/** - * @class Ctx - * @brief Context for one ODBC SQL function - * - * Local to the function (not member of the handle) because methods on - * a handle can call methods on other handles. Created in driver/ - * before method calls and saved under the handle on return. Contains - * diag area for the function. Also used as logger. - */ -class Ctx { -public: - Ctx(); - ~Ctx(); - // handle exceptions - void handleEx(CtxAssert& ctxAssert); - // logging methods - int logLevel() const; - void log(const char* fmt, ...) PRINTFLIKE(2,3); - void logSqlEnter(const char* sqlFunction); - void logSqlExit(); - const char* sqlFunction() const; - void print(const char* fmt, ...) PRINTFLIKE(2,3); - void print(int level, const char* fmt, ...) PRINTFLIKE(3,4); - // diagnostics area. - DiagArea& diagArea() const; - DiagArea& diagArea(); - SQLRETURN getCode() const; - void setCode(SQLRETURN ret); - // push diagnostic record - void pushStatus(const Sqlstate& state, SQLINTEGER code, const char* fmt, ...) PRINTFLIKE(4,5); - void pushStatus(SQLINTEGER code, const char* fmt, ...) PRINTFLIKE(3,4); - void pushStatus(const NdbError& ndbError, const char* fmt, ...) PRINTFLIKE(3,4); - void pushStatus(const Ndb* ndb, const char* fmt, ...) PRINTFLIKE(3,4); - void pushStatus(const Ndb* ndb, const NdbConnection* tcon, const NdbOperation* op, const char* fmt, ...) PRINTFLIKE(5,6); - void pushStatus(const Ndb* ndb, const NdbSchemaCon* scon, const NdbSchemaOp* op, const char* fmt, ...) PRINTFLIKE(5,6); - // check if we should continue executing. - bool ok(); -private: - static int m_logLevel; - static char m_szTraceFile[MAX_PATH]; - char m_sqlFunction[32]; // max needed is 20 - DiagArea* m_diagArea; -}; - -inline int -Ctx::logLevel() const -{ - return m_logLevel; -} - -inline const char* -Ctx::sqlFunction() const -{ - return m_sqlFunction; -} - -// logging macros can be used only when ctx is in scope - -#define ctx_logN(n, x) \ - do { if (ctx.logLevel() < (n)) break; ctx.log x; } while (0) - -#if NDB_ODBC_MAX_LOG_LEVEL >= 0 -#define ctx_log0(x) ctx_logN(0, x) -#else -#define ctx_log0(x) -#endif - -#if NDB_ODBC_MAX_LOG_LEVEL >= 1 -#define ctx_log1(x) ctx_logN(1, x) -#else -#define ctx_log1(x) -#endif - -#if NDB_ODBC_MAX_LOG_LEVEL >= 2 -#define ctx_log2(x) ctx_logN(2, x) -#else -#define ctx_log2(x) -#endif - -#if NDB_ODBC_MAX_LOG_LEVEL >= 3 -#define ctx_log3(x) ctx_logN(3, x) -#else -#define ctx_log3(x) -#endif - -#if NDB_ODBC_MAX_LOG_LEVEL >= 4 -#define ctx_log4(x) ctx_logN(4, x) -#else -#define ctx_log4(x) -#endif - -#if NDB_ODBC_MAX_LOG_LEVEL >= 5 -#define ctx_log5(x) ctx_logN(5, x) -#else -#define ctx_log5(x) -#endif - -#endif diff --git a/ndb/src/old_files/client/odbc/common/DataField.cpp b/ndb/src/old_files/client/odbc/common/DataField.cpp deleted file mode 100644 index 11aae7d893b..00000000000 --- a/ndb/src/old_files/client/odbc/common/DataField.cpp +++ /dev/null @@ -1,3023 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "DataField.hpp" - -#ifndef INT_MAX -#define INT_MAX (2147483647) -#endif - -#ifndef INT_MIN -#define INT_MIN (-INT_MAX - 1) -#endif - -#ifndef UINT_MAX -#define UINT_MAX 4294967295U -#endif - -#ifndef FLT_MAX -#define FLT_MAX (3.402823466E+38F) -#endif -#ifndef FLT_MIN -#define FLT_MIN (1.175494351E-38F) -#endif - -#ifdef NDB_WIN32 -#define FMT_I64 "%I64d" -#define FMT_U64 "%I64u" -#else -#define FMT_I64 "%lld" -#define FMT_U64 "%llu" -#endif - -#ifdef NDB_WIN32 -#define strtoll(str, endptr, base) strtoint64(str, endptr, base) -#define strtoull(str, endptr, base) strtouint64(str, endptr, base) - -static Int64 -strtoint64(const char *str, char **endptr, int base) -{ - Int64 x = 0; - while (*str == ' ') - str++; - const char* p = str; - while ('0' <= *p && *p <= '9') - x = 10 * x + *p++ - '0'; - if (p == str) { - *endptr = 0; - return 0; - } - *endptr = (char*)p; - return x; -} - -static Uint64 -strtouint64(const char *str, char **endptr, int base) -{ - Uint64 x = 0; - while (*str == ' ') - str++; - const char* p = str; - while ('0' <= *p && *p <= '9') - x = 10 * x + *p++ - '0'; - if (p == str) { - *endptr = 0; - return 0; - } - *endptr = (char*)p; - return x; -} -#endif - -// LexSpec - -void -LexSpec::convert(Ctx& ctx, const BaseString& value, SqlField& out) -{ - const SqlSpec& sqlSpec = out.sqlSpec(); - const SqlType& sqlType = sqlSpec.sqlType(); - out.alloc(); - if (sqlType.type() == SqlType::Char) { - const SqlChar* s = (const SqlChar*)value.c_str(); - out.sqlChar(s, SQL_NTS); - return; - } - if (sqlType.type() == SqlType::Bigint) { - char* endptr = 0; - SqlBigint n = static_cast(strtoll(value.c_str(), &endptr, 10)); - if (endptr == 0 || *endptr != 0) { - ctx.pushStatus(Error::Gen, "cannot convert '%s' to integer", value.c_str()); - return; - } - out.sqlBigint(n); - return; - } - if (sqlType.type() == SqlType::Double) { - char* endptr = 0; - SqlDouble x = static_cast(strtod(value.c_str(), &endptr)); - if (endptr == 0 || *endptr != 0) { - ctx.pushStatus(Error::Gen, "cannot convert '%s' to number", value.c_str()); - return; - } - out.sqlDouble(x); - return; - } - if (sqlType.type() == SqlType::Null) { - out.u_null.m_nullFlag = true; - return; - } - ctx_assert(false); -} - -// SqlField - -void -SqlField::alloc() -{ - ctx_assert(sqlSpec().store() == SqlSpec::Physical); - const SqlType& sqlType = sqlSpec().sqlType(); - if (sqlType.type() == SqlType::Char || sqlType.type() == SqlType::Varchar) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varchar) - n += 2; - if (n > SqlField_CharSmall) { - u_data.m_sqlChar = new SqlChar[n]; - } - } - if (sqlType.type() == SqlType::Binary || sqlType.type() == SqlType::Varbinary) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varbinary) - n += 2; - if (n > SqlField_CharSmall) { - u_data.m_sqlChar = new SqlChar[n]; - } - } -} - -void -SqlField::alloc(const SqlField& sqlField) -{ - alloc(); - const SqlType& sqlType = sqlSpec().sqlType(); - if (sqlType.type() == SqlType::Char || sqlType.type() == SqlType::Varchar) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varchar) - n += 2; - if (n > SqlField_CharSmall) { - memcpy(u_data.m_sqlChar, sqlField.u_data.m_sqlChar, n); - } - } - if (sqlType.type() == SqlType::Binary || sqlType.type() == SqlType::Varbinary) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varbinary) - n += 2; - if (n > SqlField_CharSmall) { - memcpy(u_data.m_sqlChar, sqlField.u_data.m_sqlChar, n); - } - } -} - -const void* -SqlField::addr() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->addr(); - } - const SqlType& sqlType = sqlSpec().sqlType(); - if (sqlType.type() == SqlType::Char || sqlType.type() == SqlType::Varchar) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varchar) - n += 2; - if (n > SqlField_CharSmall) { - return static_cast(u_data.m_sqlChar); - } - return static_cast(u_data.m_sqlCharSmall); - } - if (sqlType.type() == SqlType::Binary || sqlType.type() == SqlType::Varbinary) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varbinary) - n += 2; - if (n > SqlField_CharSmall) { - return static_cast(u_data.m_sqlChar); - } - return static_cast(u_data.m_sqlCharSmall); - } - if (sqlType.type() == SqlType::Smallint) { - return static_cast(&u_data.m_sqlSmallint); - } - if (sqlType.type() == SqlType::Integer) { - return static_cast(&u_data.m_sqlInteger); - } - if (sqlType.type() == SqlType::Bigint) { - return static_cast(&u_data.m_sqlBigint); - } - if (sqlType.type() == SqlType::Real) { - return static_cast(&u_data.m_sqlReal); - } - if (sqlType.type() == SqlType::Double) { - return static_cast(&u_data.m_sqlDouble); - } - if (sqlType.type() == SqlType::Datetime) { - return static_cast(&u_data.m_sqlDatetime); - } - ctx_assert(false); // SqlType::Null has no address - return 0; -} - -void* -SqlField::addr() -{ - const SqlType& sqlType = sqlSpec().sqlType(); - if (sqlType.type() == SqlType::Char || sqlType.type() == SqlType::Varchar) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varchar) - n += 2; - if (n > SqlField_CharSmall) { - return static_cast(u_data.m_sqlChar); - } - return static_cast(u_data.m_sqlCharSmall); - } - if (sqlType.type() == SqlType::Binary || sqlType.type() == SqlType::Varbinary) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varbinary) - n += 2; - if (n > SqlField_CharSmall) { - return static_cast(u_data.m_sqlChar); - } - return static_cast(u_data.m_sqlCharSmall); - } - if (sqlType.type() == SqlType::Smallint) { - return static_cast(&u_data.m_sqlSmallint); - } - if (sqlType.type() == SqlType::Integer) { - return static_cast(&u_data.m_sqlInteger); - } - if (sqlType.type() == SqlType::Bigint) { - return static_cast(&u_data.m_sqlBigint); - } - if (sqlType.type() == SqlType::Real) { - return static_cast(&u_data.m_sqlReal); - } - if (sqlType.type() == SqlType::Double) { - return static_cast(&u_data.m_sqlDouble); - } - if (sqlType.type() == SqlType::Datetime) { - return static_cast(&u_data.m_sqlDatetime); - } - ctx_assert(false); // SqlType::Null has no address - return 0; -} - -unsigned -SqlField::allocSize() const -{ - const SqlType& sqlType = sqlSpec().sqlType(); - unsigned n = sqlType.size(); - if (sqlType.type() == SqlType::Varchar || sqlType.type() == SqlType::Varbinary) { - n += 2; - } - return n; -} - -void -SqlField::free() -{ - ctx_assert(sqlSpec().store() == SqlSpec::Physical); - const SqlType& sqlType = sqlSpec().sqlType(); - if (sqlType.type() == SqlType::Char || sqlType.type() == SqlType::Varchar) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varchar) - n += 2; - if (n > SqlField_CharSmall) { - delete[] u_data.m_sqlChar; - u_data.m_sqlChar = 0; // safety since dtor used explicitly - } - } - if (sqlType.type() == SqlType::Binary || sqlType.type() == SqlType::Varbinary) { - unsigned n = sqlType.length(); - if (sqlType.type() == SqlType::Varbinary) - n += 2; - if (n > SqlField_CharSmall) { - delete[] u_data.m_sqlChar; - u_data.m_sqlChar = 0; // safety since dtor used explicitly - } - } -} - -// get - -const SqlChar* -SqlField::sqlChar() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlChar(); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Char); - if (sqlType.length() > SqlField_CharSmall) - return u_data.m_sqlChar; - return u_data.m_sqlCharSmall; -} - -const SqlChar* -SqlField::sqlVarchar(unsigned* length) const -{ -#if NDB_VERSION_MAJOR >= 3 - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlVarchar(length); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Varchar); - const SqlChar* sqlChar; - unsigned n = sqlType.length(); - if (2 + n > SqlField_CharSmall) - sqlChar = u_data.m_sqlChar; - else - sqlChar = u_data.m_sqlCharSmall; - if (length != 0) - *length = (sqlChar[0] << 8) | sqlChar[1]; // big-endian - return sqlChar + 2; -#else - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlVarchar(length); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Varchar); - const SqlChar* sqlChar; - unsigned n = sqlType.length(); - if (n + 2 > SqlField_CharSmall) - sqlChar = u_data.m_sqlChar; - else - sqlChar = u_data.m_sqlCharSmall; - if (length != 0) - *length = (sqlChar[n + 0] << 8) | sqlChar[n + 1]; // big-endian - return sqlChar; -#endif -} - -const SqlChar* -SqlField::sqlBinary() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlChar(); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Binary); - if (sqlType.length() > SqlField_CharSmall) - return u_data.m_sqlChar; - return u_data.m_sqlCharSmall; -} - -const SqlChar* -SqlField::sqlVarbinary(unsigned* length) const -{ -#if NDB_VERSION_MAJOR >= 3 - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlVarchar(length); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Varbinary); - const SqlChar* sqlChar; - unsigned n = sqlType.length(); - if (2 + n > SqlField_CharSmall) - sqlChar = u_data.m_sqlChar; - else - sqlChar = u_data.m_sqlCharSmall; - if (length != 0) - *length = (sqlChar[0] << 8) | sqlChar[1]; // big-endian - return sqlChar + 2; -#else - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlVarchar(length); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Varbinary); - const SqlChar* sqlChar; - unsigned n = sqlType.length(); - if (n + 2 > SqlField_CharSmall) - sqlChar = u_data.m_sqlChar; - else - sqlChar = u_data.m_sqlCharSmall; - if (length != 0) - *length = (sqlChar[n + 0] << 8) | sqlChar[n + 1]; // big-endian - return sqlChar; -#endif -} - -SqlSmallint -SqlField::sqlSmallint() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlSmallint(); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Smallint); - return u_data.m_sqlSmallint; -} - -SqlInteger -SqlField::sqlInteger() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlInteger(); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Integer); - return u_data.m_sqlInteger; -} - -SqlBigint -SqlField::sqlBigint() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlBigint(); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Bigint); - return u_data.m_sqlBigint; -} - -SqlReal -SqlField::sqlReal() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlReal(); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Real); - return u_data.m_sqlReal; -} - -SqlDouble -SqlField::sqlDouble() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlDouble(); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Double); - return u_data.m_sqlDouble; -} - -SqlDatetime -SqlField::sqlDatetime() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlDatetime(); - } - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Datetime); - return u_data.m_sqlDatetime; -} - -// set - -void -SqlField::sqlChar(const SqlChar* value, int length) -{ - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Char); - unsigned n = sqlType.length(); - SqlChar* p = n > SqlField_CharSmall ? u_data.m_sqlChar : u_data.m_sqlCharSmall; - const SqlChar* q = value; - unsigned m = length == SQL_NTS ? strlen((const char*)q) : length; - ctx_assert(m <= n); - for (unsigned i = 0; i < m; i++) - *p++ = *q++; - for (unsigned i = m; i < n; i++) - *p++ = 0x20; // space - u_null.m_nullFlag = false; -} - -void -SqlField::sqlVarchar(const SqlChar* value, int length) -{ -#if NDB_VERSION_MAJOR >= 3 - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Varchar); - unsigned n = sqlType.length(); - SqlChar* p = 2 + n > SqlField_CharSmall ? u_data.m_sqlChar : u_data.m_sqlCharSmall; - const SqlChar* q = value; - unsigned m = length == SQL_NTS ? strlen((const char*)q) : length; - ctx_assert(m <= n); - *p++ = (m >> 8) & 0xff; // big-endian - *p++ = (m & 0xff); - for (unsigned i = 0; i < m; i++) - *p++ = *q++; - for (unsigned i = m; i < n; i++) - *p++ = 0x0; // null - u_null.m_nullFlag = false; -#else - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Varchar); - unsigned n = sqlType.length(); - SqlChar* p = n + 2 > SqlField_CharSmall ? u_data.m_sqlChar : u_data.m_sqlCharSmall; - const SqlChar* q = value; - unsigned m = length == SQL_NTS ? strlen((const char*)q) : length; - ctx_assert(m <= n); - for (unsigned i = 0; i < m; i++) - *p++ = *q++; - for (unsigned i = m; i < n; i++) - *p++ = 0x0; // null - *p++ = (m >> 8) & 0xff; // big-endian - *p++ = (m & 0xff); - u_null.m_nullFlag = false; -#endif -} - -void -SqlField::sqlBinary(const SqlChar* value, int length) -{ - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Binary); - unsigned n = sqlType.length(); - SqlChar* p = n > SqlField_CharSmall ? u_data.m_sqlChar : u_data.m_sqlCharSmall; - const SqlChar* q = value; - unsigned m = length; - ctx_assert(m <= n); - for (unsigned i = 0; i < m; i++) - *p++ = *q++; - for (unsigned i = m; i < n; i++) - *p++ = 0x0; // null - u_null.m_nullFlag = false; -} - -void -SqlField::sqlVarbinary(const SqlChar* value, int length) -{ -#if NDB_VERSION_MAJOR >= 3 - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Varbinary); - unsigned n = sqlType.length(); - SqlChar* p = 2 + n > SqlField_CharSmall ? u_data.m_sqlChar : u_data.m_sqlCharSmall; - const SqlChar* q = value; - unsigned m = length; - ctx_assert(m <= n); - *p++ = (m >> 8) & 0xff; // big-endian - *p++ = (m & 0xff); - for (unsigned i = 0; i < m; i++) - *p++ = *q++; - for (unsigned i = m; i < n; i++) - *p++ = 0x0; // null - u_null.m_nullFlag = false; -#else - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Varbinary); - unsigned n = sqlType.length(); - SqlChar* p = n + 2 > SqlField_CharSmall ? u_data.m_sqlChar : u_data.m_sqlCharSmall; - const SqlChar* q = value; - unsigned m = length; - ctx_assert(m <= n); - for (unsigned i = 0; i < m; i++) - *p++ = *q++; - for (unsigned i = m; i < n; i++) - *p++ = 0x0; // null - *p++ = (m >> 8) & 0xff; // big-endian - *p++ = (m & 0xff); - u_null.m_nullFlag = false; -#endif -} - -void -SqlField::sqlSmallint(SqlSmallint value) -{ - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Smallint); - u_data.m_sqlSmallint = value; - u_null.m_nullFlag = false; -} - -void -SqlField::sqlInteger(SqlInteger value) -{ - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Integer); - u_data.m_sqlInteger = value; - u_null.m_nullFlag = false; -} - -void -SqlField::sqlBigint(SqlBigint value) -{ - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Bigint); - u_data.m_sqlBigint = value; - u_null.m_nullFlag = false; -} - -void -SqlField::sqlReal(SqlReal value) -{ - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Real); - u_data.m_sqlReal = value; - u_null.m_nullFlag = false; -} - -void -SqlField::sqlDouble(SqlDouble value) -{ - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Double); - u_data.m_sqlDouble = value; - u_null.m_nullFlag = false; -} - -void -SqlField::sqlDatetime(SqlDatetime value) -{ - const SqlType& sqlType = sqlSpec().sqlType(); - ctx_assert(sqlType.type() == SqlType::Datetime); - u_data.m_sqlDatetime = value; - u_null.m_nullFlag = false; -} - -// get and and set null - -bool -SqlField::sqlNull() const -{ - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - return u_data.m_sqlField->sqlNull(); - } - return u_null.m_nullFlag; -} - -void -SqlField::sqlNull(bool value) -{ - u_null.m_nullFlag = value; -} - -unsigned -SqlField::trim() const -{ - const SqlType& sqlType = sqlSpec().sqlType(); - unsigned n = 0; - const SqlChar* s = 0; - if (sqlType.type() == SqlType::Char) { - n = sqlType.length(); - s = sqlChar(); - } else if (sqlType.type() == SqlType::Varchar) { - s = sqlVarchar(&n); - } else { - ctx_assert(false); - return 0; - } - while (n > 0 && s[n - 1] == 0x20) - n--; - return n; -} - -void -SqlField::copy(Ctx& ctx, SqlField& out) const -{ - const SqlField& f1 = *this; - SqlField& f2 = out; - const SqlType& t1 = f1.sqlSpec().sqlType(); - const SqlType& t2 = f2.sqlSpec().sqlType(); - ctx_assert(t1.type() == t2.type()); - if (f1.sqlNull()) { - f2.sqlNull(true); - return; - } - if (t1.type() == SqlType::Char) { - f2.sqlChar(f1.sqlChar(), t1.length()); - return; - } - if (t1.type() == SqlType::Varchar) { - unsigned length; - const SqlChar* s1 = f1.sqlVarchar(&length); - f2.sqlVarchar(s1, length); - return; - } - if (t1.type() == SqlType::Binary) { - f2.sqlBinary(f1.sqlBinary(), t1.length()); - return; - } - if (t1.type() == SqlType::Varbinary) { - unsigned length; - const SqlChar* s1 = f1.sqlVarbinary(&length); - f2.sqlVarbinary(s1, length); - return; - } - if (t1.type() == SqlType::Smallint) { - f2.sqlSmallint(f1.sqlSmallint()); - return; - } - if (t1.type() == SqlType::Integer) { - f2.sqlInteger(f1.sqlInteger()); - return; - } - if (t1.type() == SqlType::Bigint) { - f2.sqlBigint(f1.sqlBigint()); - return; - } - if (t1.type() == SqlType::Real) { - f2.sqlReal(f1.sqlReal()); - return; - } - if (t1.type() == SqlType::Double) { - f2.sqlDouble(f1.sqlDouble()); - return; - } - if (t1.type() == SqlType::Datetime) { - f2.sqlDatetime(f1.sqlDatetime()); - return; - } - ctx_assert(false); -} - -bool -SqlField::cast(Ctx& ctx, SqlField& out) const -{ - const SqlField& f1 = *this; - SqlField& f2 = out; - if (f1.sqlNull()) { - f2.sqlNull(true); - return true; - } - const SqlType& t1 = f1.sqlSpec().sqlType(); - const SqlType& t2 = f2.sqlSpec().sqlType(); - if (t1.type() == SqlType::Char) { - if (t2.type() == SqlType::Char) { - unsigned n1 = f1.trim(); - if (n1 > t2.length()) - return false; - f2.sqlChar(f1.sqlChar(), n1); - return true; - } - if (t2.type() == SqlType::Varchar) { - unsigned n1 = t1.length(); - if (n1 > t2.length()) - return false; - f2.sqlVarchar(f1.sqlChar(), n1); - return true; - } - if (t2.type() == SqlType::Binary) { - unsigned n1 = t1.length(); - if (n1 > t2.length()) - return false; - f2.sqlBinary(f1.sqlChar(), n1); - return true; - } - if (t2.type() == SqlType::Varbinary) { - unsigned n1 = t1.length(); - if (n1 > t2.length()) - return false; - f2.sqlVarbinary(f1.sqlChar(), n1); - return true; - } - ctx_assert(false); - return false; - } - if (t1.type() == SqlType::Varchar) { - if (t2.type() == SqlType::Char) { - unsigned n1 = f1.trim(); - if (n1 > t2.length()) - return false; - f2.sqlChar(f1.sqlVarchar(0), n1); - return true; - } - if (t2.type() == SqlType::Varchar) { - unsigned n1 = f1.trim(); - if (n1 > t2.length()) - return false; - f2.sqlVarchar(f1.sqlVarchar(0), n1); - return true; - } - if (t2.type() == SqlType::Binary) { - unsigned n1 = t1.length(); - if (n1 > t2.length()) - return false; - f2.sqlBinary(f1.sqlVarchar(0), n1); - return true; - } - if (t2.type() == SqlType::Varbinary) { - unsigned n1 = t1.length(); - if (n1 > t2.length()) - return false; - f2.sqlVarbinary(f1.sqlVarchar(0), n1); - return true; - } - ctx_assert(false); - return false; - } - if (t1.type() == SqlType::Binary) { - if (t2.type() == SqlType::Binary) { - unsigned n1 = t1.length(); - if (n1 > t2.length()) - return false; - f2.sqlBinary(f1.sqlBinary(), n1); - return true; - } - if (t2.type() == SqlType::Varbinary) { - unsigned n1 = t1.length(); - if (n1 > t2.length()) - return false; - f2.sqlVarbinary(f1.sqlBinary(), n1); - return true; - } - ctx_assert(false); - return false; - } - if (t1.type() == SqlType::Varbinary) { - if (t2.type() == SqlType::Binary) { - unsigned n1 = t1.length(); - if (n1 > t2.length()) - return false; - f2.sqlBinary(f1.sqlVarbinary(0), n1); - return true; - } - if (t2.type() == SqlType::Varbinary) { - unsigned n1 = t1.length(); - if (n1 > t2.length()) - return false; - f2.sqlVarbinary(f1.sqlVarbinary(0), n1); - return true; - } - ctx_assert(false); - return false; - } - if (t1.type() == SqlType::Smallint) { - if (! t2.unSigned()) { - SqlSmallint x1 = f1.sqlSmallint(); - if (t2.type() == SqlType::Smallint) { - f2.sqlSmallint(x1); - return true; - } - if (t2.type() == SqlType::Integer) { - SqlInteger x2 = static_cast(x1); - f2.sqlInteger(x2); - return true; - } - if (t2.type() == SqlType::Bigint) { - SqlBigint x2 = static_cast(x1); - f2.sqlBigint(x2); - return true; - } - if (t2.type() == SqlType::Real) { - SqlReal x2 = static_cast(x1); - f2.sqlReal(x2); - return true; - } - if (t2.type() == SqlType::Double) { - SqlDouble x2 = static_cast(x1); - f2.sqlDouble(x2); - return true; - } - } else { - SqlUsmallint x1 = f1.sqlSmallint(); - if (t2.type() == SqlType::Smallint) { - f2.sqlSmallint(x1); - return true; - } - if (t2.type() == SqlType::Integer) { - SqlUinteger x2 = static_cast(x1); - f2.sqlInteger(x2); - return true; - } - if (t2.type() == SqlType::Bigint) { - SqlUbigint x2 = static_cast(x1); - f2.sqlBigint(x2); - return true; - } - } - ctx_assert(false); - return false; - } - if (t1.type() == SqlType::Integer) { - if (! t2.unSigned()) { - SqlInteger x1 = f1.sqlInteger(); - if (t2.type() == SqlType::Smallint) { - SqlSmallint x2 = static_cast(x1); - if (x1 != static_cast(x2)) - return false; - f2.sqlSmallint(x2); - return true; - } - if (t2.type() == SqlType::Integer) { - f2.sqlInteger(x1); - return true; - } - if (t2.type() == SqlType::Bigint) { - SqlBigint x2 = static_cast(x1); - f2.sqlBigint(x2); - return true; - } - if (t2.type() == SqlType::Real) { - SqlReal x2 = static_cast(x1); - f2.sqlReal(x2); - return true; - } - if (t2.type() == SqlType::Double) { - SqlDouble x2 = static_cast(x1); - f2.sqlDouble(x2); - return true; - } - } else { - SqlUinteger x1 = f1.sqlInteger(); - if (t2.type() == SqlType::Smallint) { - SqlUsmallint x2 = static_cast(x1); - if (x1 != static_cast(x2)) - return false; - f2.sqlSmallint(x2); - return true; - } - if (t2.type() == SqlType::Integer) { - f2.sqlInteger(x1); - return true; - } - if (t2.type() == SqlType::Bigint) { - SqlUbigint x2 = static_cast(x1); - f2.sqlBigint(x2); - return true; - } - } - ctx_assert(false); - return false; - } - if (t1.type() == SqlType::Bigint) { - if (! t2.unSigned()) { - SqlBigint x1 = f1.sqlBigint(); - if (t2.type() == SqlType::Smallint) { - SqlSmallint x2 = static_cast(x1); - if (x1 != static_cast(x2)) - return false; - f2.sqlSmallint(x2); - return true; - } - if (t2.type() == SqlType::Integer) { - SqlInteger x2 = static_cast(x1); - if (x1 != static_cast(x2)) - return false; - f2.sqlInteger(x2); - return true; - } - if (t2.type() == SqlType::Bigint) { - f2.sqlBigint(x1); - return true; - } - if (t2.type() == SqlType::Real) { - SqlReal x2 = static_cast(x1); - f2.sqlReal(x2); - return true; - } - if (t2.type() == SqlType::Double) { - SqlDouble x2 = static_cast(x1); - f2.sqlDouble(x2); - return true; - } - } else { - SqlUbigint x1 = f1.sqlBigint(); - if (t2.type() == SqlType::Smallint) { - SqlUsmallint x2 = static_cast(x1); - if (x1 != static_cast(x2)) - return false; - f2.sqlSmallint(x2); - return true; - } - if (t2.type() == SqlType::Integer) { - SqlUinteger x2 = static_cast(x1); - if (x1 != static_cast(x2)) - return false; - f2.sqlInteger(x2); - return true; - } - if (t2.type() == SqlType::Bigint) { - f2.sqlBigint(x1); - return true; - } - } - ctx_assert(false); - return false; - } - if (t1.type() == SqlType::Real) { - SqlReal x1 = f1.sqlReal(); - int off = 0; - if (x1 > 0.0 && x1 - floor(x1) >= 0.5) - off = 1; - if (x1 < 0.0 && x1 - floor(x1) <= 0.5) - off = -1; - bool b = (x1 - floor(x1) < 0.5); - if (t2.type() == SqlType::Smallint) { - SqlSmallint x2 = static_cast(x1) + off; - if (fabs(x1 - static_cast(x2)) >= 1.0) - return false; - f2.sqlSmallint(x2); - return true; - } - if (t2.type() == SqlType::Integer) { - SqlInteger x2 = static_cast(x1) + off; - if (fabs(x1 - static_cast(x2)) >= 1.0) - return false; - f2.sqlInteger(x2); - return true; - } - if (t2.type() == SqlType::Bigint) { - SqlBigint x2 = static_cast(x1) + off; - if (fabs(x1 - static_cast(x2)) >= 1.0) - return false; - f2.sqlBigint(x2); - return true; - } - if (t2.type() == SqlType::Real) { - f2.sqlReal(x1); - return true; - } - if (t2.type() == SqlType::Double) { - SqlDouble x2 = static_cast(x1); - f2.sqlDouble(x2); - return true; - } - ctx_assert(false); - return false; - } - if (t1.type() == SqlType::Double) { - SqlDouble x1 = f1.sqlDouble(); - int off = 0; - if (x1 > 0.0 && x1 - floor(x1) >= 0.5) - off = 1; - if (x1 < 0.0 && x1 - floor(x1) <= 0.5) - off = -1; - bool b = (x1 - floor(x1) < 0.5); - if (t2.type() == SqlType::Smallint) { - SqlSmallint x2 = static_cast(x1) + off; - if (fabs(x1 - static_cast(x2)) >= 1.0) - return false; - f2.sqlSmallint(x2); - return true; - } - if (t2.type() == SqlType::Integer) { - SqlInteger x2 = static_cast(x1) + off; - if (fabs(x1 - static_cast(x2)) >= 1.0) - return false; - f2.sqlInteger(x2); - return true; - } - if (t2.type() == SqlType::Bigint) { - SqlBigint x2 = static_cast(x1) + off; - if (fabs(x1 - static_cast(x2)) >= 1.0) - return false; - f2.sqlBigint(x2); - return true; - } - if (t2.type() == SqlType::Real) { - SqlReal x2 = static_cast(x1); - if (fabs(x1 - static_cast(x2)) >= 1.0) // XXX - return false; - f2.sqlReal(x1); - return true; - } - if (t2.type() == SqlType::Double) { - f2.sqlDouble(x1); - return true; - } - ctx_assert(false); - return false; - } - ctx_assert(false); - return false; -} - -bool -SqlField::less(const SqlField& sqlField) const -{ - const SqlField& f1 = *this; - const SqlField& f2 = sqlField; - const SqlType& t1 = f1.sqlSpec().sqlType(); - const SqlType& t2 = f2.sqlSpec().sqlType(); - ctx_assert(t1.type() == t2.type()); - if (t1.type() == SqlType::Char) { - const SqlChar* s1 = f1.sqlChar(); - const SqlChar* s2 = f2.sqlChar(); - unsigned n1 = t1.length(); - unsigned n2 = t2.length(); - SqlChar c1 = 0; - SqlChar c2 = 0; - unsigned i = 0; - while (i < n1 || i < n2) { - c1 = i < n1 ? s1[i] : 0x20; - c2 = i < n2 ? s2[i] : 0x20; - if (c1 != c2) - break; - i++; - } - return (c1 < c2); - } - if (t1.type() == SqlType::Varchar) { - unsigned n1, n2; - const SqlChar* s1 = f1.sqlVarchar(&n1); - const SqlChar* s2 = f2.sqlVarchar(&n2); - SqlChar c1 = 0; - SqlChar c2 = 0; - unsigned i = 0; - while (i < n1 || i < n2) { - c1 = i < n1 ? s1[i] : 0x0; - c2 = i < n2 ? s2[i] : 0x0; - if (c1 != c2) - break; - i++; - } - return (c1 < c2); - } - if (t1.type() == SqlType::Smallint) { - ctx_assert(t1.unSigned() == t2.unSigned()); - if (! t1.unSigned()) { - SqlSmallint x1 = f1.sqlSmallint(); - SqlSmallint x2 = f2.sqlSmallint(); - return (x1 < x2); - } else { - SqlUsmallint x1 = f1.sqlSmallint(); - SqlUsmallint x2 = f2.sqlSmallint(); - return (x1 < x2); - } - } - if (t1.type() == SqlType::Integer) { - ctx_assert(t1.unSigned() == t2.unSigned()); - if (! t1.unSigned()) { - SqlInteger x1 = f1.sqlInteger(); - SqlInteger x2 = f2.sqlInteger(); - return (x1 < x2); - } else { - SqlUinteger x1 = f1.sqlInteger(); - SqlUinteger x2 = f2.sqlInteger(); - return (x1 < x2); - } - } - if (t1.type() == SqlType::Bigint) { - ctx_assert(t1.unSigned() == t2.unSigned()); - if (! t1.unSigned()) { - SqlBigint x1 = f1.sqlBigint(); - SqlBigint x2 = f2.sqlBigint(); - return (x1 < x2); - } else { - SqlUbigint x1 = f1.sqlBigint(); - SqlUbigint x2 = f2.sqlBigint(); - return (x1 < x2); - } - } - if (t1.type() == SqlType::Real) { - SqlReal x1 = f1.sqlReal(); - SqlReal x2 = f2.sqlReal(); - return (x1 < x2); - } - if (t1.type() == SqlType::Double) { - SqlDouble x1 = f1.sqlDouble(); - SqlDouble x2 = f2.sqlDouble(); - return (x1 < x2); - } - if (t1.type() == SqlType::Datetime) { - SqlDatetime x1 = f1.sqlDatetime(); - SqlDatetime x2 = f2.sqlDatetime(); - return x1.less(x2); - } - ctx_assert(false); -} - -// copy from external - -static bool -copyin_char_char(Ctx& ctx, char* value, unsigned n, const char* ptr, const SQLINTEGER* ind, int* off, SqlChar* addr, int fieldId) -{ - if (off != 0 && *off >= 0) { - if ((unsigned)*off > n) { - ctx.pushStatus(Sqlstate::_22001, Error::Gen, "input parameter %d truncated (%u > %u)", fieldId, (unsigned)*off, n); - return false; - } - value += *off; - n -= *off; - } - unsigned m; - if (ind == 0 || *ind == SQL_NTS) - m = strlen(ptr); - else - m = *ind; - if (m > n) { - ctx.pushStatus(Sqlstate::_22001, Error::Gen, "input parameter %d truncated (%u > %u)", fieldId, m, n); - return false; - } - for (unsigned i = 0; i < m; i++) - value[i] = ptr[i]; - if (off != 0 && *off >= 0) - *off += m; - for (unsigned i = m; i < n; i++) - value[i] = addr == 0 ? 0x20 : 0x0; - if (addr != 0) { - if (off != 0 && *off >= 0) - m = *off; - addr[0] = (m >> 8) & 0xff; - addr[1] = (m & 0xff); - } - return true; -} - -static bool -copyin_binary_binary(Ctx& ctx, char* value, unsigned n, const char* ptr, const SQLINTEGER* ind, int* off, SqlChar* addr, int fieldId) -{ - if (off != 0 && *off >= 0) { - if ((unsigned)*off > n) { - ctx.pushStatus(Sqlstate::_22001, Error::Gen, "input parameter %d truncated (%u > %u)", fieldId, (unsigned)*off, n); - return false; - } - value += *off; - n -= *off; - } - if (ind == 0) { - ctx.pushStatus(Sqlstate::_22001, Error::Gen, "input parameter %d missing length", fieldId); - return false; - } - if (*ind < 0) { - ctx.pushStatus(Sqlstate::_22001, Error::Gen, "input parameter %d invalid length %d", fieldId, (int)*ind); - return false; - } - unsigned m; - m = *ind; - if (m > n) { - ctx.pushStatus(Sqlstate::_22001, Error::Gen, "input parameter %d truncated (%u > %u)", fieldId, m, n); - return false; - } - for (unsigned i = 0; i < m; i++) - value[i] = ptr[i]; - if (off != 0 && *off >= 0) - *off += m; - for (unsigned i = m; i < n; i++) - value[i] = addr == 0 ? 0x0 : 0x0; // just null - if (addr != 0) { - if (off != 0 && *off >= 0) - m = *off; - addr[0] = (m >> 8) & 0xff; - addr[1] = (m & 0xff); - } - return true; -} - -static bool -copyin_signed_char(Ctx& ctx, SqlBigint* value, const char* ptr, int fieldId) -{ - errno = 0; - char* endptr = 0; - SqlBigint x = strtoll(ptr, &endptr, 10); - if (endptr == 0 || *endptr != 0) { - errno = 0; - endptr = 0; - double y = strtod(ptr, &endptr); - if (endptr == 0 || *endptr != 0) { - ctx.pushStatus(Sqlstate::_22005, Error::Gen, "input parameter %d value %s not numeric", fieldId, ptr); - return false; - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "input parameter %d value %s overflow", fieldId, ptr); - return false; - } - // XXX should handle 123.000 - ctx.pushStatus(Sqlstate::_01004, Error::Gen, "input parameter %d value %s truncated", fieldId, ptr); - x = static_cast(y); - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "input parameter %d value %s overflow", fieldId, ptr); - return false; - } - *value = x; - return true; -} - -static bool -copyin_double_char(Ctx& ctx, SqlDouble* value, const char* ptr, int fieldId) -{ - errno = 0; - char* endptr = 0; - double x = strtod(ptr, &endptr); - if (endptr == 0 || *endptr != 0) { - ctx.pushStatus(Sqlstate::_22005, Error::Gen, "input parameter %d value %s not numeric", fieldId, ptr); - return false; - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "input parameter %d value %s overflow", fieldId, ptr); - return false; - } - *value = x; - return true; -} - -void -SqlField::copyin(Ctx& ctx, ExtField& extField) -{ - ctx_assert(extField.extSpec().extType().type() != ExtType::Unbound); - ctx_assert(sqlSpec().store() == SqlSpec::Physical); - SQLINTEGER* indPtr = extField.m_indPtr; - const int fieldId = extField.fieldId(); - if (indPtr != 0 && *indPtr == SQL_NULL_DATA) { - sqlNull(true); - return; - } - const SqlType& sqlType = sqlSpec().sqlType(); - const ExtType& extType = extField.extSpec().extType(); - if (extField.m_pos > 0) { - if (sqlType.type() == SqlType::Char && extType.type() == ExtType::Char) - ; - else if (sqlType.type() == SqlType::Varchar && extType.type() == ExtType::Char) - ; - else { - char buf[40]; - sqlType.print(buf, sizeof(buf)); - ctx.pushStatus(Sqlstate::_HY019, Error::Gen, "cannot send %s data in pieces", buf); - return; - } - } - if (sqlType.type() == SqlType::Char || sqlType.type() == SqlType::Varchar) { - unsigned length = 0; - char* value = 0; - SqlChar* laddr = 0; // Varchar length address - if (sqlType.type() == SqlType::Char) { - length = sqlType.length(); - if (length > SqlField_CharSmall) - value = reinterpret_cast(u_data.m_sqlChar); - else - value = reinterpret_cast(u_data.m_sqlCharSmall); - laddr = 0; - } else { -#if NDB_VERSION_MAJOR >= 3 - length = sqlType.length(); - if (2 + length > SqlField_CharSmall) - value = reinterpret_cast(u_data.m_sqlChar + 2); - else - value = reinterpret_cast(u_data.m_sqlCharSmall + 2); - laddr = (SqlChar*)value - 2; -#else - length = sqlType.length(); - if (length + 2 > SqlField_CharSmall) - value = reinterpret_cast(u_data.m_sqlChar); - else - value = reinterpret_cast(u_data.m_sqlCharSmall); - laddr = (SqlChar*)value + length; -#endif - } - if (extType.type() == ExtType::Char) { - const char* dataPtr = static_cast(extField.m_dataPtr); - int* off = 0; - if (extField.m_pos >= 0) - off = &extField.m_pos; - if (! copyin_char_char(ctx, value, length, dataPtr, indPtr, off, laddr, fieldId)) - return; - sqlNull(false); - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - const short* dataPtr = static_cast(extField.m_dataPtr); - char buf[100]; - sprintf(buf, "%hd", *dataPtr); - if (! copyin_char_char(ctx, value, length, buf, indPtr, 0, laddr, fieldId)) - return; - sqlNull(false); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - const unsigned short* dataPtr = static_cast(extField.m_dataPtr); - char buf[100]; - sprintf(buf, "%hu", *dataPtr); - if (! copyin_char_char(ctx, value, length, buf, indPtr, 0, laddr, fieldId)) - return; - sqlNull(false); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - const long* dataPtr = static_cast(extField.m_dataPtr); - char buf[100]; - sprintf(buf, "%ld", *dataPtr); - if (! copyin_char_char(ctx, value, length, buf, indPtr, 0, laddr, fieldId)) - return; - sqlNull(false); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - const unsigned long* dataPtr = static_cast(extField.m_dataPtr); - char buf[100]; - sprintf(buf, "%lu", *dataPtr); - if (! copyin_char_char(ctx, value, length, buf, indPtr, 0, laddr, fieldId)) - return; - sqlNull(false); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - const SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - char buf[100]; - sprintf(buf, FMT_I64, *dataPtr); - if (! copyin_char_char(ctx, value, length, buf, indPtr, 0, laddr, fieldId)) - return; - sqlNull(false); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - const SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - char buf[100]; - sprintf(buf, FMT_U64, *dataPtr); - if (! copyin_char_char(ctx, value, length, buf, indPtr, 0, laddr, fieldId)) - return; - sqlNull(false); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - const float* dataPtr = static_cast(extField.m_dataPtr); - char buf[100]; - sprintf(buf, "%.7f", (double)*dataPtr); - if (! copyin_char_char(ctx, value, length, buf, indPtr, 0, laddr, fieldId)) - return; - sqlNull(false); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - const double* dataPtr = static_cast(extField.m_dataPtr); - char buf[100]; - sprintf(buf, "%.14f", *dataPtr); - if (! copyin_char_char(ctx, value, length, buf, indPtr, 0, laddr, fieldId)) - return; - sqlNull(false); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Binary || sqlType.type() == SqlType::Varbinary) { - unsigned length = 0; - char* value = 0; - SqlChar* laddr = 0; // Varbinary length address - if (sqlType.type() == SqlType::Binary) { - length = sqlType.length(); - if (length > SqlField_CharSmall) - value = reinterpret_cast(u_data.m_sqlChar); - else - value = reinterpret_cast(u_data.m_sqlCharSmall); - laddr = 0; - } else { -#if NDB_VERSION_MAJOR >= 3 - length = sqlType.length(); - if (2 + length > SqlField_CharSmall) - value = reinterpret_cast(u_data.m_sqlChar + 2); - else - value = reinterpret_cast(u_data.m_sqlCharSmall + 2); - laddr = (SqlChar*)value - 2; -#else - length = sqlType.length(); - if (length + 2 > SqlField_CharSmall) - value = reinterpret_cast(u_data.m_sqlChar); - else - value = reinterpret_cast(u_data.m_sqlCharSmall); - laddr = (SqlChar*)value + length; -#endif - } - if (extType.type() == ExtType::Binary) { - const char* dataPtr = static_cast(extField.m_dataPtr); - int* off = 0; - if (extField.m_pos >= 0) - off = &extField.m_pos; - if (! copyin_binary_binary(ctx, value, length, dataPtr, indPtr, off, laddr, fieldId)) - return; - sqlNull(false); - return; - } - } - if (sqlType.type() == SqlType::Smallint) { - SqlSmallint value; - if (extType.type() == ExtType::Char) { - const char* dataPtr = static_cast(extField.m_dataPtr); - SqlBigint x; - if (! copyin_signed_char(ctx, &x, dataPtr, fieldId)) - return; - value = x; - sqlSmallint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlSmallint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlSmallint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlSmallint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlSmallint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlSmallint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlSmallint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - value = (SqlSmallint)*dataPtr; - sqlSmallint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - value = (SqlSmallint)*dataPtr; - sqlSmallint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Integer) { - SqlInteger value; - if (extType.type() == ExtType::Char) { - const char* dataPtr = static_cast(extField.m_dataPtr); - SqlBigint x; - if (! copyin_signed_char(ctx, &x, dataPtr, fieldId)) - return; - value = x; - sqlInteger(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlInteger(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlInteger(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlInteger(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlInteger(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlInteger(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlInteger(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - value = (SqlInteger)*dataPtr; - sqlInteger(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - value = (SqlInteger)*dataPtr; - sqlInteger(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Bigint) { - SqlBigint value; - if (extType.type() == ExtType::Char) { - const char* dataPtr = static_cast(extField.m_dataPtr); - SqlBigint x; - if (! copyin_signed_char(ctx, &x, dataPtr, fieldId)) - return; - value = x; - sqlBigint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlBigint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlBigint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlBigint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlBigint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlBigint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlBigint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - value = (SqlBigint)*dataPtr; - sqlBigint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - value = (SqlBigint)*dataPtr; - sqlBigint(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Real) { - SqlReal value; - if (extType.type() == ExtType::Char) { - const char* dataPtr = static_cast(extField.m_dataPtr); - SqlDouble x; - if (! copyin_double_char(ctx, &x, dataPtr, fieldId)) - return; - value = x; - sqlReal(x); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlReal(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlReal(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlReal(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlReal(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlReal(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlReal(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlReal(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlReal(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Double) { - SqlDouble value; - if (extType.type() == ExtType::Char) { - const char* dataPtr = static_cast(extField.m_dataPtr); - SqlDouble x; - if (! copyin_double_char(ctx, &x, dataPtr, fieldId)) - return; - value = x; - sqlDouble(x); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlDouble(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlDouble(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlDouble(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlDouble(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlDouble(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlDouble(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlDouble(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - value = *dataPtr; - sqlDouble(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Datetime) { - SqlDatetime value; - if (extType.type() == ExtType::Char) { - // XXX replace sscanf by manual scan or regex - const char* dataPtr = static_cast(extField.m_dataPtr); - int cc = 0; - unsigned yy = 0, mm = 0, dd = 0, HH = 0, MM = 0, SS = 0, ff = 0; - bool setdate = false; - char dummy[10]; - if (sscanf(dataPtr, "%2d%2u-%2u-%2u %2u:%2u:%2u.%4u%1s", &cc, &yy, &mm, &dd, &HH, &MM, &SS, &ff, dummy) == 8) { - ; - } else if (sscanf(dataPtr, "%2d%2u-%2u-%2u %2u:%2u:%2u%1s", &cc, &yy, &mm, &dd, &HH, &MM, &SS, dummy) == 7) { - ; - } else if (sscanf(dataPtr, "%2d%2u-%2u-%2u%1s", &cc, &yy, &mm, &dd, dummy) == 4) { - ; - } else if (sscanf(dataPtr, "%2u:%2u:%2u.%4u%1s", &HH, &MM, &SS, &ff, dummy) == 4) { - setdate = true; - } else if (sscanf(dataPtr, "%2u:%2u:%2u%1s", &HH, &MM, &SS, dummy) == 3) { - setdate = true; - } else { - ctx.pushStatus(Sqlstate::_22008, Error::Gen, "invalid timestamp format '%s'", dataPtr); - return; - } - if (setdate) { - time_t clock = time(0); - struct tm* t = localtime(&clock); - cc = (1900 + t->tm_year) / 100; - yy = (1900 + t->tm_year) % 100; - mm = 1 + t->tm_mon; - dd = t->tm_mday; - } - value.cc(cc); - value.yy(yy); - value.mm(mm); - value.dd(dd); - value.HH(HH); - value.MM(MM); - value.SS(SS); - value.ff(ff); - // XXX write date routines later - if (! value.valid()) { - ctx.pushStatus(Sqlstate::_22008, Error::Gen, "invalid timestamp values '%s'", dataPtr); - return; - } - sqlDatetime(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Timestamp) { - SQL_TIMESTAMP_STRUCT* dataPtr = static_cast(extField.m_dataPtr); - // XXX assume same datatype - value.cc(dataPtr->year / 100); - value.yy(dataPtr->year / 100); - value.mm(dataPtr->month); - value.dd(dataPtr->day); - value.HH(dataPtr->hour); - value.MM(dataPtr->minute); - value.SS(dataPtr->second); - value.ff(dataPtr->fraction); - if (! value.valid()) { - ctx.pushStatus(Sqlstate::_22008, Error::Gen, "invalid timestamp struct"); - return; - } - sqlDatetime(value); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - ctx_assert(false); // SqlType::Null not applicable -} - -// copy to external - -static bool -copyout_char_char(Ctx& ctx, const char* value, unsigned n, char* ptr, unsigned len, SQLINTEGER* ind, int* off) -{ - unsigned n2 = n; - if (off != 0 && *off >= 0) { - ctx_assert((unsigned)*off <= n2); - value += *off; - n2 -= *off; - if (len < n2 + 1) { - ctx.pushStatus(Sqlstate::_01004, Error::Gen, "more data at offset %d, current fetch %u, available %u", *off, len, n2); - n2 = len - 1; - } - } else { - if (len < n + 1) { // room for null byte - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "char value '%.*s' overflow (%u < %u)", (int)n, value, (unsigned)len, (unsigned)(len + 1)); - return false; - } - } - memcpy(ptr, value, n2); - ptr[n2] = 0; - if (off != 0 && *off >= 0) { - if (ind != 0) - *ind = n - *off; - *off += n2; - } else { - if (ind != 0) - *ind = n; - } - return true; -} - -static bool -copyout_binary_binary(Ctx& ctx, const char* value, unsigned n, char* ptr, unsigned len, SQLINTEGER* ind, int* off) -{ - unsigned n2 = n; - if (off != 0 && *off >= 0) { - ctx_assert((unsigned)*off <= n2); - value += *off; - n2 -= *off; - if (len < n2 + 1) { - ctx.pushStatus(Sqlstate::_01004, Error::Gen, "more data at offset %d, current fetch %u, available %u", *off, len, n2); - n2 = len - 1; - } - } else { - if (len < n) { // no room for null byte - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "binary value '%.*s' overflow (%u < %u)", (int)n, value, (unsigned)len, (unsigned)n); - return false; - } - } - memcpy(ptr, value, n2); - ptr[n2] = 0; - if (off != 0 && *off >= 0) { - if (ind != 0) - *ind = n - *off; - *off += n2; - } else { - if (ind != 0) - *ind = n; - } - return true; -} - -static bool -copyout_char_signed(Ctx& ctx, const char* value, unsigned n, long* ptr) -{ - while (n > 0 && value[0] == 0x20) { - value++; - n--; - } - char buf[200]; - if (n >= 200) - n = 200 - 1; - memcpy(buf, value, n); - buf[n] = 0; - errno = 0; - char* endptr = 0; - long x = strtol(buf, &endptr, 10); - if (endptr == 0 || *endptr != 0) { - errno = 0; - endptr = 0; - double y = strtod(buf, &endptr); - if (endptr == 0 || *endptr != 0) { - ctx.pushStatus(Sqlstate::_22005, Error::Gen, "value %s not numeric", buf); - return false; - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - // XXX should handle 123.000 - ctx.pushStatus(Sqlstate::_01004, Error::Gen, "value %s truncated", buf); - x = static_cast(y); - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - *ptr = x; - return true; -} - -static bool -copyout_char_bigsigned(Ctx& ctx, const char* value, unsigned n, SQLBIGINT* ptr) -{ - while (n > 0 && value[0] == 0x20) { - value++; - n--; - } - char buf[200]; - if (n >= 200) - n = 200 - 1; - memcpy(buf, value, n); - buf[n] = 0; - errno = 0; - char* endptr = 0; - SQLBIGINT x = strtoll(buf, &endptr, 10); - if (endptr == 0 || *endptr != 0) { - errno = 0; - endptr = 0; - double y = strtod(buf, &endptr); - if (endptr == 0 || *endptr != 0) { - ctx.pushStatus(Sqlstate::_22005, Error::Gen, "value %s not numeric", buf); - return false; - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - // XXX should handle 123.000 - ctx.pushStatus(Sqlstate::_01004, Error::Gen, "value %s truncated", buf); - x = static_cast(y); - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - *ptr = x; - return true; -} - -static bool -copyout_char_unsigned(Ctx& ctx, const char* value, unsigned n, unsigned long* ptr) -{ - while (n > 0 && value[0] == 0x20) { - value++; - n--; - } - char buf[200]; - if (n >= 200) - n = 200 - 1; - memcpy(buf, value, n); - buf[n] = 0; - errno = 0; - char* endptr = 0; - unsigned long x = strtoul(buf, &endptr, 10); - if (endptr == 0 || *endptr != 0) { - errno = 0; - endptr = 0; - double y = strtod(buf, &endptr); - if (endptr == 0 || *endptr != 0) { - ctx.pushStatus(Sqlstate::_22005, Error::Gen, "value %s not numeric", buf); - return false; - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - // XXX should handle 123.000 - ctx.pushStatus(Sqlstate::_01004, Error::Gen, "value %s truncated", buf); - x = static_cast(y); - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - *ptr = x; - return true; -} - -static bool -copyout_char_bigunsigned(Ctx& ctx, const char* value, unsigned n, SQLUBIGINT* ptr) -{ - while (n > 0 && value[0] == 0x20) { - value++; - n--; - } - char buf[200]; - if (n >= 200) - n = 200 - 1; - memcpy(buf, value, n); - buf[n] = 0; - errno = 0; - char* endptr = 0; - SQLUBIGINT x = strtoull(buf, &endptr, 10); - if (endptr == 0 || *endptr != 0) { - errno = 0; - endptr = 0; - double y = strtod(buf, &endptr); - if (endptr == 0 || *endptr != 0) { - ctx.pushStatus(Sqlstate::_22005, Error::Gen, "value %s not numeric", buf); - return false; - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - // XXX should handle 123.000 - ctx.pushStatus(Sqlstate::_01004, Error::Gen, "value %s truncated", buf); - x = static_cast(y); - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - *ptr = x; - return true; -} - -static bool -copyout_char_double(Ctx& ctx, const char* value, unsigned n, double* ptr) -{ - while (n > 0 && value[0] == 0x20) { - value++; - n--; - } - char buf[200]; - if (n >= 200) - n = 200 - 1; - memcpy(buf, value, n); - buf[n] = 0; - errno = 0; - char* endptr = 0; - double x = strtod(value, &endptr); - if (endptr == 0 || *endptr != 0) { - ctx.pushStatus(Sqlstate::_22005, Error::Gen, "value %s not numeric", value); - return false; - } else if (errno != 0) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", value); - return false; - } - *ptr = x; - return true; -} - -static bool -copyout_signed_char(Ctx& ctx, Int64 value, char* ptr, int len, SQLINTEGER* ind) -{ - char buf[100]; - sprintf(buf, FMT_I64, value); - unsigned n = strlen(buf); - if (len <= 0) { - ctx.pushStatus(Sqlstate::_HY090, Error::Gen, "invalid output buffer length %d", len); - return false; - } - if ((unsigned)len < n + 1) { // room for null byte - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - strcpy(ptr, buf); - if (ind != 0) - *ind = n; - return true; -} - -static bool -copyout_unsigned_char(Ctx& ctx, Uint64 uvalue, char* ptr, int len, SQLINTEGER* ind) -{ - char buf[100]; - sprintf(buf, FMT_U64, uvalue); - unsigned n = strlen(buf); - if (len <= 0) { - ctx.pushStatus(Sqlstate::_HY090, Error::Gen, "invalid output buffer length %d", len); - return false; - } - if ((unsigned)len < n + 1) { // room for null byte - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - strcpy(ptr, buf); - if (ind != 0) - *ind = n; - return true; -} - -static bool -copyout_double_char(Ctx& ctx, double value, unsigned prec, char* ptr, int len, SQLINTEGER* ind) -{ - char buf[100]; - sprintf(buf, "%.*f", (int)prec, value); - char* p = buf + strlen(buf); - while (p > buf + prec) - *--p = 0; - while (p > buf && *(p - 1) == '0') - *--p = 0; - if (p > buf && *(p - 1) == '.') { - *p++ = '0'; - *p = 0; - } - unsigned n = strlen(buf); - if (len <= 0) { - ctx.pushStatus(Sqlstate::_HY090, Error::Gen, "invalid output buffer length %d", len); - return false; - } - if ((unsigned)len < n + 1) { // room for null byte - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", buf); - return false; - } - strcpy(ptr, buf); - if (ind != 0) - *ind = n; - return true; -} - -void -SqlField::copyout(Ctx& ctx, ExtField& extField) const -{ - if (extField.extSpec().extType().type() == ExtType::Unbound) { - return; // output buffer may be unbound - } - if (sqlSpec().store() == SqlSpec::Reference) { - ctx_assert(u_data.m_sqlField != 0); - u_data.m_sqlField->copyout(ctx, extField); - return; - } - SQLINTEGER* indPtr = extField.m_indPtr; - if (u_null.m_nullFlag) { - if (extField.m_pos > 0) { // second time from SQLGetData - ctx.setCode(SQL_NO_DATA); - return; - } - if (indPtr == 0) { - ctx.pushStatus(Sqlstate::_22002, Error::Gen, "indicator variable required"); - return; - } - *indPtr = SQL_NULL_DATA; - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - const SqlType& sqlType = sqlSpec().sqlType(); - const ExtType& extType = extField.extSpec().extType(); - if (sqlType.type() == SqlType::Char || sqlType.type() == SqlType::Varchar) { - unsigned n = 0; - const char* value = 0; - if (sqlType.type() == SqlType::Char) { - n = sqlType.length(); - value = reinterpret_cast(sqlChar()); - } else { - value = reinterpret_cast(sqlVarchar(&n)); - } - if (extType.type() == ExtType::Char) { - char* dataPtr = static_cast(extField.m_dataPtr); - if (extField.m_dataLen <= 0) { - ctx.pushStatus(Sqlstate::_HY090, Error::Gen, "invalid output buffer length %d", (int)extField.m_dataLen); - return; - } - int* off = 0; - if (extField.m_pos >= 0) { - off = &extField.m_pos; - if ((unsigned)*off >= n) { - ctx.setCode(SQL_NO_DATA); - return; - } - } - if (! copyout_char_char(ctx, value, n, dataPtr, extField.m_dataLen, indPtr, off)) - return; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - short* dataPtr = static_cast(extField.m_dataPtr); - long x; - if (! copyout_char_signed(ctx, value, n, &x)) - return; - if (x < SHRT_MIN || x > SHRT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", value); - return; - } - *dataPtr = static_cast(x); - if (indPtr != 0) - *indPtr = sizeof(short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - unsigned long x; - if (! copyout_char_unsigned(ctx, value, n, &x)) - return; - if (x > USHRT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", value); - return; - } - *dataPtr = static_cast(x); - if (indPtr != 0) - *indPtr = sizeof(unsigned short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - long* dataPtr = static_cast(extField.m_dataPtr); - if (! copyout_char_signed(ctx, value, n, dataPtr)) - return; - if (indPtr != 0) - *indPtr = sizeof(long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - if (! copyout_char_unsigned(ctx, value, n, dataPtr)) - return; - if (indPtr != 0) - *indPtr = sizeof(unsigned long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - if (! copyout_char_bigsigned(ctx, value, n, dataPtr)) - return; - if (indPtr != 0) - *indPtr = sizeof(SQLBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - if (! copyout_char_bigunsigned(ctx, value, n, dataPtr)) - return; - if (indPtr != 0) - *indPtr = sizeof(SQLUBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - float* dataPtr = static_cast(extField.m_dataPtr); - double x; - if (! copyout_char_double(ctx, value, n, &x)) - return; - if (fabs(x) < FLT_MIN || fabs(x) > FLT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %s overflow", value); - return; - } - *dataPtr = static_cast(x); - if (indPtr != 0) - *indPtr = sizeof(float); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - double* dataPtr = static_cast(extField.m_dataPtr); - double x; - if (! copyout_char_double(ctx, value, n, &x)) - return; - *dataPtr = static_cast(x); - if (indPtr != 0) - *indPtr = sizeof(double); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Binary || sqlType.type() == SqlType::Varbinary) { - unsigned n = 0; - const char* value = 0; - if (sqlType.type() == SqlType::Binary) { - n = sqlType.length(); - value = reinterpret_cast(sqlBinary()); - } else { - value = reinterpret_cast(sqlVarbinary(&n)); - } - if (extType.type() == ExtType::Binary) { - char* dataPtr = static_cast(extField.m_dataPtr); - if (extField.m_dataLen <= 0) { - ctx.pushStatus(Sqlstate::_HY090, Error::Gen, "invalid output buffer length %d", (int)extField.m_dataLen); - return; - } - int* off = 0; - if (extField.m_pos >= 0) { - off = &extField.m_pos; - if ((unsigned)*off >= n) { - ctx.setCode(SQL_NO_DATA); - return; - } - } - if (! copyout_binary_binary(ctx, value, n, dataPtr, extField.m_dataLen, indPtr, off)) - return; - return; - } - } - if (sqlType.type() == SqlType::Smallint) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - const SqlSmallint value = sqlSmallint(); - const SqlUsmallint uvalue = value; - if (extType.type() == ExtType::Char) { - char* dataPtr = static_cast(extField.m_dataPtr); - if (! sqlType.unSigned()) { - if (! copyout_signed_char(ctx, value, dataPtr, extField.m_dataLen, indPtr)) - return; - } else { - if (! copyout_unsigned_char(ctx, uvalue, dataPtr, extField.m_dataLen, indPtr)) - return; - } - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(uvalue); - if (indPtr != 0) - *indPtr = sizeof(unsigned short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(uvalue); - if (indPtr != 0) - *indPtr = sizeof(unsigned long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(SQLBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(uvalue); - if (indPtr != 0) - *indPtr = sizeof(SQLUBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(float); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(double); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Integer) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - const SqlInteger value = sqlInteger(); - const SqlUinteger uvalue = value; - if (extType.type() == ExtType::Char) { - char* dataPtr = static_cast(extField.m_dataPtr); - if (! sqlType.unSigned()) { - if (! copyout_signed_char(ctx, value, dataPtr, extField.m_dataLen, indPtr)) - return; - } else { - if (! copyout_unsigned_char(ctx, uvalue, dataPtr, extField.m_dataLen, indPtr)) - return; - } - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - if (value < SHRT_MIN || value > SHRT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %d overflow", (int)value); - return; - } - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - if (uvalue > USHRT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %u overflow", uvalue); - return; - } - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(unsigned short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(uvalue); - if (indPtr != 0) - *indPtr = sizeof(unsigned long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(SQLBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(uvalue); - if (indPtr != 0) - *indPtr = sizeof(SQLUBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(float); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(double); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Bigint) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - const SqlBigint value = sqlBigint(); - const SqlUbigint uvalue = value; - if (extType.type() == ExtType::Char) { - char* dataPtr = static_cast(extField.m_dataPtr); - if (! sqlType.unSigned()) { - if (! copyout_signed_char(ctx, value, dataPtr, extField.m_dataLen, indPtr)) - return; - } else { - if (! copyout_unsigned_char(ctx, uvalue, dataPtr, extField.m_dataLen, indPtr)) - return; - } - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - if (value < SHRT_MIN || value > SHRT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value " FMT_I64 " overflow", (Int64)value); - return; - } - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - if (uvalue > USHRT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value " FMT_U64 " overflow", (Uint64)uvalue); - return; - } - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(unsigned short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - if (value < INT_MIN || value > INT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value " FMT_I64 " overflow", (Int64)value); - return; - } - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - if (uvalue > UINT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value " FMT_U64 " overflow", (Uint64)uvalue); - return; - } - *dataPtr = static_cast(uvalue); - if (indPtr != 0) - *indPtr = sizeof(unsigned long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(SQLBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(uvalue); - if (indPtr != 0) - *indPtr = sizeof(SQLUBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(float); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(double); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Real) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - const SqlReal value = sqlReal(); - if (extType.type() == ExtType::Char) { - char* dataPtr = static_cast(extField.m_dataPtr); - if (! copyout_double_char(ctx, value, 7, dataPtr, extField.m_dataLen, indPtr)) - return; - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // XXX todo - if (indPtr != 0) - *indPtr = sizeof(short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - if (value < 0 || value > USHRT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %g overflow", (double)value); - return; - } - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(unsigned short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // XXX todo - if (indPtr != 0) - *indPtr = sizeof(unsigned long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(SQLBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(SQLUBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(float); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(double); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Double) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - SqlDouble value = sqlDouble(); - if (extType.type() == ExtType::Char) { - char* dataPtr = static_cast(extField.m_dataPtr); - if (! copyout_double_char(ctx, value, 14, dataPtr, extField.m_dataLen, indPtr)) - return; - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Short || extType.type() == ExtType::Sshort) { - short* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // XXX todo - if (indPtr != 0) - *indPtr = sizeof(short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ushort) { - unsigned short* dataPtr = static_cast(extField.m_dataPtr); - if (value < 0 || value > USHRT_MAX) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "value %g overflow", (double)value); - return; - } - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(unsigned short); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Long || extType.type() == ExtType::Slong) { - long* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ulong) { - unsigned long* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // XXX todo - if (indPtr != 0) - *indPtr = sizeof(unsigned long); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Sbigint) { - SQLBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(SQLBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Ubigint) { - SQLUBIGINT* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(SQLUBIGINT); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Float) { - float* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); // big enough - if (indPtr != 0) - *indPtr = sizeof(float); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Double) { - double* dataPtr = static_cast(extField.m_dataPtr); - *dataPtr = static_cast(value); - if (indPtr != 0) - *indPtr = sizeof(double); - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - } - if (sqlType.type() == SqlType::Datetime) { - if (extField.m_pos > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - SqlDatetime value = sqlDatetime(); - if (extType.type() == ExtType::Char) { - char* dataPtr = static_cast(extField.m_dataPtr); - char buf[100]; - sprintf(buf, "%02d%02u-%02u-%02u\040%02u:%02u:%02u.%09u", value.cc(), value.yy(), value.mm(), value.dd(), value.HH(), value.MM(), value.SS(), value.ff()); - int n = strlen(buf); - if (extField.m_dataLen < 20) { - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "buffer too small for timestamp %s", buf); - return; - } - if (extField.m_dataLen < n) { - ctx.pushStatus(Sqlstate::_01004, Error::Gen, "truncating fractional part of timestamp %s", buf); - n = extField.m_dataLen; - } - if (! copyout_char_char(ctx, buf, n, dataPtr, extField.m_dataLen, indPtr, 0)) - return; - if (extField.m_pos >= 0) - extField.m_pos = 1; - return; - } - if (extType.type() == ExtType::Timestamp) { - SQL_TIMESTAMP_STRUCT* dataPtr = static_cast(extField.m_dataPtr); - // XXX assume same datatype - dataPtr->year = value.cc() * 100 + value.yy(); - dataPtr->month = value.mm(); - dataPtr->day = value.dd(); - dataPtr->hour = value.HH(); - dataPtr->minute = value.MM(); - dataPtr->second = value.SS(); - dataPtr->fraction = value.ff(); - return; - } - } - ctx_assert(false); // SqlType::Null not applicable -} - -void -SqlField::print(char* buf, unsigned size) const -{ - Ctx ctx; - unsigned n = sqlSpec().sqlType().displaySize(); - SQLINTEGER ind = 0; - ExtType extType(ExtType::Char); - ExtSpec extSpec(extType); - ExtField extField(extSpec, (SQLPOINTER)buf, size, &ind); - buf[0] = 0; - copyout(ctx, extField); - if (ind == SQL_NULL_DATA) - snprintf(buf, size, "NULL"); -} diff --git a/ndb/src/old_files/client/odbc/common/DataField.hpp b/ndb/src/old_files/client/odbc/common/DataField.hpp deleted file mode 100644 index 65138df25f1..00000000000 --- a/ndb/src/old_files/client/odbc/common/DataField.hpp +++ /dev/null @@ -1,446 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_DataField_hpp -#define ODBC_COMMON_DataField_hpp - -#include -#include -#include "DataType.hpp" - -/** - * @class SqlSpec - * @brief Specification of data in SQL format - */ -class SqlSpec { -public: - enum Store { - Undef = 0, - Reference = 1, // reference to read-only SqlField of same type - Physical = 2 // stored within or in allocated storage - }; - SqlSpec(); - SqlSpec(const SqlType& sqlType, Store store); - SqlSpec(const SqlSpec& sqlSpec); - SqlSpec(const SqlSpec& sqlSpec, Store store); - const SqlType& sqlType() const; - const Store store() const; - unsigned size() const; -private: - //SqlSpec& operator=(const SqlSpec& sqlSpec); // disallowed - SqlType m_sqlType; - Store m_store; -}; - -/** - * @class ExtSpec - * @brief Specification of data in external format - */ -class ExtSpec { -public: - ExtSpec(); - ExtSpec(const ExtType& extType); - ExtSpec(const ExtSpec& extSpec); - const ExtType& extType() const; - unsigned size() const; - void setValue(const ExtType& extType); -private: - ExtType m_extType; -}; - -/** - * @class LexSpec - * @brief Specification of lexical data - * - * Used only for converting lexical data to SQL data. - */ -class LexSpec { -public: - LexSpec(); - LexSpec(const LexType& lexType); - /** - * Lexical data is represented as string. Following - * converts it to SQL data. - */ - void convert(Ctx& ctx, const BaseString& value, class SqlField& out); -private: - LexType m_lexType; -}; - -// SqlSpec - -inline -SqlSpec::SqlSpec() : - m_store(Undef) -{ -} - -inline -SqlSpec::SqlSpec(const SqlType& sqlType, Store store) : - m_sqlType(sqlType), - m_store(store) -{ -} - -inline -SqlSpec::SqlSpec(const SqlSpec& sqlSpec) : - m_sqlType(sqlSpec.m_sqlType), - m_store(sqlSpec.m_store) -{ -} - -inline -SqlSpec::SqlSpec(const SqlSpec& sqlSpec, Store store) : - m_sqlType(sqlSpec.m_sqlType), - m_store(store) -{ -} - -inline const SqlType& -SqlSpec::sqlType() const -{ - return m_sqlType; -} - -inline const SqlSpec::Store -SqlSpec::store() const -{ - return m_store; -} - -inline unsigned -SqlSpec::size() const -{ - return sqlType().size(); -} - -// ExtSpec - -inline -ExtSpec::ExtSpec() -{ -} - -inline -ExtSpec::ExtSpec(const ExtType& extType) : - m_extType(extType) -{ -} - -inline -ExtSpec::ExtSpec(const ExtSpec& extSpec) : - m_extType(extSpec.m_extType) -{ -} - -inline const ExtType& -ExtSpec::extType() const -{ - return m_extType; -} - -inline unsigned -ExtSpec::size() const -{ - return m_extType.size(); -} - -inline void -ExtSpec::setValue(const ExtType& extType) -{ - m_extType = extType; -} - -// LexSpec - -inline -LexSpec::LexSpec(const LexType& lexType) : - m_lexType(lexType) -{ -} - -/** - * @class SqlField - * @brief Sql data field accessor - */ -class SqlField { -public: - SqlField(); - SqlField(const SqlSpec& sqlSpec); - SqlField(const SqlSpec& sqlSpec, const SqlField* sqlField); - SqlField(const SqlField& sqlField); - ~SqlField(); - const SqlSpec& sqlSpec() const; - const void* addr() const; // address of data - void* addr(); - unsigned allocSize() const; - const SqlChar* sqlChar() const; // get - const SqlChar* sqlVarchar(unsigned* length) const; - const SqlChar* sqlBinary() const; - const SqlChar* sqlVarbinary(unsigned* length) const; - SqlSmallint sqlSmallint() const; - SqlInteger sqlInteger() const; - SqlBigint sqlBigint() const; - SqlReal sqlReal() const; - SqlDouble sqlDouble() const; - SqlDatetime sqlDatetime() const; - void sqlChar(const char* value, int length); // set - void sqlChar(const SqlChar* value, int length); - void sqlVarchar(const char* value, int length); - void sqlVarchar(const SqlChar* value, int length); - void sqlBinary(const char* value, int length); - void sqlBinary(const SqlChar* value, int length); - void sqlVarbinary(const char* value, int length); - void sqlVarbinary(const SqlChar* value, int length); - void sqlSmallint(SqlSmallint value); - void sqlInteger(SqlInteger value); - void sqlBigint(SqlBigint value); - void sqlReal(SqlReal value); - void sqlDouble(SqlDouble value); - void sqlDatetime(SqlDatetime value); - bool sqlNull() const; // get and set null - void sqlNull(bool value); - unsigned trim() const; // right trimmed length - void copy(Ctx& ctx, SqlField& out) const; - bool cast(Ctx& ctx, SqlField& out) const; - bool less(const SqlField& sqlField) const; - // application input and output - void copyin(Ctx& ctx, class ExtField& extField); - void copyout(Ctx& ctx, class ExtField& extField) const; - // print for debugging - void print(char* buf, unsigned size) const; - // public for forte6 - //enum { CharSmall = 20 }; -#define SqlField_CharSmall 20 // redhat-6.2 (egcs-2.91.66) -private: - friend class LexSpec; - friend class SqlRow; - void alloc(); // allocate Physical - void alloc(const SqlField& sqlField); - void free(); // free Physical - SqlSpec m_sqlSpec; - union Data { - Data(); - Data(const SqlField* sqlField); - const SqlField* m_sqlField; - // Physical - SqlChar* m_sqlChar; // all char types - SqlChar m_sqlCharSmall[SqlField_CharSmall]; - SqlSmallint m_sqlSmallint; - SqlInteger m_sqlInteger; - SqlBigint m_sqlBigint; - SqlReal m_sqlReal; - SqlDouble m_sqlDouble; - SqlDatetime m_sqlDatetime; - } u_data; - union Null { - Null(); - bool m_nullFlag; - } u_null; -}; - -/** - * @class ExtField - * @brief External data field accessor - */ -class ExtField { -public: - ExtField(); - ExtField(const ExtSpec& extSpec, int fieldId = 0); - ExtField(const ExtSpec& extSpec, SQLPOINTER dataPtr, SQLINTEGER dataLen, SQLINTEGER* indPtr, int fieldId = 0); - ~ExtField(); - const ExtSpec& extSpec() const; - void setValue(SQLPOINTER dataPtr, SQLINTEGER dataLen); - void setValue(const ExtSpec& extSpec, SQLPOINTER dataPtr, SQLINTEGER dataLen, SQLINTEGER* indPtr); - int fieldId() const; - void setPos(int pos); - int getPos() const; -private: - friend class SqlField; - friend class Exec_root; - ExtSpec m_extSpec; - SQLPOINTER m_dataPtr; // data buffer - SQLINTEGER m_dataLen; // data buffer length - SQLINTEGER* m_indPtr; // null indicator or length - int m_fieldId; // field id > 0 for error messages - int m_pos; // output position for SQLGetData (if != -1) -}; - -inline int -ExtField::fieldId() const -{ - return m_fieldId; -} - -inline void -ExtField::setPos(int pos) -{ - m_pos = pos; -} - -inline int -ExtField::getPos() const -{ - return m_pos; -} - -// SqlField - -inline -SqlField::SqlField() -{ -} - -inline -SqlField::SqlField(const SqlSpec& sqlSpec) : - m_sqlSpec(sqlSpec) -{ - if (m_sqlSpec.store() == SqlSpec::Physical) - alloc(); -} - -inline -SqlField::SqlField(const SqlSpec& sqlSpec, const SqlField* sqlField) : - m_sqlSpec(sqlSpec), - u_data(sqlField) -{ - ctx_assert(m_sqlSpec.store() == SqlSpec::Reference); -} - -inline -SqlField::SqlField(const SqlField& sqlField) : - m_sqlSpec(sqlField.m_sqlSpec), - u_data(sqlField.u_data), - u_null(sqlField.u_null) -{ - if (m_sqlSpec.store() == SqlSpec::Physical) - alloc(sqlField); -} - -inline -SqlField::Data::Data() -{ -} - -inline -SqlField::Data::Data(const SqlField* sqlField) -{ - m_sqlField = sqlField; -} - -inline -SqlField::Null::Null() -{ -} - -inline -SqlField::~SqlField() -{ - if (m_sqlSpec.store() == SqlSpec::Physical) - free(); -} - -inline const SqlSpec& -SqlField::sqlSpec() const -{ - return m_sqlSpec; -} - -inline void -SqlField::sqlChar(const char* value, int length) -{ - sqlChar(reinterpret_cast(value), length); -} - -inline void -SqlField::sqlVarchar(const char* value, int length) -{ - sqlVarchar(reinterpret_cast(value), length); -} - -inline void -SqlField::sqlBinary(const char* value, int length) -{ - sqlBinary(reinterpret_cast(value), length); -} - -inline void -SqlField::sqlVarbinary(const char* value, int length) -{ - sqlVarbinary(reinterpret_cast(value), length); -} - -// ExtField - -inline -ExtField::ExtField() : - m_dataPtr(0), - m_dataLen(0), - m_indPtr(0), - m_pos(-1) -{ -} - -inline -ExtField::ExtField(const ExtSpec& extSpec, int fieldId) : - m_extSpec(extSpec), - m_dataPtr(0), - m_dataLen(0), - m_indPtr(0), - m_fieldId(fieldId), - m_pos(-1) -{ -} - -inline -ExtField::ExtField(const ExtSpec& extSpec, SQLPOINTER dataPtr, SQLINTEGER dataLen, SQLINTEGER* indPtr, int fieldId) : - m_extSpec(extSpec), - m_dataPtr(dataPtr), - m_dataLen(dataLen), - m_indPtr(indPtr), - m_fieldId(fieldId), - m_pos(-1) -{ -} - -inline -ExtField::~ExtField() -{ -} - -inline const ExtSpec& -ExtField::extSpec() const -{ - return m_extSpec; -} - -inline void -ExtField::setValue(SQLPOINTER dataPtr, SQLINTEGER dataLen) -{ - m_dataPtr = dataPtr; - m_dataLen = dataLen; -} - -inline void -ExtField::setValue(const ExtSpec& extSpec, SQLPOINTER dataPtr, SQLINTEGER dataLen, SQLINTEGER* indPtr) -{ - m_extSpec.setValue(extSpec.extType()); - m_dataPtr = dataPtr; - m_dataLen = dataLen; - m_indPtr = indPtr; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/DataRow.cpp b/ndb/src/old_files/client/odbc/common/DataRow.cpp deleted file mode 100644 index 509f2673e0d..00000000000 --- a/ndb/src/old_files/client/odbc/common/DataRow.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "DataRow.hpp" - -// SqlSpecs - -SqlSpecs::SqlSpecs(unsigned count) : - m_count(count) -{ - m_sqlSpec = new SqlSpec[1 + count]; -} - -SqlSpecs::SqlSpecs(const SqlSpecs& sqlSpecs) : - m_count(sqlSpecs.m_count) -{ - m_sqlSpec = new SqlSpec[1 + m_count]; - for (unsigned i = 1; i <= m_count; i++) { - void* place = static_cast(&m_sqlSpec[i]); - new (place) SqlSpec(sqlSpecs.m_sqlSpec[i]); - } -} - -SqlSpecs::~SqlSpecs() -{ - delete[] m_sqlSpec; -} - -// ExtSpecs - -ExtSpecs::ExtSpecs(unsigned count) : - m_count(count) -{ - m_extSpec = new ExtSpec[1 + count]; -} - -ExtSpecs::ExtSpecs(const ExtSpecs& extSpecs) : - m_count(extSpecs.m_count) -{ - m_extSpec = new ExtSpec[1 + m_count]; - for (unsigned i = 1; i <= m_count; i++) { - void* place = static_cast(&m_extSpec[i]); - new (place) ExtSpec(extSpecs.m_extSpec[i]); - } -} - -ExtSpecs::~ExtSpecs() -{ - delete[] m_extSpec; -} - -// SqlRow - -SqlRow::SqlRow(const SqlSpecs& sqlSpecs) : - m_sqlSpecs(sqlSpecs) -{ - m_sqlField = new SqlField[1 + count()]; - for (unsigned i = 1; i <= count(); i++) { - SqlField sqlField(m_sqlSpecs.getEntry(i)); - setEntry(i, sqlField); - } -} - -SqlRow::SqlRow(const SqlRow& sqlRow) : - m_sqlSpecs(sqlRow.m_sqlSpecs) -{ - m_sqlField = new SqlField[1 + count()]; - for (unsigned i = 1; i <= count(); i++) { - void* place = static_cast(&m_sqlField[i]); - new (place) SqlField(sqlRow.getEntry(i)); - } -} - -SqlRow::~SqlRow() -{ - for (unsigned i = 1; i <= count(); i++) { - m_sqlField[i].~SqlField(); - } - delete[] m_sqlField; -} - -SqlRow* -SqlRow::copy() const -{ - SqlRow* copyRow = new SqlRow(m_sqlSpecs); - for (unsigned i = 1; i <= count(); i++) { - const SqlField* sqlField = &m_sqlField[i]; - while (sqlField->sqlSpec().store() == SqlSpec::Reference) { - sqlField = sqlField->u_data.m_sqlField; - } - copyRow->setEntry(i, *sqlField); - } - return copyRow; -} - -void -SqlRow::copyout(Ctx& ctx, class ExtRow& extRow) const -{ - for (unsigned i = 1; i <= count(); i++) { - const SqlField& sqlField = getEntry(i); - ExtField& extField = extRow.getEntry(i); - sqlField.copyout(ctx, extField); - } -} - -// ExtRow - -ExtRow::ExtRow(const ExtSpecs& extSpecs) : - m_extSpecs(extSpecs) -{ - m_extField = new ExtField[1 + count()]; -} - -ExtRow::ExtRow(const ExtRow& extRow) : - m_extSpecs(extRow.m_extSpecs) -{ - m_extField = new ExtField[1 + count()]; - for (unsigned i = 1; i <= count(); i++) { - void* place = static_cast(&m_extField[i]); - new (place) ExtField(extRow.getEntry(i)); - } -} - -ExtRow::~ExtRow() -{ - delete[] m_extField; -} diff --git a/ndb/src/old_files/client/odbc/common/DataRow.hpp b/ndb/src/old_files/client/odbc/common/DataRow.hpp deleted file mode 100644 index 4a5a1e905b9..00000000000 --- a/ndb/src/old_files/client/odbc/common/DataRow.hpp +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_DataRow_hpp -#define ODBC_COMMON_DataRow_hpp - -#include -#include -#include "DataField.hpp" - -class Ctx; - -/** - * @class SqlSpecs - * @brief Specification of row of SQL data - */ -class SqlSpecs { -public: - SqlSpecs(unsigned count); - SqlSpecs(const SqlSpecs& sqlSpecs); - ~SqlSpecs(); - unsigned count() const; - void setEntry(unsigned i, const SqlSpec& sqlSpec); - const SqlSpec& getEntry(unsigned i) const; -private: - SqlSpecs& operator=(const SqlSpecs& sqlSpecs); // disallowed - const unsigned m_count; - SqlSpec* m_sqlSpec; -}; - -inline unsigned -SqlSpecs::count() const -{ - return m_count; -} - -inline void -SqlSpecs::setEntry(unsigned i, const SqlSpec& sqlSpec) -{ - ctx_assert(m_sqlSpec != 0 && 1 <= i && i <= m_count); - void* place = static_cast(&m_sqlSpec[i]); - new (place) SqlSpec(sqlSpec); -} - -inline const SqlSpec& -SqlSpecs::getEntry(unsigned i) const -{ - ctx_assert(m_sqlSpec != 0 && 1 <= i && i <= m_count); - return m_sqlSpec[i]; -} - -/** - * @class ExtSpecs - * @brief Specification of row of external data - */ -class ExtSpecs { -public: - ExtSpecs(unsigned count); - ExtSpecs(const ExtSpecs& extSpecs); - ~ExtSpecs(); - unsigned count() const; - void setEntry(unsigned i, const ExtSpec& extSpec); - const ExtSpec& getEntry(unsigned i) const; -private: - ExtSpecs& operator=(const ExtSpecs& extSpecs); // disallowed - const unsigned m_count; - ExtSpec* m_extSpec; -}; - -inline unsigned -ExtSpecs::count() const -{ - return m_count; -} - -inline void -ExtSpecs::setEntry(unsigned i, const ExtSpec& extSpec) -{ - ctx_assert(m_extSpec != 0 && 1 <= i && i <= m_count); - void* place = static_cast(&m_extSpec[i]); - new (place) ExtSpec(extSpec); -} - -inline const ExtSpec& -ExtSpecs::getEntry(unsigned i) const -{ - ctx_assert(m_extSpec != 0 && 1 <= i && i <= m_count); - return m_extSpec[i]; -} - -/** - * @class SqlRow - * @brief Sql data row - */ -class SqlRow { -public: - SqlRow(const SqlSpecs& sqlSpecs); - SqlRow(const SqlRow& sqlRow); - ~SqlRow(); - unsigned count() const; - void setEntry(unsigned i, const SqlField& sqlField); - SqlField& getEntry(unsigned i) const; - SqlRow* copy() const; - void copyout(Ctx& ctx, class ExtRow& extRow) const; -private: - SqlRow& operator=(const SqlRow& sqlRow); // disallowed - SqlSpecs m_sqlSpecs; - SqlField* m_sqlField; -}; - -inline unsigned -SqlRow::count() const -{ - return m_sqlSpecs.count(); -} - -inline void -SqlRow::setEntry(unsigned i, const SqlField& sqlField) -{ - ctx_assert(1 <= i && i <= count() && m_sqlField != 0); - m_sqlField[i].~SqlField(); - void* place = static_cast(&m_sqlField[i]); - new (place) SqlField(sqlField); -} - -inline SqlField& -SqlRow::getEntry(unsigned i) const -{ - ctx_assert(1 <= i && i <= count() && m_sqlField != 0); - return m_sqlField[i]; -} - -/** - * @class ExtRow - * @brief External data row - */ -class ExtRow { -public: - ExtRow(const ExtSpecs& extSpecs); - ExtRow(const ExtRow& extRow); - ~ExtRow(); - unsigned count() const; - void setEntry(unsigned i, const ExtField& extField); - ExtField& getEntry(unsigned i) const; -private: - ExtRow& operator=(const ExtRow& extRow); // disallowed - ExtSpecs m_extSpecs; - ExtField* m_extField; -}; - -inline unsigned -ExtRow::count() const -{ - return m_extSpecs.count(); -} - -inline void -ExtRow::setEntry(unsigned i, const ExtField& extField) -{ - ctx_assert(1 <= i && i <= count() && m_extField != 0); - void* place = static_cast(&m_extField[i]); - new (place) ExtField(extField); -} - -inline ExtField& -ExtRow::getEntry(unsigned i) const -{ - ctx_assert(1 <= i && i <= count() && m_extField != 0); - return m_extField[i]; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/DataType.cpp b/ndb/src/old_files/client/odbc/common/DataType.cpp deleted file mode 100644 index 96f6a6e0877..00000000000 --- a/ndb/src/old_files/client/odbc/common/DataType.cpp +++ /dev/null @@ -1,551 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "DataType.hpp" - -// SqlType - -SqlType::SqlType() : - m_type(Undef) -{ -} - -SqlType::SqlType(Type type, bool nullable) -{ - Ctx ctx; - setType(ctx, type, nullable); - ctx_assert(ctx.ok()); -} - -SqlType::SqlType(Type type, unsigned length, bool nullable) -{ - Ctx ctx; - setType(ctx, type, length, nullable); - ctx_assert(ctx.ok()); -} - -SqlType::SqlType(Type type, unsigned precision, unsigned scale, bool nullable) -{ - Ctx ctx; - setType(ctx, type, precision, scale, nullable); - ctx_assert(ctx.ok()); -} - -SqlType::SqlType(Ctx& ctx, Type type, bool nullable) -{ - setType(ctx, type, nullable); -} - -SqlType::SqlType(Ctx& ctx, Type type, unsigned length, bool nullable) -{ - setType(ctx, type, length, nullable); -} - -SqlType::SqlType(Ctx& ctx, Type type, unsigned precision, unsigned scale, bool nullable) -{ - setType(ctx, type, precision, scale, nullable); -} - -SqlType::SqlType(Ctx& ctx, const NdbDictionary::Column* ndbColumn) -{ - setType(ctx, ndbColumn); -} - -void -SqlType::setType(Ctx& ctx, Type type, bool nullable) -{ - switch (type) { - case Smallint: - case Integer: - case Bigint: - case Real: - case Double: - case Datetime: - break; - case Blob: - setType(ctx, Varbinary, FAKE_BLOB_SIZE, nullable); // XXX BLOB hack - return; - case Clob: - setType(ctx, Varchar, FAKE_BLOB_SIZE, nullable); // XXX BLOB hack - return; - case Null: - case Unbound: - break; - default: - ctx_assert(false); - break; - } - m_type = type; - m_precision = 0; - m_scale = 0; - m_length = 0; - m_nullable = nullable; - m_unSigned = false; -} - -void -SqlType::setType(Ctx& ctx, Type type, unsigned length, bool nullable) -{ - switch (type) { - case Char: - case Varchar: - case Binary: - case Varbinary: - break; - default: - ctx_assert(false); - break; - } - m_type = type; - m_precision = 0; - m_scale = 0; - m_length = length; - m_nullable = nullable; - m_unSigned = false; -} - -void -SqlType::setType(Ctx& ctx, Type type, unsigned precision, unsigned scale, bool nullable) -{ - ctx_assert(false); // not yet -} - -void -SqlType::setType(Ctx& ctx, const NdbDictionary::Column* ndbColumn) -{ - NdbDictionary::Column::Type type = ndbColumn->getType(); - unsigned length = ndbColumn->getLength(); - unsigned precision = ndbColumn->getPrecision(); - unsigned scale = ndbColumn->getScale(); - bool nullable = ndbColumn->getNullable(); - switch (type) { - case NdbDictionary::Column::Undefined: - break; - case NdbDictionary::Column::Int: - if (length == 1) - setType(ctx, Integer, nullable); - else - setType(ctx, Binary, length * sizeof(SqlInteger), nullable); - return; - case NdbDictionary::Column::Unsigned: - if (length == 1) { - setType(ctx, Integer, nullable); - unSigned(true); - } else - setType(ctx, Binary, length * sizeof(SqlUinteger), nullable); - return; - case NdbDictionary::Column::Bigint: - if (length == 1) - setType(ctx, Bigint, nullable); - else - setType(ctx, Binary, length * sizeof(SqlBigint), nullable); - return; - case NdbDictionary::Column::Bigunsigned: - if (length == 1) { - setType(ctx, Bigint, nullable); - unSigned(true); - } else - setType(ctx, Binary, length * sizeof(SqlBigint), nullable); - return; - case NdbDictionary::Column::Float: - if (length == 1) - setType(ctx, Real, nullable); - else - setType(ctx, Binary, length * sizeof(SqlReal), nullable); - return; - case NdbDictionary::Column::Double: - if (length == 1) - setType(ctx, Double, nullable); - else - setType(ctx, Binary, length * sizeof(SqlDouble), nullable); - return; - case NdbDictionary::Column::Decimal: - setType(ctx, Decimal, precision, scale, nullable); - return; - case NdbDictionary::Column::Char: - setType(ctx, Char, length, nullable); - return; - case NdbDictionary::Column::Varchar: - setType(ctx, Varchar, length, nullable); - return; - case NdbDictionary::Column::Binary: - setType(ctx, Binary, length, nullable); - return; - case NdbDictionary::Column::Varbinary: - setType(ctx, Varbinary, length, nullable); - return; - case NdbDictionary::Column::Datetime: - // XXX not yet - break; - case NdbDictionary::Column::Timespec: - setType(ctx, Datetime, nullable); - return; - case NdbDictionary::Column::Blob: - setType(ctx, Blob, nullable); - return; - case NdbDictionary::Column::Clob: - setType(ctx, Clob, nullable); - return; - default: - break; - } - ctx.pushStatus(Error::Gen, "unsupported NDB type %d", (signed)type); -} - -bool -SqlType::equal(const SqlType& sqlType) const -{ - return - m_type == sqlType.m_type && - m_precision == sqlType.m_precision && - m_scale == sqlType.m_scale && - m_length == sqlType.m_length; -} - -unsigned -SqlType::size() const -{ - switch (m_type) { - case Char: - case Varchar: - case Binary: - case Varbinary: - return m_length; - case Smallint: - return sizeof(SqlSmallint); - case Integer: - return sizeof(SqlInteger); - case Bigint: - return sizeof(SqlBigint); - case Real: - return sizeof(SqlReal); - case Double: - return sizeof(SqlDouble); - case Datetime: - return sizeof(SqlDatetime); - case Null: - return 0; - default: - break; - } - ctx_assert(false); - return 0; -} - -unsigned -SqlType::displaySize() const -{ - switch (m_type) { - case Char: - case Varchar: - return m_length; - case Binary: - case Varbinary: - return m_length; - case Smallint: - return m_unSigned ? 5 : 6; - case Integer: - return m_unSigned ? 10 : 11; - case Bigint: - return m_unSigned ? 20 : 21; - case Real: - return 10; - case Double: - return 20; - case Datetime: - return 30; - case Null: - return 0; - default: - break; - } - ctx_assert(false); - return 0; -} - -void -SqlType::getType(Ctx& ctx, NdbDictionary::Column* ndbColumn) const -{ - switch (m_type) { - case Char: - ndbColumn->setType(NdbDictionary::Column::Char); - ndbColumn->setLength(m_length); - break; - case Varchar: - ndbColumn->setType(NdbDictionary::Column::Varchar); - ndbColumn->setLength(m_length); - break; - case Binary: - ndbColumn->setType(NdbDictionary::Column::Binary); - ndbColumn->setLength(m_length); - break; - case Varbinary: - ndbColumn->setType(NdbDictionary::Column::Varbinary); - ndbColumn->setLength(m_length); - break; - case Smallint: - break; // XXX - case Integer: - if (! m_unSigned) - ndbColumn->setType(NdbDictionary::Column::Int); - else - ndbColumn->setType(NdbDictionary::Column::Unsigned); - ndbColumn->setLength(1); - break; - case Bigint: - if (! m_unSigned) - ndbColumn->setType(NdbDictionary::Column::Bigint); - else - ndbColumn->setType(NdbDictionary::Column::Bigunsigned); - ndbColumn->setLength(1); - break; - case Real: - ndbColumn->setType(NdbDictionary::Column::Float); - ndbColumn->setLength(1); - break; - case Double: - ndbColumn->setType(NdbDictionary::Column::Double); - ndbColumn->setLength(1); - break; - case Datetime: - ndbColumn->setType(NdbDictionary::Column::Timespec); - ndbColumn->setLength(1); - break; - default: - ctx_assert(false); - break; - } - ndbColumn->setNullable(m_nullable); -} - -const char* -SqlType::typeName() const -{ - switch (m_type) { - case Char: - return "CHAR"; - case Varchar: - return "VARCHAR"; - case Binary: - return "BINARY"; - case Varbinary: - return "VARBINARY"; - case Smallint: - return "SMALLINT"; - case Integer: - return "INTEGER"; - case Bigint: - return "BIGINT"; - case Real: - return "REAL"; - case Double: - return "FLOAT"; - case Datetime: - return "DATETIME"; - default: - break; - } - return "UNKNOWN"; -} - -void -SqlType::print(char* buf, unsigned size) const -{ - switch (m_type) { - case Char: - snprintf(buf, size, "char(%d)", m_length); - break; - case Varchar: - snprintf(buf, size, "varchar(%d)", m_length); - break; - case Binary: - snprintf(buf, size, "binary(%d)", m_length); - break; - case Varbinary: - snprintf(buf, size, "varbinary(%d)", m_length); - break; - case Smallint: - snprintf(buf, size, "smallint%s", m_unSigned ? " unsigned" : ""); - break; - case Integer: - snprintf(buf, size, "integer%s", m_unSigned ? " unsigned" : ""); - break; - case Bigint: - snprintf(buf, size, "bigint%s", m_unSigned ? " unsigned" : ""); - break; - case Real: - snprintf(buf, size, "real"); - break; - case Double: - snprintf(buf, size, "double"); - break; - case Datetime: - snprintf(buf, size, "datetime"); - break; - case Null: - snprintf(buf, size, "null"); - break; - case Unbound: - snprintf(buf, size, "unbound"); - break; - default: - snprintf(buf, size, "sqltype(%d)", (int)m_type); - break; - } -} - -// ExtType - -ExtType::ExtType() : - m_type(Undef) -{ -} - -ExtType::ExtType(Type type) -{ - Ctx ctx; - setType(ctx, type); - ctx_assert(ctx.ok()); -} - -ExtType::ExtType(Ctx& ctx, Type type) -{ - setType(ctx, type); -} - -void -ExtType::setType(Ctx& ctx, Type type) -{ - switch (type) { - case Char: - case Short: - case Sshort: - case Ushort: - case Long: - case Slong: - case Ulong: - case Sbigint: - case Ubigint: - case Float: - case Double: - case Timestamp: - case Binary: // XXX BLOB hack - case Unbound: - break; - default: - ctx.pushStatus(Error::Gen, "unsupported external type %d", (int)type); - return; - } - m_type = type; -} - -unsigned -ExtType::size() const -{ - ctx_assert(false); - return 0; -} - -// LexType - -LexType::LexType() : - m_type(Undef) -{ -} - -LexType::LexType(Type type) -{ - Ctx ctx; - setType(ctx, type); - ctx_assert(ctx.ok()); -} - -LexType::LexType(Ctx& ctx, Type type) -{ - setType(ctx, type); -} - -void -LexType::setType(Ctx& ctx, Type type) -{ - switch (type) { - case Char: - case Integer: - case Float: - case Null: - break; - default: - ctx_assert(false); - break; - } - m_type = type; -} - -// convert types - -SQLSMALLINT -SqlType::sqlcdefault(Ctx& ctx) const -{ - switch (m_type) { - case Char: - return SQL_C_CHAR; - case Varchar: - return SQL_C_CHAR; - case Binary: - return SQL_C_BINARY; - case Varbinary: - return SQL_C_BINARY; - case Smallint: - return m_unSigned ? SQL_C_USHORT : SQL_C_SSHORT; - case Integer: - return m_unSigned ? SQL_C_ULONG : SQL_C_SLONG; - case Bigint: - return SQL_C_CHAR; - // or maybe this - return m_unSigned ? SQL_C_UBIGINT : SQL_C_SBIGINT; - case Real: - return SQL_C_FLOAT; - case Double: - return SQL_C_DOUBLE; - case Datetime: - return SQL_C_TYPE_TIMESTAMP; - default: - break; - } - return SQL_C_DEFAULT; // no default -} - -void -LexType::convert(Ctx& ctx, SqlType& out, unsigned length) const -{ - switch (m_type) { - case Char: - out.setType(ctx, SqlType::Char, length, true); - return; - case Integer: - out.setType(ctx, SqlType::Bigint, false); - return; - case Float: - out.setType(ctx, SqlType::Double, false); - return; - case Null: - out.setType(ctx, SqlType::Null, true); - return; - default: - break; - } - ctx.pushStatus(Error::Gen, "unsupported lexical to SQL type conversion"); -} diff --git a/ndb/src/old_files/client/odbc/common/DataType.hpp b/ndb/src/old_files/client/odbc/common/DataType.hpp deleted file mode 100644 index e03e445cf05..00000000000 --- a/ndb/src/old_files/client/odbc/common/DataType.hpp +++ /dev/null @@ -1,293 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_DataType_hpp -#define ODBC_COMMON_DataType_hpp - -#include -#include -#include -#include -#include - -/** - * Sql data exists in several formats: - * - * - as NDB data at the bottom - * - as SQL data during intermediary processing - * - as external data in user input and output buffers - * - as lexical constants in SQL statement text - * - * Each data format has specific types (e.g. number) and each - * type has specific attributes (e.g. precision). - */ -enum DataFormat { - Undef_format = 0, - Ndb_format = 1, // not used in NDB version >= v2.10 - Sql_format = 2, - Ext_format = 3, - Lex_format = 4 -}; - -#define UndefDataType 990 -#define NullDataType 991 -#define UnboundDataType 992 - -class SqlType; -class ExtType; -class LexType; - -/** - * @class SqlType - * @brief Sql data type - */ -class SqlType { -public: - enum Type { - Undef = UndefDataType, - Char = SQL_CHAR, - Varchar = SQL_VARCHAR, - Longvarchar = SQL_LONGVARCHAR, - Binary = SQL_BINARY, - Varbinary = SQL_VARBINARY, - Longvarbinary = SQL_LONGVARBINARY, - Decimal = SQL_DECIMAL, - Tinyint = SQL_TINYINT, - Smallint = SQL_SMALLINT, - Integer = SQL_INTEGER, - Bigint = SQL_BIGINT, - Real = SQL_REAL, - Double = SQL_DOUBLE, - Date = SQL_DATE, - Datetime = SQL_TYPE_TIMESTAMP, - Blob = SQL_BLOB, - Clob = SQL_CLOB, - Null = NullDataType, // not an ODBC SQL type - Unbound = UnboundDataType // special for placeholders - }; - SqlType(); - SqlType(Type type, bool nullable = true); - SqlType(Type type, unsigned length, bool nullable = true); - SqlType(Type type, unsigned precision, unsigned scale, bool nullable = true); - SqlType(Ctx& ctx, Type type, bool nullable = true); - SqlType(Ctx& ctx, Type type, unsigned length, bool nullable = true); - SqlType(Ctx& ctx, Type type, unsigned precision, unsigned scale, bool nullable = true); - SqlType(Ctx& ctx, const NdbDictionary::Column* ndbColumn); - Type type() const; - void setType(Ctx& ctx, Type type, bool nullable = true); - void setType(Ctx& ctx, Type type, unsigned length, bool nullable = true); - void setType(Ctx& ctx, Type type, unsigned precision, unsigned scale, bool nullable = true); - void setType(Ctx& ctx, const NdbDictionary::Column* ndbColumn); - bool equal(const SqlType& sqlType) const; - unsigned size() const; - unsigned displaySize() const; - const char* typeName() const; - unsigned length() const; - bool nullable() const; - void nullable(bool value); - bool unSigned() const; - void unSigned(bool value); - // forwards compatible - void getType(Ctx& ctx, NdbDictionary::Column* ndbColumn) const; - // type conversion - SQLSMALLINT sqlcdefault(Ctx& ctx) const; - // print for debugging - void print(char* buf, unsigned size) const; -private: - friend class LexType; - Type m_type; - unsigned m_precision; - unsigned m_scale; - unsigned m_length; - bool m_nullable; - bool m_unSigned; // qualifier instead of separate types -}; - -inline SqlType::Type -SqlType::type() const -{ - return m_type; -} - -inline unsigned -SqlType::length() const -{ - return m_length; -} - -inline bool -SqlType::nullable() const -{ - return m_nullable; -} - -inline void -SqlType::nullable(bool value) -{ - m_nullable = value; -} - -inline bool -SqlType::unSigned() const -{ - return m_unSigned; -} - -inline void -SqlType::unSigned(bool value) -{ - ctx_assert(m_type == Smallint || m_type == Integer || m_type == Bigint); - m_unSigned = value; -} - -/** - * Actual SQL datatypes. - */ -typedef unsigned char SqlChar; // Char and Varchar via pointer -typedef Int16 SqlSmallint; -typedef Int32 SqlInteger; -typedef Int64 SqlBigint; -typedef Uint16 SqlUsmallint; -typedef Uint32 SqlUinteger; -typedef Uint64 SqlUbigint; -typedef float SqlReal; -typedef double SqlDouble; - -// datetime cc yy mm dd HH MM SS 00 ff ff ff ff stored as String(12) -struct SqlDatetime { - int cc() const { return *(signed char*)&m_data[0]; } - void cc(int x) { *(signed char*)&m_data[0] = x; } - unsigned yy() const { return *(unsigned char*)&m_data[1]; } - void yy(unsigned x) { *(unsigned char*)&m_data[1] = x; } - unsigned mm() const { return *(unsigned char*)&m_data[2]; } - void mm(unsigned x) { *(unsigned char*)&m_data[2] = x; } - unsigned dd() const { return *(unsigned char*)&m_data[3]; } - void dd(unsigned x) { *(unsigned char*)&m_data[3] = x; } - unsigned HH() const { return *(unsigned char*)&m_data[4]; } - void HH(unsigned x) { *(unsigned char*)&m_data[4] = x; } - unsigned MM() const { return *(unsigned char*)&m_data[5]; } - void MM(unsigned x) { *(unsigned char*)&m_data[5] = x; } - unsigned SS() const { return *(unsigned char*)&m_data[6]; } - void SS(unsigned x) { *(unsigned char*)&m_data[6] = x; } - unsigned ff() const { - const unsigned char* p = (unsigned char*)&m_data[8]; - unsigned x = 0; - x += *p++ << 24; - x += *p++ << 16; - x += *p++ << 8; - x += *p++; - return x; - } - void ff(unsigned x) { - unsigned char* p = (unsigned char*)&m_data[8]; - *p++ = (x >> 24) & 0xff; - *p++ = (x >> 16) & 0xff; - *p++ = (x >> 8) & 0xff; - *p++ = x & 0xff; - } - bool valid() { return true; } // XXX later - bool less(const SqlDatetime t) const { - if (cc() != t.cc()) - return cc() < t.cc(); - if (yy() != t.yy()) - return yy() < t.yy(); - if (mm() != t.mm()) - return mm() < t.mm(); - if (dd() != t.dd()) - return dd() < t.dd(); - if (HH() != t.HH()) - return HH() < t.HH(); - if (MM() != t.MM()) - return MM() < t.MM(); - if (SS() != t.SS()) - return SS() < t.SS(); - if (ff() != t.ff()) - return ff() < t.ff(); - return false; - } -private: - char m_data[12]; // use array to avoid gaps -}; - -/** - * @class ExtType - * @brief External data type - */ -class ExtType { -public: - enum Type { - Undef = UndefDataType, - Char = SQL_C_CHAR, - Short = SQL_C_SHORT, - Sshort = SQL_C_SSHORT, - Ushort = SQL_C_USHORT, - Long = SQL_C_LONG, // for sun.jdbc.odbc - Slong = SQL_C_SLONG, - Ulong = SQL_C_ULONG, - Sbigint = SQL_C_SBIGINT, - Ubigint = SQL_C_UBIGINT, - Float = SQL_C_FLOAT, - Double = SQL_C_DOUBLE, - Timestamp = SQL_C_TYPE_TIMESTAMP, - Binary = SQL_C_BINARY, // XXX BLOB hack - Unbound = UnboundDataType - }; - ExtType(); - ExtType(Type type); - ExtType(Ctx& ctx, Type type); - Type type() const; - void setType(Ctx& ctx, Type type); - unsigned size() const; -private: - Type m_type; -}; - -inline ExtType::Type -ExtType::type() const -{ - return m_type; -} - -/** - * @class LexType - * @class Lexical data type - */ -class LexType { -public: - enum Type { - Undef = UndefDataType, - Char = 1, - Integer = 2, - Float = 3, - Null = 4 - }; - LexType(); - LexType(Type type); - LexType(Ctx& ctx, Type type); - Type type() const; - void setType(Ctx& ctx, Type type); - void convert(Ctx& ctx, SqlType& out, unsigned length = 0) const; -private: - Type m_type; -}; - -inline LexType::Type -LexType::type() const -{ - return m_type; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/DescArea.cpp b/ndb/src/old_files/client/odbc/common/DescArea.cpp deleted file mode 100644 index bad9f23d3ef..00000000000 --- a/ndb/src/old_files/client/odbc/common/DescArea.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "DescArea.hpp" - -// DescField - -// DescRec - -void -DescRec::setField(int id, const OdbcData& data) -{ - Ctx ctx; - setField(ctx, id, data); - ctx_assert(ctx.ok()); -} - -void -DescRec::getField(int id, OdbcData& data) -{ - Ctx ctx; - getField(ctx, id, data); - ctx_assert(ctx.ok()); -} - -void -DescRec::setField(Ctx& ctx, int id, const OdbcData& data) -{ - Fields::iterator iter; - iter = m_fields.find(id); - if (ctx.logLevel() >= 3) { - char buf[100]; - data.print(buf, sizeof(buf)); - ctx_log3(("set %s rec %d id %d = %s", DescArea::nameUsage(m_area->getUsage()), m_num, id, buf)); - } - if (iter != m_fields.end()) { - DescField& field = (*iter).second; - field.setData(data); - m_area->setBound(false); // XXX could compare data values - return; - } - const DescSpec& spec = m_area->findSpec(id); - if (spec.m_pos != Desc_pos_end) { - DescField field(spec, data); - m_fields.insert(Fields::value_type(id, field)); - m_area->setBound(false); - return; - } - ctx_assert(false); -} - -void -DescRec::getField(Ctx& ctx, int id, OdbcData& data) -{ - Fields::iterator iter; - iter = m_fields.find(id); - if (iter != m_fields.end()) { - DescField& field = (*iter).second; - data.setValue(field.getData()); - return; - } - const DescSpec& spec = m_area->findSpec(id); - if (spec.m_pos != Desc_pos_end) { - data.setValue(); - return; // XXX default value - } - ctx_assert(false); -} - -// DescArea - -DescArea::DescArea(HandleBase* handle, const DescSpec* specList) : - m_handle(handle), - m_specList(specList), - m_alloc(Desc_alloc_undef), - m_usage(Desc_usage_undef), - m_bound(true) // no bind necessary since empty -{ - m_header.m_area = this; - m_header.m_num = -1; - DescRec rec; - rec.m_area = this; - rec.m_num = m_recs.size(); - m_recs.push_back(rec); // add bookmark record - SQLSMALLINT count = 0; - getHeader().setField(SQL_DESC_COUNT, count); - m_bound = true; -} - -DescArea::~DescArea() -{ -} - -const DescSpec& -DescArea::findSpec(int id) -{ - const DescSpec* p; - for (p = m_specList; p->m_pos != Desc_pos_end; p++) { - if (p->m_id == id) - break; - } - return *p; -} - -unsigned -DescArea::getCount() const -{ - ctx_assert(m_recs.size() > 0); - return m_recs.size() - 1; -} - -void -DescArea::setCount(Ctx& ctx, unsigned count) -{ - if (m_recs.size() - 1 == count) - return; - ctx_log3(("set %s count %d to %d", - DescArea::nameUsage(m_usage), - (unsigned)(m_recs.size() - 1), - count)); - m_recs.resize(1 + count); - for (unsigned i = 0; i <= count; i++) { - m_recs[i].m_area = this; - m_recs[i].m_num = i; - } - getHeader().setField(SQL_DESC_COUNT, static_cast(count)); -} - -DescRec& -DescArea::pushRecord() -{ - ctx_assert(m_recs.size() > 0); - DescRec rec; - rec.m_area = this; - rec.m_num = m_recs.size(); - m_recs.push_back(rec); - SQLSMALLINT count = m_recs.size() - 1; - getHeader().setField(SQL_DESC_COUNT, count); - return m_recs.back(); -} - -DescRec& -DescArea::getHeader() -{ - return m_header; -} - -DescRec& -DescArea::getRecord(unsigned num) -{ - ctx_assert(num < m_recs.size()); - return m_recs[num]; -} diff --git a/ndb/src/old_files/client/odbc/common/DescArea.hpp b/ndb/src/old_files/client/odbc/common/DescArea.hpp deleted file mode 100644 index e9f552d758d..00000000000 --- a/ndb/src/old_files/client/odbc/common/DescArea.hpp +++ /dev/null @@ -1,266 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_DescArea_hpp -#define ODBC_COMMON_DescArea_hpp - -#include -#include -#include -#include "OdbcData.hpp" - -/** - * Descriptor records. Contains: - * -# header, not called a "record" in this context - * -# bookmark record at index position 0 - * -# descriptor records at index positions starting from 1 - * - * These classes are in common/ since the code is general. - * However each area is associated with a HandleDesc. - * - * DescField - field identified by an SQL_DESC_* constant - * DescRec - header or record, a list of fields - * DescArea - header and all records - */ - -class HandleBase; -class DescField; -class DescRec; -class DescArea; - -enum DescPos { - Desc_pos_undef = 0, - Desc_pos_header, - Desc_pos_record, - Desc_pos_end -}; - -enum DescMode { - Desc_mode_undef = 0, - Desc_mode_readonly, - Desc_mode_writeonly, - Desc_mode_readwrite, - Desc_mode_unused -}; - -struct DescSpec { - DescPos m_pos; // header or record - int m_id; // SQL_DESC_ identifier - OdbcData::Type m_type; // data type - DescMode m_mode[1+4]; // access mode IPD APD IRD ARD - // called before setting value - typedef void CallbackSet(Ctx& ctx, HandleBase* self, const OdbcData& data); - CallbackSet* m_set; - // called to get default value - typedef void CallbackDefault(Ctx& ctx, HandleBase* self, OdbcData& data); - CallbackDefault* m_default; -}; - -enum DescAlloc { - Desc_alloc_undef = 0, - Desc_alloc_auto, - Desc_alloc_user -}; - -enum DescUsage { - Desc_usage_undef = 0, - Desc_usage_IPD = 1, // these must be 1-4 - Desc_usage_IRD = 2, - Desc_usage_APD = 3, - Desc_usage_ARD = 4 -}; - -/** - * @class DescField - * @brief Field identified by an SQL_DESC_* constant - */ -class DescField { -public: - DescField(const DescSpec& spec, const OdbcData& data); - DescField(const DescField& field); - ~DescField(); -private: - friend class DescRec; - void setData(const OdbcData& data); - const OdbcData& getData(); - const DescSpec& m_spec; - OdbcData m_data; -}; - -inline -DescField::DescField(const DescSpec& spec, const OdbcData& data) : - m_spec(spec), - m_data(data) -{ -} - -inline -DescField::DescField(const DescField& field) : - m_spec(field.m_spec), - m_data(field.m_data) -{ -} - -inline -DescField::~DescField() -{ -} - -inline void -DescField::setData(const OdbcData& data) -{ - ctx_assert(m_spec.m_type == data.type()); - m_data.setValue(data); -} - -inline const OdbcData& -DescField::getData() -{ - ctx_assert(m_data.type() != OdbcData::Undef); - return m_data; -} - -/** - * @class DescRec - * @brief Descriptor record, a list of fields - */ -class DescRec { - friend class DescArea; -public: - DescRec(); - ~DescRec(); - void setField(int id, const OdbcData& data); - void getField(int id, OdbcData& data); - void setField(Ctx& ctx, int id, const OdbcData& data); - void getField(Ctx& ctx, int id, OdbcData& data); -private: - DescArea* m_area; - int m_num; // for logging only -1 = header 0 = bookmark - typedef std::map Fields; - Fields m_fields; -}; - -inline -DescRec::DescRec() : - m_area(0) -{ -} - -inline -DescRec::~DescRec() -{ -} - -/** - * @class DescArea - * @brief All records, including header (record 0) - * - * Descriptor area includes a header (record 0) - * and zero or more records at position >= 1. - * Each of these describes one parameter or one column. - * - * - DescArea : Collection of records - * - DescRec : Collection of fields - * - DescField : Contains data of type OdbcData - */ -class DescArea { -public: - DescArea(HandleBase* handle, const DescSpec* specList); - ~DescArea(); - void setAlloc(DescAlloc alloc); - DescAlloc getAlloc() const; - void setUsage(DescUsage usage); - DescUsage getUsage() const; - static const char* nameUsage(DescUsage u); - // find specifier - const DescSpec& findSpec(int id); - // get or set number of records (record 0 not counted) - unsigned getCount() const; - void setCount(Ctx& ctx, unsigned count); - // paush new record (record 0 exists always) - DescRec& pushRecord(); - // get ref to header or to any record - DescRec& getHeader(); - DescRec& getRecord(unsigned num); - // modified since last bind - void setBound(bool bound); - bool isBound() const; -private: - HandleBase* m_handle; - const DescSpec* const m_specList; - DescRec m_header; - typedef std::vector Recs; - Recs m_recs; - DescAlloc m_alloc; - DescUsage m_usage; - bool m_bound; -}; - -inline void -DescArea::setAlloc(DescAlloc alloc) -{ - m_alloc = alloc; -} - -inline DescAlloc -DescArea::getAlloc() const -{ - return m_alloc; -} - -inline void -DescArea::setUsage(DescUsage usage) -{ - m_usage = usage; -} - -inline DescUsage -DescArea::getUsage() const -{ - return m_usage; -} - -inline const char* -DescArea::nameUsage(DescUsage u) -{ - switch (u) { - case Desc_usage_undef: - break; - case Desc_usage_IPD: - return "IPD"; - case Desc_usage_IRD: - return "IRD"; - case Desc_usage_APD: - return "APD"; - case Desc_usage_ARD: - return "ARD"; - } - return "?"; -} - -inline void -DescArea::setBound(bool bound) -{ - m_bound = bound; -} - -inline bool -DescArea::isBound() const -{ - return m_bound; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/DiagArea.cpp b/ndb/src/old_files/client/odbc/common/DiagArea.cpp deleted file mode 100644 index 06e8da89495..00000000000 --- a/ndb/src/old_files/client/odbc/common/DiagArea.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "OdbcData.hpp" -#include "DiagArea.hpp" - -// DiagSpec - -static const DiagSpec -diag_spec_list[] = { - { Diag_pos_header, - SQL_DIAG_CURSOR_ROW_COUNT, - OdbcData::Integer, - Odbc_handle_stmt - }, - { Diag_pos_header, - SQL_DIAG_DYNAMIC_FUNCTION, - OdbcData::Sqlchar, - Odbc_handle_stmt - }, - { Diag_pos_header, - SQL_DIAG_DYNAMIC_FUNCTION_CODE, - OdbcData::Integer, - Odbc_handle_stmt - }, - { Diag_pos_header, - SQL_DIAG_NUMBER, - OdbcData::Integer, - Odbc_handle_all - }, - { Diag_pos_header, - SQL_DIAG_RETURNCODE, - OdbcData::Smallint, - Odbc_handle_all - }, - { Diag_pos_header, - SQL_DIAG_ROW_COUNT, - OdbcData::Integer, - Odbc_handle_stmt - }, - { Diag_pos_status, - SQL_DIAG_CLASS_ORIGIN, - OdbcData::Sqlchar, - Odbc_handle_all - }, - { Diag_pos_status, - SQL_DIAG_COLUMN_NUMBER, - OdbcData::Integer, - Odbc_handle_all - }, - { Diag_pos_status, - SQL_DIAG_CONNECTION_NAME, - OdbcData::Sqlchar, - Odbc_handle_all - }, - { Diag_pos_status, - SQL_DIAG_MESSAGE_TEXT, - OdbcData::Sqlchar, - Odbc_handle_all - }, - { Diag_pos_status, - SQL_DIAG_NATIVE, - OdbcData::Integer, - Odbc_handle_all - }, - { Diag_pos_status, - SQL_DIAG_ROW_NUMBER, - OdbcData::Integer, - Odbc_handle_all - }, - { Diag_pos_status, - SQL_DIAG_SERVER_NAME, - OdbcData::Sqlchar, - Odbc_handle_all - }, - { Diag_pos_status, - SQL_DIAG_SQLSTATE, - OdbcData::Sqlchar, - Odbc_handle_all - }, - { Diag_pos_status, - SQL_DIAG_SUBCLASS_ORIGIN, - OdbcData::Sqlchar, - Odbc_handle_all - }, - { Diag_pos_end, - 0, - OdbcData::Undef, - 0 - } -}; - -const DiagSpec& -DiagSpec::find(int id) -{ - const DiagSpec* p; - for (p = diag_spec_list; p->m_pos != Diag_pos_end; p++) { - if (p->m_id == id) - break; - } - return *p; -} - -// DiagField - -// DiagRec - -void -DiagRec::setField(int id, const OdbcData& data) -{ - Fields::iterator iter; - iter = m_fields.find(id); - if (iter != m_fields.end()) { - DiagField& field = (*iter).second; - field.setData(data); - return; - } - const DiagSpec& spec = DiagSpec::find(id); - if (spec.m_pos != Diag_pos_end) { - DiagField field(spec, data); - m_fields.insert(Fields::value_type(id, field)); - return; - } - ctx_assert(false); -} - -void -DiagRec::getField(Ctx& ctx, int id, OdbcData& data) -{ - Fields::iterator iter; - iter = m_fields.find(id); - if (iter != m_fields.end()) { - DiagField& field = (*iter).second; - data.setValue(field.getData()); - return; - } - const DiagSpec& spec = DiagSpec::find(id); - if (spec.m_pos != Diag_pos_end) { - // success and undefined value says the MS doc - data.setValue(); - return; - } - ctx_assert(false); -} - -// DiagArea - -DiagArea::DiagArea() : - m_recs(1), // add header - m_code(SQL_SUCCESS), - m_recNumber(0) -{ - setHeader(SQL_DIAG_NUMBER, (SQLINTEGER)0); -} - -DiagArea::~DiagArea() { -} - -unsigned -DiagArea::numStatus() -{ - ctx_assert(m_recs.size() > 0); - return m_recs.size() - 1; -} - -void -DiagArea::pushStatus() -{ - ctx_assert(m_recs.size() > 0); - DiagRec rec; - m_recs.push_back(rec); - SQLINTEGER diagNumber = m_recs.size() - 1; - setHeader(SQL_DIAG_NUMBER, diagNumber); -} - -void -DiagArea::setHeader(int id, const OdbcData& data) -{ - ctx_assert(m_recs.size() > 0); - getHeader().setField(id, data); -} - -// set status - -void -DiagArea::setStatus(int id, const OdbcData& data) -{ - getStatus().setField(id, data); -} - -void -DiagArea::setStatus(const Sqlstate& state) -{ - getStatus().setField(SQL_DIAG_SQLSTATE, state); - setCode(state.getCode(m_code)); -} - -void -DiagArea::setStatus(const Error& error) -{ - BaseString message(""); - // bracketed prefixes - message.append(NDB_ODBC_COMPONENT_VENDOR); - message.append(NDB_ODBC_COMPONENT_DRIVER); - if (! error.driverError()) - message.append(NDB_ODBC_COMPONENT_DATABASE); - // native error code - char nativeString[20]; - sprintf(nativeString, "%02d%02d%04d", - (unsigned)error.m_status % 100, - (unsigned)error.m_classification % 100, - (unsigned)error.m_code % 10000); - SQLINTEGER native = atoi(nativeString); - message.appfmt("NDB-%s", nativeString); - // message text - message.append(" "); - message.append(error.m_message); - if (error.m_sqlFunction != 0) - message.appfmt(" (in %s)", error.m_sqlFunction); - // set diag fields - setStatus(error.m_sqlstate); - setStatus(SQL_DIAG_NATIVE, native); - setStatus(SQL_DIAG_MESSAGE_TEXT, message.c_str()); -} - -// push status - -void -DiagArea::pushStatus(const Error& error) -{ - pushStatus(); - setStatus(error); -} - -// record access - -DiagRec& -DiagArea::getHeader() -{ - ctx_assert(m_recs.size() > 0); - return m_recs[0]; -} - -DiagRec& -DiagArea::getStatus() -{ - ctx_assert(m_recs.size() > 1); - return m_recs.back(); -} - -DiagRec& -DiagArea::getRecord(unsigned num) -{ - ctx_assert(num < m_recs.size()); - return m_recs[num]; -} - -void -DiagArea::getRecord(Ctx& ctx, unsigned num, int id, OdbcData& data) -{ - DiagRec& rec = getRecord(num); - rec.getField(ctx, id, data); -} - -void -DiagArea::setCode(SQLRETURN code) -{ - m_code = code; - getHeader().setField(SQL_DIAG_RETURNCODE, (SQLSMALLINT)code); -} diff --git a/ndb/src/old_files/client/odbc/common/DiagArea.hpp b/ndb/src/old_files/client/odbc/common/DiagArea.hpp deleted file mode 100644 index 79c03de6623..00000000000 --- a/ndb/src/old_files/client/odbc/common/DiagArea.hpp +++ /dev/null @@ -1,196 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_DiagArea_hpp -#define ODBC_COMMON_DiagArea_hpp - -#include -#include -#include -#include "OdbcData.hpp" - -enum DiagPos { - Diag_pos_undef = 0, - Diag_pos_header, - Diag_pos_status, - Diag_pos_end -}; - -/** - * @class DiagSpec - * @brief Field specification - */ -struct DiagSpec { - DiagPos m_pos; // header or status - int m_id; // SQL_DIAG_ identifier - OdbcData::Type m_type; // data type - unsigned m_handles; // defined for these handle types - // find the spec - static const DiagSpec& find(int id); -}; - -/** - * @class DiagField - * @brief Field identified by an SQL_DIAG_* constant - */ -class DiagField { -public: - DiagField(const DiagSpec& spec, const OdbcData& data); - DiagField(const DiagField& field); - ~DiagField(); - void setData(const OdbcData& data); - const OdbcData& getData(); -private: - const DiagSpec& m_spec; - OdbcData m_data; -}; - -inline -DiagField::DiagField(const DiagSpec& spec, const OdbcData& data) : - m_spec(spec), - m_data(data) -{ -} - -inline -DiagField::DiagField(const DiagField& field) : - m_spec(field.m_spec), - m_data(field.m_data) -{ -} - -inline -DiagField::~DiagField() -{ -} - -inline void -DiagField::setData(const OdbcData& data) -{ - ctx_assert(m_spec.m_type == data.type()); - m_data.setValue(data); -} - -inline const OdbcData& -DiagField::getData() -{ - ctx_assert(m_data.type() != OdbcData::Undef); - return m_data; -} - -/** - * @class DiagRec - * @brief One diagnostic record, a list of fields - */ -class DiagRec { -public: - DiagRec(); - ~DiagRec(); - void setField(int id, const OdbcData& data); - void getField(Ctx& ctx, int id, OdbcData& data); -private: - typedef std::map Fields; - Fields m_fields; -}; - -inline -DiagRec::DiagRec() -{ -} - -inline -DiagRec::~DiagRec() -{ -} - -/** - * @class DiagArea - * @brief All records, including header (record 0) - * - * Diagnostic area includes a header (record 0) and zero or more - * status records at positions >= 1. - */ -class DiagArea { -public: - DiagArea(); - ~DiagArea(); - /** - * Get number of status records. - */ - unsigned numStatus(); - /** - * Push new status record. - */ - void pushStatus(); - /** - * Set field in header. - */ - void setHeader(int id, const OdbcData& data); - /** - * Set field in latest status record. The arguments can - * also be plain int, char*, Sqlstate. The NDB and other - * native errors set Sqlstate _IM000 automatically. - */ - void setStatus(int id, const OdbcData& data); - void setStatus(const Sqlstate& state); - void setStatus(const Error& error); - /** - * Convenience methods to push new status record and set - * some common fields in it. Sqlstate is set always. - */ - void pushStatus(const Error& error); - /** - * Get refs to various records. - */ - DiagRec& getHeader(); - DiagRec& getStatus(); - DiagRec& getRecord(unsigned num); - /** - * Get diag values. - */ - void getRecord(Ctx& ctx, unsigned num, int id, OdbcData& data); - /** - * Get or set return code. - */ - SQLRETURN getCode() const; - void setCode(SQLRETURN ret); - /** - * Get "next" record number (0 when no more). - * Used only by the deprecated SQLError function. - */ - unsigned nextRecNumber(); -private: - typedef std::vector Recs; - Recs m_recs; - SQLRETURN m_code; - unsigned m_recNumber; // for SQLError -}; - -inline SQLRETURN -DiagArea::getCode() const -{ - return m_code; -} - -inline unsigned -DiagArea::nextRecNumber() -{ - if (m_recNumber >= numStatus()) - return 0; - return ++m_recNumber; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/Makefile b/ndb/src/old_files/client/odbc/common/Makefile deleted file mode 100644 index 7ee29738d86..00000000000 --- a/ndb/src/old_files/client/odbc/common/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -include .defs.mk - -TYPE = * - -NONPIC_ARCHIVE = N - -PIC_ARCHIVE = Y - -ARCHIVE_TARGET = odbccommon - -SOURCES = \ - common.cpp \ - Ctx.cpp \ - Sqlstate.cpp \ - OdbcData.cpp \ - DiagArea.cpp \ - AttrArea.cpp \ - DescArea.cpp \ - ConnArea.cpp \ - StmtInfo.cpp \ - StmtArea.cpp \ - CodeTree.cpp \ - ResultArea.cpp \ - DataType.cpp \ - DataField.cpp \ - DataRow.cpp - -include ../Extra.mk -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/client/odbc/common/OdbcData.cpp b/ndb/src/old_files/client/odbc/common/OdbcData.cpp deleted file mode 100644 index 32400e07c7a..00000000000 --- a/ndb/src/old_files/client/odbc/common/OdbcData.cpp +++ /dev/null @@ -1,560 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "OdbcData.hpp" - -OdbcData::OdbcData() : - m_type(Undef) -{ -} - -OdbcData::OdbcData(Type type) : - m_type(type) -{ - switch (m_type) { - case Smallint: - m_smallint = 0; - break; - case Usmallint: - m_usmallint = 0; - break; - case Integer: - m_integer = 0; - break; - case Uinteger: - m_uinteger = 0; - break; - case Pointer: - m_pointer = 0; - break; - case SmallintPtr: - m_smallintPtr = 0; - break; - case UsmallintPtr: - m_usmallintPtr = 0; - break; - case IntegerPtr: - m_integerPtr = 0; - break; - case UintegerPtr: - m_uintegerPtr = 0; - break; - case PointerPtr: - m_pointerPtr = 0; - break; - case Sqlchar: - m_sqlchar = 0; - break; - case Sqlstate: - m_sqlstate = 0; - break; - default: - ctx_assert(false); - break; - }; -} - -OdbcData::OdbcData(const OdbcData& odbcData) : - m_type(odbcData.m_type) -{ - switch (m_type) { - case Smallint: - m_smallint = odbcData.m_smallint; - break; - case Usmallint: - m_usmallint = odbcData.m_usmallint; - break; - case Integer: - m_integer = odbcData.m_integer; - break; - case Uinteger: - m_uinteger = odbcData.m_uinteger; - break; - case Pointer: - m_pointer = odbcData.m_pointer; - break; - case SmallintPtr: - m_smallintPtr = odbcData.m_smallintPtr; - break; - case UsmallintPtr: - m_usmallintPtr = odbcData.m_usmallintPtr; - break; - case IntegerPtr: - m_integerPtr = odbcData.m_integerPtr; - break; - case UintegerPtr: - m_uintegerPtr = odbcData.m_uintegerPtr; - break; - case PointerPtr: - m_pointerPtr = odbcData.m_pointerPtr; - break; - case Sqlchar: { - unsigned n = strlen(odbcData.m_sqlchar); - m_sqlchar = new char[n + 1]; - memcpy(m_sqlchar, odbcData.m_sqlchar, n + 1); - break; - } - case Sqlstate: - m_sqlstate = odbcData.m_sqlstate; - break; - default: - ctx_assert(false); - break; - }; -} - -OdbcData::~OdbcData() -{ - switch (m_type) { - case Sqlchar: - delete[] m_sqlchar; - break; - default: - break; - } -} - -void -OdbcData::setValue() -{ - m_type = Undef; -} - -void -OdbcData::setValue(Type type) -{ - if (m_type == Sqlchar) { - delete[] m_sqlchar; - m_sqlchar = 0; - } - switch (m_type) { - case Smallint: - m_smallint = 0; - break; - case Usmallint: - m_usmallint = 0; - break; - case Integer: - m_integer = 0; - break; - case Uinteger: - m_uinteger = 0; - break; - case Pointer: - m_pointer = 0; - break; - case SmallintPtr: - m_smallintPtr = 0; - break; - case UsmallintPtr: - m_usmallintPtr = 0; - break; - case IntegerPtr: - m_integerPtr = 0; - break; - case UintegerPtr: - m_uintegerPtr = 0; - break; - case PointerPtr: - m_pointerPtr = 0; - break; - case Sqlchar: - m_sqlchar = 0; - break; - case Sqlstate: - m_sqlstate = 0; - break; - default: - ctx_assert(false); - break; - }; -} - -void -OdbcData::setValue(const OdbcData odbcData) -{ - if (m_type == Sqlchar) { - delete[] m_sqlchar; - m_sqlchar = 0; - } - m_type = odbcData.m_type; - switch (m_type) { - case Smallint: - m_smallint = odbcData.m_smallint; - break; - case Usmallint: - m_usmallint = odbcData.m_usmallint; - break; - case Integer: - m_integer = odbcData.m_integer; - break; - case Uinteger: - m_uinteger = odbcData.m_uinteger; - break; - case Pointer: - m_pointer = odbcData.m_pointer; - break; - case SmallintPtr: - m_smallintPtr = odbcData.m_smallintPtr; - break; - case UsmallintPtr: - m_usmallintPtr = odbcData.m_usmallintPtr; - break; - case IntegerPtr: - m_integerPtr = odbcData.m_integerPtr; - break; - case UintegerPtr: - m_uintegerPtr = odbcData.m_uintegerPtr; - break; - case PointerPtr: - m_pointerPtr = odbcData.m_pointerPtr; - break; - case Sqlchar: { - unsigned n = strlen(odbcData.m_sqlchar); - m_sqlchar = new char[n + 1]; - memcpy(m_sqlchar, odbcData.m_sqlchar, n + 1); - break; - } - case Sqlstate: - m_sqlstate = odbcData.m_sqlstate; - break; - default: - ctx_assert(false); - break; - }; -} - -// copy in from user buffer - -void -OdbcData::copyin(Ctx& ctx, Type type, SQLPOINTER buf, SQLINTEGER length) -{ - if (m_type == Sqlchar) { - delete[] m_sqlchar; - m_sqlchar = 0; - } - m_type = type; - switch (m_type) { - case Smallint: { - SQLSMALLINT val = 0; - switch (length) { - case 0: - case SQL_IS_SMALLINT: - val = (SQLSMALLINT)(SQLINTEGER)buf; - break; - case SQL_IS_USMALLINT: - val = (SQLUSMALLINT)(SQLUINTEGER)buf; - break; - case SQL_IS_INTEGER: - val = (SQLINTEGER)buf; - break; - case SQL_IS_UINTEGER: - val = (SQLUINTEGER)buf; - break; - default: - ctx.pushStatus(Error::Gen, "smallint input - invalid length %d", (int)length); - return; - } - m_smallint = val; - break; - } - case Usmallint: { - SQLUSMALLINT val = 0; - switch (length) { - case SQL_IS_SMALLINT: - val = (SQLSMALLINT)(SQLINTEGER)buf; - break; - case 0: - case SQL_IS_USMALLINT: - val = (SQLUSMALLINT)(SQLUINTEGER)buf; - break; - case SQL_IS_INTEGER: - val = (SQLINTEGER)buf; - break; - case SQL_IS_UINTEGER: - val = (SQLUINTEGER)buf; - break; - default: - ctx.pushStatus(Error::Gen, "unsigned smallint input - invalid length %d", (int)length); - return; - } - m_usmallint = val; - break; - } - case Integer: { - SQLINTEGER val = 0; - switch (length) { - case SQL_IS_SMALLINT: - val = (SQLSMALLINT)(SQLINTEGER)buf; - break; - case SQL_IS_USMALLINT: - val = (SQLUSMALLINT)(SQLUINTEGER)buf; - break; - case 0: - case SQL_IS_INTEGER: - val = (SQLINTEGER)buf; - break; - case SQL_IS_UINTEGER: - val = (SQLUINTEGER)buf; - break; - default: - ctx.pushStatus(Error::Gen, "integer input - invalid length %d", (int)length); - return; - } - m_integer = val; - break; - } - case Uinteger: { - SQLUINTEGER val = 0; - switch (length) { - case SQL_IS_SMALLINT: - val = (SQLSMALLINT)(SQLINTEGER)buf; - break; - case SQL_IS_USMALLINT: - val = (SQLUSMALLINT)(SQLUINTEGER)buf; - break; - case SQL_IS_INTEGER: - val = (SQLINTEGER)buf; - break; - case 0: - case SQL_IS_UINTEGER: - val = (SQLUINTEGER)buf; - break; - default: - ctx.pushStatus(Error::Gen, "unsigned integer input - invalid length %d", (int)length); - return; - } - m_uinteger = val; - break; - } - case Pointer: { - SQLPOINTER val = 0; - switch (length) { - case 0: - case SQL_IS_POINTER: - val = (SQLPOINTER)buf; - break; - default: - ctx.pushStatus(Error::Gen, "pointer input - invalid length %d", (int)length); - return; - } - m_pointer = val; - break; - } - case SmallintPtr: { - SQLSMALLINT* val = 0; - switch (length) { - case 0: - case SQL_IS_POINTER: - val = (SQLSMALLINT*)buf; - break; - default: - ctx.pushStatus(Error::Gen, "smallint pointer input - invalid length %d", (int)length); - return; - } - m_smallintPtr = val; - break; - } - case UsmallintPtr: { - SQLUSMALLINT* val = 0; - switch (length) { - case 0: - case SQL_IS_POINTER: - val = (SQLUSMALLINT*)buf; - break; - default: - ctx.pushStatus(Error::Gen, "unsigned smallint pointer input - invalid length %d", (int)length); - return; - } - m_usmallintPtr = val; - break; - } - case IntegerPtr: { - SQLINTEGER* val = 0; - switch (length) { - case 0: - case SQL_IS_POINTER: - val = (SQLINTEGER*)buf; - break; - default: - ctx.pushStatus(Error::Gen, "integer pointer input - invalid length %d", (int)length); - return; - } - m_integerPtr = val; - break; - } - case UintegerPtr: { - SQLUINTEGER* val = 0; - switch (length) { - case 0: - case SQL_IS_POINTER: - val = (SQLUINTEGER*)buf; - break; - default: - ctx.pushStatus(Error::Gen, "unsigned integer pointer input - invalid length %d", (int)length); - return; - } - m_uintegerPtr = val; - break; - } - case Sqlchar: { - const char* val = (char*)buf; - if (val == 0) { - ctx.pushStatus(Sqlstate::_HY009, Error::Gen, "null string input"); - return; - } - if (length < 0 && length != SQL_NTS) { - ctx.pushStatus(Error::Gen, "string input - invalid length %d", (int)length); - return; - } - if (length == SQL_NTS) { - m_sqlchar = strcpy(new char[strlen(val) + 1], val); - } else { - m_sqlchar = (char*)memcpy(new char[length + 1], val, length); - m_sqlchar[length] = 0; - } - break; - } - default: - ctx_assert(false); - break; - } -} - -// copy out to user buffer - -void -OdbcData::copyout(Ctx& ctx, SQLPOINTER buf, SQLINTEGER length, SQLINTEGER* total, SQLSMALLINT* total2) -{ - if (buf == 0) { - ctx.setCode(SQL_ERROR); - return; - } - switch (m_type) { - case Smallint: { - SQLSMALLINT* ptr = static_cast(buf); - *ptr = m_smallint; - break; - } - case Usmallint: { - SQLUSMALLINT* ptr = static_cast(buf); - *ptr = m_usmallint; - break; - } - case Integer: { - SQLINTEGER* ptr = static_cast(buf); - *ptr = m_integer; - break; - } - case Uinteger: { - SQLUINTEGER* ptr = static_cast(buf); - *ptr = m_uinteger; - break; - } - case Pointer: { - SQLPOINTER* ptr = static_cast(buf); - *ptr = m_pointer; - break; - } - case Sqlchar: { - char* ptr = static_cast(buf); - if (length < 0 && length != SQL_NTS) { - ctx.setCode(SQL_ERROR); - return; - } - if (length == SQL_NTS) { - strcpy(ptr, m_sqlchar); - } else { - strncpy(ptr, m_sqlchar, length); - } - if (total != 0) - *total = strlen(m_sqlchar); - if (total2 != 0) - *total2 = strlen(m_sqlchar); - break; - } - case Sqlstate: { - char* ptr = static_cast(buf); - const char* state = m_sqlstate->state(); - if (length < 0 && length != SQL_NTS) { - ctx.setCode(SQL_ERROR); - return; - } - if (length == SQL_NTS) { - strcpy(ptr, state); - } else { - strncpy(ptr, state, length); - } - if (total != 0) - *total = strlen(state); - if (total2 != 0) - *total2 = strlen(state); - break; - } - default: - ctx_assert(false); - break; - } -} - -void -OdbcData::print(char* buf, unsigned size) const -{ - switch (m_type) { - case Undef: - snprintf(buf, size, "undef"); - break; - case Smallint: - snprintf(buf, size, "%d", (int)m_smallint); - break; - case Usmallint: - snprintf(buf, size, "%u", (unsigned)m_usmallint); - break; - case Integer: - snprintf(buf, size, "%ld", (long)m_integer); - break; - case Uinteger: - snprintf(buf, size, "%lu", (unsigned long)m_uinteger); - break; - case Pointer: - snprintf(buf, size, "0x%lx", (unsigned long)m_pointer); - break; - case SmallintPtr: - snprintf(buf, size, "0x%lx", (unsigned long)m_smallintPtr); - break; - case UsmallintPtr: - snprintf(buf, size, "0x%lx", (unsigned long)m_usmallintPtr); - break; - case IntegerPtr: - snprintf(buf, size, "0x%lx", (unsigned long)m_integerPtr); - break; - case UintegerPtr: - snprintf(buf, size, "0x%lx", (unsigned long)m_uintegerPtr); - break; - case PointerPtr: - snprintf(buf, size, "0x%lx", (unsigned long)m_pointerPtr); - break; - case Sqlchar: - snprintf(buf, size, "%s", m_sqlchar); - break; - case Sqlstate: - snprintf(buf, size, "%s", m_sqlstate->state()); - break; - default: - snprintf(buf, size, "data(%d)", (int)m_type); - break; - }; -} diff --git a/ndb/src/old_files/client/odbc/common/OdbcData.hpp b/ndb/src/old_files/client/odbc/common/OdbcData.hpp deleted file mode 100644 index c1884507cfe..00000000000 --- a/ndb/src/old_files/client/odbc/common/OdbcData.hpp +++ /dev/null @@ -1,283 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_OdbcData_hpp -#define ODBC_COMMON_OdbcData_hpp - -#include -#include - -/** - * @class OdbcData - * @brief Odbc data types and storage - * - * Stores diagnostics, attributes, and descriptors. Also used - * for converting to and from driver function arguments. - */ -class OdbcData { -public: - enum Type { - Undef = 0, - Smallint, - Usmallint, - Integer, - Uinteger, - Pointer, - SmallintPtr, - UsmallintPtr, - IntegerPtr, - UintegerPtr, - PointerPtr, - Sqlchar, - Sqlstate - }; - OdbcData(); - OdbcData(Type type); - OdbcData(const OdbcData& odbcData); - OdbcData(SQLSMALLINT smallint); - OdbcData(SQLUSMALLINT usmallint); - OdbcData(SQLINTEGER integer); - OdbcData(SQLUINTEGER uinteger); - OdbcData(SQLPOINTER pointer); - OdbcData(SQLSMALLINT* smallintPtr); - OdbcData(SQLUSMALLINT* usmallintPtr); - OdbcData(SQLINTEGER* integerPtr); - OdbcData(SQLUINTEGER* uintegerPtr); - OdbcData(SQLPOINTER* pointerPtr); - OdbcData(const char* sqlchar); - OdbcData(const ::Sqlstate& sqlstate); - ~OdbcData(); - Type type() const; - void setValue(); - void setValue(Type type); - void setValue(const OdbcData odbcData); - // get value - SQLSMALLINT smallint() const; - SQLUSMALLINT usmallint() const; - SQLINTEGER integer() const; - SQLUINTEGER uinteger() const; - SQLPOINTER pointer() const; - SQLSMALLINT* smallintPtr() const; - SQLUSMALLINT* usmallintPtr() const; - SQLINTEGER* integerPtr() const; - SQLUINTEGER* uintegerPtr() const; - SQLPOINTER* pointerPtr() const; - const char* sqlchar() const; - const ::Sqlstate& sqlstate() const; - // copy in from user buffer - void copyin(Ctx& ctx, Type type, SQLPOINTER buf, SQLINTEGER length); - // copy out to user buffer - void copyout(Ctx& ctx, SQLPOINTER buf, SQLINTEGER length, SQLINTEGER* total, SQLSMALLINT* total2 = 0); - // logging - void print(char* buf, unsigned size) const; -private: - OdbcData& operator=(const OdbcData& odbcData); // disallowed - Type m_type; - union { - SQLSMALLINT m_smallint; - SQLUSMALLINT m_usmallint; - SQLINTEGER m_integer; - SQLUINTEGER m_uinteger; - SQLPOINTER m_pointer; - SQLSMALLINT* m_smallintPtr; - SQLUSMALLINT* m_usmallintPtr; - SQLINTEGER* m_integerPtr; - SQLUINTEGER* m_uintegerPtr; - SQLPOINTER* m_pointerPtr; - char* m_sqlchar; - const ::Sqlstate* m_sqlstate; - }; -}; - -inline OdbcData::Type -OdbcData::type() const -{ - return m_type; -} - -inline -OdbcData::OdbcData(SQLSMALLINT smallint) : - m_type(Smallint), - m_smallint(smallint) -{ -} - -inline -OdbcData::OdbcData(SQLUSMALLINT usmallint) : - m_type(Usmallint), - m_usmallint(usmallint) -{ -} - -inline -OdbcData::OdbcData(SQLINTEGER integer) : - m_type(Integer), - m_integer(integer) -{ -} - -inline -OdbcData::OdbcData(SQLUINTEGER uinteger) : - m_type(Uinteger), - m_uinteger(uinteger) -{ -} - -inline -OdbcData::OdbcData(SQLPOINTER pointer) : - m_type(Pointer), - m_pointer(pointer) -{ -} - -inline -OdbcData::OdbcData(SQLSMALLINT* smallintPtr) : - m_type(SmallintPtr), - m_smallintPtr(smallintPtr) -{ -} - -inline -OdbcData::OdbcData(SQLUSMALLINT* usmallintPtr) : - m_type(UsmallintPtr), - m_usmallintPtr(usmallintPtr) -{ -} - -inline -OdbcData::OdbcData(SQLINTEGER* integerPtr) : - m_type(IntegerPtr), - m_integerPtr(integerPtr) -{ -} - -inline -OdbcData::OdbcData(SQLUINTEGER* uintegerPtr) : - m_type(UintegerPtr), - m_uintegerPtr(uintegerPtr) -{ -} - -inline -OdbcData::OdbcData(SQLPOINTER* pointerPtr) : - m_type(PointerPtr), - m_pointerPtr(pointerPtr) -{ -} - -inline -OdbcData::OdbcData(const char* sqlchar) : - m_type(Sqlchar) -{ - unsigned n = strlen(sqlchar); - m_sqlchar = new char[n + 1]; - strcpy(m_sqlchar, sqlchar); -} - -inline -OdbcData::OdbcData(const ::Sqlstate& sqlstate) : - m_type(Sqlstate), - m_sqlstate(&sqlstate) -{ -} - -// get value - -inline SQLSMALLINT -OdbcData::smallint() const -{ - ctx_assert(m_type == Smallint); - return m_smallint; -} - -inline SQLUSMALLINT -OdbcData::usmallint() const -{ - ctx_assert(m_type == Usmallint); - return m_usmallint; -} - -inline SQLINTEGER -OdbcData::integer() const -{ - ctx_assert(m_type == Integer); - return m_integer; -} - -inline SQLUINTEGER -OdbcData::uinteger() const -{ - ctx_assert(m_type == Uinteger); - return m_uinteger; -} - -inline SQLPOINTER -OdbcData::pointer() const -{ - ctx_assert(m_type == Pointer); - return m_pointer; -} - -inline SQLSMALLINT* -OdbcData::smallintPtr() const -{ - ctx_assert(m_type == SmallintPtr); - return m_smallintPtr; -} - -inline SQLUSMALLINT* -OdbcData::usmallintPtr() const -{ - ctx_assert(m_type == UsmallintPtr); - return m_usmallintPtr; -} - -inline SQLINTEGER* -OdbcData::integerPtr() const -{ - ctx_assert(m_type == IntegerPtr); - return m_integerPtr; -} - -inline SQLUINTEGER* -OdbcData::uintegerPtr() const -{ - ctx_assert(m_type == UintegerPtr); - return m_uintegerPtr; -} - -inline SQLPOINTER* -OdbcData::pointerPtr() const -{ - ctx_assert(m_type == PointerPtr); - return m_pointerPtr; -} - -inline const char* -OdbcData::sqlchar() const -{ - ctx_assert(m_type == Sqlchar); - return m_sqlchar; -} - -inline const ::Sqlstate& -OdbcData::sqlstate() const -{ - ctx_assert(m_type == Sqlstate); - return *m_sqlstate; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/ResultArea.cpp b/ndb/src/old_files/client/odbc/common/ResultArea.cpp deleted file mode 100644 index 79d7fb0ccc4..00000000000 --- a/ndb/src/old_files/client/odbc/common/ResultArea.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "ResultArea.hpp" - -// ResultArea - -ResultArea::~ResultArea() -{ -} - -// ResultSet - -ResultSet::~ResultSet() -{ -} diff --git a/ndb/src/old_files/client/odbc/common/ResultArea.hpp b/ndb/src/old_files/client/odbc/common/ResultArea.hpp deleted file mode 100644 index d4890c44d99..00000000000 --- a/ndb/src/old_files/client/odbc/common/ResultArea.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_ResultArea_hpp -#define ODBC_COMMON_ResultArea_hpp - -#include -#include - -class SqlRow; - -/** - * @class ResultArea - * @brief Execution result - * - * ResultArea contains general results from executing SQL - * statements. Data rows from queries are fetched via derived - * class ResultSet. - */ -class ResultArea { -public: - ResultArea(); - virtual ~ResultArea(); - /** - * Get number of rows: - * - * - for queries: number of rows fetched so far - * - for DML statements: number of rows affected - * - for DDL and other statements: 0 - */ - CountType getCount() const; -protected: - void setCount(CountType count); - void addCount(unsigned count = 1); -private: - CountType m_count; -}; - -inline -ResultArea::ResultArea() : - m_count(0) -{ -} - -inline CountType -ResultArea::getCount() const -{ - return m_count; -} - -inline void -ResultArea::setCount(CountType count) -{ - m_count = count; -} - -inline void -ResultArea::addCount(unsigned count) -{ - m_count += count; -} - -/** - * @class ResultSet - * @brief Data rows from queries - * - * ResultSet is an interface implemented by SQL queries and - * virtual queries (such as SQLTables). It has an associated - * data row accessor SqlRow. - */ -class ResultSet : public ResultArea { -public: - ResultSet(const SqlRow& dataRow); - virtual ~ResultSet(); - enum State { - State_init = 1, // before first fetch - State_ok = 2, // last fetch succeeded - State_end = 3 // end of fetch or error - }; - void initState(); - State getState() const; - /** - * Get data accessor. Can be retrieved once and used after - * each successful ResultSet::fetch(). - */ - const SqlRow& dataRow() const; - /** - * Try to fetch one more row from this result set. - * - returns true if a row was fetched - * - returns false on end of fetch - * - returns false on error and sets error status - * It is a fatal error to call fetch after end of fetch. - */ - bool fetch(Ctx& ctx, Exec_base::Ctl& ctl); -protected: - /** - * Implementation of ResultSet::fetch() must be provided by - * each concrete subclass. - */ - virtual bool fetchImpl(Ctx& ctx, Exec_base::Ctl& ctl) = 0; - const SqlRow& m_dataRow; - State m_state; -}; - -inline -ResultSet::ResultSet(const SqlRow& dataRow) : - m_dataRow(dataRow), - m_state(State_end) // explicit initState() is required -{ -} - -inline const SqlRow& -ResultSet::dataRow() const -{ - return m_dataRow; -} - -inline void -ResultSet::initState() -{ - m_state = State_init; - setCount(0); -} - -inline ResultSet::State -ResultSet::getState() const -{ - return m_state; -} - -inline bool -ResultSet::fetch(Ctx& ctx, Exec_base::Ctl& ctl) -{ - if (! (m_state == State_init || m_state == State_ok)) { - // should not happen but return error instead of assert - ctx.pushStatus(Error::Gen, "invalid fetch state %d", (int)m_state); - m_state = State_end; - return false; - } - if (fetchImpl(ctx, ctl)) { - m_state = State_ok; - addCount(); - return true; - } - m_state = State_end; - return false; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/Sqlstate.cpp b/ndb/src/old_files/client/odbc/common/Sqlstate.cpp deleted file mode 100644 index 2d625a7c159..00000000000 --- a/ndb/src/old_files/client/odbc/common/Sqlstate.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include - -// Initialize Sqlstate records statically. -// They are not used by other static initializers. - -#define make_Sqlstate(state, code) \ - const Sqlstate Sqlstate::_##state(#state, code) - -make_Sqlstate(00000, SQL_SUCCESS); -make_Sqlstate(01004, SQL_SUCCESS_WITH_INFO); -make_Sqlstate(01S02, SQL_SUCCESS_WITH_INFO); -make_Sqlstate(07009, SQL_ERROR); -make_Sqlstate(08003, SQL_ERROR); -make_Sqlstate(21S01, SQL_ERROR); -make_Sqlstate(22001, SQL_ERROR); -make_Sqlstate(22002, SQL_ERROR); -make_Sqlstate(22003, SQL_ERROR); -make_Sqlstate(22005, SQL_ERROR); -make_Sqlstate(22008, SQL_ERROR); -make_Sqlstate(22012, SQL_ERROR); -make_Sqlstate(24000, SQL_ERROR); -make_Sqlstate(25000, SQL_ERROR); -make_Sqlstate(42000, SQL_ERROR); -make_Sqlstate(42S02, SQL_ERROR); -make_Sqlstate(42S22, SQL_ERROR); -make_Sqlstate(HY004, SQL_ERROR); -make_Sqlstate(HY009, SQL_ERROR); -make_Sqlstate(HY010, SQL_ERROR); -make_Sqlstate(HY011, SQL_ERROR); -make_Sqlstate(HY012, SQL_ERROR); -make_Sqlstate(HY014, SQL_ERROR); -make_Sqlstate(HY019, SQL_ERROR); -make_Sqlstate(HY024, SQL_ERROR); -make_Sqlstate(HY090, SQL_ERROR); -make_Sqlstate(HY091, SQL_ERROR); -make_Sqlstate(HY092, SQL_ERROR); -make_Sqlstate(HY095, SQL_ERROR); -make_Sqlstate(HY096, SQL_ERROR); -make_Sqlstate(HYC00, SQL_ERROR); -make_Sqlstate(HYT00, SQL_ERROR); -make_Sqlstate(IM000, SQL_ERROR); // consider all to be errors for now -make_Sqlstate(IM001, SQL_ERROR); -make_Sqlstate(IM999, SQL_ERROR); - -SQLRETURN -Sqlstate::getCode(SQLRETURN code) const -{ - int codes[2]; - int ranks[2]; - codes[0] = code; - codes[1] = m_code; - for (int i = 0; i < 2; i++) { - switch (codes[i]) { - case SQL_SUCCESS: - ranks[i] = 0; - break; - case SQL_SUCCESS_WITH_INFO: - ranks[i] = 1; - break; - case SQL_NO_DATA: - ranks[i] = 2; - break; - case SQL_NEED_DATA: - ranks[i] = 3; - break; - case SQL_ERROR: - ranks[i] = 9; - break; - default: - ctx_assert(false); - ranks[i] = 9; - } - } - if (ranks[0] < ranks[1]) - code = m_code; - return code; -} diff --git a/ndb/src/old_files/client/odbc/common/Sqlstate.hpp b/ndb/src/old_files/client/odbc/common/Sqlstate.hpp deleted file mode 100644 index 3b4665dc6ca..00000000000 --- a/ndb/src/old_files/client/odbc/common/Sqlstate.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_SqlState_hpp -#define ODBC_COMMON_SqlState_hpp - -#include - -/** - * SQL states. - */ -class Sqlstate { -public: - static const Sqlstate _00000; // no state - static const Sqlstate _01004; // data converted with truncation - static const Sqlstate _01S02; // option value changed - static const Sqlstate _07009; // invalid descriptor index - static const Sqlstate _08003; // connection not open - static const Sqlstate _21S01; // insert value list does not match column list - static const Sqlstate _22001; // string data, right truncation - static const Sqlstate _22002; // indicator variable required but not supplied - static const Sqlstate _22003; // data overflow - static const Sqlstate _22005; // data is not numeric-literal - static const Sqlstate _22008; // data value is not a valid timestamp - static const Sqlstate _22012; // division by zero - static const Sqlstate _24000; // invalid cursor state - static const Sqlstate _25000; // invalid transaction state - static const Sqlstate _42000; // syntax error or access violation - static const Sqlstate _42S02; // base table or view not found - static const Sqlstate _42S22; // column not found - static const Sqlstate _HY004; // invalid SQL data type - static const Sqlstate _HY009; // invalid use of null pointer - static const Sqlstate _HY010; // function sequence error - static const Sqlstate _HY011; // attribute cannot be set now - static const Sqlstate _HY012; // invalid transaction operation code - static const Sqlstate _HY014; // limit on number of handles exceeded - static const Sqlstate _HY019; // non-character and non-binary data sent in pieces - static const Sqlstate _HY024; // invalid attribute value - static const Sqlstate _HY090; // invalid string or buffer length - static const Sqlstate _HY091; // invalid descriptor field identifier - static const Sqlstate _HY092; // invalid attribute/option identifier - static const Sqlstate _HY095; // function type out of range - static const Sqlstate _HY096; // information type out of range - static const Sqlstate _HYC00; // optional feature not implemented - static const Sqlstate _HYT00; // timeout expired - static const Sqlstate _IM000; // implementation defined - static const Sqlstate _IM001; // driver does not support this function - static const Sqlstate _IM999; // fill in the right state please - // get the 5-char text string - const char* state() const; - // get code or "upgrade" existing code - SQLRETURN getCode(SQLRETURN code = SQL_SUCCESS) const; -private: - Sqlstate(const char* state, const SQLRETURN code); - const char* const m_state; - const SQLRETURN m_code; -}; - -inline const char* -Sqlstate::state() const -{ - return m_state; -} - -inline -Sqlstate::Sqlstate(const char* state, const SQLRETURN code) : - m_state(state), - m_code(code) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/StmtArea.cpp b/ndb/src/old_files/client/odbc/common/StmtArea.cpp deleted file mode 100644 index 5ce2d47d31a..00000000000 --- a/ndb/src/old_files/client/odbc/common/StmtArea.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "DiagArea.hpp" -#include "StmtArea.hpp" -#include - -StmtArea::StmtArea(ConnArea& connArea) : - m_connArea(connArea), - m_state(Free), - m_useSchemaCon(false), - m_useConnection(false), - m_planTree(0), - m_execTree(0), - m_unbound(0), - m_rowCount(0), - m_tuplesFetched(0) -{ - for (unsigned i = 0; i <= 4; i++) - m_descArea[i] = 0; -} - -StmtArea::~StmtArea() -{ -} - -void -StmtArea::free(Ctx &ctx) -{ - CodeGen codegen(*this); - codegen.close(ctx); - codegen.free(ctx); - m_sqlText.assign(""); - m_nativeText.assign(""); - useSchemaCon(ctx, false); - useConnection(ctx, false); - m_stmtInfo.free(ctx); - m_planTree = 0; - m_execTree = 0; - m_rowCount = 0; - m_tuplesFetched = 0; - m_unbound = 0; - m_state = Free; -} - -void -StmtArea::setRowCount(Ctx& ctx, CountType rowCount) -{ - m_rowCount = rowCount; - // location - DescArea& ird = descArea(Desc_usage_IRD); - OdbcData data; - ird.getHeader().getField(ctx, SQL_DESC_ROWS_PROCESSED_PTR, data); - if (data.type() != OdbcData::Undef) { - SQLUINTEGER* countPtr = data.uintegerPtr(); - if (countPtr != 0) { - *countPtr = static_cast(m_rowCount); - } - } - // diagnostic - SQLINTEGER count = static_cast(m_rowCount); - ctx.diagArea().setHeader(SQL_DIAG_ROW_COUNT, count); -} - -void -StmtArea::setFunction(Ctx& ctx, const char* function, SQLINTEGER functionCode) -{ - m_stmtInfo.m_function = function; - m_stmtInfo.m_functionCode = functionCode; -} - -void -StmtArea::setFunction(Ctx& ctx) -{ - OdbcData function(m_stmtInfo.m_function); - ctx.diagArea().setHeader(SQL_DIAG_DYNAMIC_FUNCTION, function); - OdbcData functionCode(m_stmtInfo.m_functionCode); - ctx.diagArea().setHeader(SQL_DIAG_DYNAMIC_FUNCTION_CODE, functionCode); -} - -bool -StmtArea::useSchemaCon(Ctx& ctx, bool use) -{ - if (m_useSchemaCon != use) - if (! m_connArea.useSchemaCon(ctx, use)) - return false; - m_useSchemaCon = use; - return true; -} - -bool -StmtArea::useConnection(Ctx& ctx, bool use) -{ - if (m_useConnection != use) - if (! m_connArea.useConnection(ctx, use)) - return false; - m_useConnection = use; - return true; -} diff --git a/ndb/src/old_files/client/odbc/common/StmtArea.hpp b/ndb/src/old_files/client/odbc/common/StmtArea.hpp deleted file mode 100644 index a88c6d36e6d..00000000000 --- a/ndb/src/old_files/client/odbc/common/StmtArea.hpp +++ /dev/null @@ -1,157 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_StmtArea_hpp -#define ODBC_COMMON_StmtArea_hpp - -#include -#include "ConnArea.hpp" -#include "StmtInfo.hpp" -#include "DescArea.hpp" - -class PlanTree; -class ExecTree; - -/** - * @class StmtArea - * @brief Public part of statement handle - */ -class StmtArea { -public: - // state between ODBC function calls - enum State { - Free = 1, // not in use - Prepared = 2, // statement prepared, maybe unbound - NeedData = 3, // executed, SQLParamData expected - Open = 4 // cursor open - }; - // connection area shared by all statements - ConnArea& connArea(); - State getState() const; - // SQL text - const BaseString& sqlText(); - BaseString& nativeText(); - // allocate or unallocate connections if necessary - bool useSchemaCon(Ctx& ctx, bool use); - bool useConnection(Ctx& ctx, bool use); - // statement info - StmtInfo& stmtInfo(); - DescArea& descArea(DescUsage u); - unsigned unbound() const; - // set row count here and in diagnostics - void setRowCount(Ctx& ctx, CountType rowCount); - CountType getRowCount() const; - // raw tuple count (tuples fetched from NDB) - void resetTuplesFetched(); - void incTuplesFetched(); - CountType getTuplesFetched() const; - // set dynamic function in StmtInfo only (at prepare) - void setFunction(Ctx& ctx, const char* function, SQLINTEGER functionCode); - // set dynamic function in diagnostics (at execute) - void setFunction(Ctx& ctx); -protected: - friend class CodeGen; - friend class Executor; - friend class Plan_root; - StmtArea(ConnArea& connArea); - ~StmtArea(); - void free(Ctx& ctx); - ConnArea& m_connArea; - State m_state; - BaseString m_sqlText; - BaseString m_nativeText; - bool m_useSchemaCon; - bool m_useConnection; - StmtInfo m_stmtInfo; - // plan tree output from parser and rewritten by analyze - PlanTree* m_planTree; - // exec tree output from analyze - ExecTree* m_execTree; - // pointers within HandleDesc allocated via HandleStmt - DescArea* m_descArea[1+4]; - // parameters with unbound SQL type - unsigned m_unbound; - CountType m_rowCount; - CountType m_tuplesFetched; -}; - -inline ConnArea& -StmtArea::connArea() -{ - return m_connArea; -} - -inline StmtArea::State -StmtArea::getState() const -{ - return m_state; -} - -inline const BaseString& -StmtArea::sqlText() { - return m_sqlText; -} - -inline BaseString& -StmtArea::nativeText() { - return m_nativeText; -} - -inline StmtInfo& -StmtArea::stmtInfo() -{ - return m_stmtInfo; -} - -inline DescArea& -StmtArea::descArea(DescUsage u) -{ - ctx_assert(1 <= u && u <= 4); - ctx_assert(m_descArea[u] != 0); - return *m_descArea[u]; -} - -inline unsigned -StmtArea::unbound() const -{ - return m_unbound; -} - -inline CountType -StmtArea::getRowCount() const -{ - return m_rowCount; -} - -inline void -StmtArea::resetTuplesFetched() -{ - m_tuplesFetched = 0; -} - -inline void -StmtArea::incTuplesFetched() -{ - m_tuplesFetched++; -} - -inline CountType -StmtArea::getTuplesFetched() const -{ - return m_tuplesFetched; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/StmtInfo.cpp b/ndb/src/old_files/client/odbc/common/StmtInfo.cpp deleted file mode 100644 index 3467fb5023e..00000000000 --- a/ndb/src/old_files/client/odbc/common/StmtInfo.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "StmtInfo.hpp" - -const char* -StmtInfo::getDesc() const -{ - switch (m_name) { - case Stmt_name_select: - return "select"; - case Stmt_name_insert: - return "insert"; - case Stmt_name_update: - return "update"; - case Stmt_name_delete: - return "delete"; - case Stmt_name_create_table: - return "create table"; - case Stmt_name_create_index: - return "create index"; - case Stmt_name_drop_table: - return "drop table"; - case Stmt_name_drop_index: - return "drop index"; - default: - ctx_assert(false); - break; - } - return ""; -} - -StmtType -StmtInfo::getType() const -{ - StmtType type = Stmt_type_undef; - switch (m_name) { - case Stmt_name_select: // query - type = Stmt_type_query; - break; - case Stmt_name_insert: // DML - case Stmt_name_update: - case Stmt_name_delete: - type = Stmt_type_DML; - break; - case Stmt_name_create_table: // DDL - case Stmt_name_create_index: - case Stmt_name_drop_table: - case Stmt_name_drop_index: - type = Stmt_type_DDL; - break; - default: - ctx_assert(false); - break; - } - return type; -} - -void -StmtInfo::free(Ctx& ctx) -{ - m_name = Stmt_name_undef; - m_function = ""; - m_functionCode = SQL_DIAG_UNKNOWN_STATEMENT; -} diff --git a/ndb/src/old_files/client/odbc/common/StmtInfo.hpp b/ndb/src/old_files/client/odbc/common/StmtInfo.hpp deleted file mode 100644 index 9cd489be6da..00000000000 --- a/ndb/src/old_files/client/odbc/common/StmtInfo.hpp +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_StmtInfo_hpp -#define ODBC_COMMON_StmtInfo_hpp - -#include - -// general type (determined by SQL command) -enum StmtType { - Stmt_type_undef = 0, - Stmt_type_query, // select - Stmt_type_DML, // insert, update, delete - Stmt_type_DDL, // create, drop, alter table - Stmt_type_info // virtual query -}; - -// specific SQL command (first 1-2 words) -enum StmtName { - Stmt_name_undef = 0, - Stmt_name_select, - Stmt_name_insert, - Stmt_name_update, - Stmt_name_delete, - Stmt_name_create_table, - Stmt_name_create_index, - Stmt_name_drop_table, - Stmt_name_drop_index -}; - -/** - * @class StmtInfo - * @brief Statement Info - * - * Statement info. This is a separate class which could - * be used in cases not tied to statement execution. - */ -class StmtInfo { -public: - StmtInfo(); - void setName(StmtName name); - StmtName getName() const; - const char* getDesc() const; - StmtType getType() const; - void free(Ctx& ctx); -private: - friend class StmtArea; - StmtName m_name; - const char* m_function; // not allocated - SQLINTEGER m_functionCode; -}; - -inline -StmtInfo::StmtInfo() : - m_name(Stmt_name_undef), - m_function(""), - m_functionCode(SQL_DIAG_UNKNOWN_STATEMENT) -{ -} - -inline void -StmtInfo::setName(StmtName name) -{ - m_name = name; -} - -inline StmtName -StmtInfo::getName() const -{ - return m_name; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/common/common.cpp b/ndb/src/old_files/client/odbc/common/common.cpp deleted file mode 100644 index 73d14c82efe..00000000000 --- a/ndb/src/old_files/client/odbc/common/common.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "common.hpp" diff --git a/ndb/src/old_files/client/odbc/common/common.hpp b/ndb/src/old_files/client/odbc/common/common.hpp deleted file mode 100644 index d2f243b6437..00000000000 --- a/ndb/src/old_files/client/odbc/common/common.hpp +++ /dev/null @@ -1,124 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_COMMON_common_hpp -#define ODBC_COMMON_common_hpp - -#define stpcpy stpcpy -#include -#undef swap - -// misc defs - -#ifdef NDB_GCC // only for odbc -#define PRINTFLIKE(i,j) __attribute__ ((format (printf, i, j))) -#else -#define PRINTFLIKE(i,j) -#endif - -// odbc defs - -#define ODBCVER 0x0351 - -#ifdef NDB_WIN32 -#include -#endif - -extern "C" { -#include -} -// some types which may be missing -#ifndef SQL_BLOB -#define SQL_BLOB 30 -#endif -#ifndef SQL_BLOB_LOCATOR -#define SQL_BLOB_LOCATOR 31 -#endif -#ifndef SQL_CLOB -#define SQL_CLOB 40 -#endif -#ifndef SQL_CLOB_LOCATOR -#define SQL_CLOB_LOCATOR 41 -#endif - -// until real blobs use Varchar of this size -#define FAKE_BLOB_SIZE 2000 - -#define SQL_HANDLE_ROOT 0 // assume real handles != 0 - -enum OdbcHandle { - Odbc_handle_root = 0, // not an odbc handle - Odbc_handle_env = 1, - Odbc_handle_dbc = 2, - Odbc_handle_stmt = 4, - Odbc_handle_desc = 8, - Odbc_handle_all = (1|2|4|8) -}; - -// ndb defs - -#undef BOOL -#include -// this info not yet on api side -#include -#include - -#ifndef MAX_TAB_NAME_SIZE -#define MAX_TAB_NAME_SIZE 128 -#endif - -#ifndef MAX_ATTR_NAME_SIZE -#define MAX_ATTR_NAME_SIZE 32 -#endif - -#ifndef MAX_ATTR_DEFAULT_VALUE_SIZE -#define MAX_ATTR_DEFAULT_VALUE_SIZE 128 -#endif - -typedef Uint32 NdbAttrId; -typedef Uint64 CountType; - -// ndb odbc defs - -#define NDB_ODBC_COMPONENT_VENDOR "[MySQL]" -#define NDB_ODBC_COMPONENT_DRIVER "[ODBC driver]" -#define NDB_ODBC_COMPONENT_DATABASE "[NDB Cluster]" - -#define NDB_ODBC_VERSION_MAJOR 0 -#define NDB_ODBC_VERSION_MINOR 22 -#define NDB_ODBC_VERSION_STRING "0.22" - -// reserved error codes for non-NDB errors -#define NDB_ODBC_ERROR_MIN 5000 -#define NDB_ODBC_ERROR_MAX 5100 - -// maximum log level compiled in -#ifdef VM_TRACE -#define NDB_ODBC_MAX_LOG_LEVEL 5 -#else -#define NDB_ODBC_MAX_LOG_LEVEL 3 -#endif - -// driver specific statement attribute for number of NDB tuples fetched -#define SQL_ATTR_NDB_TUPLES_FETCHED 66601 - -#include -#include -#include - -#undef assert - -#endif diff --git a/ndb/src/old_files/client/odbc/dictionary/DictCatalog.cpp b/ndb/src/old_files/client/odbc/dictionary/DictCatalog.cpp deleted file mode 100644 index 433347c9a70..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictCatalog.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "DictCatalog.hpp" -#include "DictSchema.hpp" - -DictCatalog::~DictCatalog() -{ - for (Schemas::iterator i = m_schemas.begin(); i != m_schemas.end(); i++) { - delete *i; - *i = 0; - } -} - -DictSchema* -DictCatalog::findSchema(Ctx& ctx, const BaseString& name) -{ - for (Schemas::iterator i = m_schemas.begin(); i != m_schemas.end(); i++) { - DictSchema* schema = *i; - ctx_assert(schema != 0); - if (strcmp(schema->getName().c_str(), name.c_str()) == 0) - return schema; - } - ctx_assert(strcmp(name.c_str(), "NDB") == 0); - DictSchema* schema = new DictSchema(m_connArea, "NDB"); - m_schemas.push_back(schema); - return schema; -} diff --git a/ndb/src/old_files/client/odbc/dictionary/DictCatalog.hpp b/ndb/src/old_files/client/odbc/dictionary/DictCatalog.hpp deleted file mode 100644 index 5452990a51b..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictCatalog.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_DICTIONARY_DictCatalog_hpp -#define ODBC_DICTIONARY_DictCatalog_hpp - -#include -#include -#include "DictSchema.hpp" - -class Ctx; -class ConnArea; -class DictSchema; - -/** - * @class DictCatalog - * @brief Collection of schemas - */ -class DictCatalog { -public: - DictCatalog(const ConnArea& connArea); - ~DictCatalog(); - const ConnArea& connArea() const; - DictSchema* findSchema(Ctx& ctx, const BaseString& name); - void addSchema(DictSchema* schema); -protected: - const ConnArea& m_connArea; - typedef std::list Schemas; - Schemas m_schemas; -}; - -inline -DictCatalog::DictCatalog(const ConnArea& connArea) : - m_connArea(connArea) -{ -} - -inline const ConnArea& -DictCatalog::connArea() const -{ - return m_connArea; -} - -inline void -DictCatalog::addSchema(DictSchema* schema) -{ - m_schemas.push_back(schema); - schema->setParent(this); -} - -#endif diff --git a/ndb/src/old_files/client/odbc/dictionary/DictColumn.cpp b/ndb/src/old_files/client/odbc/dictionary/DictColumn.cpp deleted file mode 100644 index fa0128f1ddb..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictColumn.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "DictColumn.hpp" - -DictColumn::~DictColumn() -{ - delete[] m_defaultValue; - m_defaultValue = 0; -} diff --git a/ndb/src/old_files/client/odbc/dictionary/DictColumn.hpp b/ndb/src/old_files/client/odbc/dictionary/DictColumn.hpp deleted file mode 100644 index 945fb86367b..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictColumn.hpp +++ /dev/null @@ -1,143 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_DICTIONARY_DictColumn_hpp -#define ODBC_DICTIONARY_DictColumn_hpp - -#include -#include - -class Ctx; -class SqlType; -class ConnArea; -class DictTable; - -/** - * @class DictColumn - * @brief Table column - */ -class DictColumn { -public: - DictColumn(const ConnArea& connArea, const BaseString& name, const SqlType& sqlType); - ~DictColumn(); - const BaseString& getName() const; - const SqlType& sqlType() const; - void setPosition(unsigned position); - unsigned getPosition() const; - void setParent(DictTable* parent); - DictTable* getParent() const; - NdbAttrId getAttrId() const; - bool isKey() const; - bool isTupleId() const; - bool isAutoIncrement() const; - const char* getDefaultValue() const; -protected: - friend class DictSys; - friend class DictTable; - const ConnArea& m_connArea; - const BaseString m_name; - SqlType m_sqlType; - unsigned m_position; - DictTable* m_parent; - bool m_key; // part of key - bool m_tupleId; // the tuple id - bool m_autoIncrement; - const char* m_defaultValue; -}; - -inline -DictColumn::DictColumn(const ConnArea& connArea, const BaseString& name, const SqlType& sqlType) : - m_connArea(connArea), - m_name(name), - m_sqlType(sqlType), - m_position(0), - m_parent(0), - m_key(false), - m_tupleId(false), - m_autoIncrement(false), - m_defaultValue(0) -{ -} - -inline const SqlType& -DictColumn::sqlType() const -{ - return m_sqlType; -} - -inline void -DictColumn::setPosition(unsigned position) -{ - ctx_assert(position != 0); - m_position = position; -} - -inline unsigned -DictColumn::getPosition() const -{ - return m_position; -} - -inline void -DictColumn::setParent(DictTable* parent) -{ - m_parent = parent; -} - -inline DictTable* -DictColumn::getParent() const -{ - return m_parent; -} - -inline const BaseString& -DictColumn::getName() const -{ - return m_name; -} - -inline NdbAttrId -DictColumn::getAttrId() const -{ - ctx_assert(m_position != 0); - return static_cast(m_position - 1); -} - -inline bool -DictColumn::isKey() const -{ - return m_key; -} - -inline bool -DictColumn::isTupleId() const -{ - return m_tupleId; -} - -inline bool -DictColumn::isAutoIncrement() const -{ - return m_autoIncrement; -} - -inline const char* -DictColumn::getDefaultValue() const -{ - return m_defaultValue; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/dictionary/DictIndex.cpp b/ndb/src/old_files/client/odbc/dictionary/DictIndex.cpp deleted file mode 100644 index 95d93318902..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictIndex.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "DictTable.hpp" -#include "DictIndex.hpp" - -DictIndex::~DictIndex() -{ -} - -void -DictIndex::setColumn(unsigned i, DictColumn* column) -{ - ctx_assert(1 <= i && i <= m_size); - m_columns[i] = column; -} diff --git a/ndb/src/old_files/client/odbc/dictionary/DictIndex.hpp b/ndb/src/old_files/client/odbc/dictionary/DictIndex.hpp deleted file mode 100644 index 7ba46daaae3..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictIndex.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_DICTIONARY_DictIndex_hpp -#define ODBC_DICTIONARY_DictIndex_hpp - -#include -#include -#include "DictColumn.hpp" - -class Ctx; -class ConnArea; -class DictTable; -class DictColumn; -class DictIndex; - -/** - * @class DictIndex - * @brief Database table - */ -class DictIndex { - friend class DictSchema; -public: - DictIndex(const ConnArea& connArea, const BaseString& name, NdbDictionary::Object::Type type, unsigned size); - ~DictIndex(); - NdbDictionary::Object::Type getType() const; - unsigned getSize() const; - void setTable(DictTable* table); - DictTable* getTable() const; - void setColumn(unsigned i, DictColumn* column); - DictColumn* getColumn(unsigned i) const; - const BaseString& getName() const; - DictColumn* findColumn(const BaseString& name) const; -protected: - const ConnArea& m_connArea; - const BaseString m_name; - const NdbDictionary::Object::Type m_type; - const unsigned m_size; - DictSchema* m_parent; - DictTable* m_table; - typedef std::vector Columns; // pointers to table columns - Columns m_columns; -}; - -inline -DictIndex::DictIndex(const ConnArea& connArea, const BaseString& name, NdbDictionary::Object::Type type, unsigned size) : - m_connArea(connArea), - m_name(name), - m_type(type), - m_size(size), - m_parent(0), - m_columns(1 + size) -{ -} - -inline NdbDictionary::Object::Type -DictIndex::getType() const -{ - return m_type; -} - -inline unsigned -DictIndex::getSize() const -{ - ctx_assert(m_columns.size() == 1 + m_size); - return m_size; -} - -inline void -DictIndex::setTable(DictTable* table) -{ - m_table = table; -} - -inline DictTable* -DictIndex::getTable() const -{ - return m_table; -} - -inline DictColumn* -DictIndex::getColumn(unsigned i) const -{ - ctx_assert(1 <= i && i <= m_size); - ctx_assert(m_columns[i] != 0); - return m_columns[i]; -} - -inline const BaseString& -DictIndex::getName() const -{ - return m_name; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/dictionary/DictSchema.cpp b/ndb/src/old_files/client/odbc/dictionary/DictSchema.cpp deleted file mode 100644 index 91939cb2f26..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictSchema.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "DictCatalog.hpp" -#include "DictSchema.hpp" -#include "DictTable.hpp" -#include "DictTable.hpp" -#include "DictColumn.hpp" -#include "DictIndex.hpp" -#include "DictSys.hpp" - -DictSchema::~DictSchema() -{ - for (Tables::iterator i = m_tables.begin(); i != m_tables.end(); i++) { - delete *i; - *i = 0; - } -} - -DictTable* -DictSchema::findTable(const BaseString& name) -{ - for (Tables::iterator i = m_tables.begin(); i != m_tables.end(); i++) { - DictTable* table = *i; - ctx_assert(table != 0); - if (strcmp(table->getName().c_str(), name.c_str()) == 0) - return table; - } - return 0; -} - -void -DictSchema::deleteTable(Ctx& ctx, const BaseString& name) -{ - Tables::iterator i = m_tables.begin(); - while (i != m_tables.end()) { - DictTable* table = *i; - ctx_assert(table != 0); - if (strcmp(table->getName().c_str(), name.c_str()) == 0) { - ctx_log2(("purge table %s from dictionary", name.c_str())); - delete table; - Tables::iterator j = i; - i++; - m_tables.erase(j); - break; - } - i++; - } -} - -void -DictSchema::deleteTableByIndex(Ctx& ctx, const BaseString& indexName) -{ - DictTable* foundTable = 0; - for (Tables::iterator i = m_tables.begin(); i != m_tables.end(); i++) { - DictTable* table = *i; - ctx_assert(table != 0); - for (unsigned k = 1; k <= table->indexCount(); k++) { - const DictIndex* index = table->getIndex(k); - if (strcmp(index->getName().c_str(), indexName.c_str()) == 0) { - foundTable = table; - break; - } - } - if (foundTable != 0) - break; - } - if (foundTable != 0) - deleteTable(ctx, foundTable->getName()); -} - -DictTable* -DictSchema::loadTable(Ctx& ctx, const BaseString& name) -{ - ctx_log4(("%s: load from NDB", name.c_str())); - Ndb* ndb = m_connArea.ndbObject(); - NdbDictionary::Dictionary* ndbDictionary = ndb->getDictionary(); - if (ndbDictionary == 0) { - ctx.pushStatus(ndb, "getDictionary"); - return 0; - } - const NdbDictionary::Table* ndbTable = ndbDictionary->getTable(name.c_str()); - if (ndbTable == 0) { - const NdbError& ndbError = ndbDictionary->getNdbError(); - if (ndbError.code == 709) { - // try built-in system table - DictTable* table = DictSys::loadTable(ctx, this, name); - if (table != 0) { - return table; - } - ctx_log3(("%s: not found in NDB", name.c_str())); - return 0; - } - ctx.pushStatus(ndbDictionary->getNdbError(), "getTable"); - return 0; - } - int nattr = ndbTable->getNoOfColumns(); - DictTable* table = new DictTable(m_connArea, name, nattr); - for (unsigned position = 1; position <= (unsigned)nattr; position++) { - DictColumn* column = table->loadColumn(ctx, position); - if (column == 0) - return 0; - ctx_log4(("add column %u %s", column->getPosition(), column->getName().c_str())); - } - // load indexes - NdbDictionary::Dictionary::List list; - if (ndbDictionary->listIndexes(list, name.c_str()) == -1) { - ctx.pushStatus(ndbDictionary->getNdbError(), "listIndexes"); - return 0; - } - for (unsigned i = 0; i < list.count; i++) { - const NdbDictionary::Dictionary::List::Element& elt = list.elements[i]; - if (elt.state != NdbDictionary::Object::StateOnline) { - ctx_log1(("%s: skip broken index %s", name.c_str(), elt.name)); - continue; - } - if (elt.type != NdbDictionary::Object::UniqueHashIndex && elt.type != NdbDictionary::Object::OrderedIndex) { - ctx_log1(("%s: skip unknown index type %s", name.c_str(), elt.name)); - continue; - } - const NdbDictionary::Index* ndbIndex = ndbDictionary->getIndex(elt.name, name.c_str()); - if (ndbIndex == 0) { - ctx.pushStatus(ndbDictionary->getNdbError(), "table %s getIndex %s", name.c_str(), elt.name); - return 0; - } - DictIndex* index = new DictIndex(m_connArea, elt.name, elt.type, ndbIndex->getNoOfIndexColumns()); - for (unsigned j = 0; j < index->getSize(); j++) { - const char* cname = ndbIndex->getIndexColumn(j); - ctx_assert(cname != 0); - DictColumn* icolumn = table->findColumn(cname); - ctx_assert(icolumn != 0); - index->setColumn(1 + j, icolumn); - } - table->addIndex(index); - ctx_log3(("%s: index %s: load from NDB done", name.c_str(), elt.name)); - } - addTable(table); - ctx_log3(("%s: load from NDB done", name.c_str())); - return table; -} diff --git a/ndb/src/old_files/client/odbc/dictionary/DictSchema.hpp b/ndb/src/old_files/client/odbc/dictionary/DictSchema.hpp deleted file mode 100644 index 099352edbb9..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictSchema.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_DICTIONARY_DictSchema_hpp -#define ODBC_DICTIONARY_DictSchema_hpp - -#include -#include -#include "DictTable.hpp" - -class Ctx; -class ConnArea; -class DictCatalog; -class DictTable; - -/** - * @class DictSchema - * @brief Collection of tables - */ -class DictSchema { -public: - DictSchema(const ConnArea& connArea, const BaseString& name); - ~DictSchema(); - const BaseString& getName() const; - void setParent(DictCatalog* parent); - DictCatalog* getParent() const; - void addTable(DictTable* table); - DictTable* findTable(const BaseString& name); - DictTable* loadTable(Ctx& ctx, const BaseString& name); - void deleteTable(Ctx& ctx, const BaseString& name); - void deleteTableByIndex(Ctx& ctx, const BaseString& indexName); -protected: - friend class DictCatalog; - friend class DictSys; - const ConnArea& m_connArea; - BaseString m_name; - DictCatalog* m_parent; - typedef std::list Tables; - Tables m_tables; -}; - -inline -DictSchema::DictSchema(const ConnArea& connArea, const BaseString& name) : - m_connArea(connArea), - m_name(name), - m_parent(0) -{ - ctx_assert(strcmp(name.c_str(), "NDB") == 0); -} - -inline const BaseString& -DictSchema::getName() const -{ - return m_name; -} - -inline void -DictSchema::setParent(DictCatalog* parent) -{ - m_parent = parent; -} - -inline DictCatalog* -DictSchema::getParent() const -{ - return m_parent; -} - -inline void -DictSchema::addTable(DictTable* table) -{ - m_tables.push_back(table); - table->setParent(this); -} - -#endif diff --git a/ndb/src/old_files/client/odbc/dictionary/DictSys.cpp b/ndb/src/old_files/client/odbc/dictionary/DictSys.cpp deleted file mode 100644 index 1ceef66ee57..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictSys.cpp +++ /dev/null @@ -1,433 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "DictSchema.hpp" -#include "DictTable.hpp" -#include "DictColumn.hpp" -#include "DictSys.hpp" - -#define arraySize(x) sizeof(x)/sizeof(x[0]) - -#define MAX_SCHEMA_NAME_LENGTH 32 -#define MAX_REMARKS_LENGTH 256 - -// typeinfo - -static DictSys::Column -column_ODBC_TYPEINFO[] = { - DictSys::Column( - 1, - "TYPE_NAME", - false, - SqlType(SqlType::Varchar, 20, false) - ), - DictSys::Column( - 2, - "DATA_TYPE", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 3, - "COLUMN_SIZE", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 4, - "LITERAL_PREFIX", - false, - SqlType(SqlType::Varchar, 1, true) - ), - DictSys::Column( - 5, - "LITERAL_SUFFIX", - false, - SqlType(SqlType::Varchar, 1, true) - ), - DictSys::Column( - 6, - "CREATE_PARAMS", - false, - SqlType(SqlType::Varchar, 20, true) - ), - DictSys::Column( - 7, - "NULLABLE", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 8, - "CASE_SENSITIVE", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 9, - "SEARCHABLE", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 10, - "UNSIGNED_ATTRIBUTE", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 11, - "FIXED_PREC_SCALE", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 12, - "AUTO_UNIQUE_VALUE", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 13, - "LOCAL_TYPE_NAME", - false, - SqlType(SqlType::Varchar, 20, true) - ), - DictSys::Column( - 14, - "MINIMUM_SCALE", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 15, - "MAXIMUM_SCALE", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 16, - "SQL_DATA_TYPE", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 17, - "SQL_DATETIME_SUB", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 18, - "NUM_PREC_RADIX", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 19, - "INTERVAL_PRECISION", - false, - SqlType(SqlType::Integer, true) - ) -}; - -static DictSys::Table -table_ODBC_TYPEINFO( - DictSys::OdbcTypeinfo, - "ODBC$TYPEINFO", - column_ODBC_TYPEINFO, - arraySize(column_ODBC_TYPEINFO) -); - -// tables - -static DictSys::Column -column_ODBC_TABLES[] = { - // perl docs/systables.pl tables -c - DictSys::Column( - 1, - "TABLE_CAT", - false, - SqlType(SqlType::Varchar, MAX_SCHEMA_NAME_LENGTH, true) - ), - DictSys::Column( - 2, - "TABLE_SCHEM", - false, - SqlType(SqlType::Varchar, MAX_SCHEMA_NAME_LENGTH, true) - ), - DictSys::Column( - 3, - "TABLE_NAME", - false, - SqlType(SqlType::Varchar, MAX_TAB_NAME_SIZE, false) - ), - DictSys::Column( - 4, - "TABLE_TYPE", - false, - SqlType(SqlType::Varchar, 20, false) - ), - DictSys::Column( - 5, - "REMARKS", - false, - SqlType(SqlType::Varchar, MAX_REMARKS_LENGTH, true) - ) -}; - -static DictSys::Table -table_ODBC_TABLES( - DictSys::OdbcTables, - "ODBC$TABLES", - column_ODBC_TABLES, - arraySize(column_ODBC_TABLES) -); - -// columns - -static DictSys::Column -column_ODBC_COLUMNS[] = { - // perl docs/systables.pl columns -c - DictSys::Column( - 1, - "TABLE_CAT", - false, - SqlType(SqlType::Varchar, MAX_SCHEMA_NAME_LENGTH, true) - ), - DictSys::Column( - 2, - "TABLE_SCHEM", - false, - SqlType(SqlType::Varchar, MAX_SCHEMA_NAME_LENGTH, true) - ), - DictSys::Column( - 3, - "TABLE_NAME", - false, - SqlType(SqlType::Varchar, MAX_TAB_NAME_SIZE, false) - ), - DictSys::Column( - 4, - "COLUMN_NAME", - false, - SqlType(SqlType::Varchar, MAX_ATTR_NAME_SIZE, false) - ), - DictSys::Column( - 5, - "DATA_TYPE", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 6, - "TYPE_NAME", - false, - SqlType(SqlType::Varchar, 20, false) - ), - DictSys::Column( - 7, - "COLUMN_SIZE", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 8, - "BUFFER_LENGTH", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 9, - "DECIMAL_DIGITS", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 10, - "NUM_PREC_RADIX", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 11, - "NULLABLE", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 12, - "REMARKS", - false, - SqlType(SqlType::Varchar, MAX_REMARKS_LENGTH, true) - ), - DictSys::Column( - 13, - "COLUMN_DEF", - false, - SqlType(SqlType::Varchar, MAX_ATTR_DEFAULT_VALUE_SIZE, true) - ), - DictSys::Column( - 14, - "SQL_DATA_TYPE", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 15, - "SQL_DATETIME_SUB", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 16, - "CHAR_OCTET_LENGTH", - false, - SqlType(SqlType::Integer, true) - ), - DictSys::Column( - 17, - "ORDINAL_POSITION", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 18, - "IS_NULLABLE", - false, - SqlType(SqlType::Varchar, 3, true) - ) -}; - -static DictSys::Table -table_ODBC_COLUMNS( - DictSys::OdbcColumns, - "ODBC$COLUMNS", - column_ODBC_COLUMNS, - arraySize(column_ODBC_COLUMNS) -); - -// primarykeys - -static DictSys::Column -column_ODBC_PRIMARYKEYS[] = { - DictSys::Column( - 1, - "TABLE_CAT", - false, - SqlType(SqlType::Varchar, MAX_SCHEMA_NAME_LENGTH, true) - ), - DictSys::Column( - 2, - "TABLE_SCHEM", - false, - SqlType(SqlType::Varchar, MAX_SCHEMA_NAME_LENGTH, true) - ), - DictSys::Column( - 3, - "TABLE_NAME", - false, - SqlType(SqlType::Varchar, MAX_TAB_NAME_SIZE, false) - ), - DictSys::Column( - 4, - "COLUMN_NAME", - false, - SqlType(SqlType::Varchar, MAX_ATTR_NAME_SIZE, false) - ), - DictSys::Column( - 5, - "KEY_SEQ", - false, - SqlType(SqlType::Integer, false) - ), - DictSys::Column( - 6, - "PK_NAME", - false, - SqlType(SqlType::Varchar, MAX_ATTR_NAME_SIZE, true) - ) -}; - -static DictSys::Table -table_ODBC_PRIMARYKEYS( - DictSys::OdbcPrimarykeys, - "ODBC$PRIMARYKEYS", - column_ODBC_PRIMARYKEYS, - arraySize(column_ODBC_PRIMARYKEYS) -); - -static DictSys::Column -column_DUAL[] = { - DictSys::Column( - 1, - "DUMMY", - false, - SqlType(SqlType::Varchar, 1, false) - ) -}; - -static DictSys::Table -table_DUAL( - DictSys::Dual, - "DUAL", - column_DUAL, - arraySize(column_DUAL) -); - -// all tables - -static const DictSys::Table* -tableList[] = { - &table_ODBC_TYPEINFO, - &table_ODBC_TABLES, - &table_ODBC_COLUMNS, - &table_ODBC_PRIMARYKEYS, - &table_DUAL -}; - -static const unsigned tableCount = arraySize(tableList); - -DictTable* -DictSys::loadTable(Ctx& ctx, DictSchema* schema, const BaseString& name) -{ - const Table* tp = 0; - for (unsigned i = 0; i < tableCount; i++) { - if (strcmp(tableList[i]->m_name, name.c_str()) == 0) { - tp = tableList[i]; - break; - } - } - if (tp == 0) - return 0; - DictTable* table = new DictTable(schema->m_connArea, tp->m_name, tp->m_columnCount); - table->sysId(tp->m_id); - schema->addTable(table); - for (unsigned position = 1; position <= tp->m_columnCount; position++) { - const Column* cp = &tp->m_columnList[position - 1]; - ctx_assert(cp->m_position == position); - const SqlType& sqlType = cp->m_sqlType; - DictColumn* column = new DictColumn(table->m_connArea, cp->m_name, sqlType); - table->setColumn(position, column); - column->m_key = cp->m_key; - if (column->m_key) - table->m_keys.push_back(column); - } - ctx_log3(("%s: system table defined", name.c_str())); - return table; -} diff --git a/ndb/src/old_files/client/odbc/dictionary/DictSys.hpp b/ndb/src/old_files/client/odbc/dictionary/DictSys.hpp deleted file mode 100644 index e6fa661fd59..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictSys.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_DICTIONARY_DictSys_hpp -#define ODBC_DICTIONARY_DictSys_hpp - -#include -#include - -class Ctx; -class DictSchema; -class DictTable; -class SqlType; - -/** - * @class DictSys - * @brief Built-in tables (replaced later by real systables) - */ -class DictSys { -public: - enum Id { - Undef = 0, - OdbcTypeinfo = 1, - OdbcTables = 2, - OdbcColumns = 3, - OdbcPrimarykeys = 4, - Dual = 5 - }; - struct Column { - Column(unsigned position, const char* name, bool key, const SqlType& sqlType); - const unsigned m_position; - const char* const m_name; - const bool m_key; - const SqlType m_sqlType; - }; - struct Table { - Table(Id id, const char* name, const Column* columnList, unsigned columnCount); - const Id m_id; - const char* m_name; - const Column* const m_columnList; - const unsigned m_columnCount; - }; - static DictTable* loadTable(Ctx& ctx, DictSchema* schema, const BaseString& name); -}; - -inline -DictSys::Column::Column(unsigned position, const char* name, bool key, const SqlType& sqlType) : - m_position(position), - m_name(name), - m_key(key), - m_sqlType(sqlType) -{ -} - -inline -DictSys::Table::Table(DictSys::Id id, const char* name, const Column* columnList, unsigned columnCount) : - m_id(id), - m_name(name), - m_columnList(columnList), - m_columnCount(columnCount) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/dictionary/DictTable.cpp b/ndb/src/old_files/client/odbc/dictionary/DictTable.cpp deleted file mode 100644 index 4db7d3b3aec..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictTable.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include "DictSchema.hpp" -#include "DictTable.hpp" -#include "DictColumn.hpp" -#include "DictColumn.hpp" - -DictTable::~DictTable() -{ - for (Columns::iterator i = m_columns.begin(); i != m_columns.end(); i++) { - delete *i; - *i = 0; - } - for (Indexes::iterator i = m_indexes.begin(); i != m_indexes.end(); i++) { - delete *i; - *i = 0; - } -} - -DictColumn* -DictTable::findColumn(const BaseString& name) const -{ - for (unsigned i = 1; i <= getSize(); i++) { - DictColumn* column = m_columns[i]; - ctx_assert(column != 0); - if (strcmp(column->getName().c_str(), name.c_str()) == 0) - return column; - } - return 0; -} - -DictColumn* -DictTable::loadColumn(Ctx& ctx, unsigned position) -{ - Ndb* ndb = m_connArea.ndbObject(); - NdbDictionary::Dictionary* ndbDictionary = ndb->getDictionary(); - if (ndbDictionary == 0) { - ctx.pushStatus(ndb, "getDictionary"); - return 0; - } - const NdbDictionary::Table* ndbTable = ndbDictionary->getTable(m_name.c_str()); - ctx_assert(ndbTable != 0); - ctx_assert(position != 0); - NdbAttrId attrId = position - 1; - const NdbDictionary::Column* ndbColumn = ndbTable->getColumn(attrId); - ctx_assert(ndbColumn != 0); - SqlType sqlType(ctx, ndbColumn); - if (! ctx.ok()) - return 0; - DictColumn* column = new DictColumn(m_connArea, ndbColumn->getName(), sqlType); - setColumn(position, column); - column->m_key = column->m_tupleId = false; - if (ndbColumn->getPrimaryKey()) - column->m_key = true; - if (ndbColumn->getTupleKey()) - column->m_key = column->m_tupleId = true; - if (column->m_key) - m_keys.push_back(column); - // props - const char* value; - column->m_autoIncrement = false; - if (ndbColumn->getAutoIncrement()) - column->m_autoIncrement = true; - column->m_defaultValue = 0; - if ((value = ndbColumn->getDefaultValue()) != 0 && strlen(value) != 0) - column->m_defaultValue = strcpy(new char[strlen(value) + 1], value); - ctx_log4(("column %u %s keyFlag=%d idFlag=%d", position, ndbColumn->getName(), column->m_key, column->m_tupleId)); - if (column->m_tupleId) - m_tupleId = position; - if (column->m_autoIncrement) - m_autoIncrement = position; - return column; -} diff --git a/ndb/src/old_files/client/odbc/dictionary/DictTable.hpp b/ndb/src/old_files/client/odbc/dictionary/DictTable.hpp deleted file mode 100644 index 5cecfff9562..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/DictTable.hpp +++ /dev/null @@ -1,192 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_DICTIONARY_DictTable_hpp -#define ODBC_DICTIONARY_DictTable_hpp - -#include -#include -#include -#include "DictColumn.hpp" -#include "DictIndex.hpp" -#include "DictSys.hpp" - -class Ctx; -class ConnArea; -class DictSchema; -class DictColumn; -class DictIndex; - -/** - * @class DictTable - * @brief Database table - */ -class DictTable { - friend class DictSchema; -public: - DictTable(const ConnArea& connArea, const BaseString& name, unsigned size); - ~DictTable(); - unsigned getSize() const; - void setParent(DictSchema* parent); - DictSchema* getParent() const; - void setColumn(unsigned i, DictColumn* column); - DictColumn* getColumn(unsigned i) const; - const BaseString& getName() const; - DictColumn* findColumn(const BaseString& name) const; - DictColumn* loadColumn(Ctx& ctx, unsigned position); - unsigned keyCount() const; - DictColumn* getKey(unsigned i) const; - unsigned tupleId() const; - unsigned autoIncrement() const; - void sysId(DictSys::Id id); - DictSys::Id sysId() const; - // indexes - void addIndex(DictIndex* index); - unsigned indexCount() const; - const DictIndex* getIndex(unsigned i) const; // indexed from 1 -protected: - friend class DictSys; - const ConnArea& m_connArea; - const BaseString m_name; - unsigned m_size; - DictSchema* m_parent; - typedef std::vector Columns; - Columns m_columns; - Columns m_keys; - unsigned m_tupleId; // tuple id column - unsigned m_autoIncrement; // autoincrement key - DictSys::Id m_sysId; // built-in system table id (if non-zero) - typedef std::vector Indexes; - Indexes m_indexes; -}; - -inline -DictTable::DictTable(const ConnArea& connArea, const BaseString& name, unsigned size) : - m_connArea(connArea), - m_name(name), - m_size(size), - m_parent(0), - m_columns(1 + size), - m_keys(1), // indexed from 1 - m_tupleId(0), - m_autoIncrement(0), - m_sysId(DictSys::Undef), - m_indexes(1) -{ -} - -inline unsigned -DictTable::getSize() const -{ - ctx_assert(m_columns.size() == 1 + m_size); - return m_size; -} - -inline void -DictTable::setParent(DictSchema* parent) -{ - m_parent = parent; -} - -inline DictSchema* -DictTable::getParent() const -{ - return m_parent; -} - -inline void -DictTable::setColumn(unsigned i, DictColumn* column) -{ - ctx_assert(1 <= i && i <= m_size); - m_columns[i] = column; - column->setPosition(i); - column->setParent(this); -} - -inline DictColumn* -DictTable::getColumn(unsigned i) const -{ - ctx_assert(1 <= i && i <= m_size); - ctx_assert(m_columns[i] != 0); - return m_columns[i]; -} - -inline const BaseString& -DictTable::getName() const -{ - return m_name; -} - -inline unsigned -DictTable::keyCount() const -{ - ctx_assert(m_keys.size() >= 1); - return m_keys.size() - 1; -} - -inline DictColumn* -DictTable::getKey(unsigned i) const -{ - ctx_assert(1 <= i && i <= m_keys.size() && m_keys[i] != 0); - return m_keys[i]; -} - -inline unsigned -DictTable::tupleId() const -{ - return m_tupleId; -} - -inline unsigned -DictTable::autoIncrement() const -{ - return m_autoIncrement; -} - -inline void -DictTable::sysId(DictSys::Id id) -{ - m_sysId = id; -} - -inline DictSys::Id -DictTable::sysId() const -{ - return m_sysId; -} - -inline void -DictTable::addIndex(DictIndex* index) -{ - m_indexes.push_back(index); - index->setTable(this); -} - -inline unsigned -DictTable::indexCount() const -{ - ctx_assert(m_indexes.size() >= 1); - return m_indexes.size() - 1; -} - -inline const DictIndex* -DictTable::getIndex(unsigned i) const -{ - ctx_assert(1 <= i && i < m_indexes.size() && m_indexes[i] != 0); - return m_indexes[i]; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/dictionary/Makefile b/ndb/src/old_files/client/odbc/dictionary/Makefile deleted file mode 100644 index cdfd3b6ea0c..00000000000 --- a/ndb/src/old_files/client/odbc/dictionary/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -include .defs.mk - -TYPE = * - -NONPIC_ARCHIVE = N - -PIC_ARCHIVE = Y - -ARCHIVE_TARGET = odbcdictionary - -SOURCES = \ - DictCatalog.cpp \ - DictSchema.cpp \ - DictTable.cpp \ - DictColumn.cpp \ - DictIndex.cpp \ - DictSys.cpp - -include ../Extra.mk -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/client/odbc/docs/class.fig b/ndb/src/old_files/client/odbc/docs/class.fig deleted file mode 100644 index 38c24c1fba4..00000000000 --- a/ndb/src/old_files/client/odbc/docs/class.fig +++ /dev/null @@ -1,332 +0,0 @@ -#FIG 3.2 -Landscape -Flush left -Inches -A4 -100.00 -Single --2 -1200 2 -6 600 6600 1500 9600 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 600 6600 1500 6600 1500 7200 600 7200 600 6600 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 600 7800 1500 7800 1500 8400 600 8400 600 7800 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 600 9000 1500 9000 1500 9600 600 9600 600 9000 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 900 9000 900 8400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 900 7800 900 7200 -4 0 0 50 0 12 12 0.0000 4 180 420 750 6825 Diag\001 -4 0 0 50 0 12 12 0.0000 4 180 420 750 8025 Diag\001 -4 0 0 50 0 12 12 0.0000 4 135 630 750 8325 Record\001 -4 0 0 50 0 12 12 0.0000 4 180 420 750 9225 Diag\001 -4 0 0 50 0 12 12 0.0000 4 135 525 750 9525 Field\001 -4 0 0 50 0 12 12 0.0000 4 120 420 750 7125 Area\001 --6 -6 2700 6600 3600 9600 -6 2700 6600 3600 9600 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 2700 6600 3600 6600 3600 7200 2700 7200 2700 6600 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 2700 9000 3600 9000 3600 9600 2700 9600 2700 9000 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 3000 9000 3000 7200 -4 0 0 50 0 12 12 0.0000 4 120 420 2850 6825 Attr\001 -4 0 0 50 0 12 12 0.0000 4 120 420 2850 9225 Attr\001 -4 0 0 50 0 12 12 0.0000 4 135 525 2850 9525 Field\001 -4 0 0 50 0 12 12 0.0000 4 120 420 2850 7125 Area\001 --6 --6 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 3300 3900 4200 3900 4200 4500 3300 4500 3300 3900 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 3300 2700 4200 2700 4200 3300 3300 3300 3300 2700 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 3300 1500 4200 1500 4200 2100 3300 2100 3300 1500 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 3300 300 4200 300 4200 900 3300 900 3300 300 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 1800 2700 2700 2700 2700 3300 1800 3300 1800 2700 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2 - 1 1 1.00 60.00 120.00 - 3300 1800 3000 1800 -2 1 0 1 0 7 50 0 -1 0.000 0 0 7 0 1 2 - 1 1 1.00 60.00 120.00 - 3300 3000 3000 3000 -2 1 0 1 0 7 50 0 -1 0.000 0 0 7 0 1 2 - 1 1 1.00 60.00 120.00 - 3300 4200 3000 4200 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2 - 1 1 1.00 60.00 120.00 - 1 1 1.00 60.00 120.00 - 4200 4200 4800 4200 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 3600 3900 3600 3300 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 3600 2700 3600 2100 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 3600 1500 3600 900 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 4800 5100 5700 5100 5700 5700 4800 5700 4800 5100 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 4800 2700 5700 2700 5700 3300 4800 3300 4800 2700 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 4800 3900 5700 3900 5700 4500 4800 4500 4800 3900 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2 - 1 1 1.00 60.00 120.00 - 1 1 1.00 60.00 120.00 - 5100 6600 5100 5700 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 6 - 1 1 1.00 60.00 120.00 - 5100 5100 5100 4800 4500 4800 4500 3600 3900 3600 3900 3300 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3 - 1 1 1.00 60.00 120.00 - 3600 4500 3600 5400 4800 5400 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 4800 6600 5700 6600 5700 7200 4800 7200 4800 6600 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 4800 7800 5700 7800 5700 8400 4800 8400 4800 7800 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 4800 9000 5700 9000 5700 9600 4800 9600 4800 9000 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 5100 9000 5100 8400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 5100 7800 5100 7200 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2 - 1 1 1.00 60.00 120.00 - 1 1 1.00 60.00 120.00 - 4200 3000 4800 3000 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 6900 2700 7800 2700 7800 3300 6900 3300 6900 2700 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 6900 1500 7800 1500 7800 2100 6900 2100 6900 1500 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3 - 0 0 1.00 60.00 120.00 - 7200 3300 7200 4050 5700 4050 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3 - 0 0 1.00 60.00 120.00 - 11700 3300 11700 4350 5700 4350 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 5100 3900 5100 3300 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 8400 300 9300 300 9300 900 8400 900 8400 300 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 5100 2700 5100 900 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2 - 3000 6600 3000 1800 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 6900 5100 7800 5100 7800 6000 6900 6000 6900 5100 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 8400 5100 9300 5100 9300 6000 8400 6000 8400 5100 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 9900 5100 10800 5100 10800 6000 9900 6000 9900 5100 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 11400 5100 12300 5100 12300 6000 11400 6000 11400 5100 -2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 7800 5550 8400 5550 -2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 9300 5550 9900 5550 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 7500 5100 7500 3300 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 10500 5100 10500 3300 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 12000 5100 12000 3300 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 9900 2700 10800 2700 10800 3300 9900 3300 9900 2700 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 11400 2700 12300 2700 12300 3300 11400 3300 11400 2700 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 11400 1500 12300 1500 12300 2100 11400 2100 11400 1500 -2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 - 9900 1500 10800 1500 10800 2100 9900 2100 9900 1500 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 6900 6600 7800 6600 7800 7200 6900 7200 6900 6600 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 6900 7800 7800 7800 7800 8400 6900 8400 6900 7800 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 8400 6600 9300 6600 9300 7200 8400 7200 8400 6600 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 8400 7800 9300 7800 9300 8400 8400 8400 8400 7800 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 4 - 0 0 1.00 60.00 120.00 - 5700 3000 6300 3000 6300 6900 6900 6900 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 4 - 0 0 1.00 60.00 120.00 - 5700 4200 6000 4200 6000 8100 6900 8100 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 8400 6900 7800 6900 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 8400 8100 7800 8100 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 9900 6900 9300 6900 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 9900 8100 9300 8100 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 11400 6900 10800 6900 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 11400 8100 10800 8100 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 11400 6600 12300 6600 12300 7200 11400 7200 11400 6600 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 11400 7800 12300 7800 12300 8400 11400 8400 11400 7800 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 9900 6600 10800 6600 10800 7200 9900 7200 9900 6600 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 9900 7800 10800 7800 10800 8400 9900 8400 9900 7800 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 8400 2700 9300 2700 9300 3300 8400 3300 8400 2700 -2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 8400 1500 9300 1500 9300 2100 8400 2100 8400 1500 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 9000 5100 9000 3300 -2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 7800 3000 8400 3000 -2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 9300 3000 9900 3000 -2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 7800 1800 8400 1800 -2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 9300 1800 9900 1800 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 11400 3000 10800 3000 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 11400 1800 10800 1800 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 11400 5550 10800 5550 -2 4 0 2 0 7 50 0 -1 6.000 0 0 7 0 0 5 - 5700 900 5700 300 4800 300 4800 900 5700 900 -2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 12900 6600 13800 6600 13800 7200 12900 7200 12900 6600 -2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 12900 5100 13800 5100 13800 5700 12900 5700 12900 5100 -2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 13200 7800 13200 7200 -2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 13200 6600 13200 5700 -2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5 - 12900 7800 13800 7800 13800 8400 12900 8400 12900 7800 -2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 3 - 0 0 1.00 60.00 120.00 - 13200 5100 13200 1800 12300 1800 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 1 4 - 0 0 1.00 60.00 120.00 - 0 0 1.00 60.00 120.00 - 5700 7050 6600 7050 6600 7875 6900 7875 -4 0 0 50 0 12 12 0.0000 4 135 630 3375 525 Handle\001 -4 0 0 50 0 12 12 0.0000 4 135 630 3375 1725 Handle\001 -4 0 0 50 0 12 12 0.0000 4 135 630 3375 2925 Handle\001 -4 0 0 50 0 12 12 0.0000 4 135 630 3375 4125 Handle\001 -4 0 0 50 0 12 12 0.0000 4 120 420 3450 825 Root\001 -4 0 0 50 0 12 12 0.0000 4 120 315 3450 2025 Env\001 -4 0 0 50 0 12 12 0.0000 4 135 315 3450 3225 Dbc\001 -4 0 0 50 0 12 12 0.0000 4 120 420 3450 4425 Stmt\001 -4 0 0 50 0 12 12 0.0000 4 135 630 1875 2925 Handle\001 -4 0 0 50 0 12 12 0.0000 4 120 420 1950 3225 Base\001 -4 0 0 50 0 12 12 0.0000 4 135 630 4875 5325 Handle\001 -4 0 0 50 0 12 12 0.0000 4 120 420 4950 5625 Desc\001 -4 0 0 50 0 12 12 0.0000 4 120 420 4875 3225 Area\001 -4 0 0 50 0 12 12 0.0000 4 120 420 4875 2925 Conn\001 -4 0 0 50 0 12 12 0.0000 4 120 420 4875 4425 Area\001 -4 0 0 50 0 12 12 0.0000 4 120 420 4875 4125 Stmt\001 -4 0 0 50 0 12 12 0.0000 4 120 420 4950 6825 Desc\001 -4 0 0 50 0 12 12 0.0000 4 120 420 4950 8025 Desc\001 -4 0 0 50 0 12 12 0.0000 4 135 630 4950 8325 Record\001 -4 0 0 50 0 12 12 0.0000 4 120 420 4950 9225 Desc\001 -4 0 0 50 0 12 12 0.0000 4 120 420 4950 7125 Area\001 -4 0 0 50 0 12 12 0.0000 4 135 525 4950 9525 Field\001 -4 0 0 50 0 12 12 0.0000 4 135 735 3675 5925 ird ard\001 -4 0 0 50 0 12 12 0.0000 4 180 735 3675 5625 ipd apd\001 -4 0 0 50 0 12 12 0.0000 4 135 420 6975 2925 Plan\001 -4 0 0 50 0 12 12 0.0000 4 120 420 6975 3225 root\001 -4 0 0 50 0 12 12 0.0000 4 135 420 6975 1725 Plan\001 -4 0 0 50 0 12 12 0.0000 4 120 420 6975 2025 Tree\001 -4 0 0 50 0 12 12 0.0000 4 120 420 8475 525 Base\001 -4 0 0 50 0 12 12 0.0000 4 120 420 8475 825 Tree\001 -4 0 0 50 0 12 12 0.0000 4 120 315 5025 675 NDB\001 -4 0 0 50 0 14 14 0.0000 4 195 1755 300 525 Class Diagram\001 -4 0 0 50 0 12 12 0.0000 4 135 420 6975 5325 Plan\001 -4 0 0 50 0 12 12 0.0000 4 135 630 6975 5625 delete\001 -4 0 0 50 0 12 12 0.0000 4 135 840 6975 5925 searched\001 -4 0 0 50 0 12 12 0.0000 4 135 420 8475 5325 Plan\001 -4 0 0 50 0 12 12 0.0000 4 135 630 8475 5625 delete\001 -4 0 0 50 0 12 12 0.0000 4 135 420 8475 5925 full\001 -4 0 0 50 0 12 12 0.0000 4 135 420 9975 5325 Code\001 -4 0 0 50 0 12 12 0.0000 4 135 630 9975 5625 delete\001 -4 0 0 50 0 12 12 0.0000 4 135 420 9975 5925 full\001 -4 0 0 50 0 12 12 0.0000 4 120 315 11475 5325 Run\001 -4 0 0 50 0 12 12 0.0000 4 135 630 11475 5625 delete\001 -4 0 0 50 0 12 12 0.0000 4 135 420 11475 5925 full\001 -4 0 0 50 0 12 12 0.0000 4 120 420 9975 3225 root\001 -4 0 0 50 0 12 12 0.0000 4 120 315 11475 2925 Run\001 -4 0 0 50 0 12 12 0.0000 4 120 420 11475 3225 root\001 -4 0 0 50 0 12 12 0.0000 4 120 315 11475 1725 Run\001 -4 0 0 50 0 12 12 0.0000 4 120 420 11475 2025 Tree\001 -4 0 0 50 0 12 12 0.0000 4 135 420 9975 1725 Code\001 -4 0 0 50 0 12 12 0.0000 4 120 420 9975 2025 Tree\001 -4 0 0 50 0 12 12 0.0000 4 135 420 9975 2925 Code\001 -4 0 0 50 0 12 12 0.0000 4 120 420 6975 6825 Conn\001 -4 0 0 50 0 12 12 0.0000 4 180 735 6975 7125 Catalog\001 -4 0 0 50 0 12 12 0.0000 4 120 420 6975 8025 Stmt\001 -4 0 0 50 0 12 12 0.0000 4 180 735 6975 8325 Catalog\001 -4 0 0 50 0 12 12 0.0000 4 120 420 8475 6825 Conn\001 -4 0 0 50 0 12 12 0.0000 4 120 420 8475 8025 Stmt\001 -4 0 0 50 0 12 12 0.0000 4 135 630 8475 7125 Schema\001 -4 0 0 50 0 12 12 0.0000 4 135 630 8475 8325 Schema\001 -4 0 0 50 0 12 12 0.0000 4 120 420 11475 6825 Conn\001 -4 0 0 50 0 12 12 0.0000 4 120 420 11475 8025 Stmt\001 -4 0 0 50 0 12 12 0.0000 4 135 630 11475 7125 Column\001 -4 0 0 50 0 12 12 0.0000 4 135 525 11475 8325 Field\001 -4 0 0 50 0 12 12 0.0000 4 120 420 9975 6825 Conn\001 -4 0 0 50 0 12 12 0.0000 4 120 420 9975 8025 Stmt\001 -4 0 0 50 0 12 12 0.0000 4 135 525 9975 7125 Table\001 -4 0 0 50 0 12 12 0.0000 4 120 315 9975 8325 Row\001 -4 0 0 50 0 12 12 0.0000 4 135 420 8475 1725 Plan\001 -4 0 0 50 0 12 12 0.0000 4 120 420 8475 2025 Tree\001 -4 0 0 50 0 12 12 0.0000 4 135 420 8475 2925 Plan\001 -4 0 0 50 0 12 12 0.0000 4 120 420 8475 3225 root\001 -4 0 0 50 0 14 11 0.0000 4 180 840 675 825 (prelim)\001 -4 0 0 50 0 12 12 0.0000 4 180 525 6375 1350 input\001 -4 0 0 50 0 12 12 0.0000 4 180 840 7725 1350 optimize\001 -4 0 0 50 0 12 12 0.0000 4 165 630 9375 1350 output\001 -4 0 0 50 0 12 12 0.0000 4 120 735 10650 1350 execute\001 -4 0 0 50 0 12 12 0.0000 4 135 525 12075 1350 fetch\001 -4 0 0 50 0 12 12 0.0000 4 135 630 13050 5325 Result\001 -4 0 0 50 0 12 12 0.0000 4 120 315 13050 5625 Set\001 -4 0 0 50 0 12 12 0.0000 4 135 630 13050 6825 Result\001 -4 0 0 50 0 12 12 0.0000 4 120 315 13125 7125 Row\001 -4 0 0 50 0 12 12 0.0000 4 135 630 13050 8025 Result\001 -4 0 0 50 0 12 12 0.0000 4 135 525 13050 8325 Field\001 diff --git a/ndb/src/old_files/client/odbc/docs/descfield.pl b/ndb/src/old_files/client/odbc/docs/descfield.pl deleted file mode 100644 index 80fef22f303..00000000000 --- a/ndb/src/old_files/client/odbc/docs/descfield.pl +++ /dev/null @@ -1,1482 +0,0 @@ -# usage perl Desc.data -# prints template for DescSpec.cpp -use strict; -my $order = 0; - -# XXX do it later - -# -# odbcsqlsetdescfield.htm -# -my $descSpec = { -# -# -# -# SQLSetDescField -# -# -# -# -# -# -#

-#
-# -#

SQLSetDescField

-# -#

Conformance

-# -#

Version Introduced: ODBC 3.0
-# Standards Compliance: ISO 92

-# -#

Summary

-# -#

SQLSetDescField sets the value of a single field of a descriptor record.

-# -#

Syntax

-# -#
SQLRETURN SQLSetDescField(
-#	     SQLHDESC     DescriptorHandle,
-#	     SQLSMALLINT     RecNumber,
-#	     SQLSMALLINT     FieldIdentifier,
-#	     SQLPOINTER     ValuePtr,
-#	     SQLINTEGER     BufferLength);
-# -#

Arguments -# -#

-#
DescriptorHandle
-# -#
[Input]
-# Descriptor handle.
-# -#
RecNumber
-# -#
[Input]
-# Indicates the descriptor record containing the field that the application seeks to set. Descriptor records are numbered from 0, with record number 0 being the bookmark record. The RecNumber argument is ignored for header fields.
-# -#
FieldIdentifier
-# -#
[Input]
-# Indicates the field of the descriptor whose value is to be set. For more information, see "FieldIdentifier Argument" in the "Comments" section.
-# -#
ValuePtr
-# -#
[Input]
-# Pointer to a buffer containing the descriptor information, or a 4-byte value. The data type depends on the value of FieldIdentifier. If ValuePtr is a 4-byte value, either all four of the bytes are used or just two of the four are used, depending on the value of the FieldIdentifier argument.
-# -#
BufferLength
-# -#
[Input]
-# If FieldIdentifier is an ODBC-defined field and ValuePtr points to a character string or a binary buffer, this argument should be the length of *ValuePtr. If FieldIdentifier is an ODBC-defined field and ValuePtr is an integer, BufferLength is ignored. -# -#

If FieldIdentifier is a driver-defined field, the application indicates the nature of the field to the Driver Manager by setting the BufferLength argument. BufferLength can have the following values: -# -# -#

    -#
  • If ValuePtr is a pointer to a character string, then BufferLength is the length of the string or SQL_NTS.
  • -# -#
  • If ValuePtr is a pointer to a binary buffer, then the application places the result of the SQL_LEN_BINARY_ATTR(length) macro in BufferLength. This places a negative value in BufferLength.
  • -# -#
  • If ValuePtr is a pointer to a value other than a character string or a binary string, then BufferLength should have the value SQL_IS_POINTER.
  • -# -#
  • If ValuePtr contains a fixed-length value, then BufferLength is either SQL_IS_INTEGER, SQL_IS_UINTEGER, SQL_IS_SMALLINT, or SQL_IS_USMALLINT, as appropriate.
  • -#
-#
-#
-# -#

Returns

-# -#

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

-# -#

Diagnostics

-# -#

When SQLSetDescField returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value can be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_DESC and a Handle of DescriptorHandle. The following table lists the SQLSTATE values commonly returned by SQLSetDescField and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQLSTATEErrorDescription
01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
01S02Option value changedThe driver did not support the value specified in *ValuePtr (if ValuePtr was a pointer) or the value in ValuePtr (if ValuePtr was a 4-byte value), or *ValuePtr was invalid because of implementation working conditions, so the driver substituted a similar value. (Function returns SQL_SUCCESS_WITH_INFO.)
07009Invalid descriptor indexThe FieldIdentifier argument was a record field, the RecNumber argument was 0, and the DescriptorHandle argument referred to an IPD handle. -#

The RecNumber argument was less than 0, and the DescriptorHandle argument referred to an ARD or an APD.

-# -#

The RecNumber argument was greater than the maximum number of columns or parameters that the data source can support, and the DescriptorHandle argument referred to an APD or ARD.

-# -#

(DM) The FieldIdentifier argument was SQL_DESC_COUNT, and *ValuePtr argument was less than 0.

-# -#

The RecNumber argument was equal to 0, and the DescriptorHandle argument referred to an implicitly allocated APD. (This error does not occur with an explicitly allocated application descriptor, because it is not known whether an explicitly allocated application descriptor is an APD or ARD until execute time.)

-#
08S01Communication link failureThe communication link between the driver and the data source to which the driver was connected failed before the function completed processing.
22001String data, right
-# truncated
The FieldIdentifier argument was SQL_DESC_NAME, and the BufferLength argument was a value larger than SQL_MAX_IDENTIFIER_LEN.
HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
HY001Memory allocation
-# error
The driver was unable to allocate memory required to support execution or completion of the function.
HY010Function sequence error(DM) The DescriptorHandle was associated with a StatementHandle for which an asynchronously executing function (not this one) was called and was still executing when this function was called. -#

(DM) SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for the StatementHandle with which the DescriptorHandle was associated and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

-#
HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
HY016Cannot modify an implementation row descriptorThe DescriptorHandle argument was associated with an IRD, and the FieldIdentifier argument was not SQL_DESC_ARRAY_STATUS_PTR or SQL_DESC_ROWS_PROCESSED_PTR.
HY021Inconsistent descriptor informationThe SQL_DESC_TYPE and SQL_DESC_DATETIME_INTERVAL_CODE fields do not form a valid ODBC SQL type or a valid driver-specific SQL type (for IPDs) or a valid ODBC C type (for APDs or ARDs). -#

Descriptor information checked during a consistency check was not consistent. (See "Consistency Check" in SQLSetDescRec.)

-#
HY090Invalid string or buffer length(DM) *ValuePtr is a character string, and BufferLength was less than zero but was not equal to SQL_NTS. -#

(DM) The driver was an ODBC 2.x driver, the descriptor was an ARD, the ColumnNumber argument was set to 0, and the value specified for the argument BufferLength was not equal to 4.

-#
HY091Invalid descriptor field identifierThe value specified for the FieldIdentifier argument was not an ODBC-defined field and was not an implementation-defined value. -#

The FieldIdentifier argument was invalid for the DescriptorHandle argument.

-# -#

The FieldIdentifier argument was a read-only, ODBC-defined field.

-#
HY092Invalid attribute/option identifierThe value in *ValuePtr was not valid for the FieldIdentifier argument. -#

The FieldIdentifier argument was SQL_DESC_UNNAMED, and ValuePtr was SQL_NAMED.

-#
HY105Invalid parameter type(DM) The value specified for the SQL_DESC_PARAMETER_TYPE field was invalid. (For more information, see the "InputOutputType Argument" section in SQLBindParameter.)
HYT01Connection timeout expiredThe connection timeout period expired before the data source responded to the request. The connection timeout period is set through SQLSetConnectAttr, SQL_ATTR_CONNECTION_TIMEOUT.
IM001Driver does not support this function(DM) The driver associated with the DescriptorHandle does not support the function.
-# -#

Comments

-# -#

An application can call SQLSetDescField to set any descriptor field one at a time. One call to SQLSetDescField sets a single field in a single descriptor. This function can be called to set any field in any descriptor type, provided the field can be set. (See the table later in this section.)

-# -#

Note   If a call to SQLSetDescField fails, the contents of the descriptor record identified by the RecNumber argument are undefined.

-# -#

Other functions can be called to set multiple descriptor fields with a single call of the function. The SQLSetDescRec function sets a variety of fields that affect the data type and buffer bound to a column or parameter (the SQL_DESC_TYPE, SQL_DESC_DATETIME_INTERVAL_CODE, SQL_DESC_OCTET_LENGTH, SQL_DESC_PRECISION, SQL_DESC_SCALE, SQL_DESC_DATA_PTR, SQL_DESC_OCTET_LENGTH_PTR, and SQL_DESC_INDICATOR_PTR fields). SQLBindCol or SQLBindParameter can be used to make a complete specification for the binding of a column or parameter. These functions set a specific group of descriptor fields with one function call.

-# -#

SQLSetDescField can be called to change the binding buffers by adding an offset to the binding pointers (SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, or SQL_DESC_OCTET_LENGTH_PTR). This changes the binding buffers without calling SQLBindCol or SQLBindParameter, which allows an application to change SQL_DESC_DATA_PTR without changing other fields, such as SQL_DESC_DATA_TYPE.

-# -#

If an application calls SQLSetDescField to set any field other than SQL_DESC_COUNT or the deferred fields SQL_DESC_DATA_PTR, SQL_DESC_OCTET_LENGTH_PTR, or SQL_DESC_INDICATOR_PTR, the record becomes unbound.

-# -#

Descriptor header fields are set by calling SQLSetDescField with the appropriate FieldIdentifier. Many header fields are also statement attributes, so they can also be set by a call to SQLSetStmtAttr. This allows applications to set a descriptor field without first obtaining a descriptor handle. When SQLSetDescField is called to set a header field, the RecNumber argument is ignored.

-# -#

A RecNumber of 0 is used to set bookmark fields.

-# -#

Note   The statement attribute SQL_ATTR_USE_BOOKMARKS should always be set before calling SQLSetDescField to set bookmark fields. While this is not mandatory, it is strongly recommended.

-# -#

Sequence of Setting Descriptor Fields

-# -#

When setting descriptor fields by calling SQLSetDescField, the application must follow a specific sequence: -# -#

    -#
  1. The application must first set the SQL_DESC_TYPE, SQL_DESC_CONCISE_TYPE, or SQL_DESC_DATETIME_INTERVAL_CODE field.
  2. -# -#
  3. After one of these fields has been set, the application can set an attribute of a data type, and the driver sets data type attribute fields to the appropriate default values for the data type. Automatic defaulting of type attribute fields ensures that the descriptor is always ready to use once the application has specified a data type. If the application explicitly sets a data type attribute, it is overriding the default attribute.
  4. -# -#
  5. After one of the fields listed in step 1 has been set, and data type attributes have been set, the application can set SQL_DESC_DATA_PTR. This prompts a consistency check of descriptor fields. If the application changes the data type or attributes after setting the SQL_DESC_DATA_PTR field, the driver sets SQL_DESC_DATA_PTR to a null pointer, unbinding the record. This forces the application to complete the proper steps in sequence, before the descriptor record is usable.
  6. -#
-# -#

Initialization of Descriptor Fields

-# -#

When a descriptor is allocated, the fields in the descriptor can be initialized to a default value, be initialized without a default value, or be undefined for the type of descriptor. The following tables indicate the initialization of each field for each type of descriptor, with "D" indicating that the field is initialized with a default, and "ND" indicating that the field is initialized without a default. If a number is shown, the default value of the field is that number. The tables also indicate whether a field is read/write (R/W) or read-only (R).

-# -#

The fields of an IRD have a default value only after the statement has been prepared or executed and the IRD has been populated, not when the statement handle or descriptor has been allocated. Until the IRD has been populated, any attempt to gain access to a field of an IRD will return an error.

-# -#

Some descriptor fields are defined for one or more, but not all, of the descriptor types (ARDs and IRDs, and APDs and IPDs). When a field is undefined for a type of descriptor, it is not needed by any of the functions that use that descriptor.

-# -#

The fields that can be accessed by SQLGetDescField cannot necessarily be set by SQLSetDescField. Fields that can be set by SQLSetDescField are listed in the following tables.

-# -#

The initialization of header fields is outlined in the table that follows.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
Header field nameTypeR/WDefault
SQL_DESC_ALLOC_TYPESQLSMALLINTARD: R
-# APD: R
-# IRD: R
-# IPD: R
ARD: SQL_DESC_ALLOC_AUTO for implicit or SQL_DESC_ALLOC_USER for explicit -#

APD: SQL_DESC_ALLOC_AUTO for implicit or SQL_DESC_ALLOC_USER for explicit

-# -#

IRD: SQL_DESC_ALLOC_AUTO

-# -#

IPD: SQL_DESC_ALLOC_AUTO

-#
SQL_DESC_ARRAY_SIZESQLUINTEGERARD: R/W
-# APD: R/W
-# IRD: Unused
-# IPD: Unused
ARD:[1]
-# APD:[1]
-# IRD: Unused
-# IPD: Unused
SQL_DESC_ARRAY_STATUS_PTRSQLUSMALLINT*ARD: R/W
-# APD: R/W
-# IRD: R/W
-# IPD: R/W
ARD: Null ptr
-# APD: Null ptr
-# IRD: Null ptr
-# IPD: Null ptr
SQL_DESC_BIND_OFFSET_PTRSQLINTEGER*ARD: R/W
-# APD: R/W
-# IRD: Unused
-# IPD: Unused
ARD: Null ptr
-# APD: Null ptr
-# IRD: Unused
-# IPD: Unused
SQL_DESC_BIND_TYPESQLINTEGERARD: R/W
-# APD: R/W
-# IRD: Unused
-# IPD: Unused
ARD: SQL_BIND_BY_COLUMN -#

APD: SQL_BIND_BY_COLUMN

-# -#

IRD: Unused

-# -#

IPD: Unused

-#
SQL_DESC_COUNTSQLSMALLINTARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: 0
-# APD: 0
-# IRD: D
-# IPD: 0
SQL_DESC_ROWS_PROCESSED_PTRSQLUINTEGER*ARD: Unused
-# APD: Unused
-# IRD: R/W
-# IPD: R/W
ARD: Unused
-# APD: Unused
-# IRD: Null ptr
-# IPD: Null ptr
-# -#

[1]   These fields are defined only when the IPD is automatically populated by the driver. If not, they are undefined. If an application attempts to set these fields, SQLSTATE HY091 (Invalid descriptor field identifier) will be returned.

-#

The initialization of record fields is as shown in the following table.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
Record field nameTypeR/WDefault
SQL_DESC_AUTO_UNIQUE_VALUESQLINTEGERARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_BASE_COLUMN_NAMESQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_BASE_TABLE_NAMESQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_CASE_SENSITIVESQLINTEGERARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: R
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: D[1]
SQL_DESC_CATALOG_NAMESQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_CONCISE_TYPESQLSMALLINTARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: SQL_C_
-# DEFAULT
-# APD: SQL_C_
-# DEFAULT
-# IRD: D
-# IPD: ND
SQL_DESC_DATA_PTRSQLPOINTERARD: R/W
-# APD: R/W
-# IRD: Unused
-# IPD: Unused
ARD: Null ptr
-# APD: Null ptr
-# IRD: Unused
-# IPD: Unused[2]
SQL_DESC_DATETIME_INTERVAL_CODESQLSMALLINTARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_DATETIME_INTERVAL_PRECISIONSQLINTEGERARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_DISPLAY_SIZESQLINTEGERARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_FIXED_PREC_SCALESQLSMALLINTARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: R
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: D[1]
SQL_DESC_INDICATOR_PTRSQLINTEGER *ARD: R/W
-# APD: R/W
-# IRD: Unused
-# IPD: Unused
ARD: Null ptr
-# APD: Null ptr
-# IRD: Unused
-# IPD: Unused
SQL_DESC_LABELSQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_LENGTHSQLUINTEGERARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_LITERAL_PREFIXSQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_LITERAL_SUFFIXSQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_LOCAL_TYPE_NAMESQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: R
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: D[1]
SQL_DESC_NAMESQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: R/W
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_NULLABLESQLSMALLINTARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: R
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_NUM_PREC_RADIXSQLINTEGERARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_OCTET_LENGTHSQLINTEGERARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_OCTET_LENGTH_PTRSQLINTEGER *ARD: R/W
-# APD: R/W
-# IRD: Unused
-# IPD: Unused
ARD: Null ptr
-# APD: Null ptr
-# IRD: Unused
-# IPD: Unused
SQL_DESC_PARAMETER_TYPESQLSMALLINTARD: Unused
-# APD: Unused
-# IRD: Unused
-# IPD: R/W
ARD: Unused
-# APD: Unused
-# IRD: Unused
-# IPD: D=SQL_PARAM_INPUT
SQL_DESC_PRECISIONSQLSMALLINTARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_ROWVERSQLSMALLINTARD: Unused -#

APD: Unused

-# -#

IRD: R

-# -#

IPD: R

-#
ARD: Unused -#

APD: Unused

-# -#

IRD: ND

-# -#

IPD: ND

-#
SQL_DESC_SCALESQLSMALLINTARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_SCHEMA_NAMESQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_SEARCHABLESQLSMALLINTARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_TABLE_NAMESQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
SQL_DESC_TYPESQLSMALLINTARD: R/W
-# APD: R/W
-# IRD: R
-# IPD: R/W
ARD: SQL_C_DEFAULT
-# APD: SQL_C_DEFAULT
-# IRD: D
-# IPD: ND
SQL_DESC_TYPE_NAMESQLCHAR *ARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: R
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: D[1]
SQL_DESC_UNNAMEDSQLSMALLINTARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: R/W
ARD: ND
-# APD: ND
-# IRD: D
-# IPD: ND
SQL_DESC_UNSIGNEDSQLSMALLINTARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: R
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: D[1]
SQL_DESC_UPDATABLESQLSMALLINTARD: Unused
-# APD: Unused
-# IRD: R
-# IPD: Unused
ARD: Unused
-# APD: Unused
-# IRD: D
-# IPD: Unused
-# -#

[1]   These fields are defined only when the IPD is automatically populated by the driver. If not, they are undefined. If an application attempts to set these fields, SQLSTATE HY091 (Invalid descriptor field identifier) will be returned.

-#

[2]   The SQL_DESC_DATA_PTR field in the IPD can be set to force a consistency check. In a subsequent call to SQLGetDescField or SQLGetDescRec, the driver is not required to return the value that SQL_DESC_DATA_PTR was set to.

-#

FieldIdentifier Argument

-# -#

The FieldIdentifier argument indicates the descriptor field to be set. A descriptor contains the descriptor header, consisting of the header fields described in the next section, "Header Fields," and zero or more descriptor records, consisting of the record fields described in the section following the "Header Fields" section.

-# -#

Header Fields

-# -#

Each descriptor has a header consisting of the following fields: -# -#

-#
SQL_DESC_ALLOC_TYPE [All]
-# -#
This read-only SQLSMALLINT header field specifies whether the descriptor was allocated automatically by the driver or explicitly by the application. The application can obtain, but not modify, this field. The field is set to SQL_DESC_ALLOC_AUTO by the driver if the descriptor was automatically allocated by the driver. It is set to SQL_DESC_ALLOC_USER by the driver if the descriptor was explicitly allocated by the application.
-# -#
SQL_DESC_ARRAY_SIZE [Application descriptors]
-# -#
In ARDs, this SQLUINTEGER header field specifies the number of rows in the rowset. This is the number of rows to be returned by a call to SQLFetch or SQLFetchScroll or to be operated on by a call to SQLBulkOperations or SQLSetPos. -# -#

In APDs, this SQLUINTEGER header field specifies the number of values for each parameter. -# -# -#

The default value of this field is 1. If SQL_DESC_ARRAY_SIZE is greater than 1, SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, and SQL_DESC_OCTET_LENGTH_PTR of the APD or ARD point to arrays. The cardinality of each array is equal to the value of this field. -# -# -#

This field in the ARD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_ROW_ARRAY_SIZE attribute. This field in the APD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_PARAMSET_SIZE attribute. -#

-# -#
SQL_DESC_ARRAY_STATUS_PTR [All]
-# -#
For each descriptor type, this SQLUSMALLINT * header field points to an array of SQLUSMALLINT values. These arrays are named as follows: row status array (IRD), parameter status array (IPD), row operation array (ARD), and parameter operation array (APD). -# -#

In the IRD, this header field points to a row status array containing status values after a call to SQLBulkOperations, SQLFetch, SQLFetchScroll, or SQLSetPos. The array has as many elements as there are rows in the rowset. The application must allocate an array of SQLUSMALLINTs and set this field to point to the array. The field is set to a null pointer by default. The driver will populate the array—unless the SQL_DESC_ARRAY_STATUS_PTR field is set to a null pointer, in which case no status values are generated and the array is not populated. -# -# -#

Caution   Driver behavior is undefined if the application sets the elements of the row status array pointed to by the SQL_DESC_ARRAY_STATUS_PTR field of the IRD. -# -# -#

The array is initially populated by a call to SQLBulkOperations, SQLFetch, SQLFetchScroll, or SQLSetPos. If the call did not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the array pointed to by this field are undefined. The elements in the array can contain the following values: -# -# -#

    -#
  • SQL_ROW_SUCCESS: The row was successfully fetched and has not changed since it was last fetched.
  • -# -#
  • SQL_ROW_SUCCESS_WITH_INFO: The row was successfully fetched and has not changed since it was last fetched. However, a warning was returned about the row.
  • -# -#
  • SQL_ROW_ERROR: An error occurred while fetching the row.
  • -# -#
  • SQL_ROW_UPDATED: The row was successfully fetched and has been updated since it was last fetched. If the row is fetched again, its status is SQL_ROW_SUCCESS.
  • -# -#
  • SQL_ROW_DELETED: The row has been deleted since it was last fetched.
  • -# -#
  • SQL_ROW_ADDED: The row was inserted by SQLBulkOperations. If the row is fetched again, its status is SQL_ROW_SUCCESS.
  • -# -#
  • SQL_ROW_NOROW: The rowset overlapped the end of the result set, and no row was returned that corresponded to this element of the row status array.
  • -#
-# -# -#

This field in the IRD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_ROW_STATUS_PTR attribute. -# -# -#

The SQL_DESC_ARRAY_STATUS_PTR field of the IRD is valid only after SQL_SUCCESS or SQL_SUCCESS_WITH_INFO has been returned. If the return code is not one of these, the location pointed to by SQL_DESC_ROWS_PROCESSED_PTR is undefined. -# -# -#

In the IPD, this header field points to a parameter status array containing status information for each set of parameter values after a call to SQLExecute or SQLExecDirect. If the call to SQLExecute or SQLExecDirect did not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the array pointed to by this field are undefined. The application must allocate an array of SQLUSMALLINTs and set this field to point to the array. The driver will populate the array—unless the SQL_DESC_ARRAY_STATUS_PTR field is set to a null pointer, in which case no status values are generated and the array is not populated. The elements in the array can contain the following values: -# -# -#

    -#
  • SQL_PARAM_SUCCESS: The SQL statement was successfully executed for this set of parameters.
  • -# -#
  • SQL_PARAM_SUCCESS_WITH_INFO: The SQL statement was successfully executed for this set of parameters; however, warning information is available in the diagnostics data structure.
  • -# -#
  • SQL_PARAM_ERROR: An error occurred in processing this set of parameters. Additional error information is available in the diagnostics data structure.
  • -# -#
  • SQL_PARAM_UNUSED: This parameter set was unused, possibly due to the fact that some previous parameter set caused an error that aborted further processing, or because SQL_PARAM_IGNORE was set for that set of parameters in the array specified by the SQL_DESC_ARRAY_STATUS_PTR field of the APD.
  • -# -#
  • SQL_PARAM_DIAG_UNAVAILABLE: Diagnostic information is not available. An example of this is when the driver treats arrays of parameters as a monolithic unit and so does not generate this level of error information.
  • -#
-# -# -#

This field in the IPD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_PARAM_STATUS_PTR attribute. -# -# -#

In the ARD, this header field points to a row operation array of values that can be set by the application to indicate whether this row is to be ignored for SQLSetPos operations. The elements in the array can contain the following values: -# -# -#

    -#
  • SQL_ROW_PROCEED: The row is included in the bulk operation using SQLSetPos. (This setting does not guarantee that the operation will occur on the row. If the row has the status SQL_ROW_ERROR in the IRD row status array, the driver might not be able to perform the operation in the row.)
  • -# -#
  • SQL_ROW_IGNORE: The row is excluded from the bulk operation using SQLSetPos.
  • -#
-# -# -#

If no elements of the array are set, all rows are included in the bulk operation. If the value in the SQL_DESC_ARRAY_STATUS_PTR field of the ARD is a null pointer, all rows are included in the bulk operation; the interpretation is the same as if the pointer pointed to a valid array and all elements of the array were SQL_ROW_PROCEED. If an element in the array is set to SQL_ROW_IGNORE, the value in the row status array for the ignored row is not changed. -# -# -#

This field in the ARD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_ROW_OPERATION_PTR attribute. -# -# -#

In the APD, this header field points to a parameter operation array of values that can be set by the application to indicate whether this set of parameters is to be ignored when SQLExecute or SQLExecDirect is called. The elements in the array can contain the following values: -# -# -#

    -#
  • SQL_PARAM_PROCEED: The set of parameters is included in the SQLExecute or SQLExecDirect call.
  • -# -#
  • SQL_PARAM_IGNORE: The set of parameters is excluded from the SQLExecute or SQLExecDirect call.
  • -#
-# -# -#

If no elements of the array are set, all sets of parameters in the array are used in the SQLExecute or SQLExecDirect calls. If the value in the SQL_DESC_ARRAY_STATUS_PTR field of the APD is a null pointer, all sets of parameters are used; the interpretation is the same as if the pointer pointed to a valid array and all elements of the array were SQL_PARAM_PROCEED. -# -# -#

This field in the APD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_PARAM_OPERATION_PTR attribute. -#

-# -#
SQL_DESC_BIND_OFFSET_PTR [Application descriptors]
-# -#
This SQLINTEGER * header field points to the binding offset. It is set to a null pointer by default. If this field is not a null pointer, the driver dereferences the pointer and adds the dereferenced value to each of the deferred fields that has a non-null value in the descriptor record (SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, and SQL_DESC_OCTET_LENGTH_PTR) at fetch time and uses the new pointer values when binding. -# -#

The binding offset is always added directly to the values in the SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, and SQL_DESC_OCTET_LENGTH_PTR fields. If the offset is changed to a different value, the new value is still added directly to the value in each descriptor field. The new offset is not added to the field value plus any earlier offset. -# -# -#

This field is a deferred field: It is not used at the time it is set but is used at a later time by the driver when it needs to determine addresses for data buffers. -# -# -#

This field in the ARD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_ROW_BIND_OFFSET_PTR attribute. This field in the ARD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_PARAM_BIND_OFFSET_PTR attribute. -# -# -#

For more information, see the description of row-wise binding in SQLFetchScroll and SQLBindParameter. -#

-# -#
SQL_DESC_BIND_TYPE [Application descriptors]
-# -#
This SQLUINTEGER header field sets the binding orientation to be used for binding either columns or parameters. -# -#

In ARDs, this field specifies the binding orientation when SQLFetchScroll or SQLFetch is called on the associated statement handle. -# -# -#

To select column-wise binding for columns, this field is set to SQL_BIND_BY_COLUMN (the default). -# -# -#

This field in the ARD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_ROW_BIND_TYPE Attribute. -# -# -#

In APDs, this field specifies the binding orientation to be used for dynamic parameters. -# -# -#

To select column-wise binding for parameters, this field is set to SQL_BIND_BY_COLUMN (the default). -# -# -#

This field in the APD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_PARAM_BIND_TYPE Attribute. -#

-# -#
SQL_DESC_COUNT [All]
-# -#
This SQLSMALLINT header field specifies the 1-based index of the highest-numbered record that contains data. When the driver sets the data structure for the descriptor, it must also set the SQL_DESC_COUNT field to show how many records are significant. When an application allocates an instance of this data structure, it does not have to specify how many records to reserve room for. As the application specifies the contents of the records, the driver takes any required action to ensure that the descriptor handle refers to a data structure of the adequate size. -# -#

SQL_DESC_COUNT is not a count of all data columns that are bound (if the field is in an ARD) or of all parameters that are bound (if the field is in an APD), but the number of the highest-numbered record. If the highest-numbered column or parameter is unbound, then SQL_DESC_COUNT is changed to the number of the next highest-numbered column or parameter. If a column or a parameter with a number that is less than the number of the highest-numbered column is unbound (by calling SQLBindCol with the TargetValuePtr argument set to a null pointer, or SQLBindParameter with the ParameterValuePtr argument set to a null pointer), SQL_DESC_COUNT is not changed. If additional columns or parameters are bound with numbers greater than the highest-numbered record that contains data, the driver automatically increases the value in the SQL_DESC_COUNT field. If all columns are unbound by calling SQLFreeStmt with the SQL_UNBIND option, the SQL_DESC_COUNT fields in the ARD and IRD are set to 0. If SQLFreeStmt is called with the SQL_RESET_PARAMS option, the SQL_DESC_COUNT fields in the APD and IPD are set to 0. -# -# -#

The value in SQL_DESC_COUNT can be set explicitly by an application by calling SQLSetDescField. If the value in SQL_DESC_COUNT is explicitly decreased, all records with numbers greater than the new value in SQL_DESC_COUNT are effectively removed. If the value in SQL_DESC_COUNT is explicitly set to 0 and the field is in an ARD, all data buffers except a bound bookmark column are released. -# -# -#

The record count in this field of an ARD does not include a bound bookmark column. The only way to unbind a bookmark column is to set the SQL_DESC_DATA_PTR field to a null pointer. -#

-# -#
SQL_DESC_ROWS_PROCESSED_PTR [Implementation descriptors]
-# -#
In an IRD, this SQLUINTEGER * header field points to a buffer containing the number of rows fetched after a call to SQLFetch or SQLFetchScroll, or the number of rows affected in a bulk operation performed by a call to SQLBulkOperations or SQLSetPos, including error rows. -# -#

In an IPD, this SQLUINTEGER * header field points to a buffer containing the number of sets of parameters that have been processed, including error sets. No number will be returned if this is a null pointer. -# -# -#

SQL_DESC_ROWS_PROCESSED_PTR is valid only after SQL_SUCCESS or SQL_SUCCESS_WITH_INFO has been returned after a call to SQLFetch or SQLFetchScroll (for an IRD field) or SQLExecute, SQLExecDirect, or SQLParamData (for an IPD field). If the call that fills in the buffer pointed to by this field does not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the buffer are undefined, unless it returns SQL_NO_DATA, in which case the value in the buffer is set to 0. -# -# -#

This field in the ARD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_ROWS_FETCHED_PTR attribute. This field in the APD can also be set by calling SQLSetStmtAttr with the SQL_ATTR_PARAMS_PROCESSED_PTR attribute. -# -# -#

The buffer pointed to by this field is allocated by the application. It is a deferred output buffer that is set by the driver. It is set to a null pointer by default. -#

-#
-# -#

Record Fields

-# -#

Each descriptor contains one or more records consisting of fields that define either column data or dynamic parameters, depending on the type of descriptor. Each record is a complete definition of a single column or parameter. -# -#

-#
SQL_DESC_AUTO_UNIQUE_VALUE [IRDs]
-# -#
This read-only SQLINTEGER record field contains SQL_TRUE if the column is an auto-incrementing column, or SQL_FALSE if the column is not an auto-incrementing column. This field is read-only, but the underlying auto-incrementing column is not necessarily read-only.
-# -#
SQL_DESC_BASE_COLUMN_NAME [IRDs]
-# -#
This read-only SQLCHAR * record field contains the base column name for the result set column. If a base column name does not exist (as in the case of columns that are expressions), this variable contains an empty string.
-# -#
SQL_DESC_BASE_TABLE_NAME [IRDs]
-# -#
This read-only SQLCHAR * record field contains the base table name for the result set column. If a base table name cannot be defined or is not applicable, this variable contains an empty string.
-# -#
SQL_DESC_CASE_SENSITIVE [Implementation descriptors]
-# -#
This read-only SQLINTEGER record field contains SQL_TRUE if the column or parameter is treated as case-sensitive for collations and comparisons, or SQL_FALSE if the column is not treated as case-sensitive for collations and comparisons or if it is a noncharacter column.
-# -#
SQL_DESC_CATALOG_NAME [IRDs]
-# -#
This read-only SQLCHAR * record field contains the catalog for the base table that contains the column. The return value is driver-dependent if the column is an expression or if the column is part of a view. If the data source does not support catalogs or the catalog cannot be determined, this variable contains an empty string.
-# -#
SQL_DESC_CONCISE_TYPE [All]
-# -#
This SQLSMALLINT header field specifies the concise data type for all data types, including the datetime and interval data types. -# -#

The values in the SQL_DESC_CONCISE_TYPE, SQL_DESC_TYPE, and SQL_DESC_DATETIME_INTERVAL_CODE fields are interdependent. Each time one of the fields is set, the other must also be set. SQL_DESC_CONCISE_TYPE can be set by a call to SQLBindCol or SQLBindParameter, or SQLSetDescField. SQL_DESC_TYPE can be set by a call to SQLSetDescField or SQLSetDescRec. -# -# -#

If SQL_DESC_CONCISE_TYPE is set to a concise data type other than an interval or datetime data type, the SQL_DESC_TYPE field is set to the same value and the SQL_DESC_DATETIME_INTERVAL_CODE field is set to 0. -# -# -#

If SQL_DESC_CONCISE_TYPE is set to the concise datetime or interval data type, the SQL_DESC_TYPE field is set to the corresponding verbose type (SQL_DATETIME or SQL_INTERVAL) and the SQL_DESC_DATETIME_INTERVAL_CODE field is set to the appropriate subcode. -#

-# -#
SQL_DESC_DATA_PTR [Application descriptors and IPDs]
-# -#
This SQLPOINTER record field points to a variable that will contain the parameter value (for APDs) or the column value (for ARDs). This field is a deferred field. It is not used at the time it is set but is used at a later time by the driver to retrieve data. -# -#

The column specified by the SQL_DESC_DATA_PTR field of the ARD is unbound if the TargetValuePtr argument in a call to SQLBindCol is a null pointer or if the SQL_DESC_DATA_PTR field in the ARD is set by a call to SQLSetDescField or SQLSetDescRec to a null pointer. Other fields are not affected if the SQL_DESC_DATA_PTR field is set to a null pointer. -# -# -#

If the call to SQLFetch or SQLFetchScroll that fills in the buffer pointed to by this field did not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the buffer are undefined. -# -# -#

Whenever the SQL_DESC_DATA_PTR field of an APD, ARD, or IPD is set, the driver checks that the value in the SQL_DESC_TYPE field contains one of the valid ODBC C data types or a driver-specific data type, and that all other fields affecting the data types are consistent. Prompting a consistency check is the only use of the SQL_DESC_DATA_PTR field of an IPD. Specifically, if an application sets the SQL_DESC_DATA_PTR field of an IPD and later calls SQLGetDescField on this field, it is not necessarily returned the value that it had set. For more information, see "Consistency Checks" in SQLSetDescRec. -#

-# -#
SQL_DESC_DATETIME_INTERVAL_CODE [All]
-# -#
This SQLSMALLINT record field contains the subcode for the specific datetime or interval data type when the SQL_DESC_TYPE field is SQL_DATETIME or SQL_INTERVAL. This is true for both SQL and C data types. The code consists of the data type name with "CODE" substituted for either "TYPE" or "C_TYPE" (for datetime types), or "CODE" substituted for "INTERVAL" or "C_INTERVAL" (for interval types). -# -#

If SQL_DESC_TYPE and SQL_DESC_CONCISE_TYPE in an application descriptor are set to SQL_C_DEFAULT and the descriptor is not associated with a statement handle, the contents of SQL_DESC_DATETIME_INTERVAL_CODE are undefined. -# -# -#

This field can be set for the datetime data types listed in the following table. -# -# -#

-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
Datetime typesDATETIME_INTERVAL_CODE
SQL_TYPE_DATE/SQL_C_TYPE_DATESQL_CODE_DATE
SQL_TYPE_TIME/SQL_C_TYPE_TIMESQL_CODE_TIME
SQL_TYPE_TIMESTAMP/
-# SQL_C_TYPE_TIMESTAMP
SQL_CODE_TIMESTAMP
-# -# -# -#

This field can be set for the interval data types listed in the following table. -# -# -#

-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
Interval typeDATETIME_INTERVAL_CODE
SQL_INTERVAL_DAY/
-# SQL_C_INTERVAL_DAY
SQL_CODE_DAY
SQL_INTERVAL_DAY_TO_HOUR/
-# SQL_C_INTERVAL_DAY_TO_HOUR
SQL_CODE_DAY_TO_HOUR
SQL_INTERVAL_DAY_TO_MINUTE/
-# SQL_C_INTERVAL_DAY_TO_MINUTE
SQL_CODE_DAY_TO_MINUTE
SQL_INTERVAL_DAY_TO_SECOND/
-# SQL_C_INTERVAL_DAY_TO_SECOND
SQL_CODE_DAY_TO_SECOND
SQL_INTERVAL_HOUR/
-# SQL_C_INTERVAL_HOUR
SQL_CODE_HOUR
SQL_INTERVAL_HOUR_TO_MINUTE/
-# SQL_C_INTERVAL_HOUR_TO_MINUTE
SQL_CODE_HOUR_TO_MINUTE
SQL_INTERVAL_HOUR_TO_SECOND/
-# SQL_C_INTERVAL_HOUR_TO_SECOND
SQL_CODE_HOUR_TO_SECOND
SQL_INTERVAL_MINUTE/
-# SQL_C_INTERVAL_MINUTE
SQL_CODE_MINUTE
SQL_INTERVAL_MINUTE_TO_SECOND/
-# SQL_C_INTERVAL_MINUTE_TO_SECOND
SQL_CODE_MINUTE_TO_SECOND
SQL_INTERVAL_MONTH/
-# SQL_C_INTERVAL_MONTH
SQL_CODE_MONTH
SQL_INTERVAL_SECOND/
-# SQL_C_INTERVAL_SECOND
SQL_CODE_SECOND
SQL_INTERVAL_YEAR/
-# SQL_C_INTERVAL_YEAR
SQL_CODE_YEAR
SQL_INTERVAL_YEAR_TO_MONTH/
-# SQL_C_INTERVAL_YEAR_TO_MONTH
SQL_CODE_YEAR_TO_MONTH
-# -# -# -#

For more information about the data intervals and this field, see "Data Type Identifiers and Descriptors" in Appendix D: Data Types. -#

-# -#
SQL_DESC_DATETIME_INTERVAL_PRECISION [All]
-# -#
This SQLINTEGER record field contains the interval leading precision if the SQL_DESC_TYPE field is SQL_INTERVAL. When the SQL_DESC_DATETIME_INTERVAL_CODE field is set to an interval data type, this field is set to the default interval leading precision.
-# -#
SQL_DESC_DISPLAY_SIZE [IRDs]
-# -#
This read-only SQLINTEGER record field contains the maximum number of characters required to display the data from the column.
-# -#
SQL_DESC_FIXED_PREC_SCALE [Implementation descriptors]
-# -#
This read-only SQLSMALLINT record field is set to SQL_TRUE if the column is an exact numeric column and has a fixed precision and nonzero scale, or to SQL_FALSE if the column is not an exact numeric column with a fixed precision and scale.
-# -#
SQL_DESC_INDICATOR_PTR [Application descriptors]
-# -#
In ARDs, this SQLINTEGER * record field points to the indicator variable. This variable contains SQL_NULL_DATA if the column value is a NULL. For APDs, the indicator variable is set to SQL_NULL_DATA to specify NULL dynamic arguments. Otherwise, the variable is zero (unless the values in SQL_DESC_INDICATOR_PTR and SQL_DESC_OCTET_LENGTH_PTR are the same pointer). -# -#

If the SQL_DESC_INDICATOR_PTR field in an ARD is a null pointer, the driver is prevented from returning information about whether the column is NULL or not. If the column is NULL and SQL_DESC_INDICATOR_PTR is a null pointer, SQLSTATE 22002 (Indicator variable required but not supplied) is returned when the driver attempts to populate the buffer after a call to SQLFetch or SQLFetchScroll. If the call to SQLFetch or SQLFetchScroll did not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the buffer are undefined. -# -# -#

The SQL_DESC_INDICATOR_PTR field determines whether the field pointed to by SQL_DESC_OCTET_LENGTH_PTR is set. If the data value for a column is NULL, the driver sets the indicator variable to SQL_NULL_DATA. The field pointed to by SQL_DESC_OCTET_LENGTH_PTR is then not set. If a NULL value is not encountered during the fetch, the buffer pointed to by SQL_DESC_INDICATOR_PTR is set to zero and the buffer pointed to by SQL_DESC_OCTET_LENGTH_PTR is set to the length of the data. -# -# -#

If the SQL_DESC_INDICATOR_PTR field in an APD is a null pointer, the application cannot use this descriptor record to specify NULL arguments. -# -# -#

This field is a deferred field: It is not used at the time it is set but is used at a later time by the driver to indicate nullability (for ARDs) or to determine nullability (for APDs). -#

-# -#
SQL_DESC_LABEL [IRDs]
-# -#
This read-only SQLCHAR * record field contains the column label or title. If the column does not have a label, this variable contains the column name. If the column is unnamed and unlabeled, this variable contains an empty string.
-# -#
SQL_DESC_LENGTH [All]
-# -#
This SQLUINTEGER record field is either the maximum or actual length of a character string in characters or a binary data type in bytes. It is the maximum length for a fixed-length data type, or the actual length for a variable-length data type. Its value always excludes the null-termination character that ends the character string. For values whose type is SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP, or one of the SQL interval data types, this field has the length in characters of the character string representation of the datetime or interval value. -# -#

The value in this field may be different from the value for "length" as defined in ODBC 2.x. For more information, see Appendix D: Data Types. -#

-# -#
SQL_DESC_LITERAL_PREFIX [IRDs]
-# -#
This read-only SQLCHAR * record field contains the character or characters that the driver recognizes as a prefix for a literal of this data type. This variable contains an empty string for a data type for which a literal prefix is not applicable.
-# -#
SQL_DESC_LITERAL_SUFFIX [IRDs]
-# -#
This read-only SQLCHAR * record field contains the character or characters that the driver recognizes as a suffix for a literal of this data type. This variable contains an empty string for a data type for which a literal suffix is not applicable.
-# -#
SQL_DESC_LOCAL_TYPE_NAME [Implementation descriptors]
-# -#
This read-only SQLCHAR * record field contains any localized (native language) name for the data type that may be different from the regular name of the data type. If there is no localized name, an empty string is returned. This field is for display purposes only.
-# -#
SQL_DESC_NAME [Implementation descriptors]
-# -#
This SQLCHAR * record field in a row descriptor contains the column alias, if it applies. If the column alias does not apply, the column name is returned. In either case, the driver sets the SQL_DESC_UNNAMED field to SQL_NAMED when it sets the SQL_DESC_NAME field. If there is no column name or a column alias, the driver returns an empty string in the SQL_DESC_NAME field and sets the SQL_DESC_UNNAMED field to SQL_UNNAMED. -# -#

An application can set the SQL_DESC_NAME field of an IPD to a parameter name or alias to specify stored procedure parameters by name. (For more information, see "Binding Parameters by Name (Named Parameters)" in Chapter 9: Executing Statements.) The SQL_DESC_NAME field of an IRD is a read-only field; SQLSTATE HY091 (Invalid descriptor field identifier) will be returned if an application attempts to set it. -# -# -#

In IPDs, this field is undefined if the driver does not support named parameters. If the driver supports named parameters and is capable of describing parameters, the parameter name is returned in this field. -#

-# -#
SQL_DESC_NULLABLE [Implementation descriptors]
-# -#
In IRDs, this read-only SQLSMALLINT record field is SQL_NULLABLE if the column can have NULL values, SQL_NO_NULLS if the column does not have NULL values, or SQL_NULLABLE_UNKNOWN if it is not known whether the column accepts NULL values. This field pertains to the result set column, not the base column. -# -#

In IPDs, this field is always set to SQL_NULLABLE because dynamic parameters are always nullable and cannot be set by an application. -#

-# -#
SQL_DESC_NUM_PREC_RADIX [All]
-# -#
This SQLINTEGER field contains a value of 2 if the data type in the SQL_DESC_TYPE field is an approximate numeric data type, because the SQL_DESC_PRECISION field contains the number of bits. This field contains a value of 10 if the data type in the SQL_DESC_TYPE field is an exact numeric data type, because the SQL_DESC_PRECISION field contains the number of decimal digits. This field is set to 0 for all non-numeric data types.
-# -#
SQL_DESC_OCTET_LENGTH [All]
-# -#
This SQLINTEGER record field contains the length, in bytes, of a character string or binary data type. For fixed-length character or binary types, this is the actual length in bytes. For variable-length character or binary types, this is the maximum length in bytes. This value always excludes space for the null-termination character for implementation descriptors and always includes space for the null-termination character for application descriptors. For application data, this field contains the size of the buffer. For APDs, this field is defined only for output or input/output parameters.
-# -#
SQL_DESC_OCTET_LENGTH_PTR [Application descriptors]
-# -#
This SQLINTEGER * record field points to a variable that will contain the total length in bytes of a dynamic argument (for parameter descriptors) or of a bound column value (for row descriptors). -# -#

For an APD, this value is ignored for all arguments except character string and binary; if this field points to SQL_NTS, the dynamic argument must be null-terminated. To indicate that a bound parameter will be a data-at-execution parameter, an application sets this field in the appropriate record of the APD to a variable that, at execute time, will contain the value SQL_DATA_AT_EXEC or the result of the SQL_LEN_DATA_AT_EXEC macro. If there is more than one such field, SQL_DESC_DATA_PTR can be set to a value uniquely identifying the parameter to help the application determine which parameter is being requested. -# -# -#

If the OCTET_LENGTH_PTR field of an ARD is a null pointer, the driver does not return length information for the column. If the SQL_DESC_OCTET_LENGTH_PTR field of an APD is a null pointer, the driver assumes that character strings and binary values are null-terminated. (Binary values should not be null-terminated but should be given a length to avoid truncation.) -# -# -#

If the call to SQLFetch or SQLFetchScroll that fills in the buffer pointed to by this field did not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the buffer are undefined. This field is a deferred field. It is not used at the time it is set but is used at a later time by the driver to determine or indicate the octet length of the data. -#

-# -#
SQL_DESC_PARAMETER_TYPE [IPDs]
-# -#
This SQLSMALLINT record field is set to SQL_PARAM_INPUT for an input parameter, SQL_PARAM_INPUT_OUTPUT for an input/output parameter, or SQL_PARAM_OUTPUT for an output parameter. It is set to SQL_PARAM_INPUT by default. -# -#

For an IPD, the field is set to SQL_PARAM_INPUT by default if the IPD is not automatically populated by the driver (the SQL_ATTR_ENABLE_AUTO_IPD statement attribute is SQL_FALSE). An application should set this field in the IPD for parameters that are not input parameters. -#

-# -#
SQL_DESC_PRECISION [All]
-# -#
This SQLSMALLINT record field contains the number of digits for an exact numeric type, the number of bits in the mantissa (binary precision) for an approximate numeric type, or the numbers of digits in the fractional seconds component for the SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP, or SQL_INTERVAL_SECOND data type. This field is undefined for all other data types. -# -#

The value in this field may be different from the value for "precision" as defined in ODBC 2.x. For more information, see Appendix D: Data Types. -#

-# -#
SQL_DESC_ROWVER [Implementation descriptors]
-# -#
This SQLSMALLINT record field indicates whether a column is automatically modified by the DBMS when a row is updated (for example, a column of the type "timestamp" in SQL Server). The value of this record field is set to SQL_TRUE if the column is a row versioning column, and to SQL_FALSE otherwise. This column attribute is similar to calling SQLSpecialColumns with IdentifierType of SQL_ROWVER to determine whether a column is automatically updated.
-# -#
SQL_DESC_SCALE [All]
-# -#
This SQLSMALLINT record field contains the defined scale for decimal and numeric data types. The field is undefined for all other data types. -# -#

The value in this field may be different from the value for "scale" as defined in ODBC 2.x. For more information, see Appendix D: Data Types. -#

-# -#
SQL_DESC_SCHEMA_NAME [IRDs]
-# -#
This read-only SQLCHAR * record field contains the schema name of the base table that contains the column. The return value is driver-dependent if the column is an expression or if the column is part of a view. If the data source does not support schemas or the schema name cannot be determined, this variable contains an empty string.
-# -#
SQL_DESC_SEARCHABLE [IRDs]
-# -#
This read-only SQLSMALLINT record field is set to one of the following values: -# -#
    -#
  • SQL_PRED_NONE if the column cannot be used in a WHERE clause. (This is the same as the SQL_UNSEARCHABLE value in ODBC 2.x.)
  • -# -#
  • SQL_PRED_CHAR if the column can be used in a WHERE clause but only with the LIKE predicate. (This is the same as the SQL_LIKE_ONLY value in ODBC 2.x.)
  • -# -#
  • SQL_PRED_BASIC if the column can be used in a WHERE clause with all the comparison operators except LIKE. (This is the same as the SQL_EXCEPT_LIKE value in ODBC 2.x.)
  • -# -#
  • SQL_PRED_SEARCHABLE if the column can be used in a WHERE clause with any comparison operator.
  • -#
-#
-# -#
SQL_DESC_TABLE_NAME [IRDs]
-# -#
This read-only SQLCHAR * record field contains the name of the base table that contains this column. The return value is driver-dependent if the column is an expression or if the column is part of a view.
-# -#
SQL_DESC_TYPE [All]
-# -#
This SQLSMALLINT record field specifies the concise SQL or C data type for all data types except datetime and interval data types. For the datetime and interval data types, this field specifies the verbose data type, which is SQL_DATETIME or SQL_INTERVAL. -# -#

Whenever this field contains SQL_DATETIME or SQL_INTERVAL, the SQL_DESC_DATETIME_INTERVAL_CODE field must contain the appropriate subcode for the concise type. For datetime data types, SQL_DESC_TYPE contains SQL_DATETIME, and the SQL_DESC_DATETIME_INTERVAL_CODE field contains a subcode for the specific datetime data type. For interval data types, SQL_DESC_TYPE contains SQL_INTERVAL and the SQL_DESC_DATETIME_INTERVAL_CODE field contains a subcode for the specific interval data type. -# -# -#

The values in the SQL_DESC_TYPE and SQL_DESC_CONCISE_TYPE fields are interdependent. Each time one of the fields is set, the other must also be set. SQL_DESC_TYPE can be set by a call to SQLSetDescField or SQLSetDescRec. SQL_DESC_CONCISE_TYPE can be set by a call to SQLBindCol or SQLBindParameter, or SQLSetDescField. -# -# -#

If SQL_DESC_TYPE is set to a concise data type other than an interval or datetime data type, the SQL_DESC_CONCISE_TYPE field is set to the same value and the SQL_DESC_DATETIME_INTERVAL_CODE field is set to 0. -# -# -#

If SQL_DESC_TYPE is set to the verbose datetime or interval data type (SQL_DATETIME or SQL_INTERVAL) and the SQL_DESC_DATETIME_INTERVAL_CODE field is set to the appropriate subcode, the SQL_DESC_CONCISE TYPE field is set to the corresponding concise type. Trying to set SQL_DESC_TYPE to one of the concise datetime or interval types will return SQLSTATE HY021 (Inconsistent descriptor information). -# -# -#

When the SQL_DESC_TYPE field is set by a call to SQLBindCol, SQLBindParameter, or SQLSetDescField, the following fields are set to the following default values, as shown in the table below. The values of the remaining fields of the same record are undefined. -# -# -#

-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
Value of SQL_DESC_TYPEOther fields implicitly set
SQL_CHAR, SQL_VARCHAR, SQL_C_CHAR, SQL_C_VARCHARSQL_DESC_LENGTH is set to 1. SQL_DESC_PRECISION is set to 0.
SQL_DATETIMEWhen SQL_DESC_DATETIME_INTERVAL_CODE is set to SQL_CODE_DATE or SQL_CODE_TIME, SQL_DESC_PRECISION is set to 0. When it is set to SQL_DESC_TIMESTAMP, SQL_DESC_PRECISION is set to 6.
SQL_DECIMAL, SQL_NUMERIC,
-# SQL_C_NUMERIC
SQL_DESC_SCALE is set to 0. SQL_DESC_PRECISION is set to the implementation-defined precision for the respective data type.
SQL_FLOAT, SQL_C_FLOATSQL_DESC_PRECISION is set to the implementation-defined default precision for SQL_FLOAT.
SQL_INTERVALWhen SQL_DESC_DATETIME_INTERVAL_CODE is set to an interval data type, SQL_DESC_DATETIME_INTERVAL_PRECISION is set to 2 (the default interval leading precision). When the interval has a seconds component, SQL_DESC_PRECISION is set to 6 (the default interval seconds precision).
-# -# -# -#

When an application calls SQLSetDescField to set fields of a descriptor rather than calling SQLSetDescRec, the application must first declare the data type. When it does, the other fields indicated in the previous table are implicitly set. If any of the values implicitly set are unacceptable, the application can then call SQLSetDescField or SQLSetDescRec to set the unacceptable value explicitly. -#

-# -#
SQL_DESC_TYPE_NAME [Implementation descriptors]
-# -#
This read-only SQLCHAR * record field contains the data source–dependent type name (for example, "CHAR", "VARCHAR", and so on). If the data type name is unknown, this variable contains an empty string.
-# -#
SQL_DESC_UNNAMED [Implementation descriptors]
-# -#
This SQLSMALLINT record field in a row descriptor is set by the driver to either SQL_NAMED or SQL_UNNAMED when it sets the SQL_DESC_NAME field. If the SQL_DESC_NAME field contains a column alias or if the column alias does not apply, the driver sets the SQL_DESC_UNNAMED field to SQL_NAMED. If an application sets the SQL_DESC_NAME field of an IPD to a parameter name or alias, the driver sets the SQL_DESC_UNNAMED field of the IPD to SQL_NAMED. If there is no column name or a column alias, the driver sets the SQL_DESC_UNNAMED field to SQL_UNNAMED. -# -#

An application can set the SQL_DESC_UNNAMED field of an IPD to SQL_UNNAMED. A driver returns SQLSTATE HY091 (Invalid descriptor field identifier) if an application attempts to set the SQL_DESC_UNNAMED field of an IPD to SQL_NAMED. The SQL_DESC_UNNAMED field of an IRD is read-only; SQLSTATE HY091 (Invalid descriptor field identifier) will be returned if an application attempts to set it. -#

-# -#
SQL_DESC_UNSIGNED [Implementation descriptors]
-# -#
This read-only SQLSMALLINT record field is set to SQL_TRUE if the column type is unsigned or non-numeric, or SQL_FALSE if the column type is signed.
-# -#
SQL_DESC_UPDATABLE [IRDs]
-# -#
This read-only SQLSMALLINT record field is set to one of the following values: -# -#
    -#
  • SQL_ATTR_READ_ONLY if the result set column is read-only.
  • -# -#
  • SQL_ATTR_WRITE if the result set column is read-write.
  • -# -#
  • SQL_ATTR_READWRITE_UNKNOWN if it is not known whether the result set column is updatable or not.
  • -#
-# -# -#

SQL_DESC_UPDATABLE describes the updatability of the column in the result set, not the column in the base table. The updatability of the column in the base table on which this result set column is based may be different than the value in this field. Whether a column is updatable can be based on the data type, user privileges, and the definition of the result set itself. If it is unclear whether a column is updatable, SQL_ATTR_READWRITE_UNKNOWN should be returned. -#

-#
-# -#

Consistency Checks

-# -#

A consistency check is performed by the driver automatically whenever an application passes in a value for the SQL_DESC_DATA_PTR field of the ARD, APD, or IPD. If any of the fields is inconsistent with other fields, SQLSetDescField will return SQLSTATE HY021 (Inconsistent descriptor information). For more information, see "Consistency Check" in SQLSetDescRec.

-# -#

Related Functions

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
For information aboutSee
Binding a columnSQLBindCol
Binding a parameterSQLBindParameter
Getting a descriptor fieldSQLGetDescField
Getting multiple descriptor fieldsSQLGetDescRec
Setting multiple descriptor fieldsSQLSetDescRec
-#

-# -#
-# -# -# -}; diff --git a/ndb/src/old_files/client/odbc/docs/diag.txt b/ndb/src/old_files/client/odbc/docs/diag.txt deleted file mode 100644 index a9a0e0f42d0..00000000000 --- a/ndb/src/old_files/client/odbc/docs/diag.txt +++ /dev/null @@ -1,48 +0,0 @@ -# Header Fields - -SQL_DIAG_CURSOR_ROW_COUNT -SQLINTEGER - -SQL_DIAG_DYNAMIC_FUNCTION -SQLCHAR * - -SQL_DIAG_DYNAMIC_FUNCTION_CODE -SQLINTEGER - -SQL_DIAG_NUMBER -SQLINTEGER - -SQL_DIAG_RETURNCODE -SQLRETURN - -SQL_DIAG_ROW_COUNT -SQLINTEGER - -# Record Fields - -SQL_DIAG_CLASS_ORIGIN -SQLCHAR * - -SQL_DIAG_COLUMN_NUMBER -SQLINTEGER - -SQL_DIAG_CONNECTION_NAME -SQLCHAR * - -SQL_DIAG_MESSAGE_TEXT -SQLCHAR * - -SQL_DIAG_NATIVE -SQLINTEGER - -SQL_DIAG_ROW_NUMBER -SQLINTEGER - -SQL_DIAG_SERVER_NAME -SQLCHAR * - -SQL_DIAG_SQLSTATE -SQLCHAR * - -SQL_DIAG_SUBCLASS_ORIGIN -SQLCHAR * diff --git a/ndb/src/old_files/client/odbc/docs/getinfo.pl b/ndb/src/old_files/client/odbc/docs/getinfo.pl deleted file mode 100644 index 34e26b47bab..00000000000 --- a/ndb/src/old_files/client/odbc/docs/getinfo.pl +++ /dev/null @@ -1,3676 +0,0 @@ -# -use strict; - -# -# odbcsqlgetinfo.htm -# -my $info = { -# -# -# -# SQLGetInfo -# -# -# -# -# -# -#
-#
-# -# -# -# -#
-# ODBC Programmer's Reference -#
-#
-#
-#
-# -#

SQLGetInfo

-# -#

Conformance

-# -#

Version Introduced: ODBC 1.0
-# Standards Compliance: ISO 92

-# -#

Summary

-# -#

SQLGetInfo returns general information about the driver and data source associated with a connection.

-# -#

Syntax

-# -#
SQLRETURN SQLGetInfo(
-#	     SQLHDBC     ConnectionHandle,
-#	     SQLUSMALLINT     InfoType,
-#	     SQLPOINTER     InfoValuePtr,
-#	     SQLSMALLINT     BufferLength,
-#	     SQLSMALLINT *     StringLengthPtr);
-# -#

Arguments -# -#

-#
ConnectionHandle
-# -#
[Input]
-# Connection handle.
-# -#
InfoType
-# -#
[Input]
-# Type of information.
-# -#
InfoValuePtr
-# -#
[Output]
-# Pointer to a buffer in which to return the information. Depending on the InfoType requested, the information returned will be one of the following: a null-terminated character string, an SQLUSMALLINT value, an SQLUINTEGER bitmask, an SQLUINTEGER flag, or a SQLUINTEGER binary value. -# -#

If the InfoType argument is SQL_DRIVER_HDESC or SQL_DRIVER_HSTMT, the InfoValuePtr argument is both input and output. (See the SQL_DRIVER_HDESC or SQL_DRIVER_HSTMT descriptors later in this function description for more information.) -#

-# -#
BufferLength
-# -#
[Input]
-# Length of the *InfoValuePtr buffer. If the value in *InfoValuePtr is not a character string or if InfoValuePtr is a null pointer, the BufferLength argument is ignored. The driver assumes that the size of *InfoValuePtr is SQLUSMALLINT or SQLUINTEGER, based on the InfoType. If *InfoValuePtr is a Unicode string (when calling SQLGetInfoW), the BufferLength argument must be an even number; if not, SQLSTATE HY090 (Invalid string or buffer length) is returned.
-# -#
StringLengthPtr
-# -#
[Output]
-# Pointer to a buffer in which to return the total number of bytes (excluding the null-termination character for character data) available to return in *InfoValuePtr. -# -#

For character data, if the number of bytes available to return is greater than or equal to BufferLength, the information in *InfoValuePtr is truncated to BufferLength bytes minus the length of a null-termination character and is null-terminated by the driver. -# -# -#

For all other types of data, the value of BufferLength is ignored and the driver assumes the size of *InfoValuePtr is SQLUSMALLINT or SQLUINTEGER, depending on the InfoType. -#

-#
-# -#

Returns

-# -#

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

-# -#

Diagnostics

-# -#

When SQLGetInfo returns either SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value can be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_DBC and a Handle of ConnectionHandle. The following table lists the SQLSTATE values commonly returned by SQLGetInfo and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQLSTATEErrorDescription
01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
01004String data, right truncatedThe buffer *InfoValuePtr was not large enough to return all of the requested information, so the information was truncated. The length of the requested information in its untruncated form is returned in *StringLengthPtr. (Function returns SQL_SUCCESS_WITH_INFO.)
08003Connection does not exist(DM) The type of information requested in InfoType requires an open connection. Of the information types reserved by ODBC, only SQL_ODBC_VER can be returned without an open connection.
08S01Communication link failureThe communication link between the driver and the data source to which the driver was connected failed before the function completed processing.
HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
HY001Memory allocation
-# error
The driver was unable to allocate memory required to support execution or completion of the function.
HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
HY024Invalid attribute value(DM) The InfoType argument was SQL_DRIVER_HSTMT, and the value pointed to by InfoValuePtr was not a valid statement handle. -#

(DM) The InfoType argument was SQL_DRIVER_HDESC, and the value pointed to by InfoValuePtr was not a valid descriptor handle.

-#
HY090Invalid string or buffer length(DM) The value specified for argument BufferLength was less than 0. -#

(DM) The value specified for BufferLength was an odd number, and *InfoValuePtr was of a Unicode data type.

-#
HY096Information type out of rangeThe value specified for the argument InfoType was not valid for the version of ODBC supported by the driver.
HYC00Optional field not implementedThe value specified for the argument InfoType was a driver-specific value that is not supported by the driver.
HYT01Connection timeout expiredThe connection timeout period expired before the data source responded to the request. The connection timeout period is set through SQLSetConnectAttr, SQL_ATTR_CONNECTION_TIMEOUT.
IM001Driver does not support this function(DM) The driver corresponding to the ConnectionHandle does not support the function.
-# -#

Comments

-# -#

The currently defined information types are shown in "Information Types," later in this section; it is expected that more will be defined to take advantage of different data sources. A range of information types is reserved by ODBC; driver developers must reserve values for their own driver-specific use from X/Open. SQLGetInfo performs no Unicode conversion or thunking (see Appendix A of the ODBC Programmer's Reference) for driver-defined InfoTypes. For more information, see "Driver-Specific Data Types, Descriptor Types, Information Types, Diagnostic Types, and Attributes" in Chapter 17: Programming Considerations. The format of the information returned in *InfoValuePtr depends on the InfoType requested. SQLGetInfo will return information in one of five different formats: -# -#

    -#
  • A null-terminated character string
  • -# -#
  • An SQLUSMALLINT value
  • -# -#
  • An SQLUINTEGER bitmask
  • -# -#
  • An SQLUINTEGER value
  • -# -#
  • A SQLUINTEGER binary value
  • -#
-# -#

The format of each of the following information types is noted in the type's description. The application must cast the value returned in *InfoValuePtr accordingly. For an example of how an application could retrieve data from a SQLUINTEGER bitmask, see "Code Example."

-# -#

A driver must return a value for each of the information types defined in the tables below. If an information type does not apply to the driver or data source, the driver returns one of the values listed in the following table.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
Format of *InfoValuePtrReturned value
Character string ("Y" or "N")"N"
Character string (not "Y" or "N")Empty string
SQLUSMALLINT0
SQLUINTEGER bitmask or SQLUINTEGER binary value0L
-# -#

For example, if a data source does not support procedures, SQLGetInfo returns the values listed in the following table for the values of InfoType that are related to procedures.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
InfoTypeReturned value
SQL_PROCEDURES"N"
SQL_ACCESSIBLE_PROCEDURES"N"
SQL_MAX_PROCEDURE_NAME_LEN0
SQL_PROCEDURE_TERMEmpty string
-# -#

SQLGetInfo returns SQLSTATE HY096 (Invalid argument value) for values of InfoType that are in the range of information types reserved for use by ODBC but are not defined by the version of ODBC supported by the driver. To determine what version of ODBC a driver conforms to, an application calls SQLGetInfo with the SQL_DRIVER_ODBC_VER information type. SQLGetInfo returns SQLSTATE HYC00 (Optional feature not implemented) for values of InfoType that are in the range of information types reserved for driver-specific use but are not supported by the driver.

-# -#

All calls to SQLGetInfo require an open connection, except when the InfoType is SQL_ODBC_VER, which returns the version of the Driver Manager.

-# -#

Information Types

-# -#

This section lists the information types supported by SQLGetInfo. Information types are grouped categorically and listed alphabetically. Information types that were added or renamed for ODBC 3.x are also listed.

-# -#

Driver Information

-# -#

The following values of the InfoType argument return information about the ODBC driver, such as the number of active statements, the data source name, and the interface standards compliance level:

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQL_ACTIVE_ENVIRONMENTSSQL_GETDATA_EXTENSIONS
SQL_ASYNC_MODESQL_INFO_SCHEMA_VIEWS
SQL_BATCH_ROW_COUNTSQL_KEYSET_CURSOR_ATTRIBUTES1
SQL_BATCH_SUPPORTSQL_KEYSET_CURSOR_ATTRIBUTES2
SQL_DATA_SOURCE_NAMESQL_MAX_ASYNC_CONCURRENT_STATEMENTS
SQL_DRIVER_HDBCSQL_MAX_CONCURRENT_ACTIVITIES
SQL_DRIVER_HDESCSQL_MAX_DRIVER_CONNECTIONS
SQL_DRIVER_HENVSQL_ODBC_INTERFACE_CONFORMANCE
SQL_DRIVER_HLIBSQL_ODBC_STANDARD_CLI_CONFORMANCE
SQL_DRIVER_HSTMTSQL_ODBC_VER
SQL_DRIVER_NAMESQL_PARAM_ARRAY_ROW_COUNTS
SQL_DRIVER_ODBC_VERSQL_PARAM_ARRAY_SELECTS
SQL_DRIVER_VERSQL_ROW_UPDATES
SQL_DYNAMIC_CURSOR_ATTRIBUTES1SQL_SEARCH_PATTERN_ESCAPE
SQL_DYNAMIC_CURSOR_ATTRIBUTES2SQL_SERVER_NAME
SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1SQL_STATIC_CURSOR_ATTRIBUTES1
SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2SQL_STATIC_CURSOR_ATTRIBUTES2
SQL_FILE_USAGE 
-# -#

DBMS Product Information

-# -#

The following values of the InfoType argument return information about the DBMS product, such as the DBMS name and version:

-# -#

SQL_DATABASE_NAME
-# SQL_DBMS_NAME
-# SQL_DBMS_VER

-# -#

Data Source Information

-# -#

The following values of the InfoType argument return information about the data source, such as cursor characteristics and transaction capabilities:

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQL_ACCESSIBLE_PROCEDURESSQL_MULT_RESULT_SETS
SQL_ACCESSIBLE_TABLESSQL_MULTIPLE_ACTIVE_TXN
SQL_BOOKMARK_PERSISTENCESQL_NEED_LONG_DATA_LEN
SQL_CATALOG_TERMSQL_NULL_COLLATION
SQL_COLLATION_SEQSQL_PROCEDURE_TERM
SQL_CONCAT_NULL_BEHAVIORSQL_SCHEMA_TERM
SQL_CURSOR_COMMIT_BEHAVIORSQL_SCROLL_OPTIONS
SQL_CURSOR_ROLLBACK_BEHAVIORSQL_TABLE_TERM
SQL_CURSOR_SENSITIVITYSQL_TXN_CAPABLE
SQL_DATA_SOURCE_READ_ONLYSQL_TXN_ISOLATION_OPTION
SQL_DEFAULT_TXN_ISOLATIONSQL_USER_NAME
SQL_DESCRIBE_PARAMETER 
-# -#

Supported SQL

-# -#

The following values of the InfoType argument return information about the SQL statements supported by the data source. The SQL syntax of each feature described by these information types is the SQL-92 syntax. These information types do not exhaustively describe the entire SQL-92 grammar. Instead, they describe those parts of the grammar for which data sources commonly offer different levels of support. Specifically, most of the DDL statements in SQL-92 are covered.

-# -#

Applications should determine the general level of supported grammar from the SQL_SQL_CONFORMANCE information type and use the other information types to determine variations from the stated standards compliance level.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQL_AGGREGATE_FUNCTIONSSQL_DROP_TABLE
SQL_ALTER_DOMAINSQL_DROP_TRANSLATION
SQL_ALTER_SCHEMASQL_DROP_VIEW
SQL_ALTER_TABLESQL_EXPRESSIONS_IN_ORDERBY
SQL_ANSI_SQL_DATETIME_LITERALSSQL_GROUP_BY
SQL_CATALOG_LOCATION SQL_IDENTIFIER_CASE
SQL_CATALOG_NAMESQL_IDENTIFIER_QUOTE_CHAR
SQL_CATALOG_NAME_SEPARATORSQL_INDEX_KEYWORDS
SQL_CATALOG_USAGESQL_INSERT_STATEMENT
SQL_COLUMN_ALIASSQL_INTEGRITY
SQL_CORRELATION_NAMESQL_KEYWORDS
SQL_CREATE_ASSERTIONSQL_LIKE_ESCAPE_CLAUSE
SQL_CREATE_CHARACTER_SETSQL_NON_NULLABLE_COLUMNS
SQL_CREATE_COLLATIONSQL_SQL_CONFORMANCE
SQL_CREATE_DOMAINSQL_OJ_CAPABILITIES
SQL_CREATE_SCHEMASQL_ORDER_BY_COLUMNS_IN_SELECT
SQL_CREATE_TABLESQL_OUTER_JOINS
SQL_CREATE_TRANSLATIONSQL_PROCEDURES
SQL_DDL_INDEXSQL_QUOTED_IDENTIFIER_CASE
SQL_DROP_ASSERTIONSQL_SCHEMA_USAGE
SQL_DROP_CHARACTER_SETSQL_SPECIAL_CHARACTERS
SQL_DROP_COLLATIONSQL_SUBQUERIES
SQL_DROP_DOMAINSQL_UNION
SQL_DROP_SCHEMA 
-# -#

SQL Limits

-# -#

The following values of the InfoType argument return information about the limits applied to identifiers and clauses in SQL statements, such as the maximum lengths of identifiers and the maximum number of columns in a select list. Limitations can be imposed by either the driver or the data source.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQL_MAX_BINARY_LITERAL_LENSQL_MAX_IDENTIFIER_LEN
SQL_MAX_CATALOG_NAME_LENSQL_MAX_INDEX_SIZE
SQL_MAX_CHAR_LITERAL_LENSQL_MAX_PROCEDURE_NAME_LEN
SQL_MAX_COLUMN_NAME_LENSQL_MAX_ROW_SIZE
SQL_MAX_COLUMNS_IN_GROUP_BYSQL_MAX_ROW_SIZE_INCLUDES_LONG
SQL_MAX_COLUMNS_IN_INDEXSQL_MAX_SCHEMA_NAME_LEN
SQL_MAX_COLUMNS_IN_ORDER_BYSQL_MAX_STATEMENT_LEN
SQL_MAX_COLUMNS_IN_SELECTSQL_MAX_TABLE_NAME_LEN
SQL_MAX_COLUMNS_IN_TABLESQL_MAX_TABLES_IN_SELECT
SQL_MAX_CURSOR_NAME_LENSQL_MAX_USER_NAME_LEN
-# -#

Scalar Function Information

-# -#

The following values of the InfoType argument return information about the scalar functions supported by the data source and the driver. For more information about scalar functions, see Appendix E: Scalar Functions.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQL_CONVERT_FUNCTIONSSQL_TIMEDATE_ADD_INTERVALS
SQL_NUMERIC_FUNCTIONSSQL_TIMEDATE_DIFF_INTERVALS
SQL_STRING_FUNCTIONSSQL_TIMEDATE_FUNCTIONS
SQL_SYSTEM_FUNCTIONS 
-# -#

Conversion Information

-# -#

The following values of the InfoType argument return a list of the SQL data types to which the data source can convert the specified SQL data type with the CONVERT scalar function:

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQL_CONVERT_BIGINTSQL_CONVERT_LONGVARBINARY
SQL_CONVERT_BINARYSQL_CONVERT_LONGVARCHAR
SQL_CONVERT_BITSQL_CONVERT_NUMERIC
SQL_CONVERT_CHARSQL_CONVERT_REAL
SQL_CONVERT_DATESQL_CONVERT_SMALLINT
SQL_CONVERT_DECIMALSQL_CONVERT_TIME
SQL_CONVERT_DOUBLESQL_CONVERT_TIMESTAMP
SQL_CONVERT_FLOATSQL_CONVERT_TINYINT
SQL_CONVERT_INTEGERSQL_CONVERT_VARBINARY
SQL_CONVERT_INTERVAL_YEAR_MONTHSQL_CONVERT_VARCHAR
SQL_CONVERT_INTERVAL_DAY_TIME 
-# -#

Information Types Added for ODBC 3.x

-# -#

The following values of the InfoType argument have been added for ODBC 3.x:

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQL_ACTIVE_ENVIRONMENTSSQL_DROP_ASSERTION
SQL_AGGREGATE_FUNCTIONSSQL_DROP_CHARACTER_SET
SQL_ALTER_DOMAINSQL_DROP_COLLATION
SQL_ALTER_SCHEMASQL_DROP_DOMAIN
SQL_ANSI_SQL_DATETIME_LITERALSSQL_DROP_SCHEMA
SQL_ASYNC_MODESQL_DROP_TABLE
SQL_BATCH_ROW_COUNTSQL_DROP_TRANSLATION
SQL_BATCH_SUPPORTSQL_DROP_VIEW
SQL_CATALOG_NAMESQL_DYNAMIC_CURSOR_ATTRIBUTES1
SQL_COLLATION_SEQSQL_DYNAMIC_CURSOR_ATTRIBUTES2
SQL_CONVERT_INTERVAL_YEAR_MONTHSQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1
SQL_CONVERT_INTERVAL_DAY_TIMESQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
SQL_CREATE_ASSERTIONSQL_INFO_SCHEMA_VIEWS
SQL_CREATE_CHARACTER_SETSQL_INSERT_STATEMENT
SQL_CREATE_COLLATIONSQL_KEYSET_CURSOR_ATTRIBUTES1
SQL_CREATE_DOMAINSQL_KEYSET_CURSOR_ATTRIBUTES2
SQL_CREATE_SCHEMASQL_MAX_ASYNC_CONCURRENT_STATEMENTS
SQL_CREATE_TABLESQL_MAX_IDENTIFIER_LEN
SQL_CREATE_TRANSLATIONSQL_PARAM_ARRAY_ROW_COUNTS
SQL_CURSOR_SENSITIVITYSQL_PARAM_ARRAY_SELECTS
SQL_DDL_INDEXSQL_STATIC_CURSOR_ATTRIBUTES1
SQL_DESCRIBE_PARAMETERSQL_STATIC_CURSOR_ATTRIBUTES2
SQL_DM_VERSQL_XOPEN_CLI_YEAR
SQL_DRIVER_HDESC 
-# -#

Information Types Renamed for ODBC 3.x

-# -#

The following values of the InfoType argument have been renamed for ODBC 3.x.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
ODBC 2.0 InfoTypeODBC 3.x InfoType
SQL_ACTIVE_CONNECTIONSSQL_MAX_DRIVER_CONNECTIONS
SQL_ACTIVE_STATEMENTSSQL_MAX_CONCURRENT_ACTIVITIES
SQL_MAX_OWNER_NAME_LENSQL_MAX_SCHEMA_NAME_LEN
SQL_MAX_QUALIFIER_NAME_LENSQL_MAX_CATALOG_NAME_LEN
SQL_ODBC_SQL_OPT_IEFSQL_INTEGRITY
SQL_OWNER_TERMSQL_SCHEMA_TERM
SQL_OWNER_USAGESQL_SCHEMA_USAGE
SQL_QUALIFIER_LOCATIONSQL_CATALOG_LOCATION
SQL_QUALIFIER_NAME_SEPARATORSQL_CATALOG_NAME_SEPARATOR
SQL_QUALIFIER_TERMSQL_CATALOG_TERM
SQL_QUALIFIER_USAGESQL_CATALOG_USAGE
-# -#

Information Types Deprecated in ODBC 3.x

-# -#

The following values of the InfoType argument have been deprecated in ODBC 3.x. ODBC 3.x drivers must continue to support these information types for backward compatibility with ODBC 2.x applications. (For more information on these types, see "SQLGetInfo Support" in Appendix G: Driver Guidelines for Backward Compatibility.)

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQL_FETCH_DIRECTIONSQL_POS_OPERATIONS
SQL_LOCK_TYPESSQL_POSITIONED_STATEMENTS
SQL_ODBC_API_CONFORMANCESQL_SCROLL_CONCURRENCY
SQL_ODBC_SQL_CONFORMANCESQL_STATIC_SENSITIVITY
-# -#

Information Type Descriptions

-# -#

The following table alphabetically lists each information type, the version of ODBC in which it was introduced, and its description.

-#
-# -# -# -# -# -# -# -# -# -# - SQL_ACCESSIBLE_PROCEDURES => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_ACCESSIBLE_TABLES => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_ACTIVE_ENVIRONMENTS => { - type => q(Short), - }, -# -# -# -# -# - SQL_AGGREGATE_FUNCTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_ALTER_DOMAIN => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_ALTER_TABLE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_ASYNC_MODE => { - type => q(Long), - }, -# -# -# -# -# - SQL_BATCH_ROW_COUNT => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_BATCH_SUPPORT => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_BOOKMARK_PERSISTENCE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CATALOG_LOCATION => { - type => q(Short), - }, -# -# -# -# -# - SQL_CATALOG_NAME => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_CATALOG_NAME_SEPARATOR => { - type => q(Char), - }, -# -# -# -# -# - SQL_CATALOG_TERM => { - type => q(Char), - }, -# -# -# -# -# - SQL_CATALOG_USAGE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_COLLATION_SEQ => { - type => q(Char), - }, -# -# -# -# -# - SQL_COLUMN_ALIAS => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_CONCAT_NULL_BEHAVIOR => { - type => q(Short), - }, -# -# -# -# -# -# -# -# -# -# - SQL_CONVERT_FUNCTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CORRELATION_NAME => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CREATE_ASSERTION => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CREATE_CHARACTER_SET => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CREATE_COLLATION => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CREATE_DOMAIN => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CREATE_SCHEMA => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CREATE_TABLE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CREATE_TRANSLATION => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CREATE_VIEW => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_CURSOR_COMMIT_BEHAVIOR => { - type => q(Short), - }, -# -# -# -# -# - SQL_CURSOR_ROLLBACK_BEHAVIOR => { - type => q(Short), - }, -# -# -# -# -# - SQL_CURSOR_SENSITIVITY => { - type => q(Long), - }, -# -# -# -# -# - SQL_DATA_SOURCE_NAME => { - type => q(Char), - }, -# -# -# -# -# - SQL_DATA_SOURCE_READ_ONLY => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_DATABASE_NAME => { - type => q(Char), - }, -# -# -# -# -# - SQL_DATETIME_LITERALS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DBMS_NAME => { - type => q(Char), - }, -# -# -# -# -# - SQL_DBMS_VER => { - type => q(Char), - }, -# -# -# -# -# - SQL_DDL_INDEX => { - type => q(Long), - }, -# -# -# -# -# - SQL_DEFAULT_TXN_ISOLATION => { - type => q(Long), - }, -# -# -# -# -# - SQL_DESCRIBE_PARAMETER => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_DM_VER => { - type => q(Char), - }, -# -# -# -# -# - SQL_DRIVER_HDBC => { - type => q(Long), - }, -# -# -# -# -# - SQL_DRIVER_HDESC => { - type => q(Long), - }, -# -# -# -# -# - SQL_DRIVER_HLIB => { - type => q(Long), - }, -# -# -# -# -# - SQL_DRIVER_HSTMT => { - type => q(Long), - }, -# -# -# -# -# - SQL_DRIVER_NAME => { - type => q(Char), - }, -# -# -# -# -# - SQL_DRIVER_ODBC_VER => { - type => q(Char), - }, -# -# -# -# -# - SQL_DRIVER_VER => { - type => q(Char), - }, -# -# -# -# -# - SQL_DROP_ASSERTION => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DROP_CHARACTER_SET => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DROP_COLLATION => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DROP_DOMAIN => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DROP_SCHEMA => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DROP_TABLE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DROP_TRANSLATION => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DROP_VIEW => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DYNAMIC_CURSOR_ATTRIBUTES1 => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_DYNAMIC_CURSOR_ATTRIBUTES2 => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_EXPRESSIONS_IN_ORDERBY => { - type => q(Char), - }, -# -# -# -# -# - SQL_FILE_USAGE => { - type => q(Short), - }, -# -# -# -# -# - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_GETDATA_EXTENSIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_GROUP_BY => { - type => q(Short), - }, -# -# -# -# -# - SQL_IDENTIFIER_CASE => { - type => q(Short), - }, -# -# -# -# -# - SQL_IDENTIFIER_QUOTE_CHAR => { - type => q(Char), - }, -# -# -# -# -# - SQL_INDEX_KEYWORDS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_INFO_SCHEMA_VIEWS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_INSERT_STATEMENT => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_INTEGRITY => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_KEYSET_CURSOR_ATTRIBUTES1 => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_KEYSET_CURSOR_ATTRIBUTES2 => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_KEYWORDS => { - type => q(Char), - }, -# -# -# -# -# - SQL_LIKE_ESCAPE_CLAUSE => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_MAX_ASYNC_CONCURRENT_STATEMENTS => { - type => q(Long), - }, -# -# -# -# -# - SQL_MAX_BINARY_LITERAL_LEN => { - type => q(Long), - }, -# -# -# -# -# - SQL_MAX_CATALOG_NAME_LEN => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_CHAR_LITERAL_LEN => { - type => q(Long), - }, -# -# -# -# -# - SQL_MAX_COLUMN_NAME_LEN => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_COLUMNS_IN_GROUP_BY => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_COLUMNS_IN_INDEX => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_COLUMNS_IN_ORDER_BY => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_COLUMNS_IN_SELECT => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_COLUMNS_IN_TABLE => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_CONCURRENT_ACTIVITIES => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_CURSOR_NAME_LEN => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_DRIVER_CONNECTIONS => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_IDENTIFIER_LEN => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_INDEX_SIZE => { - type => q(Long), - }, -# -# -# -# -# - SQL_MAX_PROCEDURE_NAME_LEN => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_ROW_SIZE => { - type => q(Long), - }, -# -# -# -# -# - SQL_MAX_ROW_SIZE_INCLUDES_LONG => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_MAX_SCHEMA_NAME_LEN => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_STATEMENT_LEN => { - type => q(Long), - }, -# -# -# -# -# - SQL_MAX_TABLE_NAME_LEN => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_TABLES_IN_SELECT => { - type => q(Short), - }, -# -# -# -# -# - SQL_MAX_USER_NAME_LEN => { - type => q(Short), - }, -# -# -# -# -# - SQL_MULT_RESULT_SETS => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_MULTIPLE_ACTIVE_TXN => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_NEED_LONG_DATA_LEN => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_NON_NULLABLE_COLUMNS => { - type => q(Short), - }, -# -# -# -# -# - SQL_NULL_COLLATION => { - type => q(Short), - }, -# -# -# -# -# - SQL_NUMERIC_FUNCTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_ODBC_INTERFACE_CONFORMANCE => { - type => q(Long), - }, -# -# -# -# -# - SQL_ODBC_VER => { - type => q(Char), - }, -# -# -# -# -# - SQL_OJ_CAPABILITIES => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_ORDER_BY_COLUMNS_IN_SELECT => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_PARAM_ARRAY_ROW_COUNTS => { - type => q(Long), - }, -# -# -# -# -# - SQL_PARAM_ARRAY_SELECTS => { - type => q(Long), - }, -# -# -# -# -# - SQL_PROCEDURE_TERM => { - type => q(Char), - }, -# -# -# -# -# - SQL_PROCEDURES => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_POS_OPERATIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_QUOTED_IDENTIFIER_CASE => { - type => q(Short), - }, -# -# -# -# -# - SQL_ROW_UPDATES => { - type => q(YesNo), - }, -# -# -# -# -# - SQL_SCHEMA_TERM => { - type => q(Char), - }, -# -# -# -# -# - SQL_SCHEMA_USAGE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SCROLL_OPTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SEARCH_PATTERN_ESCAPE => { - type => q(Char), - }, -# -# -# -# -# - SQL_SERVER_NAME => { - type => q(Char), - }, -# -# -# -# -# - SQL_SPECIAL_CHARACTERS => { - type => q(Char), - }, -# -# -# -# -# - SQL_SQL_CONFORMANCE => { - type => q(Long), - }, -# -# -# -# -# - SQL_SQL92_DATETIME_FUNCTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_FOREIGN_KEY_DELETE_RULE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_FOREIGN_KEY_UPDATE_RULE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_GRANT => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_NUMERIC_VALUE_FUNCTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_PREDICATES => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_RELATIONAL_JOIN_OPERATORS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_REVOKE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_ROW_VALUE_CONSTRUCTOR => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_STRING_FUNCTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SQL92_VALUE_EXPRESSIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_STANDARD_CLI_CONFORMANCE => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_STATIC_CURSOR_ATTRIBUTES1 => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_STATIC_CURSOR_ATTRIBUTES2 => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_STRING_FUNCTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SUBQUERIES => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_SYSTEM_FUNCTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_TABLE_TERM => { - type => q(Char), - }, -# -# -# -# -# - SQL_TIMEDATE_ADD_INTERVALS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_TIMEDATE_DIFF_INTERVALS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_TIMEDATE_FUNCTIONS => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_TXN_CAPABLE => { - type => q(Short), - }, -# -# -# -# -# - SQL_TXN_ISOLATION_OPTION => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_UNION => { - type => q(Bitmask), - }, -# -# -# -# -# - SQL_USER_NAME => { - type => q(Char), - }, -# -# -# -# -# - SQL_XOPEN_CLI_YEAR => { - type => q(Char), - }, -#
InfoTypeReturns
SQL_ACCESSIBLE_PROCEDURES
-# (ODBC 1.0)
A character string: "Y" if the user can execute all procedures returned by SQLProcedures; "N" if there may be procedures returned that the user cannot execute.
SQL_ACCESSIBLE_TABLES
-# (ODBC 1.0)
A character string: "Y" if the user is guaranteed SELECT privileges to all tables returned by SQLTables; "N" if there may be tables returned that the user cannot access.
SQL_ACTIVE_ENVIRONMENTS
-# (ODBC 3.0)
An SQLUSMALLINT value specifying the maximum number of active environments that the driver can support. If there is no specified limit or the limit is unknown, this value is set to zero.
SQL_AGGREGATE_FUNCTIONS
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating support for aggregation functions: -#

SQL_AF_ALL
-# SQL_AF_AVG
-# SQL_AF_COUNT
-# SQL_AF_DISTINCT
-# SQL_AF_MAX
-# SQL_AF_MIN
-# SQL_AF_SUM

-# -#

An SQL-92 Entry level–conformant driver will always return all of these options as supported.

-#
SQL_ALTER_DOMAIN
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the ALTER DOMAIN statement, as defined in SQL-92, supported by the data source. An SQL-92 Full level–compliant driver will always return all of the bitmasks. A return value of "0" means that the ALTER DOMAIN statement is not supported. -#

The SQL-92 or FIPS conformance level at which this feature needs to be supported is shown in parentheses next to each bitmask.

-# -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_AD_ADD_DOMAIN_CONSTRAINT = Adding a domain constraint is supported (Full level)

-# -#

SQL_AD_ADD_DOMAIN_DEFAULT = <alter domain> <set domain default clause> is supported (Full level)

-# -#

SQL_AD_CONSTRAINT_NAME_DEFINITION = <constraint name definition clause> is supported for naming domain constraint (Intermediate level)

-# -#

SQL_AD_DROP_DOMAIN_CONSTRAINT = <drop domain constraint clause> is supported (Full level)

-# -#

SQL_AD_DROP_DOMAIN_DEFAULT = <alter domain> <drop domain default clause> is supported (Full level)

-# -#

The following bits specify the supported <constraint attributes> if <add domain constraint> is supported (the SQL_AD_ADD_DOMAIN_CONSTRAINT bit is set):

-# -#

SQL_AD_ADD_CONSTRAINT_DEFERRABLE (Full level)
-# SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE (Full level)
-# SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED (Full level)
-# SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE (Full level)

-#
SQL_ALTER_TABLE
-# (ODBC 2.0)
An SQLUINTEGER bitmask enumerating the clauses in the ALTER TABLE statement supported by the data source. -#

The SQL-92 or FIPS conformance level at which this feature needs to be supported is shown in parentheses next to each bitmask.

-# -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_AT_ADD_COLUMN_COLLATION = <add column> clause is supported, with facility to specify column collation (Full level) (ODBC 3.0)

-# -#

SQL_AT_ADD_COLUMN_DEFAULT = <add column> clause is supported, with facility to specify column defaults (FIPS Transitional level) (ODBC 3.0)

-# -#

SQL_AT_ADD_COLUMN_SINGLE = <add column> is supported (FIPS Transitional level) (ODBC 3.0)

-# -#

SQL_AT_ADD_CONSTRAINT = <add column> clause is supported, with facility to specify column constraints (FIPS Transitional level) (ODBC 3.0)

-# -#

SQL_AT_ADD_TABLE_CONSTRAINT = <add table constraint> clause is supported (FIPS Transitional level) (ODBC 3.0)

-# -#

SQL_AT_CONSTRAINT_NAME_DEFINITION = <constraint name definition> is supported for naming column and table constraints (Intermediate level) (ODBC 3.0)

-# -#

SQL_AT_DROP_COLUMN_CASCADE = <drop column> CASCADE is supported (FIPS Transitional level) (ODBC 3.0)

-# -#

SQL_AT_DROP_COLUMN_DEFAULT = <alter column> <drop column default clause> is supported (Intermediate level) (ODBC 3.0)

-# -#

SQL_AT_DROP_COLUMN_RESTRICT = <drop column> RESTRICT is supported (FIPS Transitional level) (ODBC 3.0)

-# -#

SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE (ODBC 3.0)

-# -#

SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT = <drop column> RESTRICT is supported (FIPS Transitional level) (ODBC 3.0)

-# -#

SQL_AT_SET_COLUMN_DEFAULT = <alter column> <set column default clause> is supported (Intermediate level) (ODBC 3.0)

-# -#

The following bits specify the support <constraint attributes> if specifying column or table constraints is supported (the SQL_AT_ADD_CONSTRAINT bit is set):

-# -#

SQL_AT_CONSTRAINT_INITIALLY_DEFERRED (Full level) (ODBC 3.0)
-# SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE (Full level) (ODBC 3.0)
-# SQL_AT_CONSTRAINT_DEFERRABLE (Full level) (ODBC 3.0)
-# SQL_AT_CONSTRAINT_NON_DEFERRABLE (Full level) (ODBC 3.0)

-#
SQL_ASYNC_MODE
-# (ODBC 3.0)
An SQLUINTEGER value indicating the level of asynchronous support in the driver: -#

SQL_AM_CONNECTION = Connection level asynchronous execution is supported. Either all statement handles associated with a given connection handle are in asynchronous mode or all are in synchronous mode. A statement handle on a connection cannot be in asynchronous mode while another statement handle on the same connection is in synchronous mode, and vice versa.

-# -#

SQL_AM_STATEMENT = Statement level asynchronous execution is supported. Some statement handles associated with a connection handle can be in asynchronous mode, while other statement handles on the same connection are in synchronous mode.

-# -#

SQL_AM_NONE = Asynchronous mode is not supported.

-#
SQL_BATCH_ROW_COUNT
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the behavior of the driver with respect to the availability of row counts. The following bitmasks are used in conjunction with the information type: -#

SQL_BRC_ROLLED_UP = Row counts for consecutive INSERT, DELETE, or UPDATE statements are rolled up into one. If this bit is not set, then row counts are available for each individual statement.

-# -#

SQL_BRC_PROCEDURES = Row counts, if any, are available when a batch is executed in a stored procedure. If row counts are available, they can be rolled up or individually available, depending on the SQL_BRC_ROLLED_UP bit.

-# -#

SQL_BRC_EXPLICIT = Row counts, if any, are available when a batch is executed directly by calling SQLExecute or SQLExecDirect. If row counts are available, they can be rolled up or individually available, depending on the SQL_BRC_ROLLED_UP bit.

-#
SQL_BATCH_SUPPORT
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the driver's support for batches. The following bitmasks are used to determine which level is supported: -#

SQL_BS_SELECT_EXPLICIT = The driver supports explicit batches that can have result-set generating statements.

-# -#

SQL_BS_ROW_COUNT_EXPLICIT = The driver supports explicit batches that can have row-count generating statements.

-# -#

SQL_BS_SELECT_PROC = The driver supports explicit procedures that can have result-set generating statements.

-# -#

SQL_BS_ROW_COUNT_PROC = The driver supports explicit procedures that can have row-count generating statements.

-#
SQL_BOOKMARK_PERSISTENCE
-# (ODBC 2.0)
An SQLUINTEGER bitmask enumerating the operations through which bookmarks persist. -#

The following bitmasks are used in conjunction with the flag to determine through which options bookmarks persist:

-# -#

SQL_BP_CLOSE = Bookmarks are valid after an application calls SQLFreeStmt with the SQL_CLOSE option, or SQLCloseCursor to close the cursor associated with a statement.

-# -#

SQL_BP_DELETE = The bookmark for a row is valid after that row has been deleted.

-# -#

SQL_BP_DROP = Bookmarks are valid after an application calls SQLFreeHandle with a HandleType of SQL_HANDLE_STMT to drop a statement.

-# -#

SQL_BP_TRANSACTION = Bookmarks are valid after an application commits or rolls back a transaction.

-# -#

SQL_BP_UPDATE = The bookmark for a row is valid after any column in that row has been updated, including key columns.

-# -#

SQL_BP_OTHER_HSTMT = A bookmark associated with one statement can be used with another statement. Unless SQL_BP_CLOSE or SQL_BP_DROP is specified, the cursor on the first statement must be open.

-#
SQL_CATALOG_LOCATION
-# (ODBC 2.0)
An SQLUSMALLINT value indicating the position of the catalog in a qualified table name: -#

SQL_CL_START
-# SQL_CL_END

-# -#

For example, an Xbase driver returns SQL_CL_START because the directory (catalog) name is at the start of the table name, as in \EMPDATA\EMP.DBF. An ORACLE Server driver returns SQL_CL_END because the catalog is at the end of the table name, as in ADMIN.EMP@EMPDATA.

-# -#

An SQL-92 Full level–conformant driver will always return SQL_CL_START. A value of 0 is returned if catalogs are not supported by the data source. To find out whether catalogs are supported, an application calls SQLGetInfo with the SQL_CATALOG_NAME information type.

-# -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_QUALIFIER_LOCATION.

-#
SQL_CATALOG_NAME
-# (ODBC 3.0)
A character string: "Y" if the server supports catalog names, or "N" if it does not. -#

An SQL-92 Full level–conformant driver will always return "Y".

-#
SQL_CATALOG_NAME_SEPARATOR
-# (ODBC 1.0)
A character string: the character or characters that the data source defines as the separator between a catalog name and the qualified name element that follows or precedes it. -#

An empty string is returned if catalogs are not supported by the data source. To find out whether catalogs are supported, an application calls SQLGetInfo with the SQL_CATALOG_NAME information type. An SQL-92 Full level–conformant driver will always return ".".

-# -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_QUALIFIER_NAME_SEPARATOR.

-#
SQL_CATALOG_TERM
-# (ODBC 1.0)
A character string with the data source vendor's name for a catalog; for example, "database" or "directory". This string can be in upper, lower, or mixed case. -#

An empty string is returned if catalogs are not supported by the data source. To find out whether catalogs are supported, an application calls SQLGetInfo with the SQL_CATALOG_NAME information type. An SQL-92 Full level–conformant driver will always return "catalog".

-# -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_QUALIFIER_TERM.

-#
SQL_CATALOG_USAGE
-# (ODBC 2.0)
An SQLUINTEGER bitmask enumerating the statements in which catalogs can be used. -#

The following bitmasks are used to determine where catalogs can be used:

-# -#

SQL_CU_DML_STATEMENTS = Catalogs are supported in all Data Manipulation Language statements: SELECT, INSERT, UPDATE, DELETE, and if supported, SELECT FOR UPDATE and positioned update and delete statements.

-# -#

SQL_CU_PROCEDURE_INVOCATION = Catalogs are supported in the ODBC procedure invocation statement.

-# -#

SQL_CU_TABLE_DEFINITION = Catalogs are supported in all table definition statements: CREATE TABLE, CREATE VIEW, ALTER TABLE, DROP TABLE, and DROP VIEW.

-# -#

SQL_CU_INDEX_DEFINITION = Catalogs are supported in all index definition statements: CREATE INDEX and DROP INDEX.

-# -#

SQL_CU_PRIVILEGE_DEFINITION = Catalogs are supported in all privilege definition statements: GRANT and REVOKE.

-# -#

A value of 0 is returned if catalogs are not supported by the data source. To find out whether catalogs are supported, an application calls SQLGetInfo with the SQL_CATALOG_NAME information type. An SQL-92 Full level–conformant driver will always return a bitmask with all of these bits set.

-# -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_QUALIFIER_USAGE.

-#
SQL_COLLATION_SEQ
-# (ODBC 3.0)
The name of the collation sequence. This is a character string that indicates the name of the default collation for the default character set for this server (for example, 'ISO 8859-1' or EBCDIC). If this is unknown, an empty string will be returned. An SQL-92 Full level–conformant driver will always return a non-empty string.
SQL_COLUMN_ALIAS
-# (ODBC 2.0)
A character string: "Y" if the data source supports column aliases; otherwise, "N". -#

A column alias is an alternate name that can be specified for a column in the select list by using an AS clause. An SQL-92 Entry level–conformant driver will always return "Y".

-#
SQL_CONCAT_NULL_BEHAVIOR
-# (ODBC 1.0)
An SQLUSMALLINT value indicating how the data source handles the concatenation of NULL valued character data type columns with non-NULL valued character data type columns: -#

SQL_CB_NULL = Result is NULL valued.

-# -#

SQL_CB_NON_NULL = Result is concatenation of non-NULL valued column or columns.

-# -#

An SQL-92 Entry level–conformant driver will always return SQL_CB_NULL.

-#
SQL_CONVERT_BIGINT
- SQL_CONVERT_BIGINT => { - type => q(Bitmask), - }, -# SQL_CONVERT_BINARY
- SQL_CONVERT_BINARY => { - type => q(Bitmask), - }, -# SQL_CONVERT_BIT
- SQL_CONVERT_BIT => { - type => q(Bitmask), - }, -# SQL_CONVERT_CHAR
- SQL_CONVERT_CHAR => { - type => q(Bitmask), - }, -# SQL_CONVERT_GUID
- SQL_CONVERT_GUID => { - type => q(Bitmask), - omit => 1, - }, -# SQL_CONVERT_DATE
- SQL_CONVERT_DATE => { - type => q(Bitmask), - }, -# SQL_CONVERT_DECIMAL
- SQL_CONVERT_DECIMAL => { - type => q(Bitmask), - }, -# SQL_CONVERT_DOUBLE
- SQL_CONVERT_DOUBLE => { - type => q(Bitmask), - }, -# SQL_CONVERT_FLOAT
- SQL_CONVERT_FLOAT => { - type => q(Bitmask), - }, -# SQL_CONVERT_INTEGER
- SQL_CONVERT_INTEGER => { - type => q(Bitmask), - }, -# SQL_CONVERT_INTERVAL_YEAR_MONTH
- SQL_CONVERT_INTERVAL_YEAR_MONTH => { - type => q(Bitmask), - }, -# SQL_CONVERT_INTERVAL_DAY_TIME
- SQL_CONVERT_INTERVAL_DAY_TIME => { - type => q(Bitmask), - }, -# SQL_CONVERT_LONGVARBINARY
- SQL_CONVERT_LONGVARBINARY => { - type => q(Bitmask), - }, -# SQL_CONVERT_LONGVARCHAR
- SQL_CONVERT_LONGVARCHAR => { - type => q(Bitmask), - }, -# SQL_CONVERT_NUMERIC
- SQL_CONVERT_NUMERIC => { - type => q(Bitmask), - }, -# SQL_CONVERT_REAL
- SQL_CONVERT_REAL => { - type => q(Bitmask), - }, -# SQL_CONVERT_SMALLINT
- SQL_CONVERT_SMALLINT => { - type => q(Bitmask), - }, -# SQL_CONVERT_TIME
- SQL_CONVERT_TIME => { - type => q(Bitmask), - }, -# SQL_CONVERT_TIMESTAMP
- SQL_CONVERT_TIMESTAMP => { - type => q(Bitmask), - }, -# SQL_CONVERT_TINYINT
- SQL_CONVERT_TINYINT => { - type => q(Bitmask), - }, -# SQL_CONVERT_VARBINARY
- SQL_CONVERT_VARBINARY => { - type => q(Bitmask), - }, -# SQL_CONVERT_VARCHAR
- SQL_CONVERT_VARCHAR => { - type => q(Bitmask), - }, -# (ODBC 1.0)
An SQLUINTEGER bitmask. The bitmask indicates the conversions supported by the data source with the CONVERT scalar function for data of the type named in the InfoType. If the bitmask equals zero, the data source does not support any conversions from data of the named type, including conversion to the same data type. -#

For example, to find out if a data source supports the conversion of SQL_INTEGER data to the SQL_BIGINT data type, an application calls SQLGetInfo with the InfoType of SQL_CONVERT_INTEGER. The application performs an AND operation with the returned bitmask and SQL_CVT_BIGINT. If the resulting value is nonzero, the conversion is supported.

-# -#

The following bitmasks are used to determine which conversions are supported:

-# -#

SQL_CVT_BIGINT (ODBC 1.0)
-# SQL_CVT_BINARY (ODBC 1.0)
-# SQL_CVT_BIT (ODBC 1.0)
-# SQL_CVT_GUID (ODBC 3.5)
-# SQL_CVT_CHAR (ODBC 1.0)
-# SQL_CVT_DATE (ODBC 1.0)
-# SQL_CVT_DECIMAL (ODBC 1.0)
-# SQL_CVT_DOUBLE (ODBC 1.0)
-# SQL_CVT_FLOAT (ODBC 1.0)
-# SQL_CVT_INTEGER (ODBC 1.0)
-# SQL_CVT_INTERVAL_YEAR_MONTH (ODBC 3.0)
-# SQL_CVT_INTERVAL_DAY_TIME (ODBC 3.0)
-# SQL_CVT_LONGVARBINARY (ODBC 1.0)
-# SQL_CVT_LONGVARCHAR (ODBC 1.0)
-# SQL_CVT_NUMERIC (ODBC 1.0)
-# SQL_CVT_REAL ODBC 1.0)
-# SQL_CVT_SMALLINT (ODBC 1.0)
-# SQL_CVT_TIME (ODBC 1.0)
-# SQL_CVT_TIMESTAMP (ODBC 1.0)
-# SQL_CVT_TINYINT (ODBC 1.0)
-# SQL_CVT_VARBINARY (ODBC 1.0)
-# SQL_CVT_VARCHAR (ODBC 1.0)

-#
SQL_CONVERT_FUNCTIONS
-# (ODBC 1.0)
An SQLUINTEGER bitmask enumerating the scalar conversion functions supported by the driver and associated data source. -#

The following bitmask is used to determine which conversion functions are supported:

-# -#

SQL_FN_CVT_CAST
-# SQL_FN_CVT_CONVERT

-#
SQL_CORRELATION_NAME
-# (ODBC 1.0)
An SQLUSMALLINT value indicating whether table correlation names are supported: -#

SQL_CN_NONE = Correlation names are not supported.

-# -#

SQL_CN_DIFFERENT = Correlation names are supported but must differ from the names of the tables they represent.

-# -#

SQL_CN_ANY = Correlation names are supported and can be any valid user-defined name.

-# -#

An SQL-92 Entry level–conformant driver will always return SQL_CN_ANY.

-#
SQL_CREATE_ASSERTION
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the CREATE ASSERTION statement, as defined in SQL-92, supported by the data source. -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_CA_CREATE_ASSERTION

-# -#

The following bits specify the supported constraint attribute if the ability to specify constraint attributes explicitly is supported (see the SQL_ALTER_TABLE and SQL_CREATE_TABLE information types):

-# -#

SQL_CA_CONSTRAINT_INITIALLY_DEFERRED
-# SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE
-# SQL_CA_CONSTRAINT_DEFERRABLE
-# SQL_CA_CONSTRAINT_NON_DEFERRABLE

-# -#

An SQL-92 Full level–conformant driver will always return all of these options as supported. A return value of "0" means that the CREATE ASSERTION statement is not supported.

-#
SQL_CREATE_CHARACTER_SET
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the CREATE CHARACTER SET statement, as defined in SQL-92, supported by the data source. -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_CCS_CREATE_CHARACTER_SET
-# SQL_CCS_COLLATE_CLAUSE
-# SQL_CCS_LIMITED_COLLATION

-# -#

An SQL-92 Full level–conformant driver will always return all of these options as supported. A return value of "0" means that the CREATE CHARACTER SET statement is not supported.

-#
SQL_CREATE_COLLATION
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the CREATE COLLATION statement, as defined in SQL-92, supported by the data source. -#

The following bitmask is used to determine which clauses are supported:

-# -#

SQL_CCOL_CREATE_COLLATION

-# -#

An SQL-92 Full level–conformant driver will always return this option as supported. A return value of "0" means that the CREATE COLLATION statement is not supported.

-#
SQL_CREATE_DOMAIN
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the CREATE DOMAIN statement, as defined in SQL-92, supported by the data source. -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_CDO_CREATE_DOMAIN = The CREATE DOMAIN statement is supported (Intermediate level).

-# -#

SQL_CDO_CONSTRAINT_NAME_DEFINITION = <constraint name definition> is supported for naming domain constraints (Intermediate level).

-# -#

The following bits specify the ability to create column constraints:
-# SQL_CDO_DEFAULT = Specifying domain constraints is supported (Intermediate level)
-# SQL_CDO_CONSTRAINT = Specifying domain defaults is supported (Intermediate level)
-# SQL_CDO_COLLATION = Specifying domain collation is supported (Full level)

-# -#

The following bits specify the supported constraint attributes if specifying domain constraints is supported (SQL_CDO_DEFAULT is set):

-# -#

SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED (Full level)
-# SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE (Full level)
-# SQL_CDO_CONSTRAINT_DEFERRABLE (Full level)
-# SQL_CDO_CONSTRAINT_NON_DEFERRABLE (Full level)

-# -#

A return value of "0" means that the CREATE DOMAIN statement is not supported.

-#
SQL_CREATE_SCHEMA
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the CREATE SCHEMA statement, as defined in SQL-92, supported by the data source. -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_CS_CREATE_SCHEMA
-# SQL_CS_AUTHORIZATION
-# SQL_CS_DEFAULT_CHARACTER_SET

-# -#

An SQL-92 Intermediate level–conformant driver will always return the SQL_CS_CREATE_SCHEMA and SQL_CS_AUTHORIZATION options as supported. These must also be supported at the SQL-92 Entry level, but not necessarily as SQL statements. An SQL-92 Full level–conformant driver will always return all of these options as supported.

-#
SQL_CREATE_TABLE
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the CREATE TABLE statement, as defined in SQL-92, supported by the data source. -#

The SQL-92 or FIPS conformance level at which this feature needs to be supported is shown in parentheses next to each bitmask.

-# -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_CT_CREATE_TABLE = The CREATE TABLE statement is supported. (Entry level)

-# -#

SQL_CT_TABLE_CONSTRAINT = Specifying table constraints is supported (FIPS Transitional level)

-# -#

SQL_CT_CONSTRAINT_NAME_DEFINITION = The <constraint name definition> clause is supported for naming column and table constraints (Intermediate level)

-# -#

The following bits specify the ability to create temporary tables:

-# -#

SQL_CT_COMMIT_PRESERVE = Deleted rows are preserved on commit. (Full level)
-# SQL_CT_COMMIT_DELETE = Deleted rows are deleted on commit. (Full level)
-# SQL_CT_GLOBAL_TEMPORARY = Global temporary tables can be created. (Full level)
-# SQL_CT_LOCAL_TEMPORARY = Local temporary tables can be created. (Full level)

-# -#

The following bits specify the ability to create column constraints:

-# -#

SQL_CT_COLUMN_CONSTRAINT = Specifying column constraints is supported (FIPS Transitional level)
-# SQL_CT_COLUMN_DEFAULT = Specifying column defaults is supported (FIPS Transitional level)
-# SQL_CT_COLUMN_COLLATION = Specifying column collation is supported (Full level)

-# -#

The following bits specify the supported constraint attributes if specifying column or table constraints is supported:

-# -#

SQL_CT_CONSTRAINT_INITIALLY_DEFERRED (Full level)
-# SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE (Full level)
-# SQL_CT_CONSTRAINT_DEFERRABLE (Full level)
-# SQL_CT_CONSTRAINT_NON_DEFERRABLE (Full level)

-#
SQL_CREATE_TRANSLATION
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the CREATE TRANSLATION statement, as defined in SQL-92, supported by the data source. -#

The following bitmask is used to determine which clauses are supported:

-# -#

SQL_CTR_CREATE_TRANSLATION

-# -#

An SQL-92 Full level–conformant driver will always return these options as supported. A return value of "0" means that the CREATE TRANSLATION statement is not supported.

-#
SQL_CREATE_VIEW
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the CREATE VIEW statement, as defined in SQL-92, supported by the data source. -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_CV_CREATE_VIEW
-# SQL_CV_CHECK_OPTION
-# SQL_CV_CASCADED
-# SQL_CV_LOCAL

-# -#

A return value of "0" means that the CREATE VIEW statement is not supported.

-# -#

An SQL-92 Entry level–conformant driver will always return the SQL_CV_CREATE_VIEW and SQL_CV_CHECK_OPTION options as supported.

-# -#

An SQL-92 Full level–conformant driver will always return all of these options as supported.

-#
SQL_CURSOR_COMMIT_BEHAVIOR
-# (ODBC 1.0)
An SQLUSMALLINT value indicating how a COMMIT operation affects cursors and prepared statements in the data source: -#

SQL_CB_DELETE = Close cursors and delete prepared statements. To use the cursor again, the application must reprepare and reexecute the statement.

-# -#

SQL_CB_CLOSE = Close cursors. For prepared statements, the application can call SQLExecute on the statement without calling SQLPrepare again.

-# -#

SQL_CB_PRESERVE = Preserve cursors in the same position as before the COMMIT operation. The application can continue to fetch data, or it can close the cursor and reexecute the statement without repreparing it.

-#
SQL_CURSOR_ROLLBACK_BEHAVIOR
-# (ODBC 1.0)
An SQLUSMALLINT value indicating how a ROLLBACK operation affects cursors and prepared statements in the data source: -#

SQL_CB_DELETE = Close cursors and delete prepared statements. To use the cursor again, the application must reprepare and reexecute the statement.

-# -#

SQL_CB_CLOSE = Close cursors. For prepared statements, the application can call SQLExecute on the statement without calling SQLPrepare again.

-# -#

SQL_CB_PRESERVE = Preserve cursors in the same position as before the ROLLBACK operation. The application can continue to fetch data, or it can close the cursor and reexecute the statement without repreparing it.

-#
SQL_CURSOR_ROLLBACK_SQL_CURSOR_SENSITIVITY
-# (ODBC 3.0)
An SQLUINTEGER value indicating the support for cursor sensitivity: -#

SQL_INSENSITIVE = All cursors on the statement handle show the result set without reflecting any changes made to it by any other cursor within the same transaction.

-# -#

SQL_UNSPECIFIED = It is unspecified whether cursors on the statement handle make visible the changes made to a result set by another cursor within the same transaction. Cursors on the statement handle may make visible none, some, or all such changes.

-# -#

SQL_SENSITIVE = Cursors are sensitive to changes made by other cursors within the same transaction.

-# -#

An SQL-92 Entry level–conformant driver will always return the SQL_UNSPECIFIED option as supported.

-# -#

An SQL-92 Full level–conformant driver will always return the SQL_INSENSITIVE option as supported.

-#
SQL_DATA_SOURCE_NAME
-# (ODBC 1.0)
A character string with the data source name used during connection. If the application called SQLConnect, this is the value of the szDSN argument. If the application called SQLDriverConnect or SQLBrowseConnect, this is the value of the DSN keyword in the connection string passed to the driver. If the connection string did not contain the DSN keyword (such as when it contains the DRIVER keyword), this is an empty string.
SQL_DATA_SOURCE_READ_ONLY
-# (ODBC 1.0)
A character string. "Y" if the data source is set to READ ONLY mode, "N" if it is otherwise. -#

This characteristic pertains only to the data source itself; it is not a characteristic of the driver that enables access to the data source. A driver that is read/write can be used with a data source that is read-only. If a driver is read-only, all of its data sources must be read-only and must return SQL_DATA_SOURCE_READ_ONLY.

-#
SQL_DATABASE_NAME
-# (ODBC 1.0)
A character string with the name of the current database in use, if the data source defines a named object called "database". -#

Note   In ODBC 3.x, the value returned for this InfoType can also be returned by calling SQLGetConnectAttr with an Attribute argument of SQL_ATTR_CURRENT_CATALOG.

-#
SQL_DATETIME_LITERALS
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the SQL-92 datetime literals supported by the data source. Note that these are the datetime literals listed in the SQL-92 specification and are separate from the datetime literal escape clauses defined by ODBC. For more information about the ODBC datetime literal escape clauses, see "Date, Time, Timestamp, and Datetime Interval Literals" in Chapter 8: SQL Statements. -#

A FIPS Transitional level–conformant driver will always return the "1" value in the bitmask for the bits listed below. A value of "0" means that SQL-92 datetime literals are not supported.

-# -#

The following bitmasks are used to determine which literals are supported:

-# -#

SQL_DL_SQL92_DATE
-# SQL_DL_SQL92_TIME
-# SQL_DL_SQL92_TIMESTAMP
-# SQL_DL_SQL92_INTERVAL_YEAR
-# SQL_DL_SQL92_INTERVAL_MONTH
-# SQL_DL_SQL92_INTERVAL_DAY
-# SQL_DL_SQL92_INTERVAL_HOUR
-# SQL_DL_SQL92_INTERVAL_MINUTE
-# SQL_DL_SQL92_INTERVAL_SECOND
-# SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH
-# SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR

-# -#

SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE
-# SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND
-# SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE
-# SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND
-# SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND

-#
SQL_DBMS_NAME
-# (ODBC 1.0)
A character string with the name of the DBMS product accessed by the driver.
SQL_DBMS_VER
-# (ODBC 1.0)
A character string indicating the version of the DBMS product accessed by the driver. The version is of the form ##.##.####, where the first two digits are the major version, the next two digits are the minor version, and the last four digits are the release version. The driver must render the DBMS product version in this form but can also append the DBMS product-specific version as well. For example, "04.01.0000 Rdb 4.1".
SQL_DDL_INDEX
-# (ODBC 3.0)
An SQLUINTEGER value that indicates support for creation and dropping of indexes: -#

SQL_DI_CREATE_INDEX
-# SQL_DI_DROP_INDEX

-#
SQL_DEFAULT_TXN_ISOLATION
-# (ODBC 1.0)
An SQLUINTEGER value that indicates the default transaction isolation level supported by the driver or data source, or zero if the data source does not support transactions. The following terms are used to define transaction isolation levels: -#

Dirty Read Transaction 1 changes a row. Transaction 2 reads the changed row before transaction 1 commits the change. If transaction 1 rolls back the change, transaction 2 will have read a row that is considered to have never existed.

-# -#

Nonrepeatable Read Transaction 1 reads a row. Transaction 2 updates or deletes that row and commits this change. If transaction 1 attempts to reread the row, it will receive different row values or discover that the row has been deleted.

-# -#

Phantom Transaction 1 reads a set of rows that satisfy some search criteria. Transaction 2 generates one or more rows (through either inserts or updates) that match the search criteria. If transaction 1 reexecutes the statement that reads the rows, it receives a different set of rows.

-# -#

If the data source supports transactions, the driver returns one of the following bitmasks:

-# -#

SQL_TXN_READ_UNCOMMITTED = Dirty reads, nonrepeatable reads, and phantoms are possible.

-# -#

SQL_TXN_READ_COMMITTED = Dirty reads are not possible. Nonrepeatable reads and phantoms are possible.

-# -#

SQL_TXN_REPEATABLE_READ = Dirty reads and nonrepeatable reads are not possible. Phantoms are possible.

-# -#

SQL_TXN_SERIALIZABLE = Transactions are serializable. Serializable transactions do not allow dirty reads, nonrepeatable reads, or phantoms.

-#
SQL_DESCRIBE_PARAMETER
-# (ODBC 3.0)
A character string: "Y" if parameters can be described; "N", if not. -#

An SQL-92 Full level–conformant driver will usually return "Y" because it will support the DESCRIBE INPUT statement. Because this does not directly specify the underlying SQL support, however, describing parameters might not be supported, even in a SQL-92 Full level–conformant driver.

-#
SQL_DM_VER
-# (ODBC 3.0)
A character string with the version of the Driver Manager. The version is of the form ##.##.####.####, where: -#

The first set of two digits is the major ODBC version, as given by the constant SQL_SPEC_MAJOR.

-# -#

The second set of two digits is the minor ODBC version, as given by the constant SQL_SPEC_MINOR.

-# -#

The third set of four digits is the Driver Manager major build number.

-# -#

The last set of four digits is the Driver Manager minor build number.

-#
SQL_DRIVER_HDBC
-# SQL_DRIVER_HENV
-# (ODBC 1.0)
An SQLUINTEGER value, the driver's environment handle or connection handle, determined by the argument InfoType. -#

These information types are implemented by the Driver Manager alone.

-#
SQL_DRIVER_HDESC
-# (ODBC 3.0)
An SQLUINTEGER value, the driver's descriptor handle determined by the Driver Manager's descriptor handle, which must be passed on input in *InfoValuePtr from the application. In this case, InfoValuePtr is both an input and output argument. The input descriptor handle passed in *InfoValuePtr must have been either explicitly or implicitly allocated on the ConnectionHandle. -#

The application should make a copy of the Driver Manager's descriptor handle before calling SQLGetInfo with this information type, to ensure that the handle is not overwritten on output.

-# -#

This information type is implemented by the Driver Manager alone.

-#
SQL_DRIVER_HLIB
-# (ODBC 2.0)
An SQLUINTEGER value, the hinst from the load library returned to the Driver Manager when it loaded the driver DLL (on a Microsoft® Windows® platform) or equivalent on a non-Windows platform. The handle is valid only for the connection handle specified in the call to SQLGetInfo. -#

This information type is implemented by the Driver Manager alone.

-#
SQL_DRIVER_HSTMT
-# (ODBC 1.0)
An SQLUINTEGER value, the driver's statement handle determined by the Driver Manager statement handle, which must be passed on input in *InfoValuePtr from the application. In this case, InfoValuePtr is both an input and an output argument. The input statement handle passed in *InfoValuePtr must have been allocated on the argument ConnectionHandle. -#

The application should make a copy of the Driver Manager's statement handle before calling SQLGetInfo with this information type, to ensure that the handle is not overwritten on output.

-# -#

This information type is implemented by the Driver Manager alone.

-#
SQL_DRIVER_NAME
-# (ODBC 1.0)
A character string with the file name of the driver used to access the data source.
SQL_DRIVER_ODBC_VER
-# (ODBC 2.0)
A character string with the version of ODBC that the driver supports. The version is of the form ##.##, where the first two digits are the major version and the next two digits are the minor version. SQL_SPEC_MAJOR and SQL_SPEC_MINOR define the major and minor version numbers. For the version of ODBC described in this manual, these are 3 and 0, and the driver should return "03.00".
SQL_DRIVER_VER
-# (ODBC 1.0)
A character string with the version of the driver and optionally, a description of the driver. At a minimum, the version is of the form ##.##.####, where the first two digits are the major version, the next two digits are the minor version, and the last four digits are the release version.
SQL_DROP_ASSERTION
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the DROP ASSERTION statement, as defined in SQL-92, supported by the data source. -#

The following bitmask is used to determine which clauses are supported:

-# -#

SQL_DA_DROP_ASSERTION

-# -#

An SQL-92 Full level–conformant driver will always return this option as supported.

-#
SQL_DROP_CHARACTER_SET
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the DROP CHARACTER SET statement, as defined in SQL-92, supported by the data source. -#

The following bitmask is used to determine which clauses are supported:

-# -#

SQL_DCS_DROP_CHARACTER_SET

-# -#

An SQL-92 Full level–conformant driver will always return this option as supported.

-#
SQL_DROP_COLLATION
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the DROP COLLATION statement, as defined in SQL-92, supported by the data source. -#

The following bitmask is used to determine which clauses are supported:

-# -#

SQL_DC_DROP_COLLATION

-# -#

An SQL-92 Full level–conformant driver will always return this option as supported.

-#
SQL_DROP_DOMAIN
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the DROP DOMAIN statement, as defined in SQL-92, supported by the data source. -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_DD_DROP_DOMAIN
-# SQL_DD_CASCADE
-# SQL_DD_RESTRICT

-# -#

An SQL-92 Intermediate level–conformant driver will always return all of these options as supported.

-#
SQL_DROP_SCHEMA
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the DROP SCHEMA statement, as defined in SQL-92, supported by the data source. -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_DS_DROP_SCHEMA
-# SQL_DS_CASCADE
-# SQL_DS_RESTRICT

-# -#

An SQL-92 Intermediate level–conformant driver will always return all of these options as supported.

-#
SQL_DROP_TABLE
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the DROP TABLE statement, as defined in SQL-92, supported by the data source. -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_DT_DROP_TABLE
-# SQL_DT_CASCADE
-# SQL_DT_RESTRICT

-# -#

An FIPS Transitional level–conformant driver will always return all of these options as supported.

-#
SQL_DROP_TRANSLATION
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the DROP TRANSLATION statement, as defined in SQL-92, supported by the data source. -#

The following bitmask is used to determine which clauses are supported:

-# -#

SQL_DTR_DROP_TRANSLATION

-# -#

An SQL-92 Full level–conformant driver will always return this option as supported.

-#
SQL_DROP_VIEW
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses in the DROP VIEW statement, as defined in SQL-92, supported by the data source. -#

The following bitmasks are used to determine which clauses are supported:

-# -#

SQL_DV_DROP_VIEW
-# SQL_DV_CASCADE
-# SQL_DV_RESTRICT

-# -#

An FIPS Transitional level–conformant driver will always return all of these options as supported.

-#
SQL_DYNAMIC_CURSOR_ATTRIBUTES1
-# (ODBC 3.0)
An SQLUINTEGER bitmask that describes the attributes of a dynamic cursor that are supported by the driver. This bitmask contains the first subset of attributes; for the second subset, see SQL_DYNAMIC_CURSOR_ATTRIBUTES2. -#

The following bitmasks are used to determine which attributes are supported:

-# -#

SQL_CA1_NEXT = A FetchOrientation argument of SQL_FETCH_NEXT is supported in a call to SQLFetchScroll when the cursor is a dynamic cursor.

-# -#

SQL_CA1_ABSOLUTE = FetchOrientation arguments of SQL_FETCH_FIRST, SQL_FETCH_LAST, and SQL_FETCH_ABSOLUTE are supported in a call to SQLFetchScroll when the cursor is a dynamic cursor. (The rowset that will be fetched is independent of the current cursor position.)

-# -#

SQL_CA1_RELATIVE = FetchOrientation arguments of SQL_FETCH_PRIOR and SQL_FETCH_RELATIVE are supported in a call to SQLFetchScroll when the cursor is a dynamic cursor. (The rowset that will be fetched is dependent on the current cursor position. Note that this is separated from SQL_FETCH_NEXT because in a forward-only cursor, only SQL_FETCH_NEXT is supported.)

-# -#

SQL_CA1_BOOKMARK = A FetchOrientation argument of SQL_FETCH_BOOKMARK is supported in a call to SQLFetchScroll when the cursor is a dynamic cursor.

-# -#

SQL_CA1_LOCK_EXCLUSIVE = A LockType argument of SQL_LOCK_EXCLUSIVE is supported in a call to SQLSetPos when the cursor is a dynamic cursor.

-# -#

SQL_CA1_LOCK_NO_CHANGE = A LockType argument of SQL_LOCK_NO_CHANGE is supported in a call to SQLSetPos when the cursor is a dynamic cursor.

-# -#

SQL_CA1_LOCK_UNLOCK = A LockType argument of SQL_LOCK_UNLOCK is supported in a call to SQLSetPos when the cursor is a dynamic cursor.

-# -#

SQL_CA1_POS_POSITION = An Operation argument of SQL_POSITION is supported in a call to SQLSetPos when the cursor is a dynamic cursor.

-# -#

SQL_CA1_POS_UPDATE = An Operation argument of SQL_UPDATE is supported in a call to SQLSetPos when the cursor is a dynamic cursor.

-# -#

SQL_CA1_POS_DELETE = An Operation argument of SQL_DELETE is supported in a call to SQLSetPos when the cursor is a dynamic cursor.

-# -#

SQL_CA1_POS_REFRESH = An Operation argument of SQL_REFRESH is supported in a call to SQLSetPos when the cursor is a dynamic cursor.

-# -#

SQL_CA1_POSITIONED_UPDATE = An UPDATE WHERE CURRENT OF SQL statement is supported when the cursor is a dynamic cursor. (An SQL-92 Entry level–conformant driver will always return this option as supported.)

-# -#

SQL_CA1_POSITIONED_DELETE = A DELETE WHERE CURRENT OF SQL statement is supported when the cursor is a dynamic cursor. (An SQL-92 Entry level–conformant driver will always return this option as supported.)

-# -#

SQL_CA1_SELECT_FOR_UPDATE = A SELECT FOR UPDATE SQL statement is supported when the cursor is a dynamic cursor. (An SQL-92 Entry level–conformant driver will always return this option as supported.)

-# -#

SQL_CA1_BULK_ADD = An Operation argument of SQL_ADD is supported in a call to SQLBulkOperations when the cursor is a dynamic cursor.

-# -#

SQL_CA1_BULK_UPDATE_BY_BOOKMARK = An Operation argument of SQL_UPDATE_BY_BOOKMARK is supported in a call to SQLBulkOperations when the cursor is a dynamic cursor.

-# -#

SQL_CA1_BULK_DELETE_BY_BOOKMARK = An Operation argument of SQL_DELETE_BY_BOOKMARK is supported in a call to SQLBulkOperations when the cursor is a dynamic cursor.

-# -#

SQL_CA1_BULK_FETCH_BY_BOOKMARK = An Operation argument of SQL_FETCH_BY_BOOKMARK is supported in a call to SQLBulkOperations when the cursor is a dynamic cursor.

-# -#

An SQL-92 Intermediate level–conformant driver will usually return the SQL_CA1_NEXT, SQL_CA1_ABSOLUTE, and SQL_CA1_RELATIVE options as supported, because it supports scrollable cursors through the embedded SQL FETCH statement. Because this does not directly determine the underlying SQL support, however, scrollable cursors may not be supported, even for an SQL-92 Intermediate level–conformant driver.

-#
SQL_DYNAMIC_CURSOR_ATTRIBUTES2
-# (ODBC 3.0)
An SQLUINTEGER bitmask that describes the attributes of a dynamic cursor that are supported by the driver. This bitmask contains the second subset of attributes; for the first subset, see SQL_DYNAMIC_CURSOR_ATTRIBUTES1. -#

The following bitmasks are used to determine which attributes are supported:

-# -#

SQL_CA2_READ_ONLY_CONCURRENCY = A read-only dynamic cursor, in which no updates are allowed, is supported. (The SQL_ATTR_CONCURRENCY statement attribute can be SQL_CONCUR_READ_ONLY for a dynamic cursor).

-# -#

SQL_CA2_LOCK_CONCURRENCY = A dynamic cursor that uses the lowest level of locking sufficient to ensure that the row can be updated is supported. (The SQL_ATTR_CONCURRENCY statement attribute can be SQL_CONCUR_LOCK for a dynamic cursor.) These locks must be consistent with the transaction isolation level set by the SQL_ATTR_TXN_ISOLATION connection attribute.

-# -#

SQL_CA2_OPT_ROWVER_CONCURRENCY = A dynamic cursor that uses the optimistic concurrency control comparing row versions is supported. (The SQL_ATTR_CONCURRENCY statement attribute can be SQL_CONCUR_ROWVER for a dynamic cursor.)

-# -#

SQL_CA2_OPT_VALUES_CONCURRENCY = A dynamic cursor that uses the optimistic concurrency control comparing values is supported. (The SQL_ATTR_CONCURRENCY statement attribute can be SQL_CONCUR_VALUES for a dynamic cursor.)

-# -#

SQL_CA2_SENSITIVITY_ADDITIONS = Added rows are visible to a dynamic cursor; the cursor can scroll to those rows. (Where these rows are added to the cursor is driver-dependent.)

-# -#

SQL_CA2_SENSITIVITY_DELETIONS = Deleted rows are no longer available to a dynamic cursor, and do not leave a "hole" in the result set; after the dynamic cursor scrolls from a deleted row, it cannot return to that row.

-# -#

SQL_CA2_SENSITIVITY_UPDATES = Updates to rows are visible to a dynamic cursor; if the dynamic cursor scrolls from and returns to an updated row, the data returned by the cursor is the updated data, not the original data.

-# -#

SQL_CA2_MAX_ROWS_SELECT = The SQL_ATTR_MAX_ROWS statement attribute affects SELECT statements when the cursor is a dynamic cursor.

-# -#

SQL_CA2_MAX_ROWS_INSERT = The SQL_ATTR_MAX_ROWS statement attribute affects INSERT statements when the cursor is a dynamic cursor.

-# -#

SQL_CA2_MAX_ROWS_DELETE = The SQL_ATTR_MAX_ROWS statement attribute affects DELETE statements when the cursor is a dynamic cursor.

-# -#

SQL_CA2_MAX_ROWS_UPDATE = The SQL_ATTR_MAX_ROWS statement attribute affects UPDATE statements when the cursor is a dynamic cursor.

-# -#

SQL_CA2_MAX_ROWS_CATALOG = The SQL_ATTR_MAX_ROWS statement attribute affects CATALOG result sets when the cursor is a dynamic cursor.

-# -#

SQL_CA2_MAX_ROWS_AFFECTS_ALL = The SQL_ATTR_MAX_ROWS statement attribute affects SELECT, INSERT, DELETE, and UPDATE statements, and CATALOG result sets, when the cursor is a dynamic cursor.

-# -#

SQL_CA2_CRC_EXACT = The exact row count is available in the SQL_DIAG_CURSOR_ROW_COUNT diagnostic field when the cursor is a dynamic cursor.

-# -#

SQL_CA2_CRC_APPROXIMATE = An approximate row count is available in the SQL_DIAG_CURSOR_ROW_COUNT diagnostic field when the cursor is a dynamic cursor.

-# -#

SQL_CA2_SIMULATE_NON_UNIQUE = The driver does not guarantee that simulated positioned update or delete statements will affect only one row when the cursor is a dynamic cursor; it is the application's responsibility to guarantee this. (If a statement affects more than one row, SQLExecute or SQLExecDirect returns SQLSTATE 01001 [Cursor operation conflict].) To set this behavior, the application calls SQLSetStmtAttr with the SQL_ATTR_SIMULATE_CURSOR attribute set to SQL_SC_NON_UNIQUE.

-# -#

SQL_CA2_SIMULATE_TRY_UNIQUE = The driver attempts to guarantee that simulated positioned update or delete statements will affect only one row when the cursor is a dynamic cursor. The driver always executes such statements, even if they might affect more than one row, such as when there is no unique key. (If a statement affects more than one row, SQLExecute or SQLExecDirect returns SQLSTATE 01001 [Cursor operation conflict].) To set this behavior, the application calls SQLSetStmtAttr with the SQL_ATTR_SIMULATE_CURSOR attribute set to SQL_SC_TRY_UNIQUE.

-# -#

SQL_CA2_SIMULATE_UNIQUE = The driver guarantees that simulated positioned update or delete statements will affect only one row when the cursor is a dynamic cursor. If the driver cannot guarantee this for a given statement, SQLExecDirect or SQLPrepare return SQLSTATE 01001 (Cursor operation conflict). To set this behavior, the application calls SQLSetStmtAttr with the SQL_ATTR_SIMULATE_CURSOR attribute set to SQL_SC_UNIQUE.

-#
SQL_EXPRESSIONS_IN_ORDERBY
-# (ODBC 1.0)
A character string: "Y" if the data source supports expressions in the ORDER BY list; "N" if it does not.
SQL_FILE_USAGE
-# (ODBC 2.0)
An SQLUSMALLINT value indicating how a single-tier driver directly treats files in a data source: -#

SQL_FILE_NOT_SUPPORTED = The driver is not a single-tier driver. For example, an ORACLE driver is a two-tier driver.

-# -#

SQL_FILE_TABLE = A single-tier driver treats files in a data source as tables. For example, an Xbase driver treats each Xbase file as a table.

-# -#

SQL_FILE_CATALOG = A single-tier driver treats files in a data source as a catalog. For example, a Microsoft® Access driver treats each Microsoft Access file as a complete database.

-# -#

An application might use this to determine how users will select data. For example, Xbase users often think of data as stored in files, while ORACLE and MicrosoftAccess users generally think of data as stored in tables.

-# -#

When a user selects an Xbase data source, the application could display the Windows File Open common dialog box; when the user selects a Microsoft Access or ORACLE data source, the application could display a custom Select Table dialog box.

-#
SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1
-# (ODBC 3.0)
An SQLUINTEGER bitmask that describes the attributes of a forward-only cursor that are supported by the driver. This bitmask contains the first subset of attributes; for the second subset, see SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2. -#

The following bitmasks are used to determine which attributes are supported:

-# -#

SQL_CA1_NEXT
-# SQL_CA1_LOCK_EXCLUSIVE
-# SQL_CA1_LOCK_NO_CHANGE
-# SQL_CA1_LOCK_UNLOCK
-# SQL_CA1_POS_POSITION
-# SQL_CA1_POS_UPDATE
-# SQL_CA1_POS_DELETE
-# SQL_CA1_POS_REFRESH
-# SQL_CA1_POSITIONED_UPDATE
-# SQL_CA1_POSITIONED_DELETE
-# SQL_CA1_SELECT_FOR_UPDATE
-# SQL_CA1_BULK_ADD
-# SQL_CA1_BULK_UPDATE_BY_BOOKMARK
-# SQL_CA1_BULK_DELETE_BY_BOOKMARK
-# SQL_CA1_BULK_FETCH_BY_BOOKMARK

-# -#

For descriptions of these bitmasks, see SQL_DYNAMIC_CURSOR_ATTRIBUTES1 (and substitute "forward-only cursor" for "dynamic cursor" in the descriptions).

-#
SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
-# (ODBC 3.0)
An SQLUINTEGER bitmask that describes the attributes of a forward-only cursor that are supported by the driver. This bitmask contains the second subset of attributes; for the first subset, see SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1. -#

The following bitmasks are used to determine which attributes are supported:

-# -#

SQL_CA2_READ_ONLY_CONCURRENCY
-# SQL_CA2_LOCK_CONCURRENCY
-# SQL_CA2_OPT_ROWVER_CONCURRENCY
-# SQL_CA2_OPT_VALUES_CONCURRENCY
-# SQL_CA2_SENSITIVITY_ADDITIONS
-# SQL_CA2_SENSITIVITY_DELETIONS
-# SQL_CA2_SENSITIVITY_UPDATES
-# SQL_CA2_MAX_ROWS_SELECT
-# SQL_CA2_MAX_ROWS_INSERT
-# SQL_CA2_MAX_ROWS_DELETE
-# SQL_CA2_MAX_ROWS_UPDATE
-# SQL_CA2_MAX_ROWS_CATALOG
-# SQL_CA2_MAX_ROWS_AFFECTS_ALL
-# SQL_CA2_CRC_EXACT
-# SQL_CA2_CRC_APPROXIMATE
-# SQL_CA2_SIMULATE_NON_UNIQUE
-# SQL_CA2_SIMULATE_TRY_UNIQUE
-# SQL_CA2_SIMULATE_UNIQUE

-# -#

For descriptions of these bitmasks, see SQL_DYNAMIC_CURSOR_ATTRIBUTES2 (and substitute "forward-only cursor" for "dynamic cursor" in the descriptions).

-#
SQL_GETDATA_EXTENSIONS
-# (ODBC 2.0)
An SQLUINTEGER bitmask enumerating extensions to SQLGetData. -#

The following bitmasks are used in conjunction with the flag to determine what common extensions the driver supports for SQLGetData:

-# -#

SQL_GD_ANY_COLUMN = SQLGetData can be called for any unbound column, including those before the last bound column. Note that the columns must be called in order of ascending column number unless SQL_GD_ANY_ORDER is also returned.

-# -#

SQL_GD_ANY_ORDER = SQLGetData can be called for unbound columns in any order. Note that SQLGetData can be called only for columns after the last bound column unless SQL_GD_ANY_COLUMN is also returned.

-# -#

SQL_GD_BLOCK = SQLGetData can be called for an unbound column in any row in a block (where the rowset size is greater than 1) of data after positioning to that row with SQLSetPos.

-# -#

SQL_GD_BOUND = SQLGetData can be called for bound columns as well as unbound columns. A driver cannot return this value unless it also returns SQL_GD_ANY_COLUMN.

-# -#

SQLGetData is required to return data only from unbound columns that occur after the last bound column, are called in order of increasing column number, and are not in a row in a block of rows.

-# -#

If a driver supports bookmarks (either fixed-length or variable-length), it must support calling SQLGetData on column 0. This support is required regardless of what the driver returns for a call to SQLGetInfo with the SQL_GETDATA_EXTENSIONS InfoType.

-#
SQL_GROUP_BY
-# (ODBC 2.0)
An SQLUSMALLINT value specifying the relationship between the columns in the GROUP BY clause and the nonaggregated columns in the select list: -#

SQL_GB_COLLATE = A COLLATE clause can be specified at the end of each grouping column. (ODBC 3.0)

-# -#

SQL_GB_NOT_SUPPORTED = GROUP BY clauses are not supported. (ODBC 2.0)

-# -#

SQL_GB_GROUP_BY_EQUALS_SELECT = The GROUP BY clause must contain all nonaggregated columns in the select list. It cannot contain any other columns. For example, SELECT DEPT, MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT. (ODBC 2.0)

-# -#

SQL_GB_GROUP_BY_CONTAINS_SELECT = The GROUP BY clause must contain all nonaggregated columns in the select list. It can contain columns that are not in the select list. For example, SELECT DEPT, MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT, AGE. (ODBC 2.0)

-# -#

SQL_GB_NO_RELATION = The columns in the GROUP BY clause and the select list are not related. The meaning of nongrouped, nonaggregated columns in the select list is data source–dependent. For example, SELECT DEPT, SALARY FROM EMPLOYEE GROUP BY DEPT, AGE. (ODBC 2.0)

-# -#

An SQL-92 Entry level–conformant driver will always return the SQL_GB_GROUP_BY_EQUALS_SELECT option as supported. An SQL-92 Full level–conformant driver will always return the SQL_GB_COLLATE option as supported. If none of the options is supported, the GROUP BY clause is not supported by the data source.

-#
SQL_IDENTIFIER_CASE
-# (ODBC 1.0)
An SQLUSMALLINT value as follows: -#

SQL_IC_UPPER = Identifiers in SQL are not case-sensitive and are stored in uppercase in system catalog.

-# -#

SQL_IC_LOWER = Identifiers in SQL are not case-sensitive and are stored in lowercase in system catalog.

-# -#

SQL_IC_SENSITIVE = Identifiers in SQL are case-sensitive and are stored in mixed case in system catalog.

-# -#

SQL_IC_MIXED = Identifiers in SQL are not case-sensitive and are stored in mixed case in system catalog.

-# -#

Because identifiers in SQL-92 are never case-sensitive, a driver that conforms strictly to SQL-92 (any level) will never return the SQL_IC_SENSITIVE option as supported.

-#
SQL_IDENTIFIER_QUOTE_CHAR
-# (ODBC 1.0)
The character string used as the starting and ending delimiter of a quoted (delimited) identifier in SQL statements. (Identifiers passed as arguments to ODBC functions do not need to be quoted.) If the data source does not support quoted identifiers, a blank is returned. -#

This character string can also be used for quoting catalog function arguments when the connection attribute SQL_ATTR_METADATA_ID is set to SQL_TRUE.

-# -#

Because the identifier quote character in SQL-92 is the double quotation mark ("), a driver that conforms strictly to SQL-92 will always return the double quotation mark character.

-#
SQL_INDEX_KEYWORDS
-# (ODBC 3.0)
An SQLUINTEGER bitmask that enumerates keywords in the CREATE INDEX statement that are supported by the driver: -#

SQL_IK_NONE = None of the keywords is supported.

-# -#

SQL_IK_ASC = ASC keyword is supported.

-# -#

SQL_IK_DESC = DESC keyword is supported.

-# -#

SQL_IK_ALL = All keywords are supported.

-# -#

To see if the CREATE INDEX statement is supported, an application calls SQLGetInfo with the SQL_DLL_INDEX information type.

-#
SQL_INFO_SCHEMA_VIEWS
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the views in the INFORMATION_SCHEMA that are supported by the driver. The views in, and the contents of, INFORMATION_SCHEMA are as defined in SQL-92. -#

The SQL-92 or FIPS conformance level at which this feature needs to be supported is shown in parentheses next to each bitmask.

-# -#

The following bitmasks are used to determine which views are supported:

-# -#

SQL_ISV_ASSERTIONS = Identifies the catalog's assertions that are owned by a given user. (Full level)

-# -#

SQL_ISV_CHARACTER_SETS = Identifies the catalog's character sets that are accessible to a given user. (Intermediate level)

-# -#

SQL_ISV_CHECK_CONSTRAINTS = Identifies the CHECK constraints that are owned by a given user. (Intermediate level)

-# -#

SQL_ISV_COLLATIONS = Identifies the character collations for the catalog that are accessible to a given user. (Full level)

-# -#

SQL_ISV_COLUMN_DOMAIN_USAGE = Identifies columns for the catalog that are dependent on domains defined in the catalog and are owned by a given user. (Intermediate level)

-# -#

SQL_ISV_COLUMN_PRIVILEGES = Identifies the privileges on columns of persistent tables that are available to or granted by a given user. (FIPS Transitional level)

-# -#

SQL_ISV_COLUMNS = Identifies the columns of persistent tables that are accessible to a given user. (FIPS Transitional level)

-# -#

SQL_ISV_CONSTRAINT_COLUMN_USAGE = Similar to CONSTRAINT_TABLE_USAGE view, columns are identified for the various constraints that are owned by a given user. (Intermediate level)

-# -#

SQL_ISV_CONSTRAINT_TABLE_USAGE = Identifies the tables that are used by constraints (referential, unique, and assertions), and are owned by a given user. (Intermediate level)

-# -#

SQL_ISV_DOMAIN_CONSTRAINTS = Identifies the domain constraints (of the domains in the catalog) that are accessible to a given user. (Intermediate level)

-# -#

SQL_ISV_DOMAINS = Identifies the domains defined in a catalog that are accessible to the user. (Intermediate level)

-# -#

SQL_ISV_KEY_COLUMN_USAGE = Identifies columns defined in the catalog that are constrained as keys by a given user. (Intermediate level)

-# -#

SQL_ISV_REFERENTIAL_CONSTRAINTS = Identifies the referential constraints that are owned by a given user. (Intermediate level)

-# -#

SQL_ISV_SCHEMATA = Identifies the schemas that are owned by a given user. (Intermediate level)

-# -#

SQL_ISV_SQL_LANGUAGES = Identifies the SQL conformance levels, options, and dialects supported by the SQL implementation. (Intermediate level)

-# -#

SQL_ISV_TABLE_CONSTRAINTS = Identifies the table constraints that are owned by a given user. (Intermediate level)

-# -#

SQL_ISV_TABLE_PRIVILEGES = Identifies the privileges on persistent tables that are available to or granted by a given user. (FIPS Transitional level)

-# -#

SQL_ISV_TABLES = Identifies the persistent tables defined in a catalog that are accessible to a given user. (FIPS Transitional level)

-# -#

SQL_ISV_TRANSLATIONS = Identifies character translations for the catalog that are accessible to a given user. (Full level)

-# -#

SQL_ISV_USAGE_PRIVILEGES = Identifies the USAGE privileges on catalog objects that are available to or owned by a given user. (FIPS Transitional level)

-# -#

SQL_ISV_VIEW_COLUMN_USAGE = Identifies the columns on which the catalog's views that are owned by a given user are dependent. (Intermediate level)

-# -#

SQL_ISV_VIEW_TABLE_USAGE = Identifies the tables on which the catalog's views that are owned by a given user are dependent. (Intermediate level)

-# -#

SQL_ISV_VIEWS = Identifies the viewed tables defined in this catalog that are accessible to a given user. (FIPS Transitional level)

-#
SQL_INSERT_STATEMENT
-# (ODBC 3.0)
An SQLUINTEGER bitmask that indicates support for INSERT statements: -#

SQL_IS_INSERT_LITERALS

-# -#

SQL_IS_INSERT_SEARCHED

-# -#

SQL_IS_SELECT_INTO

-# -#

An SQL-92 Entry level–conformant driver will always return all of these options as supported.

-#
SQL_INTEGRITY
-# (ODBC 1.0)
A character string: "Y" if the data source supports the Integrity Enhancement Facility; "N" if it does not. -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_ODBC_SQL_OPT_IEF.

-#
SQL_KEYSET_CURSOR_ATTRIBUTES1
-# (ODBC 3.0)
An SQLUINTEGER bitmask that describes the attributes of a keyset cursor that are supported by the driver. This bitmask contains the first subset of attributes; for the second subset, see SQL_KEYSET_CURSOR_ATTRIBUTES2. -#

The following bitmasks are used to determine which attributes are supported:

-# -#

SQL_CA1_NEXT
-# SQL_CA1_ABSOLUTE
-# SQL_CA1_RELATIVE
-# SQL_CA1_BOOKMARK
-# SQL_CA1_LOCK_EXCLUSIVE
-# SQL_CA1_LOCK_NO_CHANGE
-# SQL_CA1_LOCK_UNLOCK
-# SQL_CA1_POS_POSITION
-# SQL_CA1_POS_UPDATE
-# SQL_CA1_POS_DELETE
-# SQL_CA1_POS_REFRESH
-# SQL_CA1_POSITIONED_UPDATE
-# SQL_CA1_POSITIONED_DELETE
-# SQL_CA1_SELECT_FOR_UPDATE
-# SQL_CA1_BULK_ADD
-# SQL_CA1_BULK_UPDATE_BY_BOOKMARK
-# SQL_CA1_BULK_DELETE_BY_BOOKMARK
-# SQL_CA1_BULK_FETCH_BY_BOOKMARK

-# -#

For descriptions of these bitmasks, see SQL_DYNAMIC_CURSOR_ATTRIBUTES1 (and substitute "keyset-driven cursor" for "dynamic cursor" in the descriptions).

-# -#

An SQL-92 Intermediate level–conformant driver will usually return the SQL_CA1_NEXT, SQL_CA1_ABSOLUTE, and SQL_CA1_RELATIVE options as supported, because the driver supports scrollable cursors through the embedded SQL FETCH statement. Because this does not directly determine the underlying SQL support, however, scrollable cursors may not be supported, even for an SQL-92 Intermediate level–conformant driver.

-#
SQL_KEYSET_CURSOR_ATTRIBUTES2
-# (ODBC 3.0)
An SQLUINTEGER bitmask that describes the attributes of a keyset cursor that are supported by the driver. This bitmask contains the second subset of attributes; for the first subset, see SQL_KEYSET_CURSOR_ATTRIBUTES1. -#

The following bitmasks are used to determine which attributes are supported:

-# -#

SQL_CA2_READ_ONLY_CONCURRENCY
-# SQL_CA2_LOCK_CONCURRENCY
-# SQL_CA2_OPT_ROWVER_CONCURRENCY
-# SQL_CA2_OPT_VALUES_CONCURRENCY
-# SQL_CA2_SENSITIVITY_ADDITIONS
-# SQL_CA2_SENSITIVITY_DELETIONS
-# SQL_CA2_SENSITIVITY_UPDATES
-# SQL_CA2_MAX_ROWS_SELECT
-# SQL_CA2_MAX_ROWS_INSERT
-# SQL_CA2_MAX_ROWS_DELETE
-# SQL_CA2_MAX_ROWS_UPDATE
-# SQL_CA2_MAX_ROWS_CATALOG
-# SQL_CA2_MAX_ROWS_AFFECTS_ALL
-# SQL_CA2_CRC_EXACT
-# SQL_CA2_CRC_APPROXIMATE
-# SQL_CA2_SIMULATE_NON_UNIQUE
-# SQL_CA2_SIMULATE_TRY_UNIQUE
-# SQL_CA2_SIMULATE_UNIQUE

-# -#

For descriptions of these bitmasks, see SQL_DYNAMIC_CURSOR_ATTRIBUTES1 (and substitute "keyset-driven cursor" for "dynamic cursor" in the descriptions).

-#
SQL_KEYWORDS
-# (ODBC 2.0)
A character string containing a comma-separated list of all data source–specific keywords. This list does not contain keywords specific to ODBC or keywords used by both the data source and ODBC. This list represents all the reserved keywords; interoperable applications should not use these words in object names. -#

For a list of ODBC keywords, see "List of Reserved Keywords" in Appendix C, "SQL Grammar." The #define value SQL_ODBC_KEYWORDS contains a comma-separated list of ODBC keywords.

-#
SQL_LIKE_ESCAPE_CLAUSE
-# (ODBC 2.0)
A character string: "Y" if the data source supports an escape character for the percent character (%) and underscore character (_) in a LIKE predicate and the driver supports the ODBC syntax for defining a LIKE predicate escape character; "N" otherwise.
SQL_MAX_ASYNC_CONCURRENT_STATEMENTS
-# (ODBC 3.0)
An SQLUINTEGER value specifying the maximum number of active concurrent statements in asynchronous mode that the driver can support on a given connection. If there is no specific limit or the limit is unknown, this value is zero.
SQL_MAX_BINARY_LITERAL_LEN
-# (ODBC 2.0)
An SQLUINTEGER value specifying the maximum length (number of hexadecimal characters, excluding the literal prefix and suffix returned by SQLGetTypeInfo) of a binary literal in an SQL statement. For example, the binary literal 0xFFAA has a length of 4. If there is no maximum length or the length is unknown, this value is set to zero.
SQL_MAX_CATALOG_NAME_LEN
-# (ODBC 1.0)
An SQLUSMALLINT value specifying the maximum length of a catalog name in the data source. If there is no maximum length or the length is unknown, this value is set to zero. -#

An FIPS Full level–conformant driver will return at least 128.

-# -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_MAX_QUALIFIER_NAME_LEN.

-#
SQL_MAX_CHAR_LITERAL_LEN
-# (ODBC 2.0)
An SQLUINTEGER value specifying the maximum length (number of characters, excluding the literal prefix and suffix returned by SQLGetTypeInfo) of a character literal in an SQL statement. If there is no maximum length or the length is unknown, this value is set to zero.
SQL_MAX_COLUMN_NAME_LEN
-# (ODBC 1.0)
An SQLUSMALLINT value specifying the maximum length of a column name in the data source. If there is no maximum length or the length is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 18. An FIPS Intermediate level–conformant driver will return at least 128.

-#
SQL_MAX_COLUMNS_IN_GROUP_BY
-# (ODBC 2.0)
An SQLUSMALLINT value specifying the maximum number of columns allowed in a GROUP BY clause. If there is no specified limit or the limit is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 6. An FIPS Intermediate level–conformant driver will return at least 15.

-#
SQL_MAX_COLUMNS_IN_INDEX
-# (ODBC 2.0)
An SQLUSMALLINT value specifying the maximum number of columns allowed in an index. If there is no specified limit or the limit is unknown, this value is set to zero.
SQL_MAX_COLUMNS_IN_ORDER_BY
-# (ODBC 2.0)
An SQLUSMALLINT value specifying the maximum number of columns allowed in an ORDER BY clause. If there is no specified limit or the limit is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 6. An FIPS Intermediate level–conformant driver will return at least 15.

-#
SQL_MAX_COLUMNS_IN_SELECT
-# (ODBC 2.0)
An SQLUSMALLINT value specifying the maximum number of columns allowed in a select list. If there is no specified limit or the limit is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 100. An FIPS Intermediate level–conformant driver will return at least 250.

-#
SQL_MAX_COLUMNS_IN_TABLE
-# (ODBC 2.0)
An SQLUSMALLINT value specifying the maximum number of columns allowed in a table. If there is no specified limit or the limit is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 100. An FIPS Intermediate level–conformant driver will return at least 250.

-#
SQL_MAX_CONCURRENT_ACTIVITIES
-# (ODBC 1.0)
An SQLUSMALLINT value specifying the maximum number of active statements that the driver can support for a connection. A statement is defined as active if it has results pending, with the term "results" meaning rows from a SELECT operation or rows affected by an INSERT, UPDATE, or DELETE operation (such as a row count), or if it is in a NEED_DATA state. This value can reflect a limitation imposed by either the driver or the data source. If there is no specified limit or the limit is unknown, this value is set to zero. -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_ACTIVE_STATEMENTS.

-#
SQL_MAX_CURSOR_NAME_LEN
-# (ODBC 1.0)
An SQLUSMALLINT value specifying the maximum length of a cursor name in the data source. If there is no maximum length or the length is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 18. An FIPS Intermediate level–conformant driver will return at least 128.

-#
SQL_MAX_DRIVER_CONNECTIONS
-# (ODBC 1.0)
An SQLUSMALLINT value specifying the maximum number of active connections that the driver can support for an environment. This value can reflect a limitation imposed by either the driver or the data source. If there is no specified limit or the limit is unknown, this value is set to zero. -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_ACTIVE_CONNECTIONS.

-#
SQL_MAX_IDENTIFIER_LEN
-# (ODBC 3.0)
An SQLUSMALLINT that indicates the maximum size in characters that the data source supports for user-defined names. -#

An FIPS Entry level–conformant driver will return at least 18. An FIPS Intermediate level–conformant driver will return at least 128.

-#
SQL_MAX_INDEX_SIZE
-# (ODBC 2.0)
An SQLUINTEGER value specifying the maximum number of bytes allowed in the combined fields of an index. If there is no specified limit or the limit is unknown, this value is set to zero.
SQL_MAX_PROCEDURE_NAME_LEN
-# (ODBC 1.0)
An SQLUSMALLINT value specifying the maximum length of a procedure name in the data source. If there is no maximum length or the length is unknown, this value is set to zero.
SQL_MAX_ROW_SIZE
-# (ODBC 2.0)
An SQLUINTEGER value specifying the maximum length of a single row in a table. If there is no specified limit or the limit is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 2,000. An FIPS Intermediate level–conformant driver will return at least 8,000.

-#
SQL_MAX_ROW_SIZE_INCLUDES_LONG
-# (ODBC 3.0)
A character string: "Y" if the maximum row size returned for the SQL_MAX_ROW_SIZE information type includes the length of all SQL_LONGVARCHAR and SQL_LONGVARBINARY columns in the row; "N" otherwise.
SQL_MAX_SCHEMA_NAME_LEN
-# (ODBC 1.0)
An SQLUSMALLINT value specifying the maximum length of a schema name in the data source. If there is no maximum length or the length is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 18. An FIPS Intermediate level–conformant driver will return at least 128.

-# -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_MAX_OWNER_NAME_LEN.

-#
SQL_MAX_STATEMENT_LEN
-# (ODBC 2.0)
An SQLUINTEGER value specifying the maximum length (number of characters, including white space) of an SQL statement. If there is no maximum length or the length is unknown, this value is set to zero.
SQL_MAX_TABLE_NAME_LEN
-# (ODBC 1.0)
An SQLUSMALLINT value specifying the maximum length of a table name in the data source. If there is no maximum length or the length is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 18. An FIPS Intermediate level–conformant driver will return at least 128.

-#
SQL_MAX_TABLES_IN_SELECT
-# (ODBC 2.0)
An SQLUSMALLINT value specifying the maximum number of tables allowed in the FROM clause of a SELECT statement. If there is no specified limit or the limit is unknown, this value is set to zero. -#

An FIPS Entry level–conformant driver will return at least 15. An FIPS Intermediate level–conformant driver will return at least 50.

-#
SQL_MAX_USER_NAME_LEN
-# (ODBC 2.0)
An SQLUSMALLINT value specifying the maximum length of a user name in the data source. If there is no maximum length or the length is unknown, this value is set to zero.
SQL_MULT_RESULT_SETS
-# (ODBC 1.0)
A character string: "Y" if the data source supports multiple result sets, "N" if it does not. -#

For more information on multiple result sets, see "Multiple Results" in Chapter 11: Retrieving Results (Advanced).

-#
SQL_MULTIPLE_ACTIVE_TXN
-# (ODBC 1.0)
A character string: "Y" if the driver supports more than one active transaction at the same time, "N" if only one transaction can be active at any time. -#

The information returned for this information type does not apply in the case of distributed transactions.

-#
SQL_NEED_LONG_DATA_LEN
-# (ODBC 2.0)
A character string: "Y" if the data source needs the length of a long data value (the data type is SQL_LONGVARCHAR, SQL_LONGVARBINARY, or a long data source–specific data type) before that value is sent to the data source, "N" if it does not. For more information, see SQLBindParameter and SQLSetPos.
SQL_NON_NULLABLE_COLUMNS
-# (ODBC 1.0)
An SQLUSMALLINT value specifying whether the data source supports NOT NULL in columns: -#

SQL_NNC_NULL = All columns must be nullable.

-# -#

SQL_NNC_NON_NULL = Columns cannot be nullable. (The data source supports the NOT NULL column constraint in CREATE TABLE statements.)

-# -#

An SQL-92 Entry level–conformant driver will return SQL_NNC_NON_NULL.

-#
SQL_NULL_COLLATION
-# (ODBC 2.0)
An SQLUSMALLINT value specifying where NULLs are sorted in a result set: -#

SQL_NC_END = NULLs are sorted at the end of the result set, regardless of the ASC or DESC keywords.

-# -#

SQL_NC_HIGH = NULLs are sorted at the high end of the result set, depending on the ASC or DESC keywords.

-# -#

SQL_NC_LOW = NULLs are sorted at the low end of the result set, depending on the ASC or DESC keywords.

-# -#

SQL_NC_START = NULLs are sorted at the start of the result set, regardless of the ASC or DESC keywords.

-#
SQL_NUMERIC_FUNCTIONS
-# (ODBC 1.0) -#

The information type was introduced in ODBC 1.0; each bitmask is labeled with the version in which it was introduced.

-#
An SQLUINTEGER bitmask enumerating the scalar numeric functions supported by the driver and associated data source. -#

The following bitmasks are used to determine which numeric functions are supported:

-# -#

SQL_FN_NUM_ABS (ODBC 1.0)
-# SQL_FN_NUM_ACOS (ODBC 1.0)
-# SQL_FN_NUM_ASIN (ODBC 1.0)
-# SQL_FN_NUM_ATAN (ODBC 1.0)
-# SQL_FN_NUM_ATAN2 (ODBC 1.0)
-# SQL_FN_NUM_CEILING (ODBC 1.0)
-# SQL_FN_NUM_COS (ODBC 1.0)
-# SQL_FN_NUM_COT (ODBC 1.0)
-# SQL_FN_NUM_DEGREES (ODBC 2.0)
-# SQL_FN_NUM_EXP (ODBC 1.0)
-# SQL_FN_NUM_FLOOR (ODBC 1.0)
-# SQL_FN_NUM_LOG (ODBC 1.0)
-# SQL_FN_NUM_LOG10 (ODBC 2.0)
-# SQL_FN_NUM_MOD (ODBC 1.0)
-# SQL_FN_NUM_PI (ODBC 1.0)
-# SQL_FN_NUM_POWER (ODBC 2.0)
-# SQL_FN_NUM_RADIANS (ODBC 2.0)
-# SQL_FN_NUM_RAND (ODBC 1.0)
-# SQL_FN_NUM_ROUND (ODBC 2.0)
-# SQL_FN_NUM_SIGN (ODBC 1.0)
-# SQL_FN_NUM_SIN (ODBC 1.0)
-# SQL_FN_NUM_SQRT (ODBC 1.0)
-# SQL_FN_NUM_TAN (ODBC 1.0)
-# SQL_FN_NUM_TRUNCATE (ODBC 2.0)

-#
SQL_ODBC_INTERFACE_CONFORMANCE
-# (ODBC 3.0)
An SQLUINTEGER value indicating the level of the ODBC 3.x interface that the driver conforms to. -#

SQL_OIC_CORE: The minimum level that all ODBC drivers are expected to conform to. This level includes basic interface elements such as connection functions, functions for preparing and executing an SQL statement, basic result set metadata functions, basic catalog functions, and so on.

-# -#

SQL_OIC_LEVEL1: A level including the core standards compliance level functionality, plus scrollable cursors, bookmarks, positioned updates and deletes, and so on.

-# -#

SQL_OIC_LEVEL2: A level including level 1 standards compliance level functionality, plus advanced features such as sensitive cursors; update, delete, and refresh by bookmarks; stored procedure support; catalog functions for primary and foreign keys; multicatalog support; and so on.

-# -#

For more information, see "Interface Conformance Levels" in Chapter 4: ODBC Fundamentals.

-#
SQL_ODBC_VER
-# (ODBC 1.0)
A character string with the version of ODBC to which the Driver Manager conforms. The version is of the form ##.##.0000, where the first two digits are the major version and the next two digits are the minor version. This is implemented solely in the Driver Manager.
SQL_OJ_CAPABILITIES
-# (ODBC 2.01)
An SQLUINTEGER bitmask enumerating the types of outer joins supported by the driver and data source. The following bitmasks are used to determine which types are supported: -#

SQL_OJ_LEFT = Left outer joins are supported.

-# -#

SQL_OJ_RIGHT = Right outer joins are supported.

-# -#

SQL_OJ_FULL = Full outer joins are supported.

-# -#

SQL_OJ_NESTED = Nested outer joins are supported.

-# -#

SQL_OJ_NOT_ORDERED = The column names in the ON clause of the outer join do not have to be in the same order as their respective table names in the OUTER JOIN clause.

-# -#

SQL_OJ_INNER = The inner table (the right table in a left outer join or the left table in a right outer join) can also be used in an inner join. This does not apply to full outer joins, which do not have an inner table.

-# -#

SQL_OJ_ALL_COMPARISON_OPS = The comparison operator in the ON clause can be any of the ODBC comparison operators. If this bit is not set, only the equals (=) comparison operator can be used in outer joins.

-# -#

If none of these options is returned as supported, no outer join clause is supported.

-# -#

For information on the support of relational join operators in a SELECT statement, as defined by SQL-92, see SQL_SQL92_RELATIONAL_JOIN_OPERATORS.

-#
SQL_ORDER_BY_COLUMNS_IN_SELECT
-# (ODBC 2.0)
A character string: "Y" if the columns in the ORDER BY clause must be in the select list; otherwise, "N".
SQL_PARAM_ARRAY_ROW_COUNTS
-# (ODBC 3.0)
An SQLUINTEGER enumerating the driver's properties regarding the availability of row counts in a parameterized execution. Has the following values: -#

SQL_PARC_BATCH = Individual row counts are available for each set of parameters. This is conceptually equivalent to the driver generating a batch of SQL statements, one for each parameter set in the array. Extended error information can be retrieved by using the SQL_PARAM_STATUS_PTR descriptor field.

-# -#

SQL_PARC_NO_BATCH = There is only one row count available, which is the cumulative row count resulting from the execution of the statement for the entire array of parameters. This is conceptually equivalent to treating the statement along with the entire parameter array as one atomic unit. Errors are handled the same as if one statement were executed.

-#
SQL_PARAM_ARRAY_SELECTS
-# (ODBC 3.0)
An SQLUINTEGER enumerating the driver's properties regarding the availability of result sets in a parameterized execution. Has the following values: -#

SQL_PAS_BATCH = There is one result set available per set of parameters. This is conceptually equivalent to the driver generating a batch of SQL statements, one for each parameter set in the array.

-# -#

SQL_PAS_NO_BATCH = There is only one result set available, which represents the cumulative result set resulting from the execution of the statement for the entire array of parameters. This is conceptually equivalent to treating the statement along with the entire parameter array as one atomic unit.

-# -#

SQL_PAS_NO_SELECT = A driver does not allow a result-set generating statement to be executed with an array of parameters.

-#
SQL_PROCEDURE_TERM
-# (ODBC 1.0)
A character string with the data source vendor's name for a procedure; for example, "database procedure", "stored procedure", "procedure", "package", or "stored query".
SQL_PROCEDURES
-# (ODBC 1.0)
A character string: "Y" if the data source supports procedures and the driver supports the ODBC procedure invocation syntax; "N" otherwise.
SQL_POS_OPERATIONS (ODBC 2.0)An SQLINTEGER bitmask enumerating the support operations in SQLSetPos. -#

The following bitmasks are used in conjunction with the flag to determine which options are supported.

-# -#

SQL_POS_POSITION (ODBC 2.0) SQL_POS_REFRESH (ODBC 2.0) SQL_POS_UPDATE (ODBC 2.0) SQL_POS_DELETE (ODBC 2.0) SQL_POS_ADD (ODBC 2.0)

-#
SQL_QUOTED_IDENTIFIER_CASE
-# (ODBC 2.0)
An SQLUSMALLINT value as follows: -#

SQL_IC_UPPER = Quoted identifiers in SQL are not case-sensitive and are stored in uppercase in the system catalog.

-# -#

SQL_IC_LOWER = Quoted identifiers in SQL are not case-sensitive and are stored in lowercase in the system catalog.

-# -#

SQL_IC_SENSITIVE = Quoted identifiers in SQL are case-sensitive and are stored in mixed case in the system catalog. (In an SQL-92–compliant database, quoted identifiers are always case-sensitive.)

-# -#

SQL_IC_MIXED = Quoted identifiers in SQL are not case-sensitive and are stored in mixed case in the system catalog.

-# -#

An SQL-92 Entry level–conformant driver will always return SQL_IC_SENSITIVE.

-#
SQL_ROW_UPDATES
-# (ODBC 1.0)
A character string: "Y" if a keyset-driven or mixed cursor maintains row versions or values for all fetched rows and therefore can detect any updates made to a row by any user since the row was last fetched. (This applies only to updates, not to deletions or insertions.) The driver can return the SQL_ROW_UPDATED flag to the row status array when SQLFetchScroll is called. Otherwise, "N".
SQL_SCHEMA_TERM
-# (ODBC 1.0)
A character string with the data source vendor's name for an schema; for example, "owner", "Authorization ID", or "Schema". -#

The character string can be returned in upper, lower, or mixed case.

-# -#

An SQL-92 Entry level–conformant driver will always return "schema".

-# -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_OWNER_TERM.

-#
SQL_SCHEMA_USAGE
-# (ODBC 2.0)
An SQLUINTEGER bitmask enumerating the statements in which schemas can be used: -#

SQL_SU_DML_STATEMENTS = Schemas are supported in all Data Manipulation Language statements: SELECT, INSERT, UPDATE, DELETE, and if supported, SELECT FOR UPDATE and positioned update and delete statements.

-# -#

SQL_SU_PROCEDURE_INVOCATION = Schemas are supported in the ODBC procedure invocation statement.

-# -#

SQL_SU_TABLE_DEFINITION = Schemas are supported in all table definition statements: CREATE TABLE, CREATE VIEW, ALTER TABLE, DROP TABLE, and DROP VIEW.

-# -#

SQL_SU_INDEX_DEFINITION = Schemas are supported in all index definition statements: CREATE INDEX and DROP INDEX.

-# -#

SQL_SU_PRIVILEGE_DEFINITION = Schemas are supported in all privilege definition statements: GRANT and REVOKE.

-# -#

An SQL-92 Entry level–conformant driver will always return the SQL_SU_DML_STATEMENTS, SQL_SU_TABLE_DEFINITION, and SQL_SU_PRIVILEGE_DEFINITION options, as supported.

-# -#

This InfoType has been renamed for ODBC 3.0 from the ODBC 2.0 InfoType SQL_OWNER_USAGE.

-#
SQL_SCROLL_OPTIONS
-# (ODBC 1.0) -#

The information type was introduced in ODBC 1.0; each bitmask is labeled with the version in which it was introduced.

-#
An SQLUINTEGER bitmask enumerating the scroll options supported for scrollable cursors. -#

The following bitmasks are used to determine which options are supported:

-# -#

SQL_SO_FORWARD_ONLY = The cursor only scrolls forward. (ODBC 1.0)

-# -#

SQL_SO_STATIC = The data in the result set is static. (ODBC 2.0)

-# -#

SQL_SO_KEYSET_DRIVEN = The driver saves and uses the keys for every row in the result set. (ODBC 1.0)

-# -#

SQL_SO_DYNAMIC = The driver keeps the keys for every row in the rowset (the keyset size is the same as the rowset size). (ODBC 1.0)

-# -#

SQL_SO_MIXED = The driver keeps the keys for every row in the keyset, and the keyset size is greater than the rowset size. The cursor is keyset-driven inside the keyset and dynamic outside the keyset. (ODBC 1.0)

-# -#

For information about scrollable cursors, see "Scrollable Cursors" in Chapter 11: Retrieving Results (Advanced)

-#
SQL_SEARCH_PATTERN_ESCAPE
-# (ODBC 1.0)
A character string specifying what the driver supports as an escape character that permits the use of the pattern match metacharacters underscore (_) and percent sign (%) as valid characters in search patterns. This escape character applies only for those catalog function arguments that support search strings. If this string is empty, the driver does not support a search-pattern escape character. -#

Because this information type does not indicate general support of the escape character in the LIKE predicate, SQL-92 does not include requirements for this character string.

-# -#

This InfoType is limited to catalog functions. For a description of the use of the escape character in search pattern strings, see "Pattern Value Arguments" in Chapter 7: Catalog Functions.

-#
SQL_SERVER_NAME
-# (ODBC 1.0)
A character string with the actual data source–specific server name; useful when a data source name is used during SQLConnect, SQLDriverConnect, and SQLBrowseConnect.
SQL_SPECIAL_CHARACTERS
-# (ODBC 2.0)
A character string containing all special characters (that is, all characters except a through z, A through Z, 0 through 9, and underscore) that can be used in an identifier name, such as a table name, column column name, or index name, on the data source. For example, "#$^". If an identifier contains one or more of these characters, the identifier must be a delimited identifier.
SQL_SQL_CONFORMANCE
-# (ODBC 3.0)
An SQLUINTEGER value indicating the level of SQL-92 supported by the driver: -#

SQL_SC_SQL92_ENTRY = Entry level SQL-92 compliant.

-# -#

SQL_SC_FIPS127_2_TRANSITIONAL = FIPS 127-2 transitional level compliant.

-# -#

SQL_SC_SQL92_FULL = Full level SQL-92 compliant.

-# -#

SQL_SC_ SQL92_INTERMEDIATE = Intermediate level SQL-92 compliant.

-#
SQL_SQL92_DATETIME_FUNCTIONS
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the datetime scalar functions that are supported by the driver and the associated data source, as defined in SQL-92. -#

The following bitmasks are used to determine which datetime functions are supported:

-# -#

SQL_SDF_CURRENT_DATE
-# SQL_SDF_CURRENT_TIME
-# SQL_SDF_CURRENT_TIMESTAMP

-#
SQL_SQL92_FOREIGN_KEY_DELETE_RULE
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the rules supported for a foreign key in a DELETE statement, as defined in SQL-92. -#

The following bitmasks are used to determine which clauses are supported by the data source:

-# -#

SQL_SFKD_CASCADE
-# SQL_SFKD_NO_ACTION
-# SQL_SFKD_SET_DEFAULT
-# SQL_SFKD_SET_NULL

-# -#

An FIPS Transitional level–conformant driver will always return all of these options as supported.

-#
SQL_SQL92_FOREIGN_KEY_UPDATE_RULE
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the rules supported for a foreign key in an UPDATE statement, as defined in SQL-92. -#

The following bitmasks are used to determine which clauses are supported by the data source:

-# -#

SQL_SFKU_CASCADE
-# SQL_SFKU_NO_ACTION
-# SQL_SFKU_SET_DEFAULT
-# SQL_SFKU_SET_NULL

-# -#

An SQL-92 Full level–conformant driver will always return all of these options as supported.

-#
SQL_SQL92_GRANT
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses supported in the GRANT statement, as defined in SQL-92. -#

The SQL-92 or FIPS conformance level at which this feature needs to be supported is shown in parentheses next to each bitmask.

-# -#

The following bitmasks are used to determine which clauses are supported by the data source:

-# -#

SQL_SG_DELETE_TABLE (Entry level)
-# SQL_SG_INSERT_COLUMN (Intermediate level)
-# SQL_SG_INSERT_TABLE (Entry level)
-# SQL_SG_REFERENCES_TABLE (Entry level)
-# SQL_SG_REFERENCES_COLUMN (Entry level)
-# SQL_SG_SELECT_TABLE (Entry level)
-# SQL_SG_UPDATE_COLUMN (Entry level)
-# SQL_SG_UPDATE_TABLE (Entry level)
-# SQL_SG_USAGE_ON_DOMAIN (FIPS Transitional level)
-# SQL_SG_USAGE_ON_CHARACTER_SET (FIPS Transitional level)
-# SQL_SG_USAGE_ON_COLLATION (FIPS Transitional level)
-# SQL_SG_USAGE_ON_TRANSLATION (FIPS Transitional level)
-# SQL_SG_WITH_GRANT_OPTION (Entry level)

-#
SQL_SQL92_NUMERIC_VALUE_FUNCTIONS
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the numeric value scalar functions that are supported by the driver and the associated data source, as defined in SQL-92. -#

The following bitmasks are used to determine which numeric functions are supported:

-# -#

SQL_SNVF_BIT_LENGTH
-# SQL_SNVF_CHAR_LENGTH
-# SQL_SNVF_CHARACTER_LENGTH
-# SQL_SNVF_EXTRACT
-# SQL_SNVF_OCTET_LENGTH
-# SQL_SNVF_POSITION

-#
SQL_SQL92_PREDICATES
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the predicates supported in a SELECT statement, as defined in SQL-92. -#

The SQL-92 or FIPS conformance level at which this feature needs to be supported is shown in parentheses next to each bitmask.

-# -#

The following bitmasks are used to determine which options are supported by the data source:

-# -#

SQL_SP_BETWEEN (Entry level)
-# SQL_SP_COMPARISON (Entry level)
-# SQL_SP_EXISTS (Entry level)
-# SQL_SP_IN (Entry level)
-# SQL_SP_ISNOTNULL (Entry level)
-# SQL_SP_ISNULL (Entry level)
-# SQL_SP_LIKE (Entry level)
-# SQL_SP_MATCH_FULL (Full level)
-# SQL_SP_MATCH_PARTIAL(Full level)
-# SQL_SP_MATCH_UNIQUE_FULL (Full level)
-# SQL_SP_MATCH_UNIQUE_PARTIAL (Full level)
-# SQL_SP_OVERLAPS (FIPS Transitional level)
-# SQL_SP_QUANTIFIED_COMPARISON (Entry level)
-# SQL_SP_UNIQUE (Entry level)

-#
SQL_SQL92_RELATIONAL_JOIN_OPERATORS
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the relational join operators supported in a SELECT statement, as defined in SQL-92. -#

The SQL-92 or FIPS conformance level at which this feature needs to be supported is shown in parentheses next to each bitmask.

-# -#

The following bitmasks are used to determine which options are supported by the data source:

-# -#

SQL_SRJO_CORRESPONDING_CLAUSE (Intermediate level)
-# SQL_SRJO_CROSS_JOIN (Full level)
-# SQL_SRJO_EXCEPT_JOIN (Intermediate level)
-# SQL_SRJO_FULL_OUTER_JOIN (Intermediate level)
-# SQL_SRJO_INNER_JOIN (FIPS Transitional level)
-# SQL_SRJO_INTERSECT_JOIN (Intermediate level)
-# SQL_SRJO_LEFT_OUTER_JOIN (FIPS Transitional level)
-# SQL_SRJO_NATURAL_JOIN (FIPS Transitional level)
-# SQL_SRJO_RIGHT_OUTER_JOIN (FIPS Transitional level)
-# SQL_SRJO_UNION_JOIN (Full level)

-# -#

SQL_SRJO_INNER_JOIN indicates support for the INNER JOIN syntax, not for the inner join capability. Support for the INNER JOIN syntax is FIPS TRANSITIONAL, while support for the inner join capability is ENTRY.

-#
SQL_SQL92_REVOKE
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the clauses supported in the REVOKE statement, as defined in SQL-92, supported by the data source. -#

The SQL-92 or FIPS conformance level at which this feature needs to be supported is shown in parentheses next to each bitmask.

-# -#

The following bitmasks are used to determine which clauses are supported by the data source:

-# -#

SQL_SR_CASCADE (FIPS Transitional level)
-# SQL_SR_DELETE_TABLE (Entry level)
-# SQL_SR_GRANT_OPTION_FOR (Intermediate level)
-# SQL_SR_INSERT_COLUMN (Intermediate level)
-# SQL_SR_INSERT_TABLE (Entry level)
-# SQL_SR_REFERENCES_COLUMN (Entry level)
-# SQL_SR_REFERENCES_TABLE (Entry level)
-# SQL_SR_RESTRICT (FIPS Transitional level)
-# SQL_SR_SELECT_TABLE (Entry level)
-# SQL_SR_UPDATE_COLUMN (Entry level)
-# SQL_SR_UPDATE_TABLE (Entry level)
-# SQL_SR_USAGE_ON_DOMAIN (FIPS Transitional level)
-# SQL_SR_USAGE_ON_CHARACTER_SET (FIPS Transitional level)
-# SQL_SR_USAGE_ON_COLLATION (FIPS Transitional level)
-# SQL_SR_USAGE_ON_TRANSLATION (FIPS Transitional level)

-#
SQL_SQL92_ROW_VALUE_CONSTRUCTOR
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the row value constructor expressions supported in a SELECT statement, as defined in SQL-92. The following bitmasks are used to determine which options are supported by the data source: -#

SQL_SRVC_VALUE_EXPRESSION
-# SQL_SRVC_NULL
-# SQL_SRVC_DEFAULT
-# SQL_SRVC_ROW_SUBQUERY

-#
SQL_SQL92_STRING_FUNCTIONS
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the string scalar functions that are supported by the driver and the associated data source, as defined in SQL-92. -#

The following bitmasks are used to determine which string functions are supported:

-# -#

SQL_SSF_CONVERT
-# SQL_SSF_LOWER
-# SQL_SSF_UPPER
-# SQL_SSF_SUBSTRING
-# SQL_SSF_TRANSLATE
-# SQL_SSF_TRIM_BOTH
-# SQL_SSF_TRIM_LEADING
-# SQL_SSF_TRIM_TRAILING

-#
SQL_SQL92_VALUE_EXPRESSIONS
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the value expressions supported, as defined in SQL-92. -#

The SQL-92 or FIPS conformance level at which this feature needs to be supported is shown in parentheses next to each bitmask.

-# -#

The following bitmasks are used to determine which options are supported by the data source:

-# -#

SQL_SVE_CASE (Intermediate level)
-# SQL_SVE_CAST (FIPS Transitional level)
-# SQL_SVE_COALESCE (Intermediate level)
-# SQL_SVE_NULLIF (Intermediate level)

-#
SQL_STANDARD_CLI_CONFORMANCE
-# (ODBC 3.0)
An SQLUINTEGER bitmask enumerating the CLI standard or standards to which the driver conforms. The following bitmasks are used to determine which levels the driver conforms to: -#

SQL_SCC_XOPEN_CLI_VERSION1: The driver conforms to the X/Open CLI version 1.

-# -#

SQL_SCC_ISO92_CLI: The driver conforms to the ISO 92 CLI.

-#
SQL_STATIC_CURSOR_ATTRIBUTES1
-# (ODBC 3.0)
An SQLUINTEGER bitmask that describes the attributes of a static cursor that are supported by the driver. This bitmask contains the first subset of attributes; for the second subset, see SQL_STATIC_CURSOR_ATTRIBUTES2. -#

The following bitmasks are used to determine which attributes are supported:

-# -#

SQL_CA1_NEXT
-# SQL_CA1_ABSOLUTE
-# SQL_CA1_RELATIVE
-# SQL_CA1_BOOKMARK
-# SQL_CA1_LOCK_NO_CHANGE
-# SQL_CA1_LOCK_EXCLUSIVE
-# SQL_CA1_LOCK_UNLOCK
-# SQL_CA1_POS_POSITION
-# SQL_CA1_POS_UPDATE
-# SQL_CA1_POS_DELETE
-# SQL_CA1_POS_REFRESH
-# SQL_CA1_POSITIONED_UPDATE
-# SQL_CA1_POSITIONED_DELETE
-# SQL_CA1_SELECT_FOR_UPDATE
-# SQL_CA1_BULK_ADD
-# SQL_CA1_BULK_UPDATE_BY_BOOKMARK
-# SQL_CA1_BULK_DELETE_BY_BOOKMARK
-# SQL_CA1_BULK_FETCH_BY_BOOKMARK

-# -#

For descriptions of these bitmasks, see SQL_DYNAMIC_CURSOR_ATTRIBUTES1 (and substitute "static cursor" for "dynamic cursor" in the descriptions).

-# -#

An SQL-92 Intermediate level–conformant driver will usually return the SQL_CA1_NEXT, SQL_CA1_ABSOLUTE, and SQL_CA1_RELATIVE options as supported, because the driver supports scrollable cursors through the embedded SQL FETCH statement. Because this does not directly determine the underlying SQL support, however, scrollable cursors may not be supported, even for an SQL-92 Intermediate level–conformant driver.

-#
SQL_STATIC_CURSOR_ATTRIBUTES2
-# (ODBC 3.0)
An SQLUINTEGER bitmask that describes the attributes of a static cursor that are supported by the driver. This bitmask contains the second subset of attributes; for the first subset, see SQL_STATIC_CURSOR_ATTRIBUTES1. -#

The following bitmasks are used to determine which attributes are supported:

-# -#

SQL_CA2_READ_ONLY_CONCURRENCY
-# SQL_CA2_LOCK_CONCURRENCY
-# SQL_CA2_OPT_ROWVER_CONCURRENCY
-# SQL_CA2_OPT_VALUES_CONCURRENCY
-# SQL_CA2_SENSITIVITY_ADDITIONS
-# SQL_CA2_SENSITIVITY_DELETIONS
-# SQL_CA2_SENSITIVITY_UPDATES
-# SQL_CA2_MAX_ROWS_SELECT
-# SQL_CA2_MAX_ROWS_INSERT
-# SQL_CA2_MAX_ROWS_DELETE
-# SQL_CA2_MAX_ROWS_UPDATE
-# SQL_CA2_MAX_ROWS_CATALOG
-# SQL_CA2_MAX_ROWS_AFFECTS_ALL
-# SQL_CA2_CRC_EXACT
-# SQL_CA2_CRC_APPROXIMATE
-# SQL_CA2_SIMULATE_NON_UNIQUE
-# SQL_CA2_SIMULATE_TRY_UNIQUE
-# SQL_CA2_SIMULATE_UNIQUE

-# -#

For descriptions of these bitmasks, see SQL_DYNAMIC_CURSOR_ATTRIBUTES2 (and substitute "static cursor" for "dynamic cursor" in the descriptions).

-#
SQL_STRING_FUNCTIONS
-# (ODBC 1.0) -#

The information type was introduced in ODBC 1.0; each bitmask is labeled with the version in which it was introduced.

-#
An SQLUINTEGER bitmask enumerating the scalar string functions supported by the driver and associated data source. -#

The following bitmasks are used to determine which string functions are supported:

-# -#

SQL_FN_STR_ASCII (ODBC 1.0)
-# SQL_FN_STR_BIT_LENGTH (ODBC 3.0)
-# SQL_FN_STR_CHAR (ODBC 1.0)
-# SQL_FN_STR_CHAR_
-# LENGTH (ODBC 3.0)
-# SQL_FN_STR_CHARACTER_
-# LENGTH (ODBC 3.0)
-# SQL_FN_STR_CONCAT (ODBC 1.0)
-# SQL_FN_STR_DIFFERENCE (ODBC 2.0)
-# SQL_FN_STR_INSERT (ODBC 1.0)
-# SQL_FN_STR_LCASE (ODBC 1.0)
-# SQL_FN_STR_LEFT (ODBC 1.0)
-# SQL_FN_STR_LENGTH (ODBC 1.0)
-# SQL_FN_STR_LOCATE (ODBC 1.0)
-# SQL_FN_STR_LTRIM (ODBC 1.0)
-# SQL_FN_STR_OCTET_
-# LENGTH (ODBC 3.0)
-# SQL_FN_STR_POSITION (ODBC 3.0)
-# SQL_FN_STR_REPEAT (ODBC 1.0)
-# SQL_FN_STR_REPLACE (ODBC 1.0)
-# SQL_FN_STR_RIGHT (ODBC 1.0)
-# SQL_FN_STR_RTRIM (ODBC 1.0)
-# SQL_FN_STR_SOUNDEX (ODBC 2.0)
-# SQL_FN_STR_SPACE (ODBC 2.0)
-# SQL_FN_STR_SUBSTRING (ODBC 1.0)
-# SQL_FN_STR_UCASE (ODBC 1.0)

-# -#

If an application can call the LOCATE scalar function with the string_exp1, string_exp2, and start arguments, the driver returns the SQL_FN_STR_LOCATE bitmask. If an application can call the LOCATE scalar function with only the string_exp1 and string_exp2 arguments, the driver returns the SQL_FN_STR_LOCATE_2 bitmask. Drivers that fully support the LOCATE scalar function return both bitmasks.

-# -#

(For more information, see String Functions in Appendix E, "Scalar Functions.")

-#
SQL_SUBQUERIES
-# (ODBC 2.0)
An SQLUINTEGER bitmask enumerating the predicates that support subqueries: -#

SQL_SQ_CORRELATED_SUBQUERIES
-# SQL_SQ_COMPARISON
-# SQL_SQ_EXISTS
-# SQL_SQ_IN
-# SQL_SQ_QUANTIFIED

-# -#

The SQL_SQ_CORRELATED_SUBQUERIES bitmask indicates that all predicates that support subqueries support correlated subqueries.

-# -#

An SQL-92 Entry level–conformant driver will always return a bitmask in which all of these bits are set.

-#
SQL_SYSTEM_FUNCTIONS
-# (ODBC 1.0)
An SQLUINTEGER bitmask enumerating the scalar system functions supported by the driver and associated data source. -#

The following bitmasks are used to determine which system functions are supported:

-# -#

SQL_FN_SYS_DBNAME
-# SQL_FN_SYS_IFNULL
-# SQL_FN_SYS_USERNAME

-#
SQL_TABLE_TERM
-# (ODBC 1.0)
A character string with the data source vendor's name for a table; for example, "table" or "file". -#

This character string can be in upper, lower, or mixed case.

-# -#

An SQL-92 Entry level–conformant driver will always return "table".

-#
SQL_TIMEDATE_ADD_INTERVALS
-# (ODBC 2.0)
An SQLUINTEGER bitmask enumerating the timestamp intervals supported by the driver and associated data source for the TIMESTAMPADD scalar function. -#

The following bitmasks are used to determine which intervals are supported:

-# -#

SQL_FN_TSI_FRAC_SECOND
-# SQL_FN_TSI_SECOND
-# SQL_FN_TSI_MINUTE
-# SQL_FN_TSI_HOUR
-# SQL_FN_TSI_DAY
-# SQL_FN_TSI_WEEK
-# SQL_FN_TSI_MONTH
-# SQL_FN_TSI_QUARTER
-# SQL_FN_TSI_YEAR

-# -#

An FIPS Transitional level–conformant driver will always return a bitmask in which all of these bits are set.

-#
SQL_TIMEDATE_DIFF_INTERVALS
-# (ODBC 2.0)
An SQLUINTEGER bitmask enumerating the timestamp intervals supported by the driver and associated data source for the TIMESTAMPDIFF scalar function. -#

The following bitmasks are used to determine which intervals are supported:

-# -#

SQL_FN_TSI_FRAC_SECOND
-# SQL_FN_TSI_SECOND
-# SQL_FN_TSI_MINUTE
-# SQL_FN_TSI_HOUR
-# SQL_FN_TSI_DAY
-# SQL_FN_TSI_WEEK
-# SQL_FN_TSI_MONTH
-# SQL_FN_TSI_QUARTER
-# SQL_FN_TSI_YEAR

-# -#

An FIPS Transitional level–conformant driver will always return a bitmask in which all of these bits are set.

-#
SQL_TIMEDATE_FUNCTIONS
-# (ODBC 1.0) -#

The information type was introduced in ODBC 1.0; each bitmask is labeled with the version in which it was introduced.

-#
An SQLUINTEGER bitmask enumerating the scalar date and time functions supported by the driver and associated data source. -#

The following bitmasks are used to determine which date and time functions are supported:

-# -#

SQL_FN_TD_CURRENT_DATE ODBC 3.0)
-# SQL_FN_TD_CURRENT_TIME (ODBC 3.0)
-# SQL_FN_TD_CURRENT_TIMESTAMP (ODBC 3.0)
-# SQL_FN_TD_CURDATE (ODBC 1.0)
-# SQL_FN_TD_CURTIME (ODBC 1.0)
-# SQL_FN_TD_DAYNAME (ODBC 2.0)
-# SQL_FN_TD_DAYOFMONTH (ODBC 1.0)
-# SQL_FN_TD_DAYOFWEEK (ODBC 1.0)
-# SQL_FN_TD_DAYOFYEAR (ODBC 1.0)
-# SQL_FN_TD_EXTRACT (ODBC 3.0)
-# SQL_FN_TD_HOUR (ODBC 1.0)
-# SQL_FN_TD_MINUTE (ODBC 1.0)
-# SQL_FN_TD_MONTH (ODBC 1.0)
-# SQL_FN_TD_MONTHNAME (ODBC 2.0)
-# SQL_FN_TD_NOW (ODBC 1.0)
-# SQL_FN_TD_QUARTER (ODBC 1.0)
-# SQL_FN_TD_SECOND (ODBC 1.0)
-# SQL_FN_TD_TIMESTAMPADD (ODBC 2.0)
-# SQL_FN_TD_TIMESTAMPDIFF (ODBC 2.0)
-# SQL_FN_TD_WEEK (ODBC 1.0)
-# SQL_FN_TD_YEAR (ODBC 1.0)

-#
SQL_TXN_CAPABLE
-# (ODBC 1.0) -#

The information type was introduced in ODBC 1.0; each return value is labeled with the version in which it was introduced.

-#
An SQLUSMALLINT value describing the transaction support in the driver or data source: -#

SQL_TC_NONE = Transactions not supported. (ODBC 1.0)

-# -#

SQL_TC_DML = Transactions can contain only Data Manipulation Language (DML) statements (SELECT, INSERT, UPDATE, DELETE). Data Definition Language (DDL) statements encountered in a transaction cause an error. (ODBC 1.0)

-# -#

SQL_TC_DDL_COMMIT = Transactions can contain only DML statements. DDL statements (CREATE TABLE, DROP INDEX, and so on) encountered in a transaction cause the transaction to be committed. (ODBC 2.0)

-# -#

SQL_TC_DDL_IGNORE = Transactions can contain only DML statements. DDL statements encountered in a transaction are ignored. (ODBC 2.0)

-# -#

SQL_TC_ALL = Transactions can contain DDL statements and DML statements in any order. (ODBC 1.0)

-# -#

(Because support of transactions is mandatory in SQL-92, an SQL-92 conformant driver [any level] will never return SQL_TC_NONE.)

-#
SQL_TXN_ISOLATION_OPTION
-# (ODBC 1.0)
An SQLUINTEGER bitmask enumerating the transaction isolation levels available from the driver or data source. -#

The following bitmasks are used in conjunction with the flag to determine which options are supported:

-# -#

SQL_TXN_READ_UNCOMMITTED
-# SQL_TXN_READ_COMMITTED
-# SQL_TXN_REPEATABLE_READ
-# SQL_TXN_SERIALIZABLE

-# -#

For descriptions of these isolation levels, see the description of SQL_DEFAULT_TXN_ISOLATION.

-# -#

To set the transaction isolation level, an application calls SQLSetConnectAttr to set the SQL_ATTR_TXN_ISOLATION attribute. For more information, see SQLSetConnectAttr.

-# -#

An SQL-92 Entry level–conformant driver will always return SQL_TXN_SERIALIZABLE as supported. A FIPS Transitional level–conformant driver will always return all of these options as supported.

-#
SQL_UNION
-# (ODBC 2.0)
An SQLUINTEGER bitmask enumerating the support for the UNION clause: -#

SQL_U_UNION = The data source supports the UNION clause.

-# -#

SQL_U_UNION_ALL = The data source supports the ALL keyword in the UNION clause. (SQLGetInfo returns both SQL_U_UNION and SQL_U_UNION_ALL in this case.)

-# -#

An SQL-92 Entry level–conformant driver will always return both of these options as supported.

-#
SQL_USER_NAME
-# (ODBC 1.0)
A character string with the name used in a particular database, which can be different from the login name.
SQL_XOPEN_CLI_YEAR
-# (ODBC 3.0)
A character string that indicates the year of publication of the X/Open specification with which the version of the ODBC Driver Manager fully complies.
-# -#

Code Example

-# -#

SQLGetInfo returns lists of supported options as an SQLUINTEGER bitmask in *InfoValuePtr. The bitmask for each option is used in conjunction with the flag to determine whether the option is supported.

-# -#

For example, an application could use the following code to determine whether the SUBSTRING scalar function is supported by the driver associated with the connection:

-# -#
SQLUINTEGER    fFuncs;
-#	
-#	SQLGetInfo(hdbc,
-#	   SQL_STRING_FUNCTIONS,
-#	   (SQLPOINTER)&fFuncs,
-#	   sizeof(fFuncs),
-#	   NULL);
-#	
-#	if (fFuncs & SQL_FN_STR_SUBSTRING)   /* SUBSTRING supported */
-#	      ;
-#	else                                 /* SUBSTRING not supported */
-#	      ;
-# -#

Related Functions

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
For information aboutSee
Returning the setting of a connection attributeSQLGetConnectAttr
Determining whether a driver supports a functionSQLGetFunctions
Returning the setting of a statement attributeSQLGetStmtAttr
Returning information about a data source's data typesSQLGetTypeInfo
-#

-# -#
-# -# -# -}; - -print <{$name}; - my $type = $p->{type}; - $type =~ /^(Char|YesNo|Short|Long|Bitmask)$/ - or die "$name: bad type $type"; - my $defstr = $type eq "YesNo" ? q("N") : $type eq "Char" ? q("") : q(0); - my $s = <{omit}) { - $s ="#if 0\n" . $s . "#endif\n"; - } - print $s; -}; - -print < "UNDEF", - type => q(Undef), - nullable => q(true), - position => 0, - }, -# -# -# -# SQLGetTypeInfo -# -# -# -# -# -# -#
-#
-# -# -# -# -#
-# ODBC Programmer's Reference -#
-#
-#
-#
-# -#

SQLGetTypeInfo

-# -#

Conformance

-# -#

Version Introduced: ODBC 1.0
-# Standards Compliance: ISO 92

-# -#

Summary

-# -#

SQLGetTypeInfo returns information about data types supported by the data source. The driver returns the information in the form of an SQL result set. The data types are intended for use in Data Definition Language (DDL) statements.

-# -#

Important   Applications must use the type names returned in the TYPE_NAME column of the SQLGetTypeInfo result set in ALTER TABLE and CREATE TABLE statements. SQLGetTypeInfo may return more than one row with the same value in the DATA_TYPE column.

-# -#

Syntax

-# -#
SQLRETURN SQLGetTypeInfo(
-#	     SQLHSTMT     StatementHandle,
-#	     SQLSMALLINT     DataType);
-# -#

Arguments -# -#

-#
StatementHandle
-# -#
[Input]
-# Statement handle for the result set.
-# -#
DataType
-# -#
[Input]
-# The SQL data type. This must be one of the values in the "SQL Data Types" section of Appendix D: Data Types, or a driver-specific SQL data type. SQL_ALL_TYPES specifies that information about all data types should be returned.
-#
-# -#

Returns

-# -#

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

-# -#

Diagnostics

-# -#

When SQLGetTypeInfo returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value can be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_STMT and a Handle of StatementHandle. The following table lists the SQLSTATE values commonly returned by SQLGetTypeInfo and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQLSTATEErrorDescription
01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
01S02Option value changedA specified statement attribute was invalid because of implementation working conditions, so a similar value was temporarily substituted. (Call SQLGetStmtAttr to determine the temporarily substituted value.) The substitute value is valid for the StatementHandle until the cursor is closed. The statement attributes that can be changed are: SQL_ATTR_CONCURRENCY, SQL_ATTR_CURSOR_TYPE, SQL_ATTR_KEYSET_SIZE, SQL_ATTR_MAX_LENGTH, SQL_ATTR_MAX_ROWS, SQL_ATTR_QUERY_TIMEOUT, and SQL_ATTR_SIMULATE_CURSOR. (Function returns SQL_SUCCESS_WITH_INFO.)
08S01Communication link failureThe communication link between the driver and the data source to which the driver was connected failed before the function completed processing.
24000Invalid cursor stateA cursor was open on the StatementHandle, and SQLFetch or SQLFetchScroll had been called. This error is returned by the Driver Manager if SQLFetch or SQLFetchScroll has not returned SQL_NO_DATA, and is returned by the driver if SQLFetch or SQLFetchScroll has returned SQL_NO_DATA. -#

A result set was open on the StatementHandle, but SQLFetch or SQLFetchScroll had not been called.

-#
40001Serialization failureThe transaction was rolled back due to a resource deadlock with another transaction.
40003Statement completion unknownThe associated connection failed during the execution of this function and the state of the transaction cannot be determined.
HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
HY001Memory allocation errorThe driver was unable to allocate memory required to support execution or completion of the function.
HY004Invalid SQL data typeThe value specified for the argument DataType was neither a valid ODBC SQL data type identifier nor a driver-specific data type identifier supported by the driver.
HY008Operation canceledAsynchronous processing was enabled for the StatementHandle, then the function was called and, before it completed execution, SQLCancel was called on the StatementHandle. Then the function was called again on the StatementHandle. -#

The function was called and, before it completed execution, SQLCancel was called on the StatementHandle from a different thread in a multithread application.

-#
HY010Function sequence error(DM) An asynchronously executing function (not this one) was called for the StatementHandle and was still executing when this function was called. -#

(DM) SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for the StatementHandle and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

-#
HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
HYC00Optional feature not implementedThe combination of the current settings of the SQL_ATTR_CONCURRENCY and SQL_ATTR_CURSOR_TYPE statement attributes was not supported by the driver or data source. -#

The SQL_ATTR_USE_BOOKMARKS statement attribute was set to SQL_UB_VARIABLE, and the SQL_ATTR_CURSOR_TYPE statement attribute was set to a cursor type for which the driver does not support bookmarks.

-#
HYT00Timeout expiredThe query timeout period expired before the data source returned the result set. The timeout period is set through SQLSetStmtAttr, SQL_ATTR_QUERY_TIMEOUT.
HYT01Connection timeout expiredThe connection timeout period expired before the data source responded to the request. The connection timeout period is set through SQLSetConnectAttr, SQL_ATTR_CONNECTION_TIMEOUT.
IM001Driver does not support this function(DM) The driver corresponding to the StatementHandle does not support the function.
-# -#

Comments

-# -#

SQLGetTypeInfo returns the results as a standard result set, ordered by DATA_TYPE and then by how closely the data type maps to the corresponding ODBC SQL data type. Data types defined by the data source take precedence over user-defined data types. Consequently, the sort order is not necessarily consistent but can be generalized as DATA_TYPE first, followed by TYPE_NAME, both ascending. For example, suppose that a data source defined INTEGER and COUNTER data types, where COUNTER is auto-incrementing, and that a user-defined data type WHOLENUM has also been defined. These would be returned in the order INTEGER, WHOLENUM, and COUNTER, because WHOLENUM maps closely to the ODBC SQL data type SQL_INTEGER, while the auto-incrementing data type, even though supported by the data source, does not map closely to an ODBC SQL data type. For information about how this information might be used, see "DDL Statements" in Chapter 8: SQL Statements.

-# -#

If the DataType argument specifies a data type which is valid for the version of ODBC supported by the driver, but is not supported by the driver, then it will return an empty result set.

-# -#

Note   For more information about the general use, arguments, and returned data of ODBC catalog functions, see Chapter 7: Catalog Functions.

-# -#

The following columns have been renamed for ODBC 3.x. The column name changes do not affect backward compatibility because applications bind by column number.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
ODBC 2.0 columnODBC 3.x column
PRECISIONCOLUMN_SIZE
MONEYFIXED_PREC_SCALE
AUTO_INCREMENTAUTO_UNIQUE_VALUE
-# -#

The following columns have been added to the results set returned by SQLGetTypeInfo for ODBC 3.x: -# -#

    -#
  • SQL_DATA_TYPE
  • -# -#
  • INTERVAL_PRECISION
  • -# -#
  • SQL_DATETIME_SUB
  • -# -#
  • NUM_PREC_RADIX
  • -#
-# -#

The following table lists the columns in the result set. Additional columns beyond column 19 (INTERVAL_PRECISION) can be defined by the driver. An application should gain access to driver-specific columns by counting down from the end of the result set rather than specifying an explicit ordinal position. For more information, see "Data Returned by Catalog Functions" in Chapter 7: Catalog Functions.

-# -#

Note   SQLGetTypeInfo might not return all data types. For example, a driver might not return user-defined data types. Applications can use any valid data type, regardless of whether it is returned by SQLGetTypeInfo.

-# -#

The data types returned by SQLGetTypeInfo are those supported by the data source. They are intended for use in Data Definition Language (DDL) statements. Drivers can return result-set data using data types other than the types returned by SQLGetTypeInfo. In creating the result set for a catalog function, the driver might use a data type that is not supported by the data source.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# - { name => "TYPE_NAME", - type => q(Varchar), - length => 20, - nullable => q(false), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "DATA_TYPE", - type => q(Smallint), - length => undef, - nullable => q(false), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "COLUMN_SIZE", - type => q(Integer), - length => undef, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "LITERAL_PREFIX", - type => q(Varchar), - length => 1, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "LITERAL_SUFFIX", - type => q(Varchar), - length => 1, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "CREATE_PARAMS", - type => q(Varchar), - length => 20, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "NULLABLE", - type => q(Smallint), - length => undef, - nullable => q(false), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "CASE_SENSITIVE", - type => q(Smallint), - length => undef, - nullable => q(false), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "SEARCHABLE", - type => q(Smallint), - length => undef, - nullable => q(false), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "UNSIGNED_ATTRIBUTE", - type => q(Smallint), - length => undef, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "FIXED_PREC_SCALE", - type => q(Smallint), - length => undef, - nullable => q(false), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "AUTO_UNIQUE_VALUE", - type => q(Smallint), - length => undef, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "LOCAL_TYPE_NAME", - type => q(Varchar), - length => 20, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "MINIMUM_SCALE", - type => q(Smallint), - length => undef, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "MAXIMUM_SCALE", - type => q(Smallint), - length => undef, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "SQL_DATA_TYPE", - type => q(Smallint), - length => undef, - nullable => q(false), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "SQL_DATETIME_SUB", - type => q(Smallint), - length => undef, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "NUM_PREC_RADIX", - type => q(Integer), - length => undef, - nullable => q(true), - position => ++$position, - }, -# -# -# -# -# -# -# - { name => "INTERVAL_PRECISION", - type => q(Smallint), - length => undef, - nullable => q(true), - position => ++$position, - }, -#

-# Column name
Column
-# number

-# Data type

-# Comments
TYPE_NAME
-# (ODBC 2.0)
1Varchar
-# not NULL
Data source–dependent data-type name; for example, "CHAR()", "VARCHAR()", "MONEY", "LONG VARBINARY", or "CHAR ( ) FOR BIT DATA". Applications must use this name in CREATE TABLE and ALTER TABLE statements.
DATA_TYPE
-# (ODBC 2.0)
2Smallint
-# not NULL
SQL data type. This can be an ODBC SQL data type or a driver-specific SQL data type. For datetime or interval data types, this column returns the concise data type (such as SQL_TYPE_TIME or SQL_INTERVAL_YEAR_TO_MONTH). For a list of valid ODBC SQL data types, see "SQL Data Types" in Appendix D: Data Types. For information about driver-specific SQL data types, see the driver’s documentation.
COLUMN_SIZE
-# (ODBC 2.0)
3IntegerThe maximum column size that the server supports for this data type. For numeric data, this is the maximum precision. For string data, this is the length in characters. For datetime data types, this is the length in characters of the string representation (assuming the maximum allowed precision of the fractional seconds component). NULL is returned for data types where column size is not applicable. For interval data types, this is the number of characters in the character representation of the interval literal (as defined by the interval leading precision; see "Interval Data Type Length" in Appendix D: Data Types). -#

For more information on column size, see "Column Size, Decimal Digits, Transfer Octet Length, and Display Size" in Appendix D: Data Types.

-#
LITERAL_PREFIX
-# (ODBC 2.0)
4VarcharCharacter or characters used to prefix a literal; for example, a single quotation mark (') for character data types or 0x for binary data types; NULL is returned for data types where a literal prefix is not applicable.
LITERAL_SUFFIX
-# (ODBC 2.0)
5VarcharCharacter or characters used to terminate a literal; for example, a single quotation mark (') for character data types; NULL is returned for data types where a literal suffix is not applicable.
CREATE_PARAMS
-# (ODBC 2.0)
6VarcharA list of keywords, separated by commas, corresponding to each parameter that the application may specify in parentheses when using the name that is returned in the TYPE_NAME field. The keywords in the list can be any of the following: length, precision, or scale. They appear in the order that the syntax requires them to be used. For example, CREATE_PARAMS for DECIMAL would be "precision,scale"; CREATE_PARAMS for VARCHAR would equal "length." NULL is returned if there are no parameters for the data type definition; for example, INTEGER. -#

The driver supplies the CREATE_PARAMS text in the language of the country where it is used.

-#
NULLABLE
-# (ODBC 2.0)
7Smallint
-# not NULL
Whether the data type accepts a NULL value: -#

SQL_NO_NULLS if the data type does not accept NULL values.

-# -#

SQL_NULLABLE if the data type accepts NULL values.

-# -#

SQL_NULLABLE_UNKNOWN if it is not known whether the column accepts NULL values.

-#
CASE_SENSITIVE
-# (ODBC 2.0)
8Smallint
-# not NULL
Whether a character data type is case-sensitive in collations and comparisons: -#

SQL_TRUE if the data type is a character data type and is case-sensitive.

-# -#

SQL_FALSE if the data type is not a character data type or is not case-sensitive.

-#
SEARCHABLE
-# (ODBC 2.0)
9Smallint
-# not NULL
How the data type is used in a WHERE clause: -#

SQL_PRED_NONE if the column cannot be used in a WHERE clause. (This is the same as the SQL_UNSEARCHABLE value in ODBC 2.x.)

-# -#

SQL_PRED_CHAR if the column can be used in a WHERE clause, but only with the LIKE predicate. (This is the same as the SQL_LIKE_ONLY value in ODBC 2.x.)

-# -#

SQL_PRED_BASIC if the column can be used in a WHERE clause with all the comparison operators except LIKE (comparison, quantified comparison, BETWEEN, DISTINCT, IN, MATCH, and UNIQUE). (This is the same as the SQL_ALL_EXCEPT_LIKE value in ODBC 2.x.)

-# -#

SQL_SEARCHABLE if the column can be used in a WHERE clause with any comparison operator.

-#
UNSIGNED_ATTRIBUTE
-# (ODBC 2.0)
10SmallintWhether the data type is unsigned: -#

SQL_TRUE if the data type is unsigned.

-# -#

SQL_FALSE if the data type is signed.

-# -#

NULL is returned if the attribute is not applicable to the data type or the data type is not numeric.

-#
FIXED_PREC_SCALE
-# (ODBC 2.0)
11Smallint
-# not NULL
Whether the data type has predefined fixed precision and scale (which are data source–specific), such as a money data type: -#

SQL_TRUE if it has predefined fixed precision and scale.

-# -#

SQL_FALSE if it does not have predefined fixed precision and scale.

-#
AUTO_UNIQUE_VALUE
-# (ODBC 2.0)
12SmallintWhether the data type is autoincrementing: -#

SQL_TRUE if the data type is autoincrementing.

-# -#

SQL_FALSE if the data type is not autoincrementing.

-# -#

NULL is returned if the attribute is not applicable to the data type or the data type is not numeric.

-# -#

An application can insert values into a column having this attribute, but typically cannot update the values in the column.

-# -#

When an insert is made into an auto-increment column, a unique value is inserted into the column at insert time. The increment is not defined, but is data source–specific. An application should not assume that an auto-increment column starts at any particular point or increments by any particular value.

-#
LOCAL_TYPE_NAME
-# (ODBC 2.0)
13VarcharLocalized version of the data source–dependent name of the data type. NULL is returned if a localized name is not supported by the data source. This name is intended for display only, such as in dialog boxes.
MINIMUM_SCALE
-# (ODBC 2.0)
14SmallintThe minimum scale of the data type on the data source. If a data type has a fixed scale, the MINIMUM_SCALE and MAXIMUM_SCALE columns both contain this value. For example, an SQL_TYPE_TIMESTAMP column might have a fixed scale for fractional seconds. NULL is returned where scale is not applicable. For more information, see "Column Size, Decimal Digits, Transfer Octet Length, and Display Size" in Appendix D: Data Types.
MAXIMUM_SCALE
-# (ODBC 2.0)
15SmallintThe maximum scale of the data type on the data source. NULL is returned where scale is not applicable. If the maximum scale is not defined separately on the data source, but is instead defined to be the same as the maximum precision, this column contains the same value as the COLUMN_SIZE column. For more information, see "Column Size, Decimal Digits, Transfer Octet Length, and Display Size" in Appendix D: Data Types.
SQL_DATA_TYPE
-# (ODBC 3.0)
16Smallint NOT NULLThe value of the SQL data type as it appears in the SQL_DESC_TYPE field of the descriptor. This column is the same as the DATA_TYPE column, except for interval and datetime data types. -#

For interval and datetime data types, the SQL_DATA_TYPE field in the result set will return SQL_INTERVAL or SQL_DATETIME, and the SQL_DATETIME_SUB field will return the subcode for the specific interval or datetime data type. (See Appendix D: Data Types.)

-#
SQL_DATETIME_SUB
-# (ODBC 3.0)
17SmallintWhen the value of SQL_DATA_TYPE is SQL_DATETIME or SQL_INTERVAL, this column contains the datetime/interval subcode. For data types other than datetime and interval, this field is NULL. -#

For interval or datetime data types, the SQL_DATA_TYPE field in the result set will return SQL_INTERVAL or SQL_DATETIME, and the SQL_DATETIME_SUB field will return the subcode for the specific interval or datetime data type. (See Appendix D: Data Types.)

-#
NUM_PREC_RADIX
-# (ODBC 3.0)
18IntegerIf the data type is an approximate numeric type, this column contains the value 2 to indicate that COLUMN_SIZE specifies a number of bits. For exact numeric types, this column contains the value 10 to indicate that COLUMN_SIZE specifies a number of decimal digits. Otherwise, this column is NULL.
INTERVAL_PRECISION
-# (ODBC 3.0)
19SmallintIf the data type is an interval data type, then this column contains the value of the interval leading precision. (See "Interval Data Type Precision" in Appendix D: Data Types.) Otherwise, this column is NULL.
-# -#

Attribute information can apply to data types or to specific columns in a result set. SQLGetTypeInfo returns information about attributes associated with data types; SQLColAttribute returns information about attributes associated with columns in a result set.

-# -#

Related Functions

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
For information aboutSee
Binding a buffer to a column in a result setSQLBindCol
Canceling statement processingSQLCancel
Returning information about a column in a result setSQLColAttribute
Fetching a block of data or scrolling through a result setSQLFetchScroll
Fetching a single row or a block of data in a forward-only directionSQLFetch
Returning information about a driver or data sourceSQLGetInfo
-#

-# -#
-# -# -# -); - -my $i4 = " " x 4; -print "// template-begin\n"; -print "#define Varchar Char\n"; -print "#define Smallint Integer\n"; -print "const SqlTypeInfo::Column\nSqlTypeInfo::m_columnList[] = {\n"; -for my $p (@typeinfo) { - print "$i4\{\t$p->{position},\n"; - print "\t\"$p->{name}\",\n"; - my $type = $p->{type}; - if ($p->{position} == 0) { - print "\tSqlType()\n"; - } elsif (! $p->{length}) { - print "\tSqlType(SqlType::$type, $p->{nullable})\n"; - } else { - print "\tSqlType(SqlType::$type, $p->{length}, $p->{nullable})\n"; - } - my $c = $p == $typeinfo[-1] ? "" : ","; - print "$i4\}$c\n"; -} -print "};\n"; -print "#undef Varchar\n"; -print "#undef Smallint\n"; -print "const unsigned\nSqlTypeInfo::m_columnCount = $position;\n"; -print "// template-end\n"; - -# vim: set sw=4: diff --git a/ndb/src/old_files/client/odbc/docs/handleattr.pl b/ndb/src/old_files/client/odbc/docs/handleattr.pl deleted file mode 100644 index 892d34b105b..00000000000 --- a/ndb/src/old_files/client/odbc/docs/handleattr.pl +++ /dev/null @@ -1,2232 +0,0 @@ -# usage: perl Attr.data X (X = Env,Dbc,Stmt) -# prints template for AttrX.cpp -use strict; -my $type = shift; -my $order = 0; - -# -# odbcsqlsetenvattr.htm -# -my $attrEnv = { -# -# -# -# SQLSetEnvAttr -# -# -# -# -# -# -#
-#
-# -# -# -# -#
-# ODBC Programmer's Reference -#
-#
-#
-#
-# -#

SQLSetEnvAttr

-# -#

Conformance

-# -#

Version Introduced: ODBC 3.0
-# Standards Compliance: ISO 92

-# -#

Summary

-# -#

SQLSetEnvAttr sets attributes that govern aspects of environments.

-# -#

Syntax

-# -#
SQLRETURN SQLSetEnvAttr(
-#	     SQLHENV     EnvironmentHandle,
-#	     SQLINTEGER     Attribute,
-#	     SQLPOINTER     ValuePtr,
-#	     SQLINTEGER     StringLength);
-# -#

Arguments -# -#

-#
EnvironmentHandle
-# -#
[Input]
-# Environment handle.
-# -#
Attribute
-# -#
[Input]
-# Attribute to set, listed in "Comments."
-# -#
ValuePtr
-# -#
[Input]
-# Pointer to the value to be associated with Attribute. Depending on the value of Attribute, ValuePtr will be a 32-bit integer value or point to a null-terminated character string.
-# -#
StringLength
-# -#
[Input] If ValuePtr points to a character string or a binary buffer, this argument should be the length of *ValuePtr. If ValuePtr is an integer, StringLength is ignored.
-#
-# -#

Returns

-# -#

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

-# -#

Diagnostics

-# -#

When SQLSetEnvAttr returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value can be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_ENV and a Handle of EnvironmentHandle. The following table lists the SQLSTATE values commonly returned by SQLSetEnvAttr and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise. If a driver does not support an environment attribute, the error can be returned only during connect time.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQLSTATEErrorDescription
01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
01S02Option value changedThe driver did not support the value specified in ValuePtr and substituted a similar value. (Function returns SQL_SUCCESS_WITH_INFO.)
HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
HY001Memory allocation
-# error
The driver was unable to allocate memory required to support execution or completion of the function.
HY009Invalid use of null pointerThe Attribute argument identified an environment attribute that required a string value, and the ValuePtr argument was a null pointer.
HY010Function sequence error(DM) A connection handle has been allocated on EnvironmentHandle.
HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
HY024Invalid attribute valueGiven the specified Attribute value, an invalid value was specified in ValuePtr.
HY090Invalid string or buffer lengthThe StringLength argument was less than 0 but was not SQL_NTS.
HY092Invalid attribute/option identifier(DM) The value specified for the argument Attribute was not valid for the version of ODBC supported by the driver.
HYC00Optional feature not implementedThe value specified for the argument Attribute was a valid ODBC environment attribute for the version of ODBC supported by the driver, but was not supported by the driver. -#

(DM) The Attribute argument was SQL_ATTR_OUTPUT_NTS, and ValuePtr was SQL_FALSE.

-#
-# -#

Comments

-# -#

An application can call SQLSetEnvAttr only if no connection handle is allocated on the environment. All environment attributes successfully set by the application for the environment persist until SQLFreeHandle is called on the environment. More than one environment handle can be allocated simultaneously in ODBC 3.x.

-# -#

The format of information set through ValuePtr depends on the specified Attribute. SQLSetEnvAttr will accept attribute information in one of two different formats: a null-terminated character string or a 32-bit integer value. The format of each is noted in the attribute's description.

-# -#

There are no driver-specific environment attributes.

-# -#

Connection attributes cannot be set by a call to SQLSetEnvAttr. Attempting to do so will return SQLSTATE HY092 (Invalid attribute/option identifier).

-#
-# -# -# -# -# -# -# -# -# -# - SQL_ATTR_CONNECTION_POOLING => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_CP_OFF SQL_CP_ONE_PER_DRIVER SQL_CP_ONE_PER_HENV) ], - default => q(SQL_CP_OFF), - mode => 'rw', - order => ++$order, - }, -# -# -# -# - SQL_ATTR_CP_MATCH => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_CP_STRICT_MATCH SQL_CP_RELAXED_MATCH) ], - default => q(SQL_CP_STRICT_MATCH), - mode => 'rw', - order => ++$order, - }, -# -# -# -# - SQL_ATTR_ODBC_VERSION => { - type => q(SQLINTEGER), - ptr => 0, - value => [ qw(SQL_OV_ODBC3 SQL_OV_ODBC2) ], - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# - SQL_ATTR_OUTPUT_NTS => { - type => q(SQLINTEGER), - ptr => 0, - value => [ qw(SQL_FALSE SQL_TRUE) ], - default => q(SQL_TRUE), - mode => 'rw', - order => ++$order, - } -#
AttributeValuePtr contents
SQL_ATTR_CONNECTION_POOLING
-# (ODBC 3.0)
A 32-bit SQLUINTEGER value that enables or disables connection pooling at the environment level. The following values are used: -#

SQL_CP_OFF = Connection pooling is turned off. This is the default.

-# -#

SQL_CP_ONE_PER_DRIVER = A single connection pool is supported for each driver. Every connection in a pool is associated with one driver.

-# -#

SQL_CP_ONE_PER_HENV = A single connection pool is supported for each environment. Every connection in a pool is associated with one environment.

-# -#

Connection pooling is enabled by calling SQLSetEnvAttr to set the SQL_ATTR_CONNECTION_POOLING attribute to SQL_CP_ONE_PER_DRIVER or SQL_CP_ONE_PER_HENV. This call must be made before the application allocates the shared environment for which connection pooling is to be enabled. The environment handle in the call to SQLSetEnvAttr is set to null, which makes SQL_ATTR_CONNECTION_POOLING a process-level attribute. After connection pooling is enabled, the application then allocates an implicit shared environment by calling SQLAllocHandle with the InputHandle argument set to SQL_HANDLE_ENV.

-# -#

After connection pooling has been enabled and a shared environment has been selected for an application, SQL_ATTR_CONNECTION_POOLING cannot be reset for that environment, because SQLSetEnvAttr is called with a null environment handle when setting this attribute. If this attribute is set while connection pooling is already enabled on a shared environment, the attribute affects only shared environments that are allocated subsequently.

-# -#

For more information, see "ODBC Connection Pooling" in Chapter 6: Connecting to a Data Source or Driver.

-#
SQL_ATTR_CP_MATCH
-# (ODBC 3.0)
A 32-bit SQLUINTEGER value that determines how a connection is chosen from a connection pool. When SQLConnect or SQLDriverConnect is called, the Driver Manager determines which connection is reused from the pool. The Driver Manager attempts to match the connection options in the call and the connection attributes set by the application to the keywords and connection attributes of the connections in the pool. The value of this attribute determines the level of precision of the matching criteria. -#

The following values are used to set the value of this attribute:

-# -#

SQL_CP_STRICT_MATCH = Only connections that exactly match the connection options in the call and the connection attributes set by the application are reused. This is the default.

-# -#

SQL_CP_RELAXED_MATCH = Connections with matching connection string keywords can be used. Keywords must match, but not all connection attributes must match.

-# -#

For more information on how the Driver Manager performs the match in connecting to a pooled connection, see SQLConnect. For more information on connection pooling, see "ODBC Connection Pooling" in Chapter 6: Connecting to a Data Source or Driver.

-#
SQL_ATTR_ODBC_VERSION
-# (ODBC 3.0)
A 32-bit integer that determines whether certain functionality exhibits ODBC 2.x behavior or ODBC 3.x behavior. The following values are used to set the value of this attribute: -#

SQL_OV_ODBC3 = The Driver Manager and driver exhibit the following ODBC 3.x behavior: -# -#

    -#
  • The driver returns and expects ODBC 3.x codes for date, time, and timestamp.
  • -# -#
  • The driver returns ODBC 3.x SQLSTATE codes when SQLError, SQLGetDiagField, or SQLGetDiagRec is called.
  • -# -#
  • The CatalogName argument in a call to SQLTables accepts a search pattern.
  • -#
-# -#

SQL_OV_ODBC2 = The Driver Manager and driver exhibit the following ODBC 2.x behavior. This is especially useful for an ODBC 2.x application working with an ODBC 3.x driver. -# -#

    -#
  • The driver returns and expects ODBC 2.x codes for date, time, and timestamp.
  • -# -#
  • The driver returns ODBC 2.x SQLSTATE codes when SQLError, SQLGetDiagField, or SQLGetDiagRec is called.
  • -# -#
  • The CatalogName argument in a call to SQLTables does not accept a search pattern.
  • -#
-# -#

An application must set this environment attribute before calling any function that has an SQLHENV argument, or the call will return SQLSTATE HY010 (Function sequence error). It is driver-specific whether or not additional behaviors exist for these environmental flags. -# -#

-#
SQL_ATTR_OUTPUT_NTS
-# (ODBC 3.0)
A 32-bit integer that determines how the driver returns string data. If SQL_TRUE, the driver returns string data null-terminated. If SQL_FALSE, the driver does not return string data null-terminated. -#

This attribute defaults to SQL_TRUE. A call to SQLSetEnvAttr to set it to SQL_TRUE returns SQL_SUCCESS. A call to SQLSetEnvAttr to set it to SQL_FALSE returns SQL_ERROR and SQLSTATE HYC00 (Optional feature not implemented).

-#
-# -#

Related Functions

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
For information aboutSee
Allocating a handleSQLAllocHandle
Returning the setting of an environment attributeSQLGetEnvAttr
-#

-# -#
-# -# -# -}; - -# -# odbcsqlsetconnectattr.htm -# -my $attrDbc = { -# -# -# -# SQLSetConnectAttr -# -# -# -# -# -# -#
-#
-# -# -# -# -#
-# ODBC Programmer's Reference -#
-#
-#
-#
-# -#

SQLSetConnectAttr

-# -#

Conformance

-# -#

Version Introduced: ODBC 3.0
-# Standards Compliance: ISO 92

-# -#

Summary

-# -#

SQLSetConnectAttr sets attributes that govern aspects of connections.

-# -#

Note   For more information about what the Driver Manager maps this function to when an ODBC 3.x application is working with an ODBC 2.x driver, see "Mapping Replacement Functions for Backward Compatibility of Applications" in Chapter 17: Programming Considerations.

-# -#

Syntax

-# -#
SQLRETURN SQLSetConnectAttr(
-#	     SQLHDBC     ConnectionHandle,
-#	     SQLINTEGER     Attribute,
-#	     SQLPOINTER     ValuePtr,
-#	     SQLINTEGER     StringLength);
-# -#

Arguments -# -#

-#
ConnectionHandle
-# -#
[Input]
-# Connection handle.
-# -#
Attribute
-# -#
[Input]
-# Attribute to set, listed in "Comments."
-# -#
ValuePtr
-# -#
[Input]
-# Pointer to the value to be associated with Attribute. Depending on the value of Attribute, ValuePtr will be a 32-bit unsigned integer value or will point to a null-terminated character string. Note that if the Attribute argument is a driver-specific value, the value in ValuePtr may be a signed integer.
-# -#
StringLength
-# -#
[Input]
-# If Attribute is an ODBC-defined attribute and ValuePtr points to a character string or a binary buffer, this argument should be the length of *ValuePtr. If Attribute is an ODBC-defined attribute and ValuePtr is an integer, StringLength is ignored. -# -#

If Attribute is a driver-defined attribute, the application indicates the nature of the attribute to the Driver Manager by setting the StringLength argument. StringLength can have the following values: -# -# -#

    -#
  • If ValuePtr is a pointer to a character string, then StringLength is the length of the string or SQL_NTS.
  • -# -#
  • If ValuePtr is a pointer to a binary buffer, then the application places the result of the SQL_LEN_BINARY_ATTR(length) macro in StringLength. This places a negative value in StringLength.
  • -# -#
  • If ValuePtr is a pointer to a value other than a character string or a binary string, then StringLength should have the value SQL_IS_POINTER.
  • -# -#
  • If ValuePtr contains a fixed-length value, then StringLength is either SQL_IS_INTEGER or SQL_IS_UINTEGER, as appropriate.
  • -#
-#
-#
-# -#

Returns

-# -#

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

-# -#

Diagnostics

-# -#

When SQLSetConnectAttr returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value can be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_DBC and a Handle of ConnectionHandle. The following table lists the SQLSTATE values commonly returned by SQLSetConnectAttr and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

-# -#

The driver can return SQL_SUCCESS_WITH_INFO to provide information about the result of setting an option.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQLSTATEErrorDescription
01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
01S02Option value changedThe driver did not support the value specified in ValuePtr and substituted a similar value. (Function returns SQL_SUCCESS_WITH_INFO.)
08002Connection name in useThe Attribute argument was SQL_ATTR_ODBC_CURSORS, and the driver was already connected to the data source.
08003Connection does not exist(DM) An Attribute value was specified that required an open connection, but the ConnectionHandle was not in a connected state.
08S01Communication link failureThe communication link between the driver and the data source to which the driver was connected failed before the function completed processing.
24000Invalid cursor stateThe Attribute argument was SQL_ATTR_CURRENT_CATALOG, and a result set was pending.
3D000Invalid catalog nameThe Attribute argument was SQL_CURRENT_CATALOG, and the specified catalog name was invalid.
HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
HY001Memory allocation errorThe driver was unable to allocate memory required to support execution or completion of the function.
HY009Invalid use of null pointerThe Attribute argument identified a connection attribute that required a string value, and the ValuePtr argument was a null pointer.
HY010Function sequence error(DM) An asynchronously executing function was called for a StatementHandle associated with the ConnectionHandle and was still executing when SQLSetConnectAttr was called. -#

(DM) SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for a StatementHandle associated with the ConnectionHandle and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

-# -#

(DM) SQLBrowseConnect was called for the ConnectionHandle and returned SQL_NEED_DATA. This function was called before SQLBrowseConnect returned SQL_SUCCESS_WITH_INFO or SQL_SUCCESS.

-#
HY011Attribute cannot be set nowThe Attribute argument was SQL_ATTR_TXN_ISOLATION, and a transaction was open.
HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
HY024Invalid attribute valueGiven the specified Attribute value, an invalid value was specified in ValuePtr. (The Driver Manager returns this SQLSTATE only for connection and statement attributes that accept a discrete set of values, such as SQL_ATTR_ACCESS_MODE or SQL_ATTR_ASYNC_ENABLE. For all other connection and statement attributes, the driver must verify the value specified in ValuePtr.) -#

The Attribute argument was SQL_ATTR_TRACEFILE or SQL_ATTR_TRANSLATE_LIB, and ValuePtr was an empty string.

-#
HY090Invalid string or buffer length(DM) *ValuePtr is a character string, and the StringLength argument was less than 0 but was not SQL_NTS.
HY092Invalid attribute/option identifier(DM) The value specified for the argument Attribute was not valid for the version of ODBC supported by the driver. -#

(DM) The value specified for the argument Attribute was a read-only attribute.

-#
HYC00Optional feature not implementedThe value specified for the argument Attribute was a valid ODBC connection or statement attribute for the version of ODBC supported by the driver but was not supported by the driver.
HYT01Connection timeout expiredThe connection timeout period expired before the data source responded to the request. The connection timeout period is set through SQLSetConnectAttr, SQL_ATTR_CONNECTION_TIMEOUT.
IM001Driver does not support this function(DM) The driver associated with the ConnectionHandle does not support the function.
IM009Unable to load translation DLLThe driver was unable to load the translation DLL that was specified for the connection. This error can be returned only when Attribute is SQL_ATTR_TRANSLATE_LIB.
-# -#

When Attribute is a statement attribute, SQLSetConnectAttr can return any SQLSTATEs returned by SQLSetStmtAttr.

-# -#

Comments

-# -#

For general information about connection attributes, see "Connection Attributes" in Chapter 6: Connecting to a Data Source or Driver.

-# -#

The currently defined attributes and the version of ODBC in which they were introduced are shown in the table later in this section; it is expected that more attributes will be defined to take advantage of different data sources. A range of attributes is reserved by ODBC; driver developers must reserve values for their own driver-specific use from X/Open.

-# -#

Note   The ability to set statement attributes at the connection level by calling SQLSetConnectAttr has been deprecated in ODBC 3.x. ODBC 3.x applications should never set statement attributes at the connection level. ODBC 3.x statement attributes cannot be set at the connection level, with the exception of the SQL_ATTR_METADATA_ID and SQL_ATTR_ASYNC_ENABLE attributes, which are both connection attributes and statement attributes and can be set at either the connection level or the statement level.

-# -#

ODBC 3.x drivers need only support this functionality if they should work with ODBC 2.x applications that set ODBC 2.x statement options at the connection level. For more information, see "SQLSetConnectOption Mapping" in Appendix G: Driver Guidelines for Backward Compatibility.

-# -#

An application can call SQLSetConnectAttr at any time between the time the connection is allocated and freed. All connection and statement attributes successfully set by the application for the connection persist until SQLFreeHandle is called on the connection. For example, if an application calls SQLSetConnectAttr before connecting to a data source, the attribute persists even if SQLSetConnectAttr fails in the driver when the application connects to the data source; if an application sets a driver-specific attribute, the attribute persists even if the application connects to a different driver on the connection.

-# -#

Some connection attributes can be set only before a connection has been made; others can be set only after a connection has been made. The following table indicates those connection attributes that must be set either before or after a connection has been made. Either indicates that the attribute can be set either before or after connection.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
AttributeSet before or after connection?
SQL_ATTR_ACCESS_MODEEither[1]
SQL_ATTR_ASYNC_ENABLEEither[2]
SQL_ATTR_AUTOCOMMITEither
SQL_ATTR_CONNECTION_TIMEOUTEither
SQL_ATTR_CURRENT_CATALOGEither[1]
SQL_ATTR_LOGIN_TIMEOUTBefore
SQL_ATTR_METADATA_IDEither
SQL_ATTR_ODBC_CURSORSBefore
SQL_ATTR_PACKET_SIZEBefore
SQL_ATTR_QUIET_MODEEither
SQL_ATTR_TRACEEither
SQL_ATTR_TRACEFILEEither
SQL_ATTR_TRANSLATE_LIBAfter
SQL_ATTR_TRANSLATE_OPTIONAfter
SQL_ATTR_TXN_ISOLATIONEither[3]
-# -#

[1]   SQL_ATTR_ACCESS_MODE and SQL_ATTR_CURRENT_CATALOG can be set before or after connecting, depending on the driver. However, interoperable applications set them before connecting because some drivers do not support changing these after connecting.

-#

[2]   SQL_ATTR_ASYNC_ENABLE must be set before there is an active statement.

-#

[3]   SQL_ATTR_TXN_ISOLATION can be set only if there are no open transactions on the connection. Some connection attributes support substitution of a similar value if the data source does not support the value specified in *ValuePtr. In such cases, the driver returns SQL_SUCCESS_WITH_INFO and SQLSTATE 01S02 (Option value changed). For example, if Attribute is SQL_ATTR_PACKET_SIZE and *ValuePtr exceeds the maximum packet size, the driver substitutes the maximum size. To determine the substituted value, an application calls SQLGetConnectAttr.

-#

The format of information set in the *ValuePtr buffer depends on the specified Attribute. SQLSetConnectAttr will accept attribute information in one of two different formats: a null-terminated character string or a 32-bit integer value. The format of each is noted in the attribute's description. Character strings pointed to by the ValuePtr argument of SQLSetConnectAttr have a length of StringLength bytes.

-# -#

The StringLength argument is ignored if the length is defined by the attribute, as is the case for all attributes introduced in ODBC 2.x or earlier.

-#
-# -# -# -# -# -# -# -# -# -# - SQL_ATTR_ACCESS_MODE => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_MODE_READ_ONLY SQL_MODE_READ_WRITE) ], - default => q(SQL_MODE_READ_WRITE), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ASYNC_ENABLE_ON => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_ASYNC_ENABLE_OFF SQL_ASYNC_ENABLE_ON) ], - default => q(SQL_ASYNC_ENABLE_OFF), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_AUTO_IPD => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_FALSE SQL_TRUE) ], - default => undef, - mode => 'ro', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_AUTOCOMMIT => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_AUTOCOMMIT_OFF SQL_AUTOCOMMIT_ON) ], - default => q(SQL_AUTOCOMMIT_ON), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_CONNECTION_DEAD => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_CD_FALSE SQL_CD_TRUE) ], - default => undef, - mode => 'ro', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_CONNECTION_TIMEOUT => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => 0, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_CURRENT_CATALOG => { - type => q(SQLCHAR), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_LOGIN_TIMEOUT => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => 0, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_METADATA_ID => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_FALSE SQL_TRUE) ], - default => q(SQL_FALSE), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ODBC_CURSORS => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_CUR_USE_IF_NEEDED SQL_CUR_USE_ODBC SQL_CUR_USE_DRIVER) ], - default => q(SQL_CUR_USE_DRIVER), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_PACKET_SIZE => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_QUIET_MODE => { - type => q(SQLPOINTER), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_TRACE => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_OPT_TRACE_OFF SQL_OPT_TRACE_ON) ], - default => q(SQL_OPT_TRACE_OFF), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_TRACEFILE => { - type => q(SQLCHAR), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_TRANSLATE_LIB => { - type => q(SQLCHAR), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_TRANSLATE_OPTION => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_TXN_ISOLATION => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -#
AttributeValuePtr contents
SQL_ATTR_ACCESS_MODE
-# (ODBC 1.0)
An SQLUINTEGER value. SQL_MODE_READ_ONLY is used by the driver or data source as an indicator that the connection is not required to support SQL statements that cause updates to occur. This mode can be used to optimize locking strategies, transaction management, or other areas as appropriate to the driver or data source. The driver is not required to prevent such statements from being submitted to the data source. The behavior of the driver and data source when asked to process SQL statements that are not read-only during a read-only connection is implementation-defined. SQL_MODE_READ_WRITE is the default.
SQL_ATTR_ASYNC_ENABLE
-# (ODBC 3.0)
An SQLUINTEGER value that specifies whether a function called with a statement on the specified connection is executed asynchronously: -#

SQL_ASYNC_ENABLE_OFF = Off (the default)
-# SQL_ASYNC_ENABLE_ON = On

-# -#

Setting SQL_ASYNC_ENABLE_ON enables asynchronous execution for all future statement handles allocated on this connection. It is driver-defined whether this enables asynchronous execution for existing statement handles associated with this connection. An error is returned if asynchronous execution is enabled while there is an active statement on the connection.

-# -#

This attribute can be set whether SQLGetInfo with the SQL_ASYNC_MODE information type returns SQL_AM_CONNECTION or SQL_AM_STATEMENT.

-# -#

After a function has been called asynchronously, only the original function, SQLAllocHandle, SQLCancel, SQLGetDiagField, or SQLGetDiagRec can be called on the statement or the connection associated with StatementHandle, until the original function returns a code other than SQL_STILL_EXECUTING. Any other function called on StatementHandle or the connection associated with StatementHandle returns SQL_ERROR with an SQLSTATE of HY010 (Function sequence error). Functions can be called on other statements. For more information, see "Asynchronous Execution" in Chapter 9: Executing Statements.

-# -#

In general, applications should execute functions asynchronously only on single-thread operating systems. On multithread operating systems, applications should execute functions on separate threads rather than executing them asynchronously on the same thread. Drivers that operate only on multithread operating systems do not need to support asynchronous execution.

-# -#

The following functions can be executed asynchronously:

-# -#

SQLBulkOperations
-# SQLColAttribute

-# SQLColumnPrivileges
-# SQLColumns
-# SQLCopyDesc
-# SQLDescribeCol
-# SQLDescribeParam
-# SQLExecDirect
-# SQLExecute
-# SQLFetch
-# SQLFetchScroll
-# SQLForeignKeys
-# SQLGetData
-# SQLGetDescField[1]
-#
SQLGetDescRec[1]
-# SQLGetDiagField

-# SQLGetDiagRec
-# SQLGetTypeInfo

-# SQLMoreResults
-# SQLNumParams
-# SQLNumResultCols
-# SQLParamData
-# SQLPrepare
-# SQLPrimaryKeys
-# SQLProcedureColumns
-# SQLProcedures
-# SQLPutData
-# SQLSetPos
-# SQLSpecialColumns
-# SQLStatistics
-# SQLTablePrivileges
-# SQLTables

-#
SQL_ATTR_AUTO_IPD
-# (ODBC 3.0)
A read-only SQLUINTEGER value that specifies whether automatic population of the IPD after a call to SQLPrepare is supported: -#

SQL_TRUE = Automatic population of the IPD after a call to SQLPrepare is supported by the driver.

-# -#

SQL_FALSE = Automatic population of the IPD after a call to SQLPrepare is not supported by the driver. Servers that do not support prepared statements will not be able to populate the IPD automatically.

-# -#

If SQL_TRUE is returned for the SQL_ATTR_AUTO_IPD connection attribute, the statement attribute SQL_ATTR_ENABLE_AUTO_IPD can be set to turn automatic population of the IPD on or off. If SQL_ATTR_AUTO_IPD is SQL_FALSE, SQL_ATTR_ENABLE_AUTO_IPD cannot be set to SQL_TRUE. The default value of SQL_ATTR_ENABLE_AUTO_IPD is equal to the value of SQL_ATTR_AUTO_IPD.

-# -#

This connection attribute can be returned by SQLGetConnectAttr but cannot be set by SQLSetConnectAttr.

-#
SQL_ATTR_AUTOCOMMIT
-# (ODBC 1.0)
An SQLUINTEGER value that specifies whether to use autocommit or manual-commit mode: -#

SQL_AUTOCOMMIT_OFF = The driver uses manual-commit mode, and the application must explicitly commit or roll back transactions with SQLEndTran.

-# -#

SQL_AUTOCOMMIT_ON = The driver uses autocommit mode. Each statement is committed immediately after it is executed. This is the default. Any open transactions on the connection are committed when SQL_ATTR_AUTOCOMMIT is set to SQL_AUTOCOMMIT_ON to change from manual-commit mode to autocommit mode.

-# -#

For more information, see "Commit Mode" in Chapter 14: Transactions.

-# -#

Important   Some data sources delete the access plans and close the cursors for all statements on a connection each time a statement is committed; autocommit mode can cause this to happen after each nonquery statement is executed or when the cursor is closed for a query. For more information, see the SQL_CURSOR_COMMIT_BEHAVIOR and SQL_CURSOR_ROLLBACK_BEHAVIOR information types in SQLGetInfo and "Effect of Transactions on Cursors and Prepared Statements" in Chapter 14: Transactions.

-# -#

When a batch is executed in autocommit mode, two things are possible. The entire batch can be treated as an autocommitable unit, or each statement in a batch is treated as an autocommitable unit. Certain data sources can support both these behaviors and may provide a way of choosing one or the other. It is driver-defined whether a batch is treated as an autocommitable unit or whether each individual statement within the batch is autocommitable.

-#
SQL_ATTR_CONNECTION_DEAD -#

(ODBC 3.5)

-#
An SQLUINTERGER value that indicates the state of the connection. If SQL_CD_TRUE, the connection has been lost. If SQL_CD_FALSE, the connection is still active.
SQL_ATTR_CONNECTION_TIMEOUT
-# (ODBC 3.0)
An SQLUINTEGER value corresponding to the number of seconds to wait for any request on the connection to complete before returning to the application. The driver should return SQLSTATE HYT00 (Timeout expired) anytime that it is possible to time out in a situation not associated with query execution or login. -#

If ValuePtr is equal to 0 (the default), there is no timeout.

-#
SQL_ATTR_CURRENT_CATALOG
-# (ODBC 2.0)
A character string containing the name of the catalog to be used by the data source. For example, in SQL Server, the catalog is a database, so the driver sends a USE database statement to the data source, where database is the database specified in *ValuePtr. For a single-tier driver, the catalog might be a directory, so the driver changes its current directory to the directory specified in *ValuePtr.
SQL_ATTR_LOGIN_TIMEOUT
-# (ODBC 1.0)
An SQLUINTEGER value corresponding to the number of seconds to wait for a login request to complete before returning to the application. The default is driver-dependent. If ValuePtr is 0, the timeout is disabled and a connection attempt will wait indefinitely. -#

If the specified timeout exceeds the maximum login timeout in the data source, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).

-#
SQL_ATTR_METADATA_ID
-# (ODBC 3.0)
An SQLUINTEGER value that determines how the string arguments of catalog functions are treated. -#

If SQL_TRUE, the string argument of catalog functions are treated as identifiers. The case is not significant. For nondelimited strings, the driver removes any trailing spaces and the string is folded to uppercase. For delimited strings, the driver removes any leading or trailing spaces and takes literally whatever is between the delimiters. If one of these arguments is set to a null pointer, the function returns SQL_ERROR and SQLSTATE HY009 (Invalid use of null pointer).

-# -#

If SQL_FALSE, the string arguments of catalog functions are not treated as identifiers. The case is significant. They can either contain a string search pattern or not, depending on the argument.

-# -#

The default value is SQL_FALSE.

-# -#

The TableType argument of SQLTables, which takes a list of values, is not affected by this attribute.

-# -#

SQL_ATTR_METADATA_ID can also be set on the statement level. (It is the only connection attribute that is also a statement attribute.)

-# -#

For more information, see "Arguments in Catalog Functions" in Chapter 7: Catalog Functions.

-#
SQL_ATTR_ODBC_CURSORS
-# (ODBC 2.0)
An SQLUINTEGER value specifying how the Driver Manager uses the ODBC cursor library: -#

SQL_CUR_USE_IF_NEEDED = The Driver Manager uses the ODBC cursor library only if it is needed. If the driver supports the SQL_FETCH_PRIOR option in SQLFetchScroll, the Driver Manager uses the scrolling capabilities of the driver. Otherwise, it uses the ODBC cursor library.

-# -#

SQL_CUR_USE_ODBC = The Driver Manager uses the ODBC cursor library.

-# -#

SQL_CUR_USE_DRIVER = The Driver Manager uses the scrolling capabilities of the driver. This is the default setting.

-# -#

For more information about the ODBC cursor library, see Appendix F: ODBC Cursor Library.

-#
SQL_ATTR_PACKET_SIZE
-# (ODBC 2.0)
An SQLUINTEGER value specifying the network packet size in bytes. -#

Note   Many data sources either do not support this option or only can return but not set the network packet size.

-# -#

If the specified size exceeds the maximum packet size or is smaller than the minimum packet size, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).

-# -#

If the application sets packet size after a connection has already been made, the driver will return SQLSTATE HY011 (Attribute cannot be set now).

-#
SQL_ATTR_QUIET_MODE
-# (ODBC 2.0)
A 32-bit window handle (hwnd). -#

If the window handle is a null pointer, the driver does not display any dialog boxes.

-# -#

If the window handle is not a null pointer, it should be the parent window handle of the application. This is the default. The driver uses this handle to display dialog boxes.

-# -#

Note   The SQL_ATTR_QUIET_MODE connection attribute does not apply to dialog boxes displayed by SQLDriverConnect.

-#
SQL_ATTR_TRACE
-# (ODBC 1.0)
An SQLUINTEGER value telling the Driver Manager whether to perform tracing: -#

SQL_OPT_TRACE_OFF = Tracing off (the default)

-# -#

SQL_OPT_TRACE_ON = Tracing on

-# -#

When tracing is on, the Driver Manager writes each ODBC function call to the trace file.

-# -#

Note   When tracing is on, the Driver Manager can return SQLSTATE IM013 (Trace file error) from any function.

-# -#

An application specifies a trace file with the SQL_ATTR_TRACEFILE option. If the file already exists, the Driver Manager appends to the file. Otherwise, it creates the file. If tracing is on and no trace file has been specified, the Driver Manager writes to the file SQL.LOG in the root directory.

-# -#

An application can set the variable ODBCSharedTraceFlag to enable tracing dynamically. Tracing is then enabled for all ODBC applications currently running. If an application turns tracing off, it is turned off only for that application.

-# -#

If the Trace keyword in the system information is set to 1 when an application calls SQLAllocHandle with a HandleType of SQL_HANDLE_ENV, tracing is enabled for all handles. It is enabled only for the application that called SQLAllocHandle.

-# -#

Calling SQLSetConnectAttr with an Attribute of SQL_ATTR_TRACE does not require that the ConnectionHandle argument be valid and will not return SQL_ERROR if ConnectionHandle is NULL. This attribute applies to all connections.

-#
SQL_ATTR_TRACEFILE
-# (ODBC 1.0)
A null-terminated character string containing the name of the trace file. -#

The default value of the SQL_ATTR_TRACEFILE attribute is specified with the TraceFile keyword in the system information. For more information, see "ODBC Subkey" in Chapter 19: Configuring Data Sources.

-# -#

Calling SQLSetConnectAttr with an Attribute of SQL_ATTR_ TRACEFILE does not require the ConnectionHandle argument to be valid and will not return SQL_ERROR if ConnectionHandle is invalid. This attribute applies to all connections.

-#
SQL_ATTR_TRANSLATE_LIB
-# (ODBC 1.0)
A null-terminated character string containing the name of a library containing the functions SQLDriverToDataSource and SQLDataSourceToDriver that the driver accesses to perform tasks such as character set translation. This option may be specified only if the driver has connected to the data source. The setting of this attribute will persist across connections. For more information about translating data, see "Translation DLLs" in Chapter 17: Programming Considerations, and Chapter 24: Translation DLL Function Reference.
SQL_ATTR_TRANSLATE_OPTION
-# (ODBC 1.0)
A 32-bit flag value that is passed to the translation DLL. This attribute can be specified only if the driver has connected to the data source. For information about translating data, see "Translation DLLs" in Chapter 17: Programming Considerations.
SQL_ATTR_TXN_ISOLATION
-# (ODBC 1.0)
A 32-bit bitmask that sets the transaction isolation level for the current connection. An application must call SQLEndTran to commit or roll back all open transactions on a connection, before calling SQLSetConnectAttr with this option. -#

The valid values for ValuePtr can be determined by calling SQLGetInfo with InfoType equal to SQL_TXN_ISOLATION_OPTIONS.

-# -#

For a description of transaction isolation levels, see the description of the SQL_DEFAULT_TXN_ISOLATION information type in SQLGetInfo and "Transaction Isolation Levels" in Chapter 14: Transactions.

-#
-# -#

[1]   These functions can be called asynchronously only if the descriptor is an implementation descriptor, not an application descriptor.

-#

Code Example

-# -#

See SQLConnect.

-# -#

Related Functions

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
For information aboutSee
Allocating a handleSQLAllocHandle
Returning the setting of a connection
-# attribute
SQLGetConnectAttr
-#

-# -#
-# -# -# -}; - -# -# odbcsqlsetstmtattr.htm -# -my $attrStmt = { -# -# -# -# SQLSetStmtAttr -# -# -# -# -# -# -#
-#
-# -# -# -# -#
-# ODBC Programmer's Reference -#
-#
-#
-#
-# -#

SQLSetStmtAttr

-# -#

Conformance

-# -#

Version Introduced: ODBC 3.0
-# Standards Compliance: ISO 92

-# -#

Summary

-# -#

SQLSetStmtAttr sets attributes related to a statement.

-# -#

Note   For more information about what the Driver Manager maps this function to when an ODBC 3.x application is working with an ODBC 2.x driver, see "Mapping Replacement Functions for Backward Compatibility of Applications" in Chapter 17: Programming Considerations.

-# -#

Syntax

-# -#
SQLRETURN SQLSetStmtAttr(
-#	     SQLHSTMT     StatementHandle,
-#	     SQLINTEGER     Attribute,
-#	     SQLPOINTER     ValuePtr,
-#	     SQLINTEGER     StringLength);
-# -#

Arguments -# -#

-#
StatementHandle
-# -#
[Input]
-# Statement handle.
-# -#
Attribute
-# -#
[Input]
-# Option to set, listed in "Comments."
-# -#
ValuePtr
-# -#
[Input]
-# Pointer to the value to be associated with Attribute. Depending on the value of Attribute, ValuePtr will be a 32-bit unsigned integer value or a pointer to a null-terminated character string, a binary buffer, or a driver-defined value. If the Attribute argument is a driver-specific value, ValuePtr may be a signed integer.
-# -#
StringLength
-# -#
[Input]
-# If Attribute is an ODBC-defined attribute and ValuePtr points to a character string or a binary buffer, this argument should be the length of *ValuePtr. If Attribute is an ODBC-defined attribute and ValuePtr is an integer, StringLength is ignored. -# -#

If Attribute is a driver-defined attribute, the application indicates the nature of the attribute to the Driver Manager by setting the StringLength argument. StringLength can have the following values: -#

-#
-# -#
    -#
  • If ValuePtr is a pointer to a character string, then StringLength is the length of the string or SQL_NTS.
  • -# -#
  • If ValuePtr is a pointer to a binary buffer, then the application places the result of the SQL_LEN_BINARY_ATTR(length) macro in StringLength. This places a negative value in StringLength.
  • -# -#
  • If ValuePtr is a pointer to a value other than a character string or a binary string, then StringLength should have the value SQL_IS_POINTER.
  • -# -#
  • If ValuePtr contains a fixed-length value, then StringLength is either SQL_IS_INTEGER or SQL_IS_UINTEGER, as appropriate.
  • -#
-# -#

Returns

-# -#

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

-# -#

Diagnostics

-# -#

When SQLSetStmtAttr returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_STMT and a Handle of StatementHandle. The following table lists the SQLSTATE values commonly returned by SQLSetStmtAttr and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
SQLSTATEErrorDescription
01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
01S02Option value changedThe driver did not support the value specified in ValuePtr, or the value specified in ValuePtr was invalid because of implementation working conditions, so the driver substituted a similar value. (SQLGetStmtAttr can be called to determine the temporarily substituted value.) The substitute value is valid for the StatementHandle until the cursor is closed, at which point the statement attribute reverts to its previous value. The statement attributes that can be changed are: -#

SQL_ ATTR_CONCURRENCY
-# SQL_ ATTR_CURSOR_TYPE
-# SQL_ ATTR_KEYSET_SIZE
-# SQL_ ATTR_MAX_LENGTH
-# SQL_ ATTR_MAX_ROWS
-# SQL_ ATTR_QUERY_TIMEOUT
-# SQL_ATTR_ROW_ARRAY_SIZE
-# SQL_ ATTR_SIMULATE_CURSOR

-# -#

(Function returns SQL_SUCCESS_WITH_INFO.)

-#
08S01Communication link failureThe communication link between the driver and the data source to which the driver was connected failed before the function completed processing.
24000Invalid cursor stateThe Attribute was SQL_ATTR_CONCURRENCY, SQL_ATTR_CURSOR_TYPE, SQL_ATTR_SIMULATE_CURSOR, or SQL_ATTR_USE_BOOKMARKS, and the cursor was open.
HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
HY001Memory allocation
-# error
The driver was unable to allocate memory required to support execution or completion of the function.
HY009Invalid use of null pointerThe Attribute argument identified a statement attribute that required a string attribute, and the ValuePtr argument was a null pointer.
HY010Function sequence error(DM) An asynchronously executing function was called for the StatementHandle and was still executing when this function was called. -#

(DM) SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for the StatementHandle and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

-#
HY011Attribute cannot be set nowThe Attribute was SQL_ATTR_CONCURRENCY, SQL_ ATTR_CURSOR_TYPE, SQL_ ATTR_SIMULATE_CURSOR, or SQL_ ATTR_USE_BOOKMARKS, and the statement was prepared.
HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
HY017Invalid use of an automatically allocated descriptor handle(DM) The Attribute argument was SQL_ATTR_IMP_ROW_DESC or SQL_ATTR_IMP_PARAM_DESC. -#

(DM) The Attribute argument was SQL_ATTR_APP_ROW_DESC or SQL_ATTR_APP_PARAM_DESC, and the value in ValuePtr was an implicitly allocated descriptor handle other than the handle originally allocated for the ARD or APD.

-#
HY024Invalid attribute valueGiven the specified Attribute value, an invalid value was specified in ValuePtr. (The Driver Manager returns this SQLSTATE only for connection and statement attributes that accept a discrete set of values, such as SQL_ATTR_ACCESS_MODE or SQL_ ATTR_ASYNC_ENABLE. For all other connection and statement attributes, the driver must verify the value specified in ValuePtr.) -#

The Attribute argument was SQL_ATTR_APP_ROW_DESC or SQL_ATTR_APP_PARAM_DESC, and ValuePtr was an explicitly allocated descriptor handle that is not on the same connection as the StatementHandle argument.

-#
HY090Invalid string or buffer length(DM) *ValuePtr is a character string, and the StringLength argument was less than 0 but was not SQL_NTS.
HY092Invalid attribute/option identifier(DM) The value specified for the argument Attribute was not valid for the version of ODBC supported by the driver. -#

(DM) The value specified for the argument Attribute was a read-only attribute.

-#
HYC00Optional feature not implementedThe value specified for the argument Attribute was a valid ODBC statement attribute for the version of ODBC supported by the driver but was not supported by the driver. -#

The Attribute argument was SQL_ATTR_ASYNC_ENABLE, and a call to SQLGetInfo with an InfoType of SQL_ASYNC_MODE returns SQL_AM_CONNECTION.

-# -#

The Attribute argument was SQL_ATTR_ENABLE_AUTO_IPD, and the value of the connection attribute SQL_ATTR_AUTO_IPD was SQL_FALSE.

-#
HYT01Connection timeout expiredThe connection timeout period expired before the data source responded to the request. The connection timeout period is set through SQLSetConnectAttr, SQL_ATTR_CONNECTION_TIMEOUT.
IM001Driver does not support this function(DM) The driver associated with the StatementHandle does not support the function.
-# -#

Comments

-# -#

Statement attributes for a statement remain in effect until they are changed by another call to SQLSetStmtAttr or until the statement is dropped by calling SQLFreeHandle. Calling SQLFreeStmt with the SQL_CLOSE, SQL_UNBIND, or SQL_RESET_PARAMS option does not reset statement attributes.

-# -#

Some statement attributes support substitution of a similar value if the data source does not support the value specified in ValuePtr. In such cases, the driver returns SQL_SUCCESS_WITH_INFO and SQLSTATE 01S02 (Option value changed). For example, if Attribute is SQL_ATTR_CONCURRENCY and ValuePtr is SQL_CONCUR_ROWVER, and if the data source does not support this, the driver substitutes SQL_CONCUR_VALUES and returns SQL_SUCCESS_WITH_INFO. To determine the substituted value, an application calls SQLGetStmtAttr.

-# -#

The format of information set with ValuePtr depends on the specified Attribute. SQLSetStmtAttr accepts attribute information in one of two different formats: a character string or a 32-bit integer value. The format of each is noted in the attribute's description. This format applies to the information returned for each attribute in SQLGetStmtAttr. Character strings pointed to by the ValuePtr argument of SQLSetStmtAttr have a length of StringLength.

-# -#

Note   The ability to set statement attributes at the connection level by calling SQLSetConnectAttr has been deprecated in ODBC 3.x. ODBC 3.x applications should never set statement attributes at the connection level. ODBC 3.x statement attributes cannot be set at the connection level, with the exception of the SQL_ATTR_METADATA_ID and SQL_ATTR_ASYNC_ENABLE attributes, which are both connection attributes and statement attributes, and can be set at either the connection level or the statement level.

-# -#

ODBC 3.x drivers need only support this functionality if they should work with ODBC 2.x applications that set ODBC 2.x statement options at the connection level. For more information, see "Setting Statement Options on the Connection Level" under "SQLSetConnectOption Mapping" in Appendix G: Driver Guidelines for Backward Compatibility.

-# -#

Statement Attributes That Set Descriptor Fields

-# -#

Many statement attributes correspond to a header field of a descriptor. Setting these attributes actually results in the setting of the descriptor fields. Setting fields by a call to SQLSetStmtAttr rather than to SQLSetDescField has the advantage that a descriptor handle does not have to be obtained for the function call.

-# -#

Caution   Calling SQLSetStmtAttr for one statement can affect other statements. This occurs when the APD or ARD associated with the statement is explicitly allocated and is also associated with other statements. Because SQLSetStmtAttr modifies the APD or ARD, the modifications apply to all statements with which this descriptor is associated. If this is not the required behavior, the application should dissociate this descriptor from the other statements (by calling SQLSetStmtAttr to set the SQL_ATTR_APP_ROW_DESC or SQL_ATTR_APP_PARAM_DESC field to a different descriptor handle) before calling SQLSetStmtAttr again.

-# -#

When a descriptor field is set as a result of the corresponding statement attribute being set, the field is set only for the applicable descriptors that are currently associated with the statement identified by the StatementHandle argument, and the attribute setting does not affect any descriptors that may be associated with that statement in the future. When a descriptor field that is also a statement attribute is set by a call to SQLSetDescField, the corresponding statement attribute is set. If an explicitly allocated descriptor is dissociated from a statement, a statement attribute that corresponds to a header field will revert to the value of the field in the implicitly allocated descriptor.

-# -#

When a statement is allocated (see SQLAllocHandle), four descriptor handles are automatically allocated and associated with the statement. Explicitly allocated descriptor handles can be associated with the statement by calling SQLAllocHandle with an fHandleType of SQL_HANDLE_DESC to allocate a descriptor handle and then calling SQLSetStmtAttr to associate the descriptor handle with the statement.

-# -#

The statement attributes in the following table correspond to descriptor header fields.

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
Statement attributeHeader fieldDesc.
SQL_ATTR_PARAM_BIND_OFFSET_PTRSQL_DESC_BIND_OFFSET_PTRAPD
SQL_ATTR_PARAM_BIND_TYPESQL_DESC_BIND_TYPEAPD
SQL_ATTR_PARAM_OPERATION_PTRSQL_DESC_ARRAY_STATUS_PTRAPD
SQL_ATTR_PARAM_STATUS_PTRSQL_DESC_ARRAY_STATUS_PTRIPD
SQL_ATTR_PARAMS_PROCESSED_PTRSQL_DESC_ROWS_PROCESSED_PTRIPD
SQL_ATTR_PARAMSET_SIZESQL_DESC_ARRAY_SIZEAPD
SQL_ATTR_ROW_ARRAY_SIZESQL_DESC_ARRAY_SIZEARD
SQL_ATTR_ROW_BIND_OFFSET_PTRSQL_DESC_BIND_OFFSET_PTRARD
SQL_ATTR_ROW_BIND_TYPESQL_DESC_BIND_TYPEARD
SQL_ATTR_ROW_OPERATION_PTRSQL_DESC_ARRAY_STATUS_PTRARD
SQL_ATTR_ROW_STATUS_PTRSQL_DESC_ARRAY_STATUS_PTRIRD
SQL_ATTR_ROWS_FETCHED_PTRSQL_DESC_ROWS_PROCESSED_PTRIRD
-# -#

Statement Attributes

-# -#

The currently defined attributes and the version of ODBC in which they were introduced are shown in the following table; it is expected that more attributes will be defined by drivers to take advantage of different data sources. A range of attributes is reserved by ODBC; driver developers must reserve values for their own driver-specific use from X/Open. For more information, see "Driver-Specific Data Types, Descriptor Types, Information Types, Diagnostic Types, and Attributes" in Chapter 17: Programming Considerations.

-#
-# -# -# -# -# -# -# -# -# -# - SQL_ATTR_APP_PARAM_DESC => { - type => q(SQLPOINTER), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_APP_ROW_DESC => { - type => q(SQLPOINTER), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ASYNC_ENABLE => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_CONCURRENCY => { - type => q(SQLUINTEGER), - ptr => undef, - value => [ qw(SQL_CONCUR_READ_ONLY SQL_CONCUR_LOCK SQL_CONCUR_ROWVER SQL_CONCUR_ROWVER) ], - default => q(SQL_CONCUR_READ_ONLY), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_CURSOR_SCROLLABLE => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_NONSCROLLABLE SQL_SCROLLABLE) ], - default => q(SQL_NONSCROLLABLE), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_CURSOR_SENSITIVITY => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_UNSPECIFIED SQL_INSENSITIVE SQL_SENSITIVE) ], - default => q(SQL_UNSPECIFIED), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_CURSOR_TYPE => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_CURSOR_FORWARD_ONLY SQL_CURSOR_STATIC SQL_CURSOR_KEYSET_DRIVEN SQL_CURSOR_DYNAMIC) ], - default => q(SQL_CURSOR_FORWARD_ONLY), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ENABLE_AUTO_IPD => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_FALSE SQL_TRUE) ], - default => q(SQL_FALSE), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_FETCH_BOOKMARK_PTR => { - type => q(SQLPOINTER), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_IMP_PARAM_DESC => { - type => q(SQLPOINTER), - ptr => undef, - value => undef, - default => undef, - mode => 'ro', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_IMP_ROW_DESC => { - type => q(SQLPOINTER), - ptr => undef, - value => undef, - default => undef, - mode => 'ro', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_KEYSET_SIZE => { - type => q(SQLUINTEGER), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_MAX_LENGTH => { - type => q(SQLUINTEGER), - ptr => undef, - value => undef, - default => 0, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_MAX_ROWS => { - type => q(SQLUINTEGER), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_METADATA_ID => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_FALSE SQL_TRUE) ], - default => q(SQL_FALSE), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_NOSCAN => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_NOSCAN_OFF SQL_NOSCAN_ON) ], - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_PARAM_BIND_OFFSET_PTR => { - type => q(SQLUINTEGER), - ptr => 1, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# -# -# -# -# -# - SQL_ATTR_PARAM_BIND_TYPE => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_PARAM_OPERATION_PTR => { - type => q(SQLUSMALLINT), - ptr => 1, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_PARAM_STATUS_PTR => { - type => q(SQLUSMALLINT), - ptr => 1, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_PARAMS_PROCESSED_PTR => { - type => q(SQLUINTEGER), - ptr => 1, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_PARAMSET_SIZE => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_QUERY_TIMEOUT => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_RETRIEVE_DATA => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_RD_ON SQL_RD_OFF) ], - default => q(SQL_RD_ON), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ROW_ARRAY_SIZE => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ROW_BIND_OFFSET_PTR => { - type => q(SQLUINTEGER), - ptr => undef, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ROW_BIND_TYPE => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_BIND_BY_COLUMN etc) ], - default => q(SQL_BIND_BY_COLUMN), - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ROW_NUMBER => { - type => q(SQLUINTEGER), - ptr => 0, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ROW_OPERATION_PTR => { - type => q(SQLUSMALLINT), - ptr => 1, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ROW_STATUS_PTR => { - type => q(SQLUSMALLINT), - ptr => 1, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_ROWS_FETCHED_PTR => { - type => q(SQLUINTEGER), - ptr => 1, - value => undef, - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_SIMULATE_CURSOR => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_SC_NON_UNIQUE SQL_SC_TRY_UNIQUE SQL_SC_UNIQUE) ], - default => undef, - mode => 'rw', - order => ++$order, - }, -# -# -# -# -# - SQL_ATTR_USE_BOOKMARKS => { - type => q(SQLUINTEGER), - ptr => 0, - value => [ qw(SQL_UB_OFF SQL_UB_VARIABLE SQL_UB_FIXED) ], - default => undef, - mode => 'rw', - order => ++$order, - }, -#
AttributeValuePtr contents
SQL_ATTR_APP_PARAM_DESC
-# (ODBC 3.0)
The handle to the APD for subsequent calls to SQLExecute and SQLExecDirect on the statement handle. The initial value of this attribute is the descriptor implicitly allocated when the statement was initially allocated. If the value of this attribute is set to SQL_NULL_DESC or the handle originally allocated for the descriptor, an explicitly allocated APD handle that was previously associated with the statement handle is dissociated from it and the statement handle reverts to the implicitly allocated APD handle. -#

This attribute cannot be set to a descriptor handle that was implicitly allocated for another statement or to another descriptor handle that was implicitly set on the same statement; implicitly allocated descriptor handles cannot be associated with more than one statement or descriptor handle.

-#
SQL_ATTR_APP_ROW_DESC
-# (ODBC 3.0)
The handle to the ARD for subsequent fetches on the statement handle. The initial value of this attribute is the descriptor implicitly allocated when the statement was initially allocated. If the value of this attribute is set to SQL_NULL_DESC or the handle originally allocated for the descriptor, an explicitly allocated ARD handle that was previously associated with the statement handle is dissociated from it and the statement handle reverts to the implicitly allocated ARD handle. -#

This attribute cannot be set to a descriptor handle that was implicitly allocated for another statement or to another descriptor handle that was implicitly set on the same statement; implicitly allocated descriptor handles cannot be associated with more than one statement or descriptor handle.

-#
SQL_ATTR_ASYNC_ENABLE
-# (ODBC 1.0)
An SQLUINTEGER value that specifies whether a function called with the specified statement is executed asynchronously: -#

SQL_ASYNC_ENABLE_OFF = Off (the default)
-# SQL_ASYNC_ENABLE_ON = On

-# -#

Once a function has been called asynchronously, only the original function, SQLCancel, SQLGetDiagField, or SQLGetDiagRec can be called on the statement, and only the original function, SQLAllocHandle (with a HandleType of SQL_HANDLE_STMT), SQLGetDiagField, SQLGetDiagRec, or SQLGetFunctions can be called on the connection associated with the statement, until the original function returns a code other than SQL_STILL_EXECUTING. Any other function called on the statement or the connection associated with the statement returns SQL_ERROR with an SQLSTATE of HY010 (Function sequence error). Functions can be called on other statements. For more information, see "Asynchronous Execution" in Chapter 9: Executing Statements.

-# -#

For drivers with statement level asynchronous execution support, the statement attribute SQL_ATTR_ASYNC_ENABLE may be set. Its initial value is the same as the value of the connection level attribute with the same name at the time the statement handle was allocated.

-# -#

For drivers with connection-level, asynchronous-execution support, the statement attribute SQL_ATTR_ASYNC_ENABLE is read-only. Its value is the same as the value of the connection level attribute with the same name at the time the statement handle was allocated. Calling SQLSetStmtAttr to set SQL_ATTR_ASYNC_ENABLE when the SQL_ASYNC_MODE InfoType returns SQL_AM_CONNECTION returns SQLSTATE HYC00 (Optional feature not implemented). (See SQLSetConnectAttr for more information.)

-# -#

As a standard practice, applications should execute functions asynchronously only on single-thread operating systems. On multithread operating systems, applications should execute functions on separate threads rather than executing them asynchronously on the same thread. No functionality is lost if drivers that operate only on multithread operating systems do not need to support asynchronous execution.

-# -#

The following functions can be executed asynchronously:

-# -#

SQLBulkOperations
-# SQLColAttribute

-# SQLColumnPrivileges
-# SQLColumns
-# SQLCopyDesc
-# SQLDescribeCol
-# SQLDescribeParam
-# SQLExecDirect
-# SQLExecute
-# SQLFetch
-# SQLFetchScroll
-# SQLForeignKeys
-# SQLGetData
-# SQLGetDescField[1]
-# SQLGetDescRec[1]
-# SQLGetDiagField

-# SQLGetDiagRec
-# SQLGetTypeInfo

-# SQLMoreResults
-# SQLNumParams
-# SQLNumResultCols
-# SQLParamData
-# SQLPrepare
-# SQLPrimaryKeys
-# SQLProcedureColumns
-# SQLProcedures
-# SQLPutData
-# SQLSetPos
-# SQLSpecialColumns
-# SQLStatistics
-# SQLTablePrivileges
-# SQLTables

-#
SQL_ATTR_CONCURRENCY
-# (ODBC 2.0)
An SQLUINTEGER value that specifies the cursor concurrency: -#

SQL_CONCUR_READ_ONLY = Cursor is read-only. No updates are allowed.

-# -#

SQL_CONCUR_LOCK = Cursor uses the lowest level of locking sufficient to ensure that the row can be updated.

-# -#

SQL_CONCUR_ROWVER = Cursor uses optimistic concurrency control, comparing row versions such as SQLBase ROWID or Sybase TIMESTAMP.

-# -#

SQL_CONCUR_VALUES = Cursor uses optimistic concurrency control, comparing values.

-# -#

The default value for SQL_ATTR_CONCURRENCY is SQL_CONCUR_READ_ONLY.

-# -#

This attribute cannot be specified for an open cursor. For more information, see "Concurrency Types" in Chapter 14: Transactions.

-# -#

If the SQL_ATTR_CURSOR_TYPE Attribute is changed to a type that does not support the current value of SQL_ATTR_CONCURRENCY, the value of SQL_ATTR_CONCURRENCY will be changed at execution time, and a warning issued when SQLExecDirect or SQLPrepare is called.

-# -#

If the driver supports the SELECT FOR UPDATE statement and such a statement is executed while the value of SQL_ATTR_CONCURRENCY is set to SQL_CONCUR_READ_ONLY, an error will be returned. If the value of SQL_ATTR_CONCURRENCY is changed to a value that the driver supports for some value of SQL_ATTR_CURSOR_TYPE but not for the current value of SQL_ATTR_CURSOR_TYPE, the value of SQL_ATTR_CURSOR_TYPE will be changed at execution time and SQLSTATE 01S02 (Option value changed) is issued when SQLExecDirect or SQLPrepare is called.

-# -#

If the specified concurrency is not supported by the data source, the driver substitutes a different concurrency and returns SQLSTATE 01S02 (Option value changed). For SQL_CONCUR_VALUES, the driver substitutes SQL_CONCUR_ROWVER, and vice versa. For SQL_CONCUR_LOCK, the driver substitutes, in order, SQL_CONCUR_ROWVER or SQL_CONCUR_VALUES. The validity of the substituted value is not checked until execution time.

-# -#

For more information about the relationship between SQL_ATTR_CONCURRENCY and the other cursor attributes, see "Cursor Characteristics and Cursor Type" in Chapter 11: Retrieving Results (Advanced).

-#
SQL_ATTR_CURSOR_SCROLLABLE
-# (ODBC 3.0)
An SQLUINTEGER value that specifies the level of support that the application requires. Setting this attribute affects subsequent calls to SQLExecDirect and SQLExecute. -#

SQL_NONSCROLLABLE = Scrollable cursors are not required on the statement handle. If the application calls SQLFetchScroll on this handle, the only valid value of FetchOrientation is SQL_FETCH_NEXT. This is the default.

-# -#

SQL_SCROLLABLE = Scrollable cursors are required on the statement handle. When calling SQLFetchScroll, the application may specify any valid value of FetchOrientation, achieving cursor positioning in modes other than the sequential mode.

-# -#

For more information about scrollable cursors, see "Scrollable Cursors" in Chapter 11: Retrieving Results (Advanced). For more information about the relationship between SQL_ATTR_CURSOR_SCROLLABLE and the other cursor attributes, see "Cursor Characteristics and Cursor Type" in Chapter 11: Retrieving Results (Advanced).

-#
SQL_ATTR_CURSOR_SENSITIVITY
-# (ODBC 3.0)
An SQLUINTEGER value that specifies whether cursors on the statement handle make visible the changes made to a result set by another cursor. Setting this attribute affects subsequent calls to SQLExecDirect and SQLExecute. An application can read back the value of this attribute to obtain its initial state or its state as most recently set by the application. -#

SQL_UNSPECIFIED = It is unspecified what the cursor type is and whether cursors on the statement handle make visible the changes made to a result set by another cursor. Cursors on the statement handle may make visible none, some, or all such changes. This is the default.

-# -#

SQL_INSENSITIVE = All cursors on the statement handle show the result set without reflecting any changes made to it by any other cursor. Insensitive cursors are read-only. This corresponds to a static cursor, which has a concurrency that is read-only.

-# -#

SQL_SENSITIVE = All cursors on the statement handle make visible all changes made to a result set by another cursor.

-# -#

For more information about the relationship between SQL_ATTR_CURSOR_SENSITIVITY and the other cursor attributes, see "Cursor Characteristics and Cursor Type" in Chapter 11: Retrieving Results (Advanced).

-#
SQL_ATTR_CURSOR_TYPE
-# (ODBC 2.0)
An SQLUINTEGER value that specifies the cursor type: -#

SQL_CURSOR_FORWARD_ONLY = The cursor only scrolls forward.

-# -#

SQL_CURSOR_STATIC = The data in the result set is static.

-# -#

SQL_CURSOR_KEYSET_DRIVEN = The driver saves and uses the keys for the number of rows specified in the SQL_ATTR_KEYSET_SIZE statement attribute.

-# -#

SQL_CURSOR_DYNAMIC = The driver saves and uses only the keys for the rows in the rowset.

-# -#

The default value is SQL_CURSOR_FORWARD_ONLY. This attribute cannot be specified after the SQL statement has been prepared.

-# -#

If the specified cursor type is not supported by the data source, the driver substitutes a different cursor type and returns SQLSTATE 01S02 (Option value changed). For a mixed or dynamic cursor, the driver substitutes, in order, a keyset-driven or static cursor. For a keyset-driven cursor, the driver substitutes a static cursor.

-# -#

For more information about scrollable cursor types, see "Scrollable Cursor Types" in Chapter 11: Retrieving Results (Advanced). For more information about the relationship between SQL_ATTR_CURSOR_TYPE and the other cursor attributes, see "Cursor Characteristics and Cursor Type" in Chapter 11: Retrieving Results (Advanced).

-#
SQL_ATTR_ENABLE_AUTO_IPD
-# (ODBC 3.0)
An SQLUINTEGER value that specifies whether automatic population of the IPD is performed: -#

SQL_TRUE = Turns on automatic population of the IPD after a call to SQLPrepare. SQL_FALSE = Turns off automatic population of the IPD after a call to SQLPrepare. (An application can still obtain IPD field information by calling SQLDescribeParam, if supported.) The default value of the statement attribute SQL_ATTR_ENABLE_AUTO_IPD is SQL_FALSE. For more information, see "Automatic Population of the IPD" in Chapter 13: Descriptors.

-#
SQL_ATTR_FETCH_BOOKMARK_PTR
-# (ODBC 3.0)
A pointer that points to a binary bookmark value. When SQLFetchScroll is called with fFetchOrientation equal to SQL_FETCH_BOOKMARK, the driver picks up the bookmark value from this field. This field defaults to a null pointer. For more information, see "Scrolling by Bookmark" in Chapter 11: Retrieving Results (Advanced). -#

The value pointed to by this field is not used for delete by bookmark, update by bookmark, or fetch by bookmark operations in SQLBulkOperations, which use bookmarks cached in rowset buffers.

-#
SQL_ATTR_IMP_PARAM_DESC
-# (ODBC 3.0)
The handle to the IPD. The value of this attribute is the descriptor allocated when the statement was initially allocated. The application cannot set this attribute. -#

This attribute can be retrieved by a call to SQLGetStmtAttr but not set by a call to SQLSetStmtAttr.

-#
SQL_ATTR_IMP_ROW_DESC
-# (ODBC 3.0)
The handle to the IRD. The value of this attribute is the descriptor allocated when the statement was initially allocated. The application cannot set this attribute. -#

This attribute can be retrieved by a call to SQLGetStmtAttr but not set by a call to SQLSetStmtAttr.

-#
SQL_ATTR_KEYSET_SIZE
-# (ODBC 2.0)
An SQLUINTEGER that specifies the number of rows in the keyset for a keyset-driven cursor. If the keyset size is 0 (the default), the cursor is fully keyset-driven. If the keyset size is greater than 0, the cursor is mixed (keyset-driven within the keyset and dynamic outside of the keyset). The default keyset size is 0. For more information about keyset-driven cursors, see "Keyset-Driven Cursors" in Chapter 11: Retrieving Results (Advanced). -#

If the specified size exceeds the maximum keyset size, the driver substitutes that size and returns SQLSTATE 01S02 (Option value changed).

-# -#

SQLFetch or SQLFetchScroll returns an error if the keyset size is greater than 0 and less than the rowset size.

-#
SQL_ATTR_MAX_LENGTH
-# (ODBC 1.0)
An SQLUINTEGER value that specifies the maximum amount of data that the driver returns from a character or binary column. If ValuePtr is less than the length of the available data, SQLFetch or SQLGetData truncates the data and returns SQL_SUCCESS. If ValuePtr is 0 (the default), the driver attempts to return all available data. -#

If the specified length is less than the minimum amount of data that the data source can return or greater than the maximum amount of data that the data source can return, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).

-# -#

The value of this attribute can be set on an open cursor; however, the setting might not take effect immediately, in which case the driver will return SQLSTATE 01S02 (Option value changed) and reset the attribute to its original value.

-# -#

This attribute is intended to reduce network traffic and should be supported only when the data source (as opposed to the driver) in a multiple-tier driver can implement it. This mechanism should not be used by applications to truncate data; to truncate data received, an application should specify the maximum buffer length in the BufferLength argument in SQLBindCol or SQLGetData.

-#
SQL_ATTR_MAX_ROWS
-# (ODBC 1.0)
An SQLUINTEGER value corresponding to the maximum number of rows to return to the application for a SELECT statement. If *ValuePtr equals 0 (the default), the driver returns all rows. -#

This attribute is intended to reduce network traffic. Conceptually, it is applied when the result set is created and limits the result set to the first ValuePtr rows. If the number of rows in the result set is greater than ValuePtr, the result set is truncated.

-# -#

SQL_ATTR_MAX_ROWS applies to all result sets on the Statement, including those returned by catalog functions. SQL_ATTR_MAX_ROWS establishes a maximum for the value of the cursor row count.

-# -#

A driver should not emulate SQL_ATTR_MAX_ROWS behavior for SQLFetch or SQLFetchScroll (if result set size limitations cannot be implemented at the data source) if it cannot guarantee that SQL_ATTR_MAX_ROWS will be implemented properly.

-# -#

It is driver-defined whether SQL_ATTR_MAX_ROWS applies to statements other than SELECT statements (such as catalog functions).

-# -#

The value of this attribute can be set on an open cursor; however, the setting might not take effect immediately, in which case the driver will return SQLSTATE 01S02 (Option value changed) and reset the attribute to its original value.

-#
SQL_ATTR_METADATA_ID
-# (ODBC 3.0)
An SQLUINTEGER value that determines how the string arguments of catalog functions are treated. -#

If SQL_TRUE, the string argument of catalog functions are treated as identifiers. The case is not significant. For nondelimited strings, the driver removes any trailing spaces and the string is folded to uppercase. For delimited strings, the driver removes any leading or trailing spaces and takes whatever is between the delimiters literally. If one of these arguments is set to a null pointer, the function returns SQL_ERROR and SQLSTATE HY009 (Invalid use of null pointer).

-# -#

If SQL_FALSE, the string arguments of catalog functions are not treated as identifiers. The case is significant. They can either contain a string search pattern or not, depending on the argument.

-# -#

The default value is SQL_FALSE.

-# -#

The TableType argument of SQLTables, which takes a list of values, is not affected by this attribute.

-# -#

SQL_ATTR_METADATA_ID can also be set on the connection level. (It and SQL_ATTR_ASYNC_ENABLE are the only statement attributes that are also connection attributes.)

-# -#

For more information, see "Arguments in Catalog Functions" in Chapter 7: Catalog Functions.

-#
SQL_ATTR_NOSCAN
-# (ODBC 1.0)
An SQLUINTEGER value that indicates whether the driver should scan SQL strings for escape sequences: -#

SQL_NOSCAN_OFF = The driver scans SQL strings for escape sequences (the default).

-# -#

SQL_NOSCAN_ON = The driver does not scan SQL strings for escape sequences. Instead, the driver sends the statement directly to the data source.

-# -#

For more information, see "Escape Sequences in ODBC" in Chapter 8: SQL Statements.

-#
SQL_ATTR_PARAM_BIND_OFFSET_PTR
-# (ODBC 3.0)
An SQLUINTEGER * value that points to an offset added to pointers to change binding of dynamic parameters. If this field is non-null, the driver dereferences the pointer, adds the dereferenced value to each of the deferred fields in the descriptor record (SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, and SQL_DESC_OCTET_LENGTH_PTR), and uses the new pointer values when binding. It is set to null by default. -#

The bind offset is always added directly to the SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, and SQL_DESC_OCTET_LENGTH_PTR fields. If the offset is changed to a different value, the new value is still added directly to the value in the descriptor field. The new offset is not added to the field value plus any earlier offsets.

-#
SQL_ATTR_PARAM_BIND_OFFSET_PTR
-# (ODBC 3.0) (continued)
For more information, see "Parameter Binding Offsets" in Chapter 9: Executing Statements. -#

Setting this statement attribute sets the SQL_DESC_BIND_OFFSET_PTR field in the APD header.

-#
SQL_ATTR_PARAM_BIND_TYPE
-# (ODBC 3.0)
An SQLUINTEGER value that indicates the binding orientation to be used for dynamic parameters. -#

This field is set to SQL_PARAM_BIND_BY_COLUMN (the default) to select column-wise binding.

-# -#

To select row-wise binding, this field is set to the length of the structure or an instance of a buffer that will be bound to a set of dynamic parameters. This length must include space for all of the bound parameters and any padding of the structure or buffer to ensure that when the address of a bound parameter is incremented with the specified length, the result will point to the beginning of the same parameter in the next set of parameters. When using the sizeof operator in ANSI C, this behavior is guaranteed.

-# -#

For more information, see "Binding Arrays of Parameters" in Chapter 9: Executing Statements.

-# -#

Setting this statement attribute sets the SQL_DESC_ BIND_TYPE field in the APD header.

-#
SQL_ATTR_PARAM_OPERATION_PTR
-# (ODBC 3.0)
An SQLUSMALLINT * value that points to an array of SQLUSMALLINT values used to ignore a parameter during execution of an SQL statement. Each value is set to either SQL_PARAM_PROCEED (for the parameter to be executed) or SQL_PARAM_IGNORE (for the parameter to be ignored). -#

A set of parameters can be ignored during processing by setting the status value in the array pointed to by SQL_DESC_ARRAY_STATUS_PTR in the APD to SQL_PARAM_IGNORE. A set of parameters is processed if its status value is set to SQL_PARAM_PROCEED or if no elements in the array are set.

-# -#

This statement attribute can be set to a null pointer, in which case the driver does not return parameter status values. This attribute can be set at any time, but the new value is not used until the next time SQLExecDirect or SQLExecute is called.

-# -#

For more information, see "Using Arrays of Parameters" in Chapter 9: Executing Statements.

-# -#

Setting this statement attribute sets the SQL_DESC_ARRAY_STATUS_PTR field in the APD header.

-#
SQL_ATTR_PARAM_STATUS_PTR
-# (ODBC 3.0)
An SQLUSMALLINT * value that points to an array of SQLUSMALLINT values containing status information for each row of parameter values after a call to SQLExecute or SQLExecDirect. This field is required only if PARAMSET_SIZE is greater than 1. -#

The status values can contain the following values:

-# -#

SQL_PARAM_SUCCESS: The SQL statement was successfully executed for this set of parameters.

-# -#

SQL_PARAM_SUCCESS_WITH_INFO: The SQL statement was successfully executed for this set of parameters; however, warning information is available in the diagnostics data structure.

-# -#

SQL_PARAM_ERROR: There was an error in processing this set of parameters. Additional error information is available in the diagnostics data structure.

-# -#

SQL_PARAM_UNUSED: This parameter set was unused, possibly due to the fact that some previous parameter set caused an error that aborted further processing, or because SQL_PARAM_IGNORE was set for that set of parameters in the array specified by the SQL_ATTR_PARAM_OPERATION_PTR.

-# -#

SQL_PARAM_DIAG_UNAVAILABLE: The driver treats arrays of parameters as a monolithic unit and so does not generate this level of error information.

-# -#

This statement attribute can be set to a null pointer, in which case the driver does not return parameter status values. This attribute can be set at any time, but the new value is not used until the next time SQLExecute or SQLExecDirect is called. Note that setting this attribute can affect the output parameter behavior implemented by the driver.

-# -#

For more information, see "Using Arrays of Parameters" in Chapter 9: Executing Statements.

-# -#

Setting this statement attribute sets the SQL_DESC_ARRAY_STATUS_PTR field in the IPD header.

-#
SQL_ATTR_PARAMS_PROCESSED_PTR
-# (ODBC 3.0)
An SQLUINTEGER * record field that points to a buffer in which to return the number of sets of parameters that have been processed, including error sets. No number will be returned if this is a null pointer. -#

Setting this statement attribute sets the SQL_DESC_ROWS_PROCESSED_PTR field in the IPD header.

-# -#

If the call to SQLExecDirect or SQLExecute that fills in the buffer pointed to by this attribute does not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the buffer are undefined.

-# -#

For more information, see "Using Arrays of Parameters" in Chapter 9: Executing Statements.

-#
SQL_ATTR_PARAMSET_SIZE
-# (ODBC 3.0)
An SQLUINTEGER value that specifies the number of values for each parameter. If SQL_ATTR_PARAMSET_SIZE is greater than 1, SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, and SQL_DESC_OCTET_LENGTH_PTR of the APD point to arrays. The cardinality of each array is equal to the value of this field. -#

For more information, see "Using Arrays of Parameters" in Chapter 9: Executing Statements.

-# -#

Setting this statement attribute sets the SQL_DESC_ARRAY_SIZE field in the APD header.

-#
SQL_ATTR_QUERY_TIMEOUT
-# (ODBC 1.0)
An SQLUINTEGER value corresponding to the number of seconds to wait for an SQL statement to execute before returning to the application. If ValuePtr is equal to 0 (default), there is no timeout. -#

If the specified timeout exceeds the maximum timeout in the data source or is smaller than the minimum timeout, SQLSetStmtAttr substitutes that value and returns SQLSTATE 01S02 (Option value changed).

-# -#

Note that the application need not call SQLCloseCursor to reuse the statement if a SELECT statement timed out.

-# -#

The query timeout set in this statement attribute is valid in both synchronous and asynchronous modes.

-#
SQL_ATTR_RETRIEVE_DATA
-# (ODBC 2.0)
An SQLUINTEGER value: -#

SQL_RD_ON = SQLFetchScroll and, in ODBC 3.x, SQLFetch retrieve data after it positions the cursor to the specified location. This is the default.

-# -#

SQL_RD_OFF = SQLFetchScroll and, in ODBC 3.x, SQLFetch do not retrieve data after it positions the cursor.

-# -#

By setting SQL_RETRIEVE_DATA to SQL_RD_OFF, an application can verify that a row exists or retrieve a bookmark for the row without incurring the overhead of retrieving rows. For more information, see "Scrolling and Fetching Rows" in Chapter 11: Retrieving Results (Advanced).

-# -#

The value of this attribute can be set on an open cursor; however, the setting might not take effect immediately, in which case the driver will return SQLSTATE 01S02 (Option value changed) and reset the attribute to its original value.

-#
SQL_ATTR_ROW_ARRAY_SIZE
-# (ODBC 3.0)
An SQLUINTEGER value that specifies the number of rows returned by each call to SQLFetch or SQLFetchScroll. It is also the number of rows in a bookmark array used in a bulk bookmark operation in SQLBulkOperations. The default value is 1. -#

If the specified rowset size exceeds the maximum rowset size supported by the data source, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).

-# -#

For more information, see "Rowset Size" in Chapter 11: Retrieving Results (Advanced).

-# -#

Setting this statement attribute sets the SQL_DESC_ARRAY_SIZE field in the ARD header.

-#
SQL_ATTR_ROW_BIND_OFFSET_PTR
-# (ODBC 3.0)
An SQLUINTEGER * value that points to an offset added to pointers to change binding of column data. If this field is non-null, the driver dereferences the pointer, adds the dereferenced value to each of the deferred fields in the descriptor record (SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, and SQL_DESC_OCTET_LENGTH_PTR), and uses the new pointer values when binding. It is set to null by default. -#

Setting this statement attribute sets the SQL_DESC_BIND_OFFSET_PTR field in the ARD header.

-#
SQL_ATTR_ROW_BIND_TYPE
-# (ODBC 1.0)
An SQLUINTEGER value that sets the binding orientation to be used when SQLFetch or SQLFetchScroll is called on the associated statement. Column-wise binding is selected by setting the value to SQL_BIND_BY_COLUMN. Row-wise binding is selected by setting the value to the length of a structure or an instance of a buffer into which result columns will be bound. -#

If a length is specified, it must include space for all of the bound columns and any padding of the structure or buffer to ensure that when the address of a bound column is incremented with the specified length, the result will point to the beginning of the same column in the next row. When using the sizeof operator with structures or unions in ANSI C, this behavior is guaranteed.

-# -#

Column-wise binding is the default binding orientation for SQLFetch and SQLFetchScroll.

-# -#

For more information, see "Binding Columns for Use with Block Cursors" in Chapter 11: Retrieving Results (Advanced).

-# -#

Setting this statement attribute sets the SQL_DESC_BIND_TYPE field in the ARD header.

-#
SQL_ATTR_ROW_NUMBER
-# (ODBC 2.0)
An SQLUINTEGER value that is the number of the current row in the entire result set. If the number of the current row cannot be determined or there is no current row, the driver returns 0. -#

This attribute can be retrieved by a call to SQLGetStmtAttr but not set by a call to SQLSetStmtAttr.

-#
SQL_ATTR_ROW_OPERATION_PTR
-# (ODBC 3.0)
An SQLUSMALLINT * value that points to an array of SQLUSMALLINT values used to ignore a row during a bulk operation using SQLSetPos. Each value is set to either SQL_ROW_PROCEED (for the row to be included in the bulk operation) or SQL_ROW_IGNORE (for the row to be excluded from the bulk operation). (Rows cannot be ignored by using this array during calls to SQLBulkOperations.) -#

This statement attribute can be set to a null pointer, in which case the driver does not return row status values. This attribute can be set at any time, but the new value is not used until the next time SQLSetPos is called.

-# -#

For more information, see "Updating Rows in the Rowset with SQLSetPos" and "Deleting Rows in the Rowset with SQLSetPos" in Chapter 12: Updating Data.

-# -#

Setting this statement attribute sets the SQL_DESC_ARRAY_STATUS_PTR field in the ARD.

-#
SQL_ATTR_ROW_STATUS_PTR
-# (ODBC 3.0)
An SQLUSMALLINT * value that points to an array of SQLUSMALLINT values containing row status values after a call to SQLFetch or SQLFetchScroll. The array has as many elements as there are rows in the rowset. -#

This statement attribute can be set to a null pointer, in which case the driver does not return row status values. This attribute can be set at any time, but the new value is not used until the next time SQLBulkOperations, SQLFetch, SQLFetchScroll, or SQLSetPos is called.

-# -#

For more information, see "Number of Rows Fetched and Status" in Chapter 11: Retrieving Results (Advanced).

-# -#

Setting this statement attribute sets the SQL_DESC_ARRAY_STATUS_PTR field in the IRD header.

-# -#

This attribute is mapped by an ODBC 2.x driver to the rgbRowStatus array in a call to SQLExtendedFetch.

-#
SQL_ATTR_ROWS_FETCHED_PTR
-# (ODBC 3.0)
An SQLUINTEGER * value that points to a buffer in which to return the number of rows fetched after a call to SQLFetch or SQLFetchScroll; the number of rows affected by a bulk operation performed by a call to SQLSetPos with an Operation argument of SQL_REFRESH; or the number of rows affected by a bulk operation performed by SQLBulkOperations. This number includes error rows. -#

For more information, see "Number of Rows Fetched and Status" in Chapter 11: Retrieving Results (Advanced).

-# -#

Setting this statement attribute sets the SQL_DESC_ROWS_PROCESSED_PTR field in the IRD header.

-# -#

If the call to SQLFetch or SQLFetchScroll that fills in the buffer pointed to by this attribute does not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the buffer are undefined.

-#
SQL_ATTR_SIMULATE_CURSOR
-# (ODBC 2.0)
An SQLUINTEGER value that specifies whether drivers that simulate positioned update and delete statements guarantee that such statements affect only one single row. -#

To simulate positioned update and delete statements, most drivers construct a searched UPDATE or DELETE statement containing a WHERE clause that specifies the value of each column in the current row. Unless these columns make up a unique key, such a statement can affect more than one row.

-# -#

To guarantee that such statements affect only one row, the driver determines the columns in a unique key and adds these columns to the result set. If an application guarantees that the columns in the result set make up a unique key, the driver is not required to do so. This may reduce execution time.

-# -#

SQL_SC_NON_UNIQUE = The driver does not guarantee that simulated positioned update or delete statements will affect only one row; it is the application's responsibility to do so. If a statement affects more than one row, SQLExecute, SQLExecDirect, or SQLSetPos returns SQLSTATE 01001 (Cursor operation conflict).

-# -#

SQL_SC_TRY_UNIQUE = The driver attempts to guarantee that simulated positioned update or delete statements affect only one row. The driver always executes such statements, even if they might affect more than one row, such as when there is no unique key. If a statement affects more than one row, SQLExecute, SQLExecDirect, or SQLSetPos returns SQLSTATE 01001 (Cursor operation conflict).

-# -#

SQL_SC_UNIQUE = The driver guarantees that simulated positioned update or delete statements affect only one row. If the driver cannot guarantee this for a given statement, SQLExecDirect or SQLPrepare returns an error.

-# -#

If the data source provides native SQL support for positioned update and delete statements and the driver does not simulate cursors, SQL_SUCCESS is returned when SQL_SC_UNIQUE is requested for SQL_SIMULATE_CURSOR. SQL_SUCCESS_WITH_INFO is returned if SQL_SC_TRY_UNIQUE or SQL_SC_NON_UNIQUE is requested. If the data source provides the SQL_SC_TRY_UNIQUE level of support and the driver does not, SQL_SUCCESS is returned for SQL_SC_TRY_UNIQUE and SQL_SUCCESS_WITH_INFO is returned for SQL_SC_NON_UNIQUE.

-# -#

If the specified cursor simulation type is not supported by the data source, the driver substitutes a different simulation type and returns SQLSTATE 01S02 (Option value changed). For SQL_SC_UNIQUE, the driver substitutes, in order, SQL_SC_TRY_UNIQUE or SQL_SC_NON_UNIQUE. For SQL_SC_TRY_UNIQUE, the driver substitutes SQL_SC_NON_UNIQUE.

-# -#

For more information, see "Simulating Positioned Update and Delete Statements" in Chapter 12: Updating Data.

-#
SQL_ATTR_USE_BOOKMARKS
-# (ODBC 2.0)
An SQLUINTEGER value that specifies whether an application will use bookmarks with a cursor: -#

SQL_UB_OFF = Off (the default)

-# -#

SQL_UB_VARIABLE = An application will use bookmarks with a cursor, and the driver will provide variable-length bookmarks if they are supported. SQL_UB_FIXED is deprecated in ODBC 3.x. ODBC 3.x applications should always use variable-length bookmarks, even when working with ODBC 2.x drivers (which supported only 4-byte, fixed-length bookmarks). This is because a fixed-length bookmark is just a special case of a variable-length bookmark. When working with an ODBC 2.x driver, the Driver Manager maps SQL_UB_VARIABLE to SQL_UB_FIXED.

-# -#

To use bookmarks with a cursor, the application must specify this attribute with the SQL_UB_VARIABLE value before opening the cursor.

-# -#

For more information, see "Retrieving Bookmarks" in Chapter 11: Retrieving Results (Advanced).

-#
-# -#

[1]   These functions can be called asynchronously only if the descriptor is an implementation descriptor, not an application descriptor.

-#

See "Column-Wise Binding" and "Row-Wise Binding" in Chapter 11: Retrieving Results (Advanced).

-# -#

Related Functions

-#
-# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
For information aboutSee
Canceling statement processingSQLCancel
Returning the setting of a connection attributeSQLGetConnectAttr
Returning the setting of a statement attributeSQLGetStmtAttr
Setting a connection attributeSQLSetConnectAttr
Setting a single field of the descriptorSQLSetDescField
-#

-# -#
-# -# -# -}; - -my $i3 = " " x 3; -my $i4 = " " x 4; -my $i8 = " " x 8; - -my $type2type = { - SQLSMALLINT => 'Smallint', - SQLUSMALLINT => 'Usmallint', - SQLINTEGER => 'Integer', - SQLUINTEGER => 'Uinteger', - SQLPOINTER => 'Pointer', - SQLCHAR => 'Sqlchar', -}; - -my $attr = - $type eq 'Env' ? $attrEnv : - $type eq 'Dbc' ? $attrDbc : - $type eq 'Stmt' ? $attrStmt : die "bad type $type"; - -my @name = sort { - $attr->{$a}{order} <=> $attr->{$b}{order} -} keys %$attr; - -print "#include \"Handle$type.hpp\"\n"; -my $class = "OdbcData"; - -for my $name (@name) { - my $p = $attr->{$name}; - my $odbctype = $type2type->{$p->{type}} or die $name; - $odbctype .= "Ptr" if $p->{ptr}; - print "\nstatic void\n"; - print "callback_${name}_set(Ctx& ctx, HandleBase* self, const $class& data)\n"; - print "{\n"; - print "${i4}Handle$type* p$type = dynamic_cast(self);\n"; - print "${i4}assert(p$type != 0 && data.type() == ${class}::$odbctype);\n"; - print "}\n"; - print "\nstatic void\n"; - print "callback_${name}_default(Ctx& ctx, HandleBase* self, $class& data)\n"; - print "{\n"; - print "${i4}Handle$type* p$type = dynamic_cast(self);\n"; - print "${i4}assert(p$type != 0);\n"; - print "${i4}data.set();\n"; - print "}\n"; -} - -print "\nAttrSpec Handle${type}::m_attrSpec\[\] = {\n"; -for my $name (@name) { - my $p = $attr->{$name}; - my $odbctype = $type2type->{$p->{type}} or die $name; - $odbctype .= "Ptr" if $p->{ptr}; - print "${i4}\{${i3}$name,\n"; - print "${i8}${class}::$odbctype,\n"; - my $attrmode = - $p->{mode} eq 'rw' ? 'Attr_mode_readwrite' : - $p->{mode} eq 'ro' ? 'Attr_mode_readonly' : die "bad mode $p->{mode}"; - print "${i8}$attrmode,\n"; - print "${i8}callback_${name}_set,\n"; - print "${i8}callback_${name}_default,\n"; - print "${i4}\},\n"; -} -print "${i4}\{${i3}0,\n"; -print "${i8}${class}::Undef,\n"; -print "${i8}Attr_mode_undef,\n"; -print "${i8}0,\n"; -print "${i8}0,\n"; -print "${i4}\},\n"; - -print "};\n"; diff --git a/ndb/src/old_files/client/odbc/docs/main.hpp b/ndb/src/old_files/client/odbc/docs/main.hpp deleted file mode 100644 index ebb5b1f235a..00000000000 --- a/ndb/src/old_files/client/odbc/docs/main.hpp +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/** - @mainpage NDB ODBC - - The ODBC Driver Frontend has: - -# HandleBase : Various ODBC handles - -# AttrArea : Attributes of handles - -# ConnArea : Communication area on connection level between driver parts - -# StmtArea : Communication area on statement level between driver parts - - and controls the following steps: - -# SQL_compiler : Compiles SQL into SQL_code_tree:s - -# Parser : Bison grammar - -# Analyzer : Syntactic and semantic checks (binds names) - -# PlanGen : Generate initial (execution) plan (PlanTree) - -# CodeGen : Generates CodeTree:s out of PlanTree:s - -# Optimizer : Optimizes PlanTree:s - -# Output : Outputs executable CodeTree:s - -# Executor : Executes CodeTree:s - -# CodeTree::allocRun : Allocates runtime data structures (RunTree:s) - -# Dataflow machine : Executes and evaluates statement and expressions - - The Dataflow machine works in four different ways: - -# Non-query statements - -# CodeStmt::execute : Executes (non-query) statement - -# Query statements - -# CodeQuery::execute : Execute Query statement - -# CodeQuery::fetch : Fetch row from CodeQuery node - -# Boolean expressions - -# CodePred::evaluate : Evaluates boolean expression - -# Arithmetical expressions - -# CodeExpr::evaluate : Evaluates arithmetic expression - - The following components are used throughout the NDB ODBC: - -# Context (Ctx) : Info regarding execution/evaluation - -# Diagnostic area (DiagArea) : Errors and warnings (for ODBC user) - -# DescArea : Description of ODBC user input/output bind varibles/columns - -# Dictionary (DictBase) : Lookup info stored in NDB Dictionary - and info regarding temporary - materialized results - -# ResultArea : Execution (temporary) results - - - @section secCompiler SQL_compiler : SQL to SQL_code_tree - - The SQL_compiler takes an SQL statement and translates - it into an SQL_code_tree. The compiler uses an SQL_code_tree - internally during the compilation and the result of the compilation - is a simlified SQL_code_tree. - - The compiler works in the following steps: - -# Parse SQL statments and create SQL_code_tree representing the - statement. - -# Apply Syntax Rules to the SQL_code_tree. Syntax rules are - rules which are not expressed in the SQL grammar, - but are expressed in natural language in the SQL specification. - -# Apply Access Rules to the SQL_code_tree - (this is not implemented, since NDB Cluster has no access control) - -# Apply General Rules to the SQL_code_tree - -# Apply Conformance Rules to the SQL_code_tree - - The resulting simplified SQL_code_tree is represented by a - tree of C++ objects. - - - @section secCodegen Codegen : SQL_code_tree to CodeTree - - CodeGen takes simplified SQL_code_tree:s and transforms them into - CodeTree:s. - - - @section secOptimizer Optimizer : CodeTree to CodeTree - - The implementation of the ODBC optimizer will uses the - PlanTree:s to represent statements and transforms them - into executable format (still PlanTree format). - - @note In the future, more optimizations can be implemented. - - - @section secExecutor Executor : Execute CodeTree - - The Executor uses the following data structures: - -# CodeTree : A read-only quary evaluation plan - -# RunTree : Runtime data structures containing ResultSet:s - - The execution mechanism is actually implemented as a - part of the CodeTree. -*/ diff --git a/ndb/src/old_files/client/odbc/docs/ndbodbc.html b/ndb/src/old_files/client/odbc/docs/ndbodbc.html deleted file mode 100644 index 6be624dfa1b..00000000000 --- a/ndb/src/old_files/client/odbc/docs/ndbodbc.html +++ /dev/null @@ -1,659 +0,0 @@ - - - -ODBC and SQL - - - -

ODBC and SQL - NDB Cluster v2.11

- -

-NDB Cluster v2.11 includes a version of ODBC and SQL. -

-This document has 4 sections. -

    -
  1. PLATFORMS -
  2. ODBC -
  3. SQL -
  4. DIAGNOSTICS -
-

-Features which are currently incomplete or planned for next release -are marked with v2.x. - -

1. PLATFORMS

- -

1.1 Linux / Unix

-

-We use RedHat package names to describe supporting software. -Packages starting with perl- are perl modules. -If your installation does not include them you can get them -from a CPAN archive ( ftp://ftp.funet.fi/pub/languages/perl/CPAN ). -

-Version numbers are given only as examples. -Other versions will work. -

-An ODBC driver manager is required, one of: -

    -
  • unixODBC-2.2.3 (this is more common) -
  • libiodbc-3.0.5 -
-

-Additional packages are convenient. -Following include perl scripting interface -and an "interactive SQL" tool dbish: -

    -
  • perl-DBI-1.30 -
  • perl-DBD-ODBC-0.43 -
  • readline-4.2 -
  • perl-Term-ReadLine-Gnu-1.11 -
-

-The NDB ODBC driver is located under NDB Cluster installation -directory and is named libNDB_ODBC.so. -It includes NDB API. -To use it create a text file -/etc/odbc.ini or $HOME/.odbc.ini -containing at least: -

- - -[ndb] -
-Driver = <path-to-your-NDB-installation>/lib/libNDB_ODBC.so -
-
-

-Then try the shell command dbish dbi:ODBC:ndb -in an NDB API node directory. - -

1.2 Windows

- -[ TODO - documentation ] - -

2. ODBC

- -

2.1 External data types

- -Usual external data types are supported and converted to and from SQL -data types. -

- - - - - - -
type description
SQL_C_CHARcharacter buffers
SQL_C_SLONG, etcinteger types
SQL_C_DOUBLE, etcfloating types
SQL_C_TYPE_TIMESTAMPtimestamp
- -

2.2 ODBC functions

-

-The driver implements basic ODBC functions. -Main exceptions are: -

    -
  • no named cursors -
  • no scrollable cursors -
  • no bulk operations -
  • no asynchronous execution -
-

-Following lists main ODBC 3.0 functions and -their status in the driver. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
functionsupported
SQLAllocHandle -yes -
SQLConnect -yes -
SQLGetInfo -yes -
SQLGetFunctions -yes -
SQLGetTypeInfo -yes -
SQLSetConnectAttr -yes -
SQLGetConnectAttr -yes -
SQLSetEnvAttr -yes -
SQLGetEnvAttr -yes -
SQLSetStmtAttr -yes -
SQLGetStmtAttr -yes -
SQLGetDescField -yes -
SQLGetDescRec -yes -
SQLSetDescField -yes -
SQLSetDescRec -yes -
SQLPrepare -yes -
SQLBindParameter -yes -
SQLGetCursorName -yes, but cursor names cannot be used in SQL -
SQLSetCursorName -yes, but cursor names cannot be used in SQL -
SQLSetScrollOptions -not implemented -
SQLExecute -yes -
SQLExecDirect -yes -
SQLNativeSql -not implemented -
SQLDescribeParam -not supported -
SQLNumParams -yes -
SQLParamData -yes -
SQLPutData -yes -
SQLRowCount -yes -
SQLNumResultCols -yes -
SQLDescribeCol -yes -
SQLColAttribute -yes -
SQLBindCol -yes -
SQLFetch -yes -
SQLFetchScroll -not implemented -
SQLGetData -yes -
SQLSetPos -not implemented -
SQLBulkOperations -not implemented -
SQLMoreResults -yes, but multiple result sets are not supported -
SQLGetDiagField -yes -
SQLGetDiagRec -yes -
SQLColumnPrivileges -not applicable -
SQLColumns -yes -
SQLForeignKeys -not applicable -
SQLPrimaryKeys -yes -
SQLProcedureColumns -not applicable -
SQLProcedures -not applicable -
SQLSpecialColumns -yes v2.x -
SQLStatistics -not applicable -
SQLTablePrivileges -not applicable -
SQLTables -yes -
SQLFreeStmt -yes -
SQLCloseCursor -yes -
SQLCancel -yes -
SQLEndTran -yes -
SQLDisconnect -yes -
SQLFreeHandle -yes -
- -

3. SQL

- -

3.1 Data types

- - - - - - - - - - - - -
type description
CHAR(n)fixed-width blank-padded string
VARCHAR(n)variable length string
INT
INTEGER
integer 32 bits
BIGINTinteger 64 bits
DECIMAL(m,n)exact number with precision and scale v2.x
REALfloat 32 bits
FLOAT
DOUBLE PRECISION
float, at least 64 bits
DATEdate with precision 1 second v2.x
DATETIMEdate with precision 1 nanosecond (SQL_TYPE_TIMESTAMP)
-

- -Integer types may be qualified as UNSIGNED. -

-Strings and numbers are not converted to each other automatically. -Following is an error (unlike in oracle). -
-

select 123 + '456' from tab
- -

3.2 Expressions

- - - - - - - - -
syntax description
NULLnull value
12.34e5integer or decimal or float constant
'abc'string constant
+ - * / ( )arithmetic operations
||string concatenation v2.x
- -
-Integer and decimal arithmetic is done in BIGINT. -
-Floating arithmetic is done in DOUBLE PRECISION. -
-Numeric literals use largest applicable type. -
-String operations are done in CHAR or in VARCHAR (if any operand is VARCHAR). -
-String literals have type CHAR. - -

3.3 Functions : non-aggregate

- - - - - - - -
syntax description
SUBSTR() LEFT() RIGHT()substring
TO_NUMBER() TO_CHAR()basic conversions v2.x
ROWNUMrow number in query
SYSDATEcurrent date as DATETIME
- -

3.4 Functions : aggregate

- - - - - - -
syntax description
COUNT(*) COUNT(expr)count rows or non-NULL values
MIN(expr) MAX(expr)min and max of strings and numbers
SUM(expr) AVG(expr)sum and average of numbers
-
-GROUP BY and HAVING are supported. - -

3.5 Predicates

- - - - - - - -
syntax description
IS NULL / IS NOT NULLtest if value is null
< <= = != > >=comparisons
LIKE / NOT LIKEstring matching
AND OR NOT ( )boolean operators
- -

3.6 Tables

- -An NDB table requires a primary key. -There are 2 ways to specify it. - -

-

Case 1

-
create table t (
-    a integer not null,
-    b char(20) not null,
-    c float,
-    primary key(a, b)
-)
-
-

-

Case 2

-

-A column can be specified as AUTO_INCREMENT. -The column has following requirements. -

    -
  • it must be the primary key (not just part of one) -
  • its type must be one of the integer types -
-
create table t (
-    a int unsigned auto_increment primary key,
-    b char(20) not null,
-    c float
-)
-
-

-The values of an AUTO_INCREMENT column are unique (until wrap-around) -and form an ascending sequence. -Gaps in the sequence are possible. -

Default values

-Columns can be specified with DEFAULT value -which is used on insert if the column is not on the insert list. -

-

create table t (
-    a int primary key,
-    b int default 100
-)
-insert into t(a) values(1) -- inserts (1,100)
-
-

-The value must evaluate to constant. -Using SYSDATE (if allowed at all) evaluates to table creation time. -

- -

Logging / nologging

- -By default tables are created in logging mode, meaning the data -is preserved across database restart. -The mode can be specified explicitly: -

-create table t1 (a int primary key, b int) logging -
-create table t1 (a int primary key, b int) nologging - -

Schemas

- -Schemas do not exist in current NDB Cluster. -As a convenience, a single period is allowed in table names: -

-

create table mydb.mytable (a int primary key)
-

- -

Drop table

- -Deletes a table, all of its indexes, and all data: -

-drop table t - -

3.7 Indexes

-Only unique non-ordered indexes exist currently. -The columns must be not nullable and are stored in same -order as underlying table columns. -

-create unique hash index x1 on t1(b, c) logging -

-Internally, a unique hash index is a table where index key is primary key. -If the index is nologging, it is rebuilt on database restart -before the database is opened. -

-Indexes can of course be dropped: -

-drop index x1 - -

3.8 Select

- -Features: - -
    -
  • Expressions and predicates -
    select a + b * c from t where a < b + c and (b > c or c > 10) -
  • JOIN to any depth -
    select a.x, b.y, c.z from t1 a, t2 b, t2 c where a.x + b.y < c.z -
  • ORDER BY -
    select * from t1, t2 where a1 > 5 order by b1 + b2, c1 desc -
  • DISTINCT -
    select distinct a, b + c from t -
  • Aggregates without grouping. -
    select count(*), max(a), 1 + sum(b) + avg(c * d) from t -
  • Aggregates with grouping. -
    select a, sum(b) from t group by a having sum(c) > 0 order by a, sum(d) -
- -Major omissions: -
    -
  • no OUTER JOIN -
  • no subqueries and no EXISTS clause -
- -Queries are optimized to minimize scans, -by using primary keys and existing unique hash indexes. -Simple predicates in scans (column compared to constant) -are passed to an interpreter in NDB kernel. -Joins are done via nested loops only. -

-

    -
  • SCAN -
    select * from t where a < b -
  • INTERPRETED SCAN (much faster) -
    select * from t1, t2 where t1.a < 10 and t2.b > t1.c -
  • PRIMARY KEY lookup -
    select * from t where pk = 5 and b > 10 -
  • NESTED LOOPS -
    select * from t1, t2, t3 where t1.pk = t2.x and t2.pk = t3.y -
- -

3.9 Insert and write

- -Both VALUES and subquery variants can be used. -

-

insert into t(a, c) values (123, 'abc')
-insert into t1(a, c) select a + 10 * b, c from t2
-
-

-For convenience, the non-standard MySql syntax is also supported. -

-

insert into t set a = 123, c = 'abc'
-

-The non-standard operation WRITE is used exactly like INSERT. -The record is updated if it exists. -Otherwise a new record is inserted. -

-

write into t(a, c) values (123, 'abc')
-
- -

3.10 Update

- -Update allows no subqueries. -Update is optimized to minimize scans and reads, -by using primary keys and existing unique hash indexes. -

-

    -
  • SCAN -
    update t set a = b + 5, c = d where c > 10 -
  • PRIMARY KEY or INDEX lookup -
    update t set a = b + 5, c = d where pk = 5 and c > 10 -
  • PRIMARY KEY or INDEX direct -
    update t set a = 5, c = 7 where pk = 5 -
- -

3.11 Delete

- -Delete allows no subqueries. -Delete is optimized to minimize scans and reads, -by using primary keys and existing unique hash indexes. -

-

    -
  • SCAN -
    delete from t where c > 10 -
  • PRIMARY KEY or INDEX lookup -
    delete from t where pk = 5 and c > 10 -
  • PRIMARY KEY or INDEX direct -
    delete from t where pk = 5 -
- -

3.12 Virtual tables

- -The driver implements some virtual tables. -They can only be queried, not modified. -

-

    -
  • DUAL -
    A 1-row table - example: select SYSDATE from DUAL. -
  • ODBC$TYPEINFO -
    Corresponds to SQLGetTypeInfo. -
  • ODBC$TABLES -
    Corresponds to SQLTables but shows all NDB kernel objects. -
  • ODBC$COLUMNS -
    Corresponds to SQLColumns. -
  • ODBC$PRIMARYKEYS -
    Corresponds to SQLPrimaryKeys. -
- -

4. DIAGNOSTICS

- -

4.1 Diagnostic records

- -The driver manager and driver return 3 main diagnostics -(see SQLGetDiagRec). -
    -
  • SQLSTATE (a string of 5 characters) -
  • Native error code -
  • Message text -
-

-Message text format is -

-[Alzato][ODBC driver][NDB Cluster] NDB-ssccnnn error text (in SQLXxx) -

-Here ssccnnnn is native error code (decimal number), with following parts: -

-

  • ss - status -
  • cc - classification -
  • nnnn - error code - -

    -See NDB API guide for further information. -

    -For non-database errors the last prefix [NDB Cluster] is omitted -and native error code is always 02015001. - -

    4.2 Tracing

    - -Following environment variables may be useful. -
      -
    • NDB_ODBC_TRACE -
      -Values ≥ 2 cause SQL execution plan -to be printed on standard output. -
      -Values ≥ 3 show the ODBC API functions -called by the driver manager. -

      -
    • NDB_ODBC_DEBUG -
      -Non-zero value makes the driver abort -the application on unhandled conditions. -
      -By default the ODBC API function is aborted gracefully. -
    - -

    4.3 Thread safety

    -

    -The driver has same thread-safety model as NDB API. -In NDB API each thread must use its own Ndb object. -In NDB ODBC a SQLConnect corresponds to an Ndb object. -It is required that each thread allocates its -own ODBC handles (of all types). - -

    4.4 Data formats

    -

    -SQL types are represented as (old) NDB types as follows. -

    - - - - - - - -
    SQL type NDB type
    CHAR(n)String(n), blank-padded to n
    VARCHAR(n)String(n+2), zero-padded to n, length in last 2 bytes (big-endian)
    integersSigned(x) or UnSigned(x), x=16,32,64, native format
    floatsFloat(x), x=32,64, native format
    DATETIMEString(12) = cc yy mm dd HH MM SS \0 ff ff ff ff (big-endian)
    -

    -Note: SQL types exist now in NDB API in NdbDictionary class. -However they are not yet understood by NDB API operations. - -

    4.5 NDB Cluster limitations

    -

    -

      -
    • Isolation level is READ COMMITTED. -A scan (non-primary-key select of several rows) does not see consistent data. -

      -
    • Inserting into a table from itself is likely to cause a deadlock -or a random result. -
      no: insert into t(a, b) select a*100, b+100 from t -

      -
    • Number of uncommitted rows is limited by NDB configuration -parameter MaxNoOfConcurrentOperations (typical default 4096). -To delete all rows from a large table one may need to do repeatedly: -
      delete from t where rownum < 4000 -
    - -

    4.6 Known problems v2.11

    -

    -Following lists specific known problems. -

      -
    • ORDER BY works only with expressions, -not with column aliases or positions. -
      no: select a+b x from t order by x -
      no: select * from t order by 1, 2, 3 -

      -
    • Join optimizer does not always minimize number of scans. -Changing the order of tables in the statement may help. -
    - -

    4.7 Useful links

    -

    -Microsoft ODBC page -
    -unixODBC home page -
    -iODBC home page - - - diff --git a/ndb/src/old_files/client/odbc/docs/select.fig b/ndb/src/old_files/client/odbc/docs/select.fig deleted file mode 100644 index 4f51a2085b4..00000000000 --- a/ndb/src/old_files/client/odbc/docs/select.fig +++ /dev/null @@ -1,94 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -A4 -92.00 -Single --2 -1200 2 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 2700 2700 1500 3900 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 3150 2700 3150 3900 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 3600 4500 4800 5700 -2 1 1 1 0 7 50 0 -1 4.000 0 0 7 1 0 2 - 0 0 1.00 60.00 120.00 - 3600 2700 4800 3900 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 2775 4500 1200 5700 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 3150 4500 3150 5700 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 2100 4500 2100 3900 600 3900 600 4500 2100 4500 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 2100 6300 2100 5700 600 5700 600 6300 2100 6300 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 3900 4500 3900 3900 2400 3900 2400 4500 3900 4500 -2 4 1 1 0 7 50 0 -1 4.000 0 0 7 0 0 5 - 5700 4500 5700 3900 4200 3900 4200 4500 5700 4500 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 3900 6300 3900 5700 2400 5700 2400 6300 3900 6300 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 5700 6300 5700 5700 4200 5700 4200 6300 5700 6300 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 8400 2700 8400 2100 6900 2100 6900 2700 8400 2700 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 8400 6300 8400 5700 6900 5700 6900 6300 8400 6300 -2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 0 2 - 0 0 1.00 60.00 120.00 - 7650 2700 7650 5700 -2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 0 2 - 0 0 1.00 60.00 120.00 - 7650 6300 7650 7500 -2 1 1 1 0 7 50 0 -1 4.000 0 0 7 1 0 2 - 0 0 1.00 60.00 120.00 - 8100 6300 10575 6900 -2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 0 2 - 0 0 1.00 60.00 120.00 - 8100 2700 10575 3300 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 11700 3900 11700 3300 10200 3300 10200 3900 11700 3900 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 9900 5400 9900 4800 8400 4800 8400 5400 9900 5400 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 11700 5400 11700 4800 10200 4800 10200 5400 11700 5400 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 13500 5400 13500 4800 12000 4800 12000 5400 13500 5400 -2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 0 2 - 0 0 1.00 60.00 120.00 - 10500 3900 9300 4800 -2 1 0 1 0 7 50 0 -1 4.000 0 0 7 1 0 2 - 0 0 1.00 60.00 120.00 - 11400 3900 12600 4800 -2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 10950 3900 10950 4800 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 8400 8100 8400 7500 6900 7500 6900 8100 8400 8100 -2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 - 3900 2700 3900 2100 2400 2100 2400 2700 3900 2700 -2 4 1 1 0 7 50 0 -1 4.000 0 0 7 0 0 5 - 11700 7500 11700 6900 10200 6900 10200 7500 11700 7500 -4 0 0 50 0 14 12 0.0000 4 135 840 900 4275 table T1\001 -4 0 0 50 0 14 20 0.0000 4 240 4125 900 1125 select A, C, 123 from T1/\001 -4 0 0 50 0 14 12 0.0000 4 135 840 825 6075 column A\001 -4 0 0 50 0 14 12 0.0000 4 135 840 2775 6075 column C\001 -4 0 0 50 0 14 12 0.0000 4 135 945 4425 6075 const 123\001 -4 0 0 50 0 14 12 0.0000 4 135 630 4575 4275 clause\001 -4 0 0 50 0 14 12 0.0000 4 90 315 2925 4275 row\001 -4 0 0 50 0 14 12 0.0000 4 180 735 7200 2475 project\001 -4 0 0 50 0 14 12 0.0000 4 135 630 7200 6000 filter\001 -4 0 0 50 0 14 12 0.0000 4 135 840 8625 5100 column 1\001 -4 0 0 50 0 14 12 0.0000 4 135 840 10500 5100 column 2\001 -4 0 0 50 0 14 12 0.0000 4 135 945 12300 5100 const 123\001 -4 0 0 50 0 14 12 0.0000 4 90 315 10650 3600 row\001 -4 0 0 50 0 14 12 0.0000 4 150 840 7200 7800 scan 1,2\001 -4 0 0 50 0 14 12 0.0000 4 135 630 2850 2475 select\001 -4 0 0 50 0 14 12 0.0000 4 135 630 10500 7200 clause\001 diff --git a/ndb/src/old_files/client/odbc/docs/systables.pl b/ndb/src/old_files/client/odbc/docs/systables.pl deleted file mode 100644 index 728d966a7a4..00000000000 --- a/ndb/src/old_files/client/odbc/docs/systables.pl +++ /dev/null @@ -1,2192 +0,0 @@ -# usage: perl systables.pl {typeinfo|tables|columns|primarykeys} {-l|-c} -use strict; -my $what = shift; -my $opt = shift; -my $listWhat = {}; - -# -# odbcsqlgettypeinfo.htm -# -$listWhat->{typeinfo} = [ -# -# -# -# SQLGetTypeInfo -# -# -# -# -# -# -#

    -#
    -# -# -# -# -#
    -# ODBC Programmer's Reference -#
    -#
    -#
    -#
    -# -#

    SQLGetTypeInfo

    -# -#

    Conformance

    -# -#

    Version Introduced: ODBC 1.0
    -# Standards Compliance: ISO 92

    -# -#

    Summary

    -# -#

    SQLGetTypeInfo returns information about data types supported by the data source. The driver returns the information in the form of an SQL result set. The data types are intended for use in Data Definition Language (DDL) statements.

    -# -#

    Important   Applications must use the type names returned in the TYPE_NAME column of the SQLGetTypeInfo result set in ALTER TABLE and CREATE TABLE statements. SQLGetTypeInfo may return more than one row with the same value in the DATA_TYPE column.

    -# -#

    Syntax

    -# -#
    SQLRETURN SQLGetTypeInfo(
    -#	     SQLHSTMT     StatementHandle,
    -#	     SQLSMALLINT     DataType);
    -# -#

    Arguments -# -#

    -#
    StatementHandle
    -# -#
    [Input]
    -# Statement handle for the result set.
    -# -#
    DataType
    -# -#
    [Input]
    -# The SQL data type. This must be one of the values in the "SQL Data Types" section of Appendix D: Data Types, or a driver-specific SQL data type. SQL_ALL_TYPES specifies that information about all data types should be returned.
    -#
    -# -#

    Returns

    -# -#

    SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

    -# -#

    Diagnostics

    -# -#

    When SQLGetTypeInfo returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value can be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_STMT and a Handle of StatementHandle. The following table lists the SQLSTATE values commonly returned by SQLGetTypeInfo and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    SQLSTATEErrorDescription
    01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
    01S02Option value changedA specified statement attribute was invalid because of implementation working conditions, so a similar value was temporarily substituted. (Call SQLGetStmtAttr to determine the temporarily substituted value.) The substitute value is valid for the StatementHandle until the cursor is closed. The statement attributes that can be changed are: SQL_ATTR_CONCURRENCY, SQL_ATTR_CURSOR_TYPE, SQL_ATTR_KEYSET_SIZE, SQL_ATTR_MAX_LENGTH, SQL_ATTR_MAX_ROWS, SQL_ATTR_QUERY_TIMEOUT, and SQL_ATTR_SIMULATE_CURSOR. (Function returns SQL_SUCCESS_WITH_INFO.)
    08S01Communication link failureThe communication link between the driver and the data source to which the driver was connected failed before the function completed processing.
    24000Invalid cursor stateA cursor was open on the StatementHandle, and SQLFetch or SQLFetchScroll had been called. This error is returned by the Driver Manager if SQLFetch or SQLFetchScroll has not returned SQL_NO_DATA, and is returned by the driver if SQLFetch or SQLFetchScroll has returned SQL_NO_DATA. -#

    A result set was open on the StatementHandle, but SQLFetch or SQLFetchScroll had not been called.

    -#
    40001Serialization failureThe transaction was rolled back due to a resource deadlock with another transaction.
    40003Statement completion unknownThe associated connection failed during the execution of this function and the state of the transaction cannot be determined.
    HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
    HY001Memory allocation errorThe driver was unable to allocate memory required to support execution or completion of the function.
    HY004Invalid SQL data typeThe value specified for the argument DataType was neither a valid ODBC SQL data type identifier nor a driver-specific data type identifier supported by the driver.
    HY008Operation canceledAsynchronous processing was enabled for the StatementHandle, then the function was called and, before it completed execution, SQLCancel was called on the StatementHandle. Then the function was called again on the StatementHandle. -#

    The function was called and, before it completed execution, SQLCancel was called on the StatementHandle from a different thread in a multithread application.

    -#
    HY010Function sequence error(DM) An asynchronously executing function (not this one) was called for the StatementHandle and was still executing when this function was called. -#

    (DM) SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for the StatementHandle and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

    -#
    HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
    HYC00Optional feature not implementedThe combination of the current settings of the SQL_ATTR_CONCURRENCY and SQL_ATTR_CURSOR_TYPE statement attributes was not supported by the driver or data source. -#

    The SQL_ATTR_USE_BOOKMARKS statement attribute was set to SQL_UB_VARIABLE, and the SQL_ATTR_CURSOR_TYPE statement attribute was set to a cursor type for which the driver does not support bookmarks.

    -#
    HYT00Timeout expiredThe query timeout period expired before the data source returned the result set. The timeout period is set through SQLSetStmtAttr, SQL_ATTR_QUERY_TIMEOUT.
    HYT01Connection timeout expiredThe connection timeout period expired before the data source responded to the request. The connection timeout period is set through SQLSetConnectAttr, SQL_ATTR_CONNECTION_TIMEOUT.
    IM001Driver does not support this function(DM) The driver corresponding to the StatementHandle does not support the function.
    -# -#

    Comments

    -# -#

    SQLGetTypeInfo returns the results as a standard result set, ordered by DATA_TYPE and then by how closely the data type maps to the corresponding ODBC SQL data type. Data types defined by the data source take precedence over user-defined data types. Consequently, the sort order is not necessarily consistent but can be generalized as DATA_TYPE first, followed by TYPE_NAME, both ascending. For example, suppose that a data source defined INTEGER and COUNTER data types, where COUNTER is auto-incrementing, and that a user-defined data type WHOLENUM has also been defined. These would be returned in the order INTEGER, WHOLENUM, and COUNTER, because WHOLENUM maps closely to the ODBC SQL data type SQL_INTEGER, while the auto-incrementing data type, even though supported by the data source, does not map closely to an ODBC SQL data type. For information about how this information might be used, see "DDL Statements" in Chapter 8: SQL Statements.

    -# -#

    If the DataType argument specifies a data type which is valid for the version of ODBC supported by the driver, but is not supported by the driver, then it will return an empty result set.

    -# -#

    Note   For more information about the general use, arguments, and returned data of ODBC catalog functions, see Chapter 7: Catalog Functions.

    -# -#

    The following columns have been renamed for ODBC 3.x. The column name changes do not affect backward compatibility because applications bind by column number.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    ODBC 2.0 columnODBC 3.x column
    PRECISIONCOLUMN_SIZE
    MONEYFIXED_PREC_SCALE
    AUTO_INCREMENTAUTO_UNIQUE_VALUE
    -# -#

    The following columns have been added to the results set returned by SQLGetTypeInfo for ODBC 3.x: -# -#

      -#
    • SQL_DATA_TYPE
    • -# -#
    • INTERVAL_PRECISION
    • -# -#
    • SQL_DATETIME_SUB
    • -# -#
    • NUM_PREC_RADIX
    • -#
    -# -#

    The following table lists the columns in the result set. Additional columns beyond column 19 (INTERVAL_PRECISION) can be defined by the driver. An application should gain access to driver-specific columns by counting down from the end of the result set rather than specifying an explicit ordinal position. For more information, see "Data Returned by Catalog Functions" in Chapter 7: Catalog Functions.

    -# -#

    Note   SQLGetTypeInfo might not return all data types. For example, a driver might not return user-defined data types. Applications can use any valid data type, regardless of whether it is returned by SQLGetTypeInfo.

    -# -#

    The data types returned by SQLGetTypeInfo are those supported by the data source. They are intended for use in Data Definition Language (DDL) statements. Drivers can return result-set data using data types other than the types returned by SQLGetTypeInfo. In creating the result set for a catalog function, the driver might use a data type that is not supported by the data source.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# - { name => "type_name", - type => "varchar", - length => 20, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "data_type", - type => "smallint", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "column_size", - type => "integer", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "literal_prefix", - type => "varchar", - length => 1, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "literal_suffix", - type => "varchar", - length => 1, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "create_params", - type => "varchar", - length => 20, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "nullable", - type => "smallint", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "case_sensitive", - type => "smallint", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "searchable", - type => "smallint", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "unsigned_attribute", - type => "smallint", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "fixed_prec_scale", - type => "smallint", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "auto_unique_value", - type => "smallint", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "local_type_name", - type => "varchar", - length => 20, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "minimum_scale", - type => "smallint", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "maximum_scale", - type => "smallint", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "sql_data_type", - type => "smallint", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "sql_datetime_sub", - type => "smallint", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "num_prec_radix", - type => "integer", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "interval_precision", - type => "smallint", - length => undef, - nullable => 1, - }, -#

    -# Column name
    Column
    -# number

    -# Data type

    -# Comments
    TYPE_NAME
    -# (ODBC 2.0)
    1Varchar
    -# not NULL
    Data source–dependent data-type name; for example, "CHAR()", "VARCHAR()", "MONEY", "LONG VARBINARY", or "CHAR ( ) FOR BIT DATA". Applications must use this name in CREATE TABLE and ALTER TABLE statements.
    DATA_TYPE
    -# (ODBC 2.0)
    2Smallint
    -# not NULL
    SQL data type. This can be an ODBC SQL data type or a driver-specific SQL data type. For datetime or interval data types, this column returns the concise data type (such as SQL_TYPE_TIME or SQL_INTERVAL_YEAR_TO_MONTH). For a list of valid ODBC SQL data types, see "SQL Data Types" in Appendix D: Data Types. For information about driver-specific SQL data types, see the driver’s documentation.
    COLUMN_SIZE
    -# (ODBC 2.0)
    3IntegerThe maximum column size that the server supports for this data type. For numeric data, this is the maximum precision. For string data, this is the length in characters. For datetime data types, this is the length in characters of the string representation (assuming the maximum allowed precision of the fractional seconds component). NULL is returned for data types where column size is not applicable. For interval data types, this is the number of characters in the character representation of the interval literal (as defined by the interval leading precision; see "Interval Data Type Length" in Appendix D: Data Types). -#

    For more information on column size, see "Column Size, Decimal Digits, Transfer Octet Length, and Display Size" in Appendix D: Data Types.

    -#
    LITERAL_PREFIX
    -# (ODBC 2.0)
    4VarcharCharacter or characters used to prefix a literal; for example, a single quotation mark (') for character data types or 0x for binary data types; NULL is returned for data types where a literal prefix is not applicable.
    LITERAL_SUFFIX
    -# (ODBC 2.0)
    5VarcharCharacter or characters used to terminate a literal; for example, a single quotation mark (') for character data types; NULL is returned for data types where a literal suffix is not applicable.
    CREATE_PARAMS
    -# (ODBC 2.0)
    6VarcharA list of keywords, separated by commas, corresponding to each parameter that the application may specify in parentheses when using the name that is returned in the TYPE_NAME field. The keywords in the list can be any of the following: length, precision, or scale. They appear in the order that the syntax requires them to be used. For example, CREATE_PARAMS for DECIMAL would be "precision,scale"; CREATE_PARAMS for VARCHAR would equal "length." NULL is returned if there are no parameters for the data type definition; for example, INTEGER. -#

    The driver supplies the CREATE_PARAMS text in the language of the country where it is used.

    -#
    NULLABLE
    -# (ODBC 2.0)
    7Smallint
    -# not NULL
    Whether the data type accepts a NULL value: -#

    SQL_NO_NULLS if the data type does not accept NULL values.

    -# -#

    SQL_NULLABLE if the data type accepts NULL values.

    -# -#

    SQL_NULLABLE_UNKNOWN if it is not known whether the column accepts NULL values.

    -#
    CASE_SENSITIVE
    -# (ODBC 2.0)
    8Smallint
    -# not NULL
    Whether a character data type is case-sensitive in collations and comparisons: -#

    SQL_TRUE if the data type is a character data type and is case-sensitive.

    -# -#

    SQL_FALSE if the data type is not a character data type or is not case-sensitive.

    -#
    SEARCHABLE
    -# (ODBC 2.0)
    9Smallint
    -# not NULL
    How the data type is used in a WHERE clause: -#

    SQL_PRED_NONE if the column cannot be used in a WHERE clause. (This is the same as the SQL_UNSEARCHABLE value in ODBC 2.x.)

    -# -#

    SQL_PRED_CHAR if the column can be used in a WHERE clause, but only with the LIKE predicate. (This is the same as the SQL_LIKE_ONLY value in ODBC 2.x.)

    -# -#

    SQL_PRED_BASIC if the column can be used in a WHERE clause with all the comparison operators except LIKE (comparison, quantified comparison, BETWEEN, DISTINCT, IN, MATCH, and UNIQUE). (This is the same as the SQL_ALL_EXCEPT_LIKE value in ODBC 2.x.)

    -# -#

    SQL_SEARCHABLE if the column can be used in a WHERE clause with any comparison operator.

    -#
    UNSIGNED_ATTRIBUTE
    -# (ODBC 2.0)
    10SmallintWhether the data type is unsigned: -#

    SQL_TRUE if the data type is unsigned.

    -# -#

    SQL_FALSE if the data type is signed.

    -# -#

    NULL is returned if the attribute is not applicable to the data type or the data type is not numeric.

    -#
    FIXED_PREC_SCALE
    -# (ODBC 2.0)
    11Smallint
    -# not NULL
    Whether the data type has predefined fixed precision and scale (which are data source–specific), such as a money data type: -#

    SQL_TRUE if it has predefined fixed precision and scale.

    -# -#

    SQL_FALSE if it does not have predefined fixed precision and scale.

    -#
    AUTO_UNIQUE_VALUE
    -# (ODBC 2.0)
    12SmallintWhether the data type is autoincrementing: -#

    SQL_TRUE if the data type is autoincrementing.

    -# -#

    SQL_FALSE if the data type is not autoincrementing.

    -# -#

    NULL is returned if the attribute is not applicable to the data type or the data type is not numeric.

    -# -#

    An application can insert values into a column having this attribute, but typically cannot update the values in the column.

    -# -#

    When an insert is made into an auto-increment column, a unique value is inserted into the column at insert time. The increment is not defined, but is data source–specific. An application should not assume that an auto-increment column starts at any particular point or increments by any particular value.

    -#
    LOCAL_TYPE_NAME
    -# (ODBC 2.0)
    13VarcharLocalized version of the data source–dependent name of the data type. NULL is returned if a localized name is not supported by the data source. This name is intended for display only, such as in dialog boxes.
    MINIMUM_SCALE
    -# (ODBC 2.0)
    14SmallintThe minimum scale of the data type on the data source. If a data type has a fixed scale, the MINIMUM_SCALE and MAXIMUM_SCALE columns both contain this value. For example, an SQL_TYPE_TIMESTAMP column might have a fixed scale for fractional seconds. NULL is returned where scale is not applicable. For more information, see "Column Size, Decimal Digits, Transfer Octet Length, and Display Size" in Appendix D: Data Types.
    MAXIMUM_SCALE
    -# (ODBC 2.0)
    15SmallintThe maximum scale of the data type on the data source. NULL is returned where scale is not applicable. If the maximum scale is not defined separately on the data source, but is instead defined to be the same as the maximum precision, this column contains the same value as the COLUMN_SIZE column. For more information, see "Column Size, Decimal Digits, Transfer Octet Length, and Display Size" in Appendix D: Data Types.
    SQL_DATA_TYPE
    -# (ODBC 3.0)
    16Smallint NOT NULLThe value of the SQL data type as it appears in the SQL_DESC_TYPE field of the descriptor. This column is the same as the DATA_TYPE column, except for interval and datetime data types. -#

    For interval and datetime data types, the SQL_DATA_TYPE field in the result set will return SQL_INTERVAL or SQL_DATETIME, and the SQL_DATETIME_SUB field will return the subcode for the specific interval or datetime data type. (See Appendix D: Data Types.)

    -#
    SQL_DATETIME_SUB
    -# (ODBC 3.0)
    17SmallintWhen the value of SQL_DATA_TYPE is SQL_DATETIME or SQL_INTERVAL, this column contains the datetime/interval subcode. For data types other than datetime and interval, this field is NULL. -#

    For interval or datetime data types, the SQL_DATA_TYPE field in the result set will return SQL_INTERVAL or SQL_DATETIME, and the SQL_DATETIME_SUB field will return the subcode for the specific interval or datetime data type. (See Appendix D: Data Types.)

    -#
    NUM_PREC_RADIX
    -# (ODBC 3.0)
    18IntegerIf the data type is an approximate numeric type, this column contains the value 2 to indicate that COLUMN_SIZE specifies a number of bits. For exact numeric types, this column contains the value 10 to indicate that COLUMN_SIZE specifies a number of decimal digits. Otherwise, this column is NULL.
    INTERVAL_PRECISION
    -# (ODBC 3.0)
    19SmallintIf the data type is an interval data type, then this column contains the value of the interval leading precision. (See "Interval Data Type Precision" in Appendix D: Data Types.) Otherwise, this column is NULL.
    -# -#

    Attribute information can apply to data types or to specific columns in a result set. SQLGetTypeInfo returns information about attributes associated with data types; SQLColAttribute returns information about attributes associated with columns in a result set.

    -# -#

    Related Functions

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    For information aboutSee
    Binding a buffer to a column in a result setSQLBindCol
    Canceling statement processingSQLCancel
    Returning information about a column in a result setSQLColAttribute
    Fetching a block of data or scrolling through a result setSQLFetchScroll
    Fetching a single row or a block of data in a forward-only directionSQLFetch
    Returning information about a driver or data sourceSQLGetInfo
    -#

    -# -#
    -# -# -# -]; - -# -# odbcsqltables.htm -# -$listWhat->{tables} = [ -# -# -# -# SQLTables -# -# -# -# -# -# -#
    -#
    -# -# -# -# -#
    -# ODBC Programmer's Reference -#
    -#
    -#
    -#
    -# -#

    SQLTables

    -# -#

    Conformance

    -# -#

    Version Introduced: ODBC 1.0
    -# Standards Compliance: X/Open

    -# -#

    Summary

    -# -#

    SQLTables returns the list of table, catalog, or schema names, and table types, stored in a specific data source. The driver returns the information as a result set.

    -# -#

    Syntax

    -# -#
    SQLRETURN SQLTables(
    -#	     SQLHSTMT     StatementHandle,
    -#	     SQLCHAR *     CatalogName,
    -#	     SQLSMALLINT     NameLength1,
    -#	     SQLCHAR *     SchemaName,
    -#	     SQLSMALLINT     NameLength2,
    -#	     SQLCHAR *     TableName,
    -#	     SQLSMALLINT     NameLength3,
    -#	     SQLCHAR *     TableType,
    -#	     SQLSMALLINT     NameLength4);
    -# -#

    Arguments -# -#

    -#
    StatementHandle
    -# -#
    [Input]
    -# Statement handle for retrieved results.
    -# -#
    CatalogName
    -# -#
    [Input]
    -# Catalog name. The CatalogName argument accepts search patterns if the SQL_ODBC_VERSION environment attribute is SQL_OV_ODBC3; it does not accept search patterns if SQL_OV_ODBC2 is set. If a driver supports catalogs for some tables but not for others, such as when a driver retrieves data from different DBMSs, an empty string ("") denotes those tables that do not have catalogs. -# -#

    If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, CatalogName is treated as an identifier and its case is not significant. If it is SQL_FALSE, CatalogName is a pattern value argument; it is treated literally, and its case is significant. For more information, see "Arguments in Catalog Functions" in Chapter 7: Catalog Functions. -#

    -# -#
    NameLength1
    -# -#
    [Input]
    -# Length of *CatalogName.
    -# -#
    SchemaName
    -# -#
    [Input]
    -# String search pattern for schema names. If a driver supports schemas for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string ("") denotes those tables that do not have schemas. -# -#

    If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, SchemaName is treated as an identifier and its case is not significant. If it is SQL_FALSE, SchemaName is a pattern value argument; it is treated literally, and its case is significant. -#

    -# -#
    NameLength2
    -# -#
    [Input]
    -# Length of *SchemaName.
    -# -#
    TableName
    -# -#
    [Input]
    -# String search pattern for table names. -# -#

    If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, TableName is treated as an identifier and its case is not significant. If it is SQL_FALSE, TableName is a pattern value argument; it is treated literally, and its case is significant. -#

    -# -#
    NameLength3
    -# -#
    [Input]
    -# Length of *TableName.
    -# -#
    TableType
    -# -#
    [Input]
    -# List of table types to match. -# -#

    Note that the SQL_ATTR_METADATA_ID statement attribute has no effect upon the TableType argument. TableType is a value list argument, no matter what the setting of SQL_ATTR_METADATA_ID. -#

    -# -#
    NameLength4
    -# -#
    [Input]
    -# Length of *TableType.
    -#
    -# -#

    Returns

    -# -#

    SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

    -# -#

    Diagnostics

    -# -#

    When SQLTables returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_STMT and a Handle of StatementHandle. The following table lists the SQLSTATE values commonly returned by SQLTables and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    SQLSTATEErrorDescription
    01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
    08S01Communication link failureThe communication link between the driver and the data source to which the driver was connected failed before the function completed processing.
    24000Invalid cursor stateA cursor was open on the StatementHandle, and SQLFetch or SQLFetchScroll had been called. This error is returned by the Driver Manager if SQLFetch or SQLFetchScroll has not returned SQL_NO_DATA and is returned by the driver if SQLFetch or SQLFetchScroll has returned SQL_NO_DATA. -#

    A cursor was open on the StatementHandle, but SQLFetch or SQLFetchScroll had not been called.

    -#
    40001Serialization failureThe transaction was rolled back due to a resource deadlock with another transaction.
    40003Statement completion unknownThe associated connection failed during the execution of this function, and the state of the transaction cannot be determined.
    HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
    HY001Memory allocation
    -# error
    The driver was unable to allocate memory required to support execution or completion of the function.
    HY008Operation canceledAsynchronous processing was enabled for the StatementHandle. The function was called, and before it completed execution, SQLCancel was called on the StatementHandle. Then the function was called again on the StatementHandle. -#

    The function was called, and before it completed execution, SQLCancel was called on the StatementHandle from a different thread in a multithread application.

    -#
    HY009Invalid use of null pointerThe SQL_ATTR_METADATA_ID statement attribute was set to SQL_TRUE, the CatalogName argument was a null pointer, and the SQL_CATALOG_NAME InfoType returns that catalog names are supported. -#

    (DM) The SQL_ATTR_METADATA_ID statement attribute was set to SQL_TRUE, and the SchemaName or TableName argument was a null pointer.

    -#
    HY010Function sequence error(DM) An asynchronously executing function (not this one) was called for the StatementHandle and was still executing when this function was called. -#

    (DM) SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for the StatementHandle and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

    -#
    HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
    HY090Invalid string or buffer length(DM) The value of one of the length arguments was less than 0 but not equal to SQL_NTS. -#

    The value of one of the name length arguments exceeded the maximum length value for the corresponding name.

    -#
    HYC00Optional feature not implementedA catalog was specified, and the driver or data source does not support catalogs. -#

    A schema was specified, and the driver or data source does not support schemas.

    -# -#

    A string search pattern was specified for the catalog name, table schema, or table name, and the data source does not support search patterns for one or more of those arguments.

    -# -#

    The combination of the current settings of the SQL_ATTR_CONCURRENCY and SQL_ATTR_CURSOR_TYPE statement attributes was not supported by the driver or data source.

    -# -#

    The SQL_ATTR_USE_BOOKMARKS statement attribute was set to SQL_UB_VARIABLE, and the SQL_ATTR_CURSOR_TYPE statement attribute was set to a cursor type for which the driver does not support bookmarks.

    -#
    HYT00Timeout expiredThe query timeout period expired before the data source returned the requested result set. The timeout period is set through SQLSetStmtAttr, SQL_ATTR_QUERY_TIMEOUT.
    HYT01Connection timeout expiredThe connection timeout period expired before the data source responded to the request. The connection timeout period is set through SQLSetConnectAttr, SQL_ATTR_CONNECTION_TIMEOUT.
    IM001Driver does not support this function(DM) The driver associated with the StatementHandle does not support the function.
    -# -#

    Comments

    -# -#

    SQLTables lists all tables in the requested range. A user may or may not have SELECT privileges to any of these tables. To check accessibility, an application can: -# -#

      -#
    • Call SQLGetInfo and check the SQL_ACCESSIBLE_TABLES information type.
    • -# -#
    • Call SQLTablePrivileges to check the privileges for each table.
    • -#
    -# -#

    Otherwise, the application must be able to handle a situation where the user selects a table for which SELECT privileges are not granted.

    -# -#

    The SchemaName and TableName arguments accept search patterns. The CatalogName argument accepts search patterns if the SQL_ODBC_VERSION environment attribute is SQL_OV_ODBC3; it does not accept search patterns if SQL_OV_ODBC2 is set. If SQL_OV_ODBC3 is set, an ODBC 3.x driver will require that wildcard characters in the CatalogName argument be escaped to be treated literally. For more information about valid search patterns, see "Pattern Value Arguments" in Chapter 7: Catalog Functions.

    -# -#

    Note   For more information about the general use, arguments, and returned data of ODBC catalog functions, see Chapter 7: Catalog Functions.

    -# -#

    To support enumeration of catalogs, schemas, and table types, the following special semantics are defined for the CatalogName, SchemaName, TableName, and TableType arguments of SQLTables: -# -#

      -#
    • If CatalogName is SQL_ALL_CATALOGS and SchemaName and TableName are empty strings, the result set contains a list of valid catalogs for the data source. (All columns except the TABLE_CAT column contain NULLs.)
    • -# -#
    • If SchemaName is SQL_ALL_SCHEMAS and CatalogName and TableName are empty strings, the result set contains a list of valid schemas for the data source. (All columns except the TABLE_SCHEM column contain NULLs.)
    • -# -#
    • If TableType is SQL_ALL_TABLE_TYPES and CatalogName, SchemaName, and TableName are empty strings, the result set contains a list of valid table types for the data source. (All columns except the TABLE_TYPE column contain NULLs.)
    • -#
    -# -#

    If TableType is not an empty string, it must contain a list of comma-separated values for the types of interest; each value may be enclosed in single quotation marks (') or unquoted—for example, 'TABLE', 'VIEW' or TABLE, VIEW. An application should always specify the table type in uppercase; the driver should convert the table type to whatever case is needed by the data source. If the data source does not support a specified table type, SQLTables does not return any results for that type.

    -# -#

    SQLTables returns the results as a standard result set, ordered by TABLE_TYPE, TABLE_CAT, TABLE_SCHEM, and TABLE_NAME. For information about how this information might be used, see "Uses of Catalog Data" in Chapter 7: Catalog Functions.

    -# -#

    To determine the actual lengths of the TABLE_CAT, TABLE_SCHEM, and TABLE_NAME columns, an application can call SQLGetInfo with the SQL_MAX_CATALOG_NAME_LEN, SQL_MAX_SCHEMA_NAME_LEN, and SQL_MAX_TABLE_NAME_LEN information types.

    -# -#

    The following columns have been renamed for ODBC 3.x. The column name changes do not affect backward compatibility because applications bind by column number.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    ODBC 2.0 columnODBC 3.x column
    TABLE_QUALIFIERTABLE_CAT
    TABLE_OWNERTABLE_SCHEM
    -# -#

    The following table lists the columns in the result set. Additional columns beyond column 5 (REMARKS) can be defined by the driver. An application should gain access to driver-specific columns by counting down from the end of the result set rather than specifying an explicit ordinal position. For more information, see "Data Returned by Catalog Functions" in Chapter 7: Catalog Functions.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# - { name => "table_cat", - type => "varchar", - length => 16, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "table_schem", - type => "varchar", - length => 16, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "table_name", - type => "varchar", - length => 16, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "table_type", - type => "varchar", - length => 20, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "remarks", - type => "varchar", - length => 200, - nullable => 1, - }, -#

    -# Column name
    Column number
    -# Data type

    -# Comments
    TABLE_CAT
    -# (ODBC 1.0)
    1VarcharCatalog name; NULL if not applicable to the data source. If a driver supports catalogs for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string ("") for those tables that do not have catalogs.
    TABLE_SCHEM
    -# (ODBC 1.0)
    2VarcharSchema name; NULL if not applicable to the data source. If a driver supports schemas for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string ("") for those tables that do not have schemas.
    TABLE_NAME
    -# (ODBC 1.0)
    3VarcharTable name.
    TABLE_TYPE
    -# (ODBC 1.0)
    4VarcharTable type name; one of the following: "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM", or a data source–specific type name. -#

    The meanings of "ALIAS" and "SYNONYM" are driver-specific.

    -#
    REMARKS
    -# (ODBC 1.0)
    5VarcharA description of the table.
    -# -#

    Code Example

    -# -#

    For a code example of a similar function, see SQLColumns.

    -# -#

    Related Functions

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    For information aboutSee
    Binding a buffer to a column in a result setSQLBindCol
    Canceling statement processingSQLCancel
    Returning privileges for a column or columnsSQLColumnPrivileges
    Returning the columns in a table or tablesSQLColumns
    Fetching a single row or a block of data in a forward-only directionSQLFetch
    Fetching a block of data or scrolling through a result setSQLFetchScroll
    Returning table statistics and indexesSQLStatistics
    Returning privileges for a table or tablesSQLTablePrivileges
    -#

    -# -#
    -# -# -# -]; - -# -# odbcsqlcolumns.htm -# -$listWhat->{columns} = [ -# -# -# -# SQLColumns -# -# -# -# -# -# -#
    -#
    -# -# -# -# -#
    -# ODBC Programmer's Reference -#
    -#
    -#
    -#
    -# -#

    SQLColumns

    -# -#

    Conformance

    -# -#

    Version Introduced: ODBC 1.0
    -# Standards Compliance: X/Open

    -# -#

    Summary

    -# -#

    SQLColumns returns the list of column names in specified tables. The driver returns this information as a result set on the specified StatementHandle.

    -# -#

    Syntax

    -# -#
    SQLRETURN SQLColumns(
    -#	     SQLHSTMT     StatementHandle,
    -#	     SQLCHAR *     CatalogName,
    -#	     SQLSMALLINT     NameLength1,
    -#	     SQLCHAR *     SchemaName,
    -#	     SQLSMALLINT     NameLength2,
    -#	     SQLCHAR *     TableName,
    -#	     SQLSMALLINT     NameLength3,
    -#	     SQLCHAR *     ColumnName,
    -#	     SQLSMALLINT     NameLength4);
    -# -#

    Arguments -# -#

    -#
    StatementHandle
    -# -#
    [Input]
    -# Statement handle.
    -# -#
    CatalogName
    -# -#
    [Input]
    -# Catalog name. If a driver supports catalogs for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string ("") denotes those tables that do not have catalogs. CatalogName cannot contain a string search pattern.
    -#
    -# -#
    -# If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, CatalogName is treated as an identifier and its case is not significant. If it is SQL_FALSE, CatalogName is an ordinary argument; it is treated literally, and its case is significant. For more information, see "Arguments in Catalog Functions" in Chapter 7: Catalog Functions.
    -# -#
    -#
    NameLength1
    -# -#
    [Input]
    -# Length of *CatalogName.
    -# -#
    SchemaName
    -# -#
    [Input]
    -# String search pattern for schema names. If a driver supports schemas for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string ("") denotes those tables that do not have schemas.
    -#
    -# -#
    -# If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, SchemaName is treated as an identifier and its case is not significant. If it is SQL_FALSE, SchemaName is a pattern value argument; it is treated literally, and its case is significant.
    -# -#
    -#
    NameLength2
    -# -#
    [Input]
    -# Length of *SchemaName.
    -# -#
    TableName
    -# -#
    [Input]
    -# String search pattern for table names.
    -#
    -# -#
    -# If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, TableName is treated as an identifier and its case is not significant. If it is SQL_FALSE, TableName is a pattern value argument; it is treated literally, and its case is significant.
    -# -#
    -#
    NameLength3
    -# -#
    [Input]
    -# Length of *TableName.
    -# -#
    ColumnName
    -# -#
    [Input]
    -# String search pattern for column names.
    -#
    -# -#
    -# If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, ColumnName is treated as an identifier and its case is not significant. If it is SQL_FALSE, ColumnName is a pattern value argument; it is treated literally, and its case is significant.
    -# -#
    -#
    NameLength4
    -# -#
    [Input]
    -# Length of *ColumnName.
    -#
    -# -#

    Returns

    -# -#

    SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

    -# -#

    Diagnostics

    -# -#

    When SQLColumns returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_STMT and a Handle of StatementHandle. The following table lists the SQLSTATE values commonly returned by SQLColumns and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    SQLSTATEErrorDescription
    01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
    08S01Communication link failureThe communication link between the driver and the data source to which the driver was connected failed before the function completed processing.
    24000Invalid cursor stateA cursor was open on the StatementHandle, and SQLFetch or SQLFetchScroll had been called. This error is returned by the Driver Manager if SQLFetch or SQLFetchScroll has not returned SQL_NO_DATA, and is returned by the driver if SQLFetch or SQLFetchScroll has returned SQL_NO_DATA. -#

    A cursor was open on the StatementHandle but SQLFetch or SQLFetchScroll had not been called.

    -#
    40001Serialization failureThe transaction was rolled back due to a resource deadlock with another transaction.
    40003Statement completion unknownThe associated connection failed during the execution of this function, and the state of the transaction cannot be determined.
    HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
    HY001Memory allocation errorThe driver was unable to allocate memory required to support execution or completion of the function.
    HY008Operation canceledAsynchronous processing was enabled for the StatementHandle. The function was called, and before it completed execution, SQLCancel was called on the StatementHandle. Then the function was called again on the StatementHandle. -#

    The function was called, and before it completed execution, SQLCancel was called on the StatementHandle from a different thread in a multithread application.

    -#
    HY009Invalid use of null pointerThe SQL_ATTR_METADATA_ID statement attribute was set to SQL_TRUE, the CatalogName argument was a null pointer, and the SQL_CATALOG_NAME InfoType returns that catalog names are supported. -#

    (DM) The SQL_ATTR_METADATA_ID statement attribute was set to SQL_TRUE, and the SchemaName, TableName, or ColumnName argument was a null pointer.

    -#
    HY010Function sequence error(DM) An asynchronously executing function (not this one) was called for the StatementHandle and was still executing when this function was called. -#

    (DM) SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for the StatementHandle and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

    -#
    HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
    HY090Invalid string or buffer length(DM) The value of one of the name length arguments was less than 0 but not equal to SQL_NTS.
      The value of one of the name length arguments exceeded the maximum length value for the corresponding catalog or name. The maximum length of each catalog or name may be obtained by calling SQLGetInfo with the InfoType values. (See "Comments.")
    HYC00Optional feature not implementedA catalog name was specified, and the driver or data source does not support catalogs. -#

    A schema name was specified, and the driver or data source does not support schemas.

    -# -#

    A string search pattern was specified for the schema name, table name, or column name, and the data source does not support search patterns for one or more of those arguments.

    -# -#

    The combination of the current settings of the SQL_ATTR_CONCURRENCY and SQL_ATTR_CURSOR_TYPE statement attributes was not supported by the driver or data source.

    -# -#

    The SQL_ATTR_USE_BOOKMARKS statement attribute was set to SQL_UB_VARIABLE, and the SQL_ATTR_CURSOR_TYPE statement attribute was set to a cursor type for which the driver does not support bookmarks.

    -#
    HYT00Timeout expiredThe query timeout period expired before the data source returned the result set. The timeout period is set through SQLSetStmtAttr, SQL_ATTR_QUERY_TIMEOUT.
    HYT01Connection timeout expiredThe connection timeout period expired before the data source responded to the request. The connection timeout period is set through SQLSetConnectAttr, SQL_ATTR_CONNECTION_TIMEOUT.
    IM001Driver does not support this function(DM) The driver associated with the StatementHandle does not support the function.
    -# -#

    Comments

    -# -#

    This function typically is used before statement execution to retrieve information about columns for a table or tables from the data source's catalog. SQLColumns can be used to retrieve data for all types of items returned by SQLTables. In addition to base tables, this may include (but is not limited to) views, synonyms, system tables, and so on. By contrast, the functions SQLColAttribute and SQLDescribeCol describe the columns in a result set and the function SQLNumResultCols returns the number of columns in a result set. For more information, see "Uses of Catalog Data" in Chapter 7: Catalog Functions.

    -# -#

    Note   For more information about the general use, arguments, and returned data of ODBC catalog functions, see Chapter 7: Catalog Functions.

    -# -#

    SQLColumns returns the results as a standard result set, ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME, and ORDINAL_POSITION.

    -# -#

    Note   When an application works with an ODBC 2.x driver, no ORDINAL_POSITION column is returned in the result set. As a result, when working with ODBC 2.x drivers, the order of the columns in the column list returned by SQLColumns is not necessarily the same as the order of the columns returned when the application performs a SELECT statement on all columns in that table.

    -# -#

    Note   SQLColumns might not return all columns. For example, a driver might not return information about pseudo-columns, such as Oracle ROWID. Applications can use any valid column, whether or not it is returned by SQLColumns.

    -# -#

    Some columns that can be returned by SQLStatistics are not returned by SQLColumns. For example, SQLColumns does not return the columns in an index created over an expression or filter, such as SALARY + BENEFITS or DEPT = 0012.

    -# -#

    The lengths of VARCHAR columns are not shown in the table; the actual lengths depend on the data source. To determine the actual lengths of the TABLE_CAT, TABLE_SCHEM, TABLE_NAME, and COLUMN_NAME columns, an application can call SQLGetInfo with the SQL_MAX_CATALOG_NAME_LEN, SQL_MAX_SCHEMA_NAME_LEN, SQL_MAX_TABLE_NAME_LEN, and SQL_MAX_COLUMN_NAME_LEN options.

    -# -#

    The following columns have been renamed for ODBC 3.x. The column name changes do not affect backward compatibility because applications bind by column number.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    ODBC 2.0 columnODBC 3.x column
    TABLE_QUALIFIERTABLE_CAT
    TABLE_OWNERTABLE_SCHEM
    PRECISIONCOLUMN_SIZE
    LENGTHBUFFER_LENGTH
    SCALEDECIMAL_DIGITS
    RADIXNUM_PREC_RADIX
    -# -#

    The following columns have been added to the result set returned by SQLColumns for ODBC 3.x:

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
       CHAR_OCTET_LENGTH ORDINAL_POSITION
       COLUMN_DEFSQL_DATA_TYPE
       IS_NULLABLE SQL_DATETIME_SUB
    -# -#

    The following table lists the columns in the result set. Additional columns beyond column 18 (IS_NULLABLE) can be defined by the driver. An application should gain access to driver-specific columns by counting down from the end of the result set rather than specifying an explicit ordinal position. For more information, see "Data Returned by Catalog Functions" in Chapter 7: Catalog Functions.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# - { name => "table_cat", - type => "varchar", - length => 16, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "table_schem", - type => "varchar", - length => 16, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "table_name", - type => "varchar", - length => 16, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "column_name", - type => "varchar", - length => 16, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "data_type", - type => "smallint", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "type_name", - type => "varchar", - length => 20, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "column_size", - type => "integer", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "buffer_length", - type => "integer", - length => 16, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "decimal_digits", - type => "smallint", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "num_prec_radix", - type => "smallint", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "nullable", - type => "smallint", - length => 16, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "remarks", - type => "varchar", - length => 200, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "column_def", - type => "varchar", - length => 100, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "sql_data_type", - type => "smallint", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "sql_datetime_sub", - type => "smallint", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "char_octet_length", - type => "integer", - length => undef, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "ordinal_position", - type => "integer", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "is_nullable", - type => "varchar", - length => 3, - nullable => 1, - }, -#

    -# Column name
    Column
    -# number

    -# Data type

    -# Comments
    TABLE_CAT
    -# (ODBC 1.0)
    1VarcharCatalog name; NULL if not applicable to the data source. If a driver supports catalogs for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string ("") for those tables that do not have catalogs.
    TABLE_SCHEM
    -# (ODBC 1.0)
    2Varchar Schema name; NULL if not applicable to the data source. If a driver supports schemas for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string ("") for those tables that do not have schemas.
    TABLE_NAME
    -# (ODBC 1.0)
    3Varchar not NULLTable name.
    COLUMN_NAME
    -# (ODBC 1.0)
    4Varchar not NULLColumn name. The driver returns an empty string for a column that does not have a name.
    DATA_TYPE
    -# (ODBC 1.0)
    5Smallint not NULLSQL data type. This can be an ODBC SQL data type or a driver-specific SQL data type. For datetime and interval data types, this column returns the concise data type (such as SQL_TYPE_DATE or SQL_INTERVAL_YEAR_TO_MONTH, rather than the nonconcise data type such as SQL_DATETIME or SQL_INTERVAL). For a list of valid ODBC SQL data types, see "SQL Data Types" in Appendix D: Data Types. For information about driver-specific SQL data types, see the driver's documentation. -#

    The data types returned for ODBC 3.x and ODBC 2.x applications may be different. For more information, see "Backward Compatibility and Standards Compliance" in Chapter 17: Programming Considerations.

    -#
    TYPE_NAME
    -# (ODBC 1.0)
    6Varchar not NULLData source–dependent data type name; for example, "CHAR", "VARCHAR", "MONEY", "LONG VARBINAR", or "CHAR ( ) FOR BIT DATA".
    COLUMN_SIZE
    -# (ODBC 1.0)
    7IntegerIf DATA_TYPE is SQL_CHAR or SQL_VARCHAR, this column contains the maximum length in characters of the column. For datetime data types, this is the total number of characters required to display the value when converted to characters. For numeric data types, this is either the total number of digits or the total number of bits allowed in the column, according to the NUM_PREC_RADIX column. For interval data types, this is the number of characters in the character representation of the interval literal (as defined by the interval leading precision, see "Interval Data Type Length" in Appendix D: Data Types). For more information, see "Column Size, Decimal Digits, Transfer Octet Length, and Display Size" in Appendix D: Data Types.
    BUFFER_LENGTH
    -# (ODBC 1.0)
    8IntegerThe length in bytes of data transferred on an SQLGetData, SQLFetch, or SQLFetchScroll operation if SQL_C_DEFAULT is specified. For numeric data, this size may be different than the size of the data stored on the data source. This value might be different than COLUMN_SIZE column for character data. For more information about length, see "Column Size, Decimal Digits, Transfer Octet Length, and Display Size" in Appendix D: Data Types.
    DECIMAL_DIGITS
    -# (ODBC 1.0)
    9SmallintThe total number of significant digits to the right of the decimal point. For SQL_TYPE_TIME and SQL_TYPE_TIMESTAMP, this column contains the number of digits in the fractional seconds component. For the other data types, this is the decimal digits of the column on the data source. For interval data types that contain a time component, this column contains the number of digits to the right of the decimal point (fractional seconds). For interval data types that do not contain a time component, this column is 0. For more information about decimal digits, see "Column Size, Decimal Digits, Transfer Octet Length, and Display Size" in Appendix D: Data Types. NULL is returned for data types where DECIMAL_DIGITS is not applicable.
    NUM_PREC_RADIX
    -# (ODBC 1.0)
    10SmallintFor numeric data types, either 10 or 2. If it is 10, the values in COLUMN_SIZE and DECIMAL_DIGITS give the number of decimal digits allowed for the column. For example, a DECIMAL(12,5) column would return a NUM_PREC_RADIX of 10, a COLUMN_SIZE of 12, and a DECIMAL_DIGITS of 5; a FLOAT column could return a NUM_PREC_RADIX of 10, a COLUMN_SIZE of 15, and a DECIMAL_DIGITS of NULL. -#

    If it is 2, the values in COLUMN_SIZE and DECIMAL_DIGITS give the number of bits allowed in the column. For example, a FLOAT column could return a RADIX of 2, a COLUMN_SIZE of 53, and a DECIMAL_DIGITS of NULL.

    -# -#

    NULL is returned for data types where NUM_PREC_RADIX is not applicable.

    -#
    NULLABLE
    -# (ODBC 1.0)
    11Smallint not NULLSQL_NO_NULLS if the column could not include NULL values. -#

    SQL_NULLABLE if the column accepts NULL values.

    -# -#

    SQL_NULLABLE_UNKNOWN if it is not known whether the column accepts NULL values.

    -# -#

    The value returned for this column is different from the value returned for the IS_NULLABLE column. The NULLABLE column indicates with certainty that a column can accept NULLs, but cannot indicate with certainty that a column does not accept NULLs. The IS_NULLABLE column indicates with certainty that a column cannot accept NULLs, but cannot indicate with certainty that a column accepts NULLs.

    -#
    REMARKS
    -# (ODBC 1.0)
    12VarcharA description of the column.
    COLUMN_DEF
    -# (ODBC 3.0)
    13VarcharThe default value of the column. The value in this column should be interpreted as a string if it is enclosed in quotation marks. -#

    If NULL was specified as the default value, then this column is the word NULL, not enclosed in quotation marks. If the default value cannot be represented without truncation, then this column contains TRUNCATED, with no enclosing single quotation marks. If no default value was specified, then this column is NULL.

    -# -#

    The value of COLUMN_DEF can be used in generating a new column definition, except when it contains the value TRUNCATED.

    -#
    SQL_DATA_TYPE
    -# (ODBC 3.0)
    14Smallint not NULLSQL data type, as it appears in the SQL_DESC_TYPE record field in the IRD. This can be an ODBC SQL data type or a driver-specific SQL data type. This column is the same as the DATA_TYPE column, with the exception of datetime and interval data types. This column returns the nonconcise data type (such as SQL_DATETIME or SQL_INTERVAL), rather than the concise data type (such as SQL_TYPE_DATE or SQL_INTERVAL_YEAR_TO_MONTH) for datetime and interval data types. If this column returns SQL_DATETIME or SQL_INTERVAL, the specific data type can be determined from the SQL_DATETIME_SUB column. For a list of valid ODBC SQL data types, see "SQL Data Types" in Appendix D: Data Types. For information about driver-specific SQL data types, see the driver's documentation. -#

    The data types returned for ODBC 3.x and ODBC 2.x applications may be different. For more information, see "Backward Compatibility and Standards Compliance" in Chapter 17: Programming Considerations.

    -#
    SQL_DATETIME_SUB
    -# (ODBC 3.0)
    15SmallintThe subtype code for datetime and interval data types. For other data types, this column returns a NULL. For more information about datetime and interval subcodes, see "SQL_DESC_DATETIME_INTERVAL_CODE" in SQLSetDescField.
    CHAR_OCTET_LENGTH
    -# (ODBC 3.0)
    16IntegerThe maximum length in bytes of a character or binary data type column. For all other data types, this column returns a NULL.
    ORDINAL_POSITION
    -# (ODBC 3.0)
    17Integer not NULLThe ordinal position of the column in the table. The first column in the table is number 1.
    IS_NULLABLE
    -# (ODBC 3.0)
    18Varchar"NO" if the column does not include NULLs. -#

    "YES" if the column could include NULLs.

    -# -#

    This column returns a zero-length string if nullability is unknown.

    -# -#

    ISO rules are followed to determine nullability. An ISO SQL–compliant DBMS cannot return an empty string.

    -# -#

    The value returned for this column is different from the value returned for the NULLABLE column. (See the description of the NULLABLE column.)

    -#
    -# -#

    Code Example

    -# -#

    In the following example, an application declares buffers for the result set returned by SQLColumns. It calls SQLColumns to return a result set that describes each column in the EMPLOYEE table. It then calls SQLBindCol to bind the columns in the result set to the buffers. Finally, the application fetches each row of data with SQLFetch and processes it.

    -# -#
    #define STR_LEN 128+1
    -#	#define REM_LEN 254+1
    -#	
    -#	/* Declare buffers for result set data */
    -#	
    -#	SQLCHAR       szCatalog[STR_LEN], szSchema[STR_LEN];
    -#	SQLCHAR       szTableName[STR_LEN], szColumnName[STR_LEN];
    -#	SQLCHAR       szTypeName[STR_LEN], szRemarks[REM_LEN];
    -#	SQLCHAR       szColumnDefault[STR_LEN], szIsNullable[STR_LEN];
    -#	SQLINTEGER    ColumnSize, BufferLength, CharOctetLength, OrdinalPosition;
    -#	SQLSMALLINT   DataType, DecimalDigits, NumPrecRadix, Nullable;
    -#	SQLSMALLINT   SQLDataType, DatetimeSubtypeCode;
    -#	SQLRETURN     retcode;
    -#	SQLHSTMT      hstmt;
    -#	
    -#	/* Declare buffers for bytes available to return */
    -#	
    -#	SQLINTEGER cbCatalog, cbSchema, cbTableName, cbColumnName;
    -#	SQLINTEGER cbDataType, cbTypeName, cbColumnSize, cbBufferLength;
    -#	SQLINTEGER cbDecimalDigits, cbNumPrecRadix, cbNullable, cbRemarks;
    -#	SQLINTEGER cbColumnDefault, cbSQLDataType, cbDatetimeSubtypeCode, cbCharOctetLength;
    -#	SQLINTEGER cbOrdinalPosition, cbIsNullable;
    -#	
    -#	retcode = SQLColumns(hstmt,
    -#	         NULL, 0,                /* All catalogs */
    -#	         NULL, 0,                /* All schemas */
    -#	         "CUSTOMERS", SQL_NTS,   /* CUSTOMERS table */
    -#	         NULL, 0);               /* All columns */
    -#	
    -#	if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
    -#	
    -#	   /* Bind columns in result set to buffers */
    -#	
    -#	   SQLBindCol(hstmt, 1, SQL_C_CHAR, szCatalog, STR_LEN,&cbCatalog);
    -#	   SQLBindCol(hstmt, 2, SQL_C_CHAR, szSchema, STR_LEN, &cbSchema);
    -#	   SQLBindCol(hstmt, 3, SQL_C_CHAR, szTableName, STR_LEN,&cbTableName);
    -#	   SQLBindCol(hstmt, 4, SQL_C_CHAR, szColumnName, STR_LEN, &cbColumnName);
    -#	   SQLBindCol(hstmt, 5, SQL_C_SSHORT, &DataType, 0, &cbDataType);
    -#	   SQLBindCol(hstmt, 6, SQL_C_CHAR, szTypeName, STR_LEN, &cbTypeName);
    -#	   SQLBindCol(hstmt, 7, SQL_C_SLONG, &ColumnSize, 0, &cbColumnSize);
    -#	   SQLBindCol(hstmt, 8, SQL_C_SLONG, &BufferLength, 0, &cbBufferLength);
    -#	   SQLBindCol(hstmt, 9, SQL_C_SSHORT, &DecimalDigits, 0, &cbDecimalDigits);
    -#	   SQLBindCol(hstmt, 10, SQL_C_SSHORT, &NumPrecRadix, 0, &cbNumPrecRadix);
    -#	   SQLBindCol(hstmt, 11, SQL_C_SSHORT, &Nullable, 0, &cbNullable);
    -#	   SQLBindCol(hstmt, 12, SQL_C_CHAR, szRemarks, REM_LEN, &cbRemarks);
    -#	   SQLBindCol(hstmt, 13, SQL_C_CHAR, szColumnDefault, STR_LEN, &cbColumnDefault);
    -#	SQLBindCol(hstmt, 14, SQL_C_SSHORT, &SQLDataType, 0, &cbSQLDataType);
    -#	   SQLBindCol(hstmt, 15, SQL_C_SSHORT, &DatetimeSubtypeCode, 0,
    -#	      &cbDatetimeSubtypeCode);
    -#	   SQLBindCol(hstmt, 16, SQL_C_SLONG, &CharOctetLength, 0, &cbCharOctetLength);
    -#	   SQLBindCol(hstmt, 17, SQL_C_SLONG, &OrdinalPosition, 0, &cbOrdinalPosition);
    -#	   SQLBindCol(hstmt, 18, SQL_C_CHAR, szIsNullable, STR_LEN, &cbIsNullable);
    -#	   while(TRUE) {
    -#	      retcode = SQLFetch(hstmt);
    -#	      if (retcode == SQL_ERROR || retcode == SQL_SUCCESS_WITH_INFO) {
    -#	         show_error( );
    -#	      }
    -#	      if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO){
    -#	            ;   /* Process fetched data */
    -#	      } else {
    -#	         break;
    -#	      }
    -#	   }
    -#	}
    -# -#

    Related Functions

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    For information aboutSee
    Binding a buffer to a column in a result setSQLBindCol
    Canceling statement processingSQLCancel
    Returning privileges for a column or columnsSQLColumnPrivileges
    Fetching a block of data or scrolling through a result setSQLFetchScroll
    Fetching multiple rows of dataSQLFetch
    Returning columns that uniquely identify a row, or columns automatically updated by a transactionSQLSpecialColumns
    Returning table statistics and indexesSQLStatistics
    Returning a list of tables in a data sourceSQLTables
    Returning privileges for a table or tablesSQLTablePrivileges
    -#

    -# -#
    -# -# -# -]; - -# -# odbcsqlprimarykeys.htm -# -$listWhat->{primarykeys} = [ -# -# -# -# SQLPrimaryKeys -# -# -# -# -# -# -#
    -#
    -# -# -# -# -#
    -# ODBC Programmer's Reference -#
    -#
    -#
    -#
    -# -#

    SQLPrimaryKeys

    -# -#

    Conformance

    -# -#

    Version Introduced: ODBC 1.0
    -# Standards Compliance: ODBC

    -# -#

    Summary

    -# -#

    SQLPrimaryKeys returns the column names that make up the primary key for a table. The driver returns the information as a result set. This function does not support returning primary keys from multiple tables in a single call.

    -# -#

    Syntax

    -# -#
    SQLRETURN SQLPrimaryKeys(
    -#	     SQLHSTMT     StatementHandle,
    -#	     SQLCHAR *     CatalogName,
    -#	     SQLSMALLINT     NameLength1,
    -#	     SQLCHAR *     SchemaName,
    -#	     SQLSMALLINT     NameLength2,
    -#	     SQLCHAR *     TableName,
    -#	     SQLSMALLINT     NameLength3);
    -# -#

    Arguments -# -#

    -#
    StatementHandle
    -# -#
    [Input]
    -# Statement handle.
    -# -#
    CatalogName
    -# -#
    [Input]
    -# Catalog name. If a driver supports catalogs for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string ("") denotes those tables that do not have catalogs. CatalogName cannot contain a string search pattern. -# -#

    If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, CatalogName is treated as an identifier and its case is not significant. If it is SQL_FALSE, CatalogName is an ordinary argument; it is treated literally, and its case is significant. For more information, see "Arguments in Catalog Functions" in Chapter 7: Catalog Functions. -#

    -# -#
    NameLength1
    -# -#
    [Input]
    -# Length in bytes of *CatalogName.
    -# -#
    SchemaName
    -# -#
    [Input]
    -# Schema name. If a driver supports schemas for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string ("") denotes those tables that do not have schemas. SchemaName cannot contain a string search pattern. -# -#

    If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, SchemaName is treated as an identifier and its case is not significant. If it is SQL_FALSE, SchemaName is an ordinary argument; it is treated literally, and its case is not significant. -#

    -# -#
    NameLength2
    -# -#
    [Input]
    -# Length in bytes of *SchemaName.
    -# -#
    TableName
    -# -#
    [Input]
    -# Table name. This argument cannot be a null pointer. TableName cannot contain a string search pattern. -# -#

    If the SQL_ATTR_METADATA_ID statement attribute is set to SQL_TRUE, TableName is treated as an identifier and its case is not significant. If it is SQL_FALSE, TableName is an ordinary argument; it is treated literally, and its case is not significant. -#

    -# -#
    NameLength3
    -# -#
    [Input]
    -# Length in bytes of *TableName.
    -#
    -# -#

    Returns

    -# -#

    SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

    -# -#

    Diagnostics

    -# -#

    When SQLPrimaryKeys returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value can be obtained by calling SQLGetDiagRec with a HandleType of SQL_HANDLE_STMT and a Handle of StatementHandle. The following table lists the SQLSTATE values commonly returned by SQLPrimaryKeys and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    SQLSTATEErrorDescription
    01000General warningDriver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)
    08S01Communication link failureThe communication link between the driver and the data source to which the driver was connected failed before the function completed processing.
    24000Invalid cursor state(DM) A cursor was open on the StatementHandle, and SQLFetch or SQLFetchScroll had been called. -#

    A cursor was open on the StatementHandle, but SQLFetch or SQLFetchScroll had not been called.

    -#
    40001Serialization failureThe transaction was rolled back due to a resource deadlock with another transaction.
    40003Statement completion unknownThe associated connection failed during the execution of this function, and the state of the transaction cannot be determined.
    HY000General errorAn error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by SQLGetDiagRec in the *MessageText buffer describes the error and its cause.
    HY001Memory allocation errorThe driver was unable to allocate memory required to support execution or completion of the function.
    HY008Operation canceledAsynchronous processing was enabled for the StatementHandle. The function was called, and before it completed execution, SQLCancel was called on the StatementHandle. Then the function was called again on the StatementHandle. -#

    The function was called, and before it completed execution, SQLCancel was called on the StatementHandle from a different thread in a multithread application.

    -#
    HY009Invalid use of null pointer(DM) The TableName argument was a null pointer. -#

    The SQL_ATTR_METADATA_ID statement attribute was set to SQL_TRUE, the CatalogName argument was a null pointer, and SQLGetInfo with the SQL_CATALOG_NAME information type returns that catalog names are supported.

    -# -#

    (DM) The SQL_ATTR_METADATA_ID statement attribute was set to SQL_TRUE, and the SchemaName argument was a null pointer.

    -#
    HY010Function sequence error(DM) An asynchronously executing function (not this one) was called for the StatementHandle and was still executing when this function was called. -#

    (DM) SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for the StatementHandle and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

    -#
    HY013Memory management errorThe function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.
    HY090Invalid string or buffer length(DM) The value of one of the name length arguments was less than 0 but not equal to SQL_NTS, and the associated name argument is not a null pointer. -#

    The value of one of the name length arguments exceeded the maximum length value for the corresponding name.

    -#
    HYC00Optional feature not implementedA catalog was specified, and the driver or data source does not support catalogs. -#

    A schema was specified and the driver or data source does not support schemas.

    -# -#

    The combination of the current settings of the SQL_ATTR_CONCURRENCY and SQL_ATTR_CURSOR_TYPE statement attributes was not supported by the driver or data source.

    -# -#

    The SQL_ATTR_USE_BOOKMARKS statement attribute was set to SQL_UB_VARIABLE, and the SQL_ATTR_CURSOR_TYPE statement attribute was set to a cursor type for which the driver does not support bookmarks.

    -#
    HYT00Timeout expiredThe timeout period expired before the data source returned the requested result set. The timeout period is set through SQLSetStmtAttr, SQL_ATTR_QUERY_TIMEOUT.
    HYT01Connection timeout expiredThe connection timeout period expired before the data source responded to the request. The connection timeout period is set through SQLSetConnectAttr, SQL_ATTR_CONNECTION_TIMEOUT.
    IM001Driver does not support this function(DM) The driver associated with the StatementHandle does not support the function.
    -# -#

    Comments

    -# -#

    SQLPrimaryKeys returns the results as a standard result set, ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME, and KEY_SEQ. For information about how this information might be used, see "Uses of Catalog Data" in Chapter 7: Catalog Functions.

    -# -#

    The following columns have been renamed for ODBC 3.x. The column name changes do not affect backward compatibility because applications bind by column number.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    ODBC 2.0 columnODBC 3.x column
    TABLE_QUALIFIERTABLE_CAT
    TABLE_OWNERTABLE_SCHEM
    -# -#

    To determine the actual lengths of the TABLE_CAT, TABLE_SCHEM, TABLE_NAME, and COLUMN_NAME columns, call SQLGetInfo with the SQL_MAX_CATALOG_NAME_LEN, SQL_MAX_SCHEMA_NAME_LEN, SQL_MAX_TABLE_NAME_LEN, and SQL_MAX_COLUMN_NAME_LEN options.

    -# -#

    Note   For more information about the general use, arguments, and returned data of ODBC catalog functions, see Chapter 7: Catalog Functions.

    -# -#

    The following table lists the columns in the result set. Additional columns beyond column 6 (PK_NAME) can be defined by the driver. An application should gain access to driver-specific columns by counting down from the end of the result set rather than specifying an explicit ordinal position. For more information, see "Data Returned by Catalog Functions" in Chapter 7: Catalog Functions.

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# - { name => "table_cat", - type => "varchar", - length => 16, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "table_schem", - type => "varchar", - length => 16, - nullable => 1, - }, -# -# -# -# -# -# -# - { name => "table_name", - type => "varchar", - length => 16, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "column_name", - type => "varchar", - length => 16, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "key_seq", - type => "smallint", - length => undef, - nullable => 0, - }, -# -# -# -# -# -# -# - { name => "pk_name", - type => "varchar", - length => 16, - nullable => 1, - }, -#

    -# Column name
    Column number
    -# Data type

    -# Comments
    TABLE_CAT
    -# (ODBC 1.0)
    1VarcharPrimary key table catalog name; NULL if not applicable to the data source. If a driver supports catalogs for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string ("") for those tables that do not have catalogs.
    TABLE_SCHEM
    -# (ODBC 1.0)
    2VarcharPrimary key table schema name; NULL if not applicable to the data source. If a driver supports schemas for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string ("") for those tables that do not have schemas.
    TABLE_NAME
    -# (ODBC 1.0)
    3Varchar
    -# not NULL
    Primary key table name.
    COLUMN_NAME
    -# (ODBC 1.0)
    4Varchar
    -# not NULL
    Primary key column name. The driver returns an empty string for a column that does not have a name.
    KEY_SEQ
    -# (ODBC 1.0)
    5Smallint
    -# not NULL
    Column sequence number in key (starting with 1).
    PK_NAME
    -# (ODBC 2.0)
    6VarcharPrimary key name. NULL if not applicable to the data source.
    -# -#

    Code Example

    -# -#

    See SQLForeignKeys.

    -# -#

    Related Functions

    -#
    -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
    For information aboutSee
    Binding a buffer to a column in a result setSQLBindCol
    Canceling statement processingSQLCancel
    Fetching a block of data or scrolling through a result setSQLFetchScroll
    Fetching a single row or a block of data in a forward-only directionSQLFetch
    Returning the columns of foreign keysSQLForeignKeys
    Returning table statistics and indexesSQLStatistics
    -#

    -# -#
    -# -# -# -]; - -my $list = $listWhat->{$what} or die "$what?"; -my $i4 = " " x 4; -if ($opt eq '-l') { - print join(", ", map($_->{name}, @$list)), "\n"; - exit; -} -if ($opt eq '-c') { - my $pos = 0; - for my $p (@$list) { - print "${i4}ConnSys::Column::Column(\n"; - $pos++; - print "\t$pos,\n"; - print "\t\"" . uc($p->{name}) . "\",\n"; - print "\tfalse,\n"; - print "\tNdbType(NdbType::"; - if ($p->{type} eq 'varchar') { - print "String, 8, $p->{length}"; - } else { - print "Signed, 32, 1"; - } - print ", " . ($p->{nullable} ? "true" : "false"); - print ")\n"; - print "${i4}),\n"; - } - exit; -} -print "$opt?\n"; - -# vim: set sw=4: diff --git a/ndb/src/old_files/client/odbc/docs/type.txt b/ndb/src/old_files/client/odbc/docs/type.txt deleted file mode 100644 index d7b391afc55..00000000000 --- a/ndb/src/old_files/client/odbc/docs/type.txt +++ /dev/null @@ -1,333 +0,0 @@ -ODBC Programmer's Reference -****** SQL Data Types ****** -Each DBMS defines its own SQL types. Each ODBC driver exposes only those SQL -data types that the associated DBMS defines. How a driver maps DBMS SQL types -to the ODBC-defined SQL type identifiers and how a driver maps DBMS SQL types -to its own driver-specific SQL type identifiers are returned through a call to -SQLGetTypeInfo. A driver also returns the SQL data types when describing the -data types of columns and parameters through calls to SQLColAttribute, -SQLColumns, SQLDescribeCol, SQLDescribeParam, SQLProcedureColumns, and -SQLSpecialColumns. -Note The SQL data types are contained in the SQL_DESC_ CONCISE_TYPE, -SQL_DESC_TYPE, and SQL_DESC_DATETIME_INTERVAL_CODE fields of the implementation -descriptors. Characteristics of the SQL data types are contained in the -SQL_DESC_PRECISION, SQL_DESC_SCALE, SQL_DESC_LENGTH, and SQL_DESC_OCTET_LENGTH -fields of the implementation descriptors. For more information, see "Data_Type -Identifiers_and_Descriptors" later in this appendix. -A given driver and data source do not necessarily support all of the SQL data -types defined in this appendix. A driver's support for SQL data types depends -on the level of SQL-92 that the driver conforms to. To determine the level of -SQL-92 grammar supported by the driver, an application calls SQLGetInfo with -the SQL_SQL_CONFORMANCE information type. Furthermore, a given driver and data -source may support additional, driver-specific SQL data types. To determine -which data types a driver supports, an application calls SQLGetTypeInfo. For -information about driver-specific SQL data types, see the driver's -documentation. For information about the data types in a specific data source, -see the documentation for that data source. -Important The tables throughout this appendix are only guidelines and show -commonly used names, ranges, and limits of SQL data types. A given data source -might support only some of the listed data types, and the characteristics of -the supported data types can differ from those listed. -The following table lists valid SQL type identifiers for all SQL data types. -The table also lists the name and description of the corresponding data type -from SQL-92 (if one exists). -SQL type identifier[1] Typical SQL data Typical type description - type[2] -SQL_CHAR CHAR(n) Character string of fixed - string length n. -SQL_VARCHAR VARCHAR(n) Variable-length character - string with a maximum - string length n. -SQL_LONGVARCHAR LONG VARCHAR Variable length character - data. Maximum length is - data source–dependent.[9] -SQL_WCHAR WCHAR(n) Unicode character string - of fixed string length n -SQL_WVARCHAR VARWCHAR(n) Unicode variable-length - character string with a - maximum string length n -SQL_WLONGVARCHAR LONGWVARCHAR Unicode variable-length - character data. Maximum - length is data - source–dependent -SQL_DECIMAL DECIMAL(p,s) Signed, exact, numeric - value with a precision of - at least p and scale s. - (The maximum precision is - driver-defined.) - (1 <= p <= 15; s <= p). - [4] -SQL_NUMERIC NUMERIC(p,s) Signed, exact, numeric - value with a precision p - and scale s - (1 <= p <= 15; s <= p). - [4] -SQL_SMALLINT SMALLINT Exact numeric value with - precision 5 and scale 0 - (signed: - –32,768 <= n <= 32,767, - unsigned: - 0 <= n <= 65,535)[3]. -SQL_INTEGER INTEGER Exact numeric value with - precision 10 and scale 0 - (signed: - –2[31] <= n <= 2[31] – 1, - unsigned: - 0 <= n <= 2[32] – 1)[3]. -SQL_REAL REAL Signed, approximate, - numeric value with a - binary precision 24 (zero - or absolute value 10[–38] - to 10[38]). -SQL_FLOAT FLOAT(p) Signed, approximate, - numeric value with a - binary precision of at - least p. (The maximum - precision is driver- - defined.)[5] -SQL_DOUBLE DOUBLE PRECISION Signed, approximate, - numeric value with a - binary precision 53 (zero - or absolute value 10 - [–308] to 10[308]). -SQL_BIT BIT Single bit binary data. - [8] -SQL_TINYINT TINYINT Exact numeric value with - precision 3 and scale 0 - (signed: - –128 <= n <= 127, - unsigned: - 0 <= n <= 255)[3]. -SQL_BIGINT BIGINT Exact numeric value with - precision 19 (if signed) - or 20 (if unsigned) and - scale 0 - (signed: - –2[63] <= n <= 2[63] – 1, - - unsigned: - 0 <= n <= 2[64] – 1)[3], - [9]. -SQL_BINARY BINARY(n) Binary data of fixed - length n.[9] -SQL_VARBINARY VARBINARY(n) Variable length binary - data of maximum length n. - The maximum is set by the - user.[9] -SQL_LONGVARBINARY LONG VARBINARY Variable length binary - data. Maximum length is - data source–dependent.[9] -SQL_TYPE_DATE[6] DATE Year, month, and day - fields, conforming to the - rules of the Gregorian - calendar. (See - "Constraints_of_the - Gregorian_Calendar," - later in this appendix.) -SQL_TYPE_TIME[6] TIME(p) Hour, minute, and second - fields, with valid values - for hours of 00 to 23, - valid values for minutes - of 00 to 59, and valid - values for seconds of 00 - to 61. Precision p - indicates the seconds - precision. -SQL_TYPE_TIMESTAMP[6] TIMESTAMP(p) Year, month, day, hour, - minute, and second - fields, with valid values - as defined for the DATE - and TIME data types. -SQL_INTERVAL_MONTH[7] INTERVAL MONTH(p) Number of months between - two dates; p is the - interval leading - precision. -SQL_INTERVAL_YEAR[7] INTERVAL YEAR(p) Number of years between - two dates; p is the - interval leading - precision. -SQL_INTERVAL_YEAR_TO_MONTH[7] INTERVAL YEAR(p) TO Number of years and - MONTH months between two dates; - p is the interval leading - precision. -SQL_INTERVAL_DAY[7] INTERVAL DAY(p) Number of days between - two dates; p is the - interval leading - precision. -SQL_INTERVAL_HOUR[7] INTERVAL HOUR(p) Number of hours between - two date/times; p is the - interval leading - precision. -SQL_INTERVAL_MINUTE[7] INTERVAL MINUTE(p) Number of minutes between - two date/times; p is the - interval leading - precision. -SQL_INTERVAL_SECOND[7] INTERVAL SECOND(p,q) Number of seconds between - two date/times; p is the - interval leading - precision and q is the - interval seconds - precision. -SQL_INTERVAL_DAY_TO_HOUR[7] INTERVAL DAY(p) TO HOUR Number of days/hours - between two date/times; p - is the interval leading - precision. -SQL_INTERVAL_DAY_TO_MINUTE[7] INTERVAL DAY(p) TO Number of days/hours/ - MINUTE minutes between two date/ - times; p is the interval - leading precision. -SQL_INTERVAL_DAY_TO_SECOND[7] INTERVAL DAY(p) TO Number of days/hours/ - SECOND(q) minutes/seconds between - two date/times; p is the - interval leading - precision and q is the - interval seconds - precision. -SQL_INTERVAL_HOUR_TO_MINUTE INTERVAL HOUR(p) TO Number of hours/minutes -[7] MINUTE between two date/times; p - is the interval leading - precision. -SQL_INTERVAL_HOUR_TO_SECOND INTERVAL HOUR(p) TO Number of hours/minutes/ -[7] SECOND(q) seconds between two date/ - times; p is the interval - leading precision and q - is the interval seconds - precision. -SQL_INTERVAL_MINUTE_TO_SECOND INTERVAL MINUTE(p) TO Number of minutes/seconds -[7] SECOND(q) between two date/times; p - is the interval leading - precision and q is the - interval seconds - precision. -SQL_GUID GUID Fixed length Globally - Unique Identifier. -[1] This is the value returned in the DATA_TYPE column by a call to -SQLGetTypeInfo. -[2] This is the value returned in the NAME and CREATE PARAMS column by a call -to SQLGetTypeInfo. The NAME column returns the designation—for example, -CHAR—while the CREATE PARAMS column returns a comma-separated list of creation -parameters such as precision, scale, and length. -[3] An application uses SQLGetTypeInfo or SQLColAttribute to determine if a -particular data type or a particular column in a result set is unsigned. -[4] SQL_DECIMAL and SQL_NUMERIC data types differ only in their precision. -The precision of a DECIMAL(p,s) is an implementation-defined decimal precision -that is no less than p, while the precision of a NUMERIC(p,s) is exactly equal -to p. -[5] Depending on the implementation, the precision of SQL_FLOAT can be either -24 or 53: if it is 24, the SQL_FLOAT data type is the same as SQL_REAL; if it -is 53, the SQL_FLOAT data type is the same as SQL_DOUBLE. -[6] In ODBC 3.x, the SQL date, time, and timestamp data types are -SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP, respectively; in ODBC -2.x, the data types are SQL_DATE, SQL_TIME, and SQL_TIMESTAMP. -[7] For more information on the interval SQL data types, see the "Interval -Data_Types" section, later in this appendix. -[8] The SQL_BIT data type has different characteristics than the BIT type in -SQL-92. -[9] This data type has no corresponding data type in SQL-92. -ODBC Programmer's Reference -************ CC DDaattaa TTyyppeess ************ -ODBC C data types indicate the data type of C buffers used to store data in the -application. -All drivers must support all C data types. This is required because all drivers -must support all C types to which SQL types that they support can be converted, -and all drivers support at least one character SQL type. Because the character -SQL type can be converted to and from all C types, all drivers must support all -C types. -The C data type is specified in the SSQQLLBBiinnddCCoolland SSQQLLGGeettDDaattaa functions with the -TargetType argument and in the SSQQLLBBiinnddPPaarraammeetteerr function with the ValueType -argument. It can also be specified by calling SSQQLLSSeettDDeessccFFiieelldd to set the -SQL_DESC_CONCISE_TYPE field of an ARD or APD, or by calling SSQQLLSSeettDDeessccRReecc with -the Type argument (and the SubType argument if needed) and the DescriptorHandle -argument set to the handle of an ARD or APD. -The following table lists valid type identifiers for the C data types. The -table also lists the ODBC C data type that corresponds to each identifier and -the definition of this data type. -CC ttyyppee iiddeennttiiffiieerr OODDBBCC CC ttyyppeeddeeff CC ttyyppee -SQL_C_CHAR SQLCHAR * unsigned char * -SQL_C_SSHORT[j] SQLSMALLINT short int -SQL_C_USHORT[j] SQLUSMALLINT unsigned short int -SQL_C_SLONG[j] SQLINTEGER long int -SQL_C_ULONG[j] SQLUINTEGER unsigned long int -SQL_C_FLOAT SQLREAL float -SQL_C_DOUBLE SQLDOUBLE, SQLFLOAT double -SQL_C_BIT SQLCHAR unsigned char -SQL_C_STINYINT[j] SQLSCHAR signed char -SQL_C_UTINYINT[j] SQLCHAR unsigned char -SQL_C_SBIGINT SQLBIGINT _int64[h] -SQL_C_UBIGINT SQLUBIGINT unsigned _int64[h] -SQL_C_BINARY SQLCHAR * unsigned char * -SQL_C_BOOKMARK[i] BOOKMARK unsigned long int[d] -SQL_C_VARBOOKMARK SQLCHAR * unsigned char * -SQL_C_TYPE_DATE[c] SQL_DATE_STRUCT struct tagDATE_STRUCT { - SQLSMALLINT year; - SQLUSMALLINT month; - SQLUSMALLINT day; - } DATE_STRUCT;[a] -SQL_C_TYPE_TIME[c] SQL_TIME_STRUCT struct tagTIME_STRUCT { - SQLUSMALLINT hour; - SQLUSMALLINT minute; - SQLUSMALLINT second; - } TIME_STRUCT;[a] -SQL_C_TYPE_TIMESTAMP[c] SQL_TIMESTAMP_STRUCT struct tagTIMESTAMP_STRUCT { - SQLSMALLINT year; - SQLUSMALLINT month; - SQLUSMALLINT day; - SQLUSMALLINT hour; - SQLUSMALLINT minute; - SQLUSMALLINT second; - SQLUINTEGER fraction;[b] - } TIMESTAMP_STRUCT;[a] -SQL_C_NUMERIC SQL_NUMERIC_STRUCT struct tagSQL_NUMERIC_STRUCT { - SQLCHAR precision; - SQLSCHAR scale; - SQLCHAR sign[g]; - SQLCHAR - val - [SQL_MAX_NUMERIC_L EN]; - [e], [f] - } SQL_NUMERIC_STRUCT; -SQL_C_GUID SQLGUID struct tagSQLGUID { - DWORD Data1; - WORD Data2; - WORD Data3; - BYTE Data4[8]; - } SQLGUID;[k] -All C interval data SQL_INTERVAL_STRUCT See the "_C_ _I_n_t_e_r_v_a_l_ _S_t_r_u_c_t_u_r_e" -types section, later in this appendix. -[a] The values of the year, month, day, hour, minute, and second fields in -the datetime C data types must conform to the constraints of the Gregorian -calendar. (See "_C_o_n_s_t_r_a_i_n_t_s_ _o_f_ _t_h_e_ _G_r_e_g_o_r_i_a_n_ _C_a_l_e_n_d_a_r" later in this appendix.) -[b] The value of the fraction field is the number of billionths of a second -and ranges from 0 through 999,999,999 (1 less than 1 billion). For example, the -value of the fraction field for a half-second is 500,000,000, for a thousandth -of a second (one millisecond) is 1,000,000, for a millionth of a second (one -microsecond) is 1,000, and for a billionth of a second (one nanosecond) is 1. -[c] In ODBC 2.x, the C date, time, and timestamp data types are SQL_C_DATE, -SQL_C_TIME, and SQL_C_TIMESTAMP. -[d] ODBC 3.x applications should use SQL_C_VARBOOKMARK, not SQL_C_BOOKMARK. -When an ODBC 3.x application works with an ODBC 2.x driver, the ODBC 3.x Driver -Manager will map SQL_C_VARBOOKMARK to SQL_C_BOOKMARK. -[e] A number is stored in the val field of the SQL_NUMERIC_STRUCT structure -as a scaled integer, in little endian mode (the leftmost byte being the least- -significant byte). For example, the number 10.001 base 10, with a scale of 4, -is scaled to an integer of 100010. Because this is 186AA in hexadecimal format, -the value in SQL_NUMERIC_STRUCT would be "AA 86 01 00 00 … 00", with the number -of bytes defined by the SQL_MAX_NUMERIC_LEN ##ddeeffiinnee. -[f] The precision and scale fields of the SQL_C_NUMERIC data type are never -used for input from an application, only for output from the driver to the -application. When the driver writes a numeric value into the -SQL_NUMERIC_STRUCT, it will use its own driver-specific default as the value -for the precision field, and it will use the value in the SQL_DESC_SCALE field -of the application descriptor (which defaults to 0) for the scale field. An -application can provide its own values for precision and scale by setting the -SQL_DESC_PRECISION and SQL_DESC_SCALE fields of the application descriptor. -[g] The sign field is 1 if positive, 0 if negative. -[h] _int64 might not be supplied by some compilers. -[i] _SQL_C_BOOKMARK has been deprecated in ODBC 3.x. -[j] _SQL_C_SHORT, SQL_C_LONG, and SQL_C_TINYINT have been replaced in ODBC by -signed and unsigned types: SQL_C_SSHORT and SQL_C_USHORT, SQL_C_SLONG and -SQL_C_ULONG, and SQL_C_STINYINT and SQL_C_UTINYINT. An ODBC 3.x driver that -should work with ODBC 2.x applications should support SQL_C_SHORT, SQL_C_LONG, -and SQL_C_TINYINT, because when they are called, the Driver Manager passes them -through to the driver. -[k] SQL_C_GUID can be converted only to SQL_CHAR or SQL_WCHAR. diff --git a/ndb/src/old_files/client/odbc/driver/Func.data b/ndb/src/old_files/client/odbc/driver/Func.data deleted file mode 100644 index c32671e1135..00000000000 --- a/ndb/src/old_files/client/odbc/driver/Func.data +++ /dev/null @@ -1,2822 +0,0 @@ -$func = { - SQLAllocConnect => { - type => 'SQLRETURN', - name => 'SQLAllocConnect', - param => [ - { - type => 'SQLHENV', - ptr => 0, - name => 'EnvironmentHandle', - index => 0, - }, - { - type => 'SQLHDBC', - ptr => 1, - name => 'ConnectionHandle', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLAllocEnv => { - type => 'SQLRETURN', - name => 'SQLAllocEnv', - param => [ - { - type => 'SQLHENV', - ptr => 1, - name => 'EnvironmentHandle', - index => 0, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLAllocHandle => { - type => 'SQLRETURN', - name => 'SQLAllocHandle', - param => [ - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'HandleType', - index => 0, - }, - { - type => 'SQLHANDLE', - ptr => 0, - name => 'InputHandle', - index => 1, - }, - { - type => 'SQLHANDLE', - ptr => 1, - name => 'OutputHandle', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLAllocHandleStd => { - type => 'SQLRETURN', - name => 'SQLAllocHandleStd', - param => [ - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'fHandleType', - index => 0, - }, - { - type => 'SQLHANDLE', - ptr => 0, - name => 'hInput', - index => 1, - }, - { - type => 'SQLHANDLE', - ptr => 1, - name => 'phOutput', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLAllocStmt => { - type => 'SQLRETURN', - name => 'SQLAllocStmt', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - { - type => 'SQLHSTMT', - ptr => 1, - name => 'StatementHandle', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLBindCol => { - type => 'SQLRETURN', - name => 'SQLBindCol', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'ColumnNumber', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'TargetType', - index => 2, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'TargetValue', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'BufferLength', - index => 4, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'StrLen_or_Ind', - index => 5, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLBindParam => { - type => 'SQLRETURN', - name => 'SQLBindParam', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'ParameterNumber', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'ValueType', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'ParameterType', - index => 3, - }, - { - type => 'SQLUINTEGER', - ptr => 0, - name => 'LengthPrecision', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'ParameterScale', - index => 5, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'ParameterValue', - index => 6, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'StrLen_or_Ind', - index => 7, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLBindParameter => { - type => 'SQLRETURN', - name => 'SQLBindParameter', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'ipar', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'fParamType', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'fCType', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'fSqlType', - index => 4, - }, - { - type => 'SQLUINTEGER', - ptr => 0, - name => 'cbColDef', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'ibScale', - index => 6, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'rgbValue', - index => 7, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'cbValueMax', - index => 8, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'pcbValue', - index => 9, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLBrowseConnect => { - type => 'SQLRETURN', - name => 'SQLBrowseConnect', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'hdbc', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szConnStrIn', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbConnStrIn', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szConnStrOut', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbConnStrOutMax', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'pcbConnStrOut', - index => 5, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLBulkOperations => { - type => 'SQLRETURN', - name => 'SQLBulkOperations', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'Operation', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLCancel => { - type => 'SQLRETURN', - name => 'SQLCancel', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLCloseCursor => { - type => 'SQLRETURN', - name => 'SQLCloseCursor', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLColAttribute => { - type => 'SQLRETURN', - name => 'SQLColAttribute', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'ColumnNumber', - index => 1, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'FieldIdentifier', - index => 2, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'CharacterAttribute', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'StringLength', - index => 5, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'NumericAttribute', - index => 6, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLColAttributes => { - type => 'SQLRETURN', - name => 'SQLColAttributes', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'icol', - index => 1, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'fDescType', - index => 2, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'rgbDesc', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbDescMax', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'pcbDesc', - index => 5, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'pfDesc', - index => 6, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLColumnPrivileges => { - type => 'SQLRETURN', - name => 'SQLColumnPrivileges', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szCatalogName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbCatalogName', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szSchemaName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbSchemaName', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szTableName', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbTableName', - index => 6, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szColumnName', - index => 7, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbColumnName', - index => 8, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLColumns => { - type => 'SQLRETURN', - name => 'SQLColumns', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'CatalogName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength1', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'SchemaName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength2', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'TableName', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength3', - index => 6, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'ColumnName', - index => 7, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength4', - index => 8, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLConnect => { - type => 'SQLRETURN', - name => 'SQLConnect', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'ServerName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength1', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'UserName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength2', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'Authentication', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength3', - index => 6, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLCopyDesc => { - type => 'SQLRETURN', - name => 'SQLCopyDesc', - param => [ - { - type => 'SQLHDESC', - ptr => 0, - name => 'SourceDescHandle', - index => 0, - }, - { - type => 'SQLHDESC', - ptr => 0, - name => 'TargetDescHandle', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLDataSources => { - type => 'SQLRETURN', - name => 'SQLDataSources', - param => [ - { - type => 'SQLHENV', - ptr => 0, - name => 'EnvironmentHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Direction', - index => 1, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'ServerName', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength1', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'NameLength1', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'Description', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength2', - index => 6, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'NameLength2', - index => 7, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLDescribeCol => { - type => 'SQLRETURN', - name => 'SQLDescribeCol', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'ColumnNumber', - index => 1, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'ColumnName', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'NameLength', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'DataType', - index => 5, - }, - { - type => 'SQLUINTEGER', - ptr => 1, - name => 'ColumnSize', - index => 6, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'DecimalDigits', - index => 7, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'Nullable', - index => 8, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLDescribeParam => { - type => 'SQLRETURN', - name => 'SQLDescribeParam', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'ipar', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'pfSqlType', - index => 2, - }, - { - type => 'SQLUINTEGER', - ptr => 1, - name => 'pcbParamDef', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'pibScale', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'pfNullable', - index => 5, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLDisconnect => { - type => 'SQLRETURN', - name => 'SQLDisconnect', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLDriverConnect => { - type => 'SQLRETURN', - name => 'SQLDriverConnect', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'hdbc', - index => 0, - }, - { - type => 'SQLHWND', - ptr => 0, - name => 'hwnd', - index => 1, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szConnStrIn', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbConnStrIn', - index => 3, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szConnStrOut', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbConnStrOutMax', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'pcbConnStrOut', - index => 6, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'fDriverCompletion', - index => 7, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLDrivers => { - type => 'SQLRETURN', - name => 'SQLDrivers', - param => [ - { - type => 'SQLHENV', - ptr => 0, - name => 'henv', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'fDirection', - index => 1, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szDriverDesc', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbDriverDescMax', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'pcbDriverDesc', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szDriverAttributes', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbDrvrAttrMax', - index => 6, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'pcbDrvrAttr', - index => 7, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLEndTran => { - type => 'SQLRETURN', - name => 'SQLEndTran', - param => [ - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'HandleType', - index => 0, - }, - { - type => 'SQLHANDLE', - ptr => 0, - name => 'Handle', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'CompletionType', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLError => { - type => 'SQLRETURN', - name => 'SQLError', - param => [ - { - type => 'SQLHENV', - ptr => 0, - name => 'EnvironmentHandle', - index => 0, - }, - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 1, - }, - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'Sqlstate', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'NativeError', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'MessageText', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength', - index => 6, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'TextLength', - index => 7, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLExecDirect => { - type => 'SQLRETURN', - name => 'SQLExecDirect', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'StatementText', - index => 1, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'TextLength', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLExecute => { - type => 'SQLRETURN', - name => 'SQLExecute', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLExtendedFetch => { - type => 'SQLRETURN', - name => 'SQLExtendedFetch', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'fFetchType', - index => 1, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'irow', - index => 2, - }, - { - type => 'SQLUINTEGER', - ptr => 1, - name => 'pcrow', - index => 3, - }, - { - type => 'SQLUSMALLINT', - ptr => 1, - name => 'rgfRowStatus', - index => 4, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLFetch => { - type => 'SQLRETURN', - name => 'SQLFetch', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLFetchScroll => { - type => 'SQLRETURN', - name => 'SQLFetchScroll', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'FetchOrientation', - index => 1, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'FetchOffset', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLForeignKeys => { - type => 'SQLRETURN', - name => 'SQLForeignKeys', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szPkCatalogName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbPkCatalogName', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szPkSchemaName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbPkSchemaName', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szPkTableName', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbPkTableName', - index => 6, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szFkCatalogName', - index => 7, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbFkCatalogName', - index => 8, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szFkSchemaName', - index => 9, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbFkSchemaName', - index => 10, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szFkTableName', - index => 11, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbFkTableName', - index => 12, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLFreeConnect => { - type => 'SQLRETURN', - name => 'SQLFreeConnect', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLFreeEnv => { - type => 'SQLRETURN', - name => 'SQLFreeEnv', - param => [ - { - type => 'SQLHENV', - ptr => 0, - name => 'EnvironmentHandle', - index => 0, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLFreeHandle => { - type => 'SQLRETURN', - name => 'SQLFreeHandle', - param => [ - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'HandleType', - index => 0, - }, - { - type => 'SQLHANDLE', - ptr => 0, - name => 'Handle', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLFreeStmt => { - type => 'SQLRETURN', - name => 'SQLFreeStmt', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Option', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLGetConnectAttr => { - type => 'SQLRETURN', - name => 'SQLGetConnectAttr', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'Attribute', - index => 1, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 2, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'BufferLength', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'StringLength', - index => 4, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLGetConnectOption => { - type => 'SQLRETURN', - name => 'SQLGetConnectOption', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Option', - index => 1, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLGetCursorName => { - type => 'SQLRETURN', - name => 'SQLGetCursorName', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'CursorName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'NameLength', - index => 3, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLGetData => { - type => 'SQLRETURN', - name => 'SQLGetData', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'ColumnNumber', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'TargetType', - index => 2, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'TargetValue', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'BufferLength', - index => 4, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'StrLen_or_Ind', - index => 5, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLGetDescField => { - type => 'SQLRETURN', - name => 'SQLGetDescField', - param => [ - { - type => 'SQLHDESC', - ptr => 0, - name => 'DescriptorHandle', - index => 0, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'RecNumber', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'FieldIdentifier', - index => 2, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'BufferLength', - index => 4, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'StringLength', - index => 5, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLGetDescRec => { - type => 'SQLRETURN', - name => 'SQLGetDescRec', - param => [ - { - type => 'SQLHDESC', - ptr => 0, - name => 'DescriptorHandle', - index => 0, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'RecNumber', - index => 1, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'Name', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'StringLength', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'Type', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'SubType', - index => 6, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'Length', - index => 7, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'Precision', - index => 8, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'Scale', - index => 9, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'Nullable', - index => 10, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLGetDiagField => { - type => 'SQLRETURN', - name => 'SQLGetDiagField', - param => [ - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'HandleType', - index => 0, - }, - { - type => 'SQLHANDLE', - ptr => 0, - name => 'Handle', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'RecNumber', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'DiagIdentifier', - index => 3, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'DiagInfo', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'StringLength', - index => 6, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLGetDiagRec => { - type => 'SQLRETURN', - name => 'SQLGetDiagRec', - param => [ - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'HandleType', - index => 0, - }, - { - type => 'SQLHANDLE', - ptr => 0, - name => 'Handle', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'RecNumber', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'Sqlstate', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'NativeError', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'MessageText', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength', - index => 6, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'TextLength', - index => 7, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLGetEnvAttr => { - type => 'SQLRETURN', - name => 'SQLGetEnvAttr', - param => [ - { - type => 'SQLHENV', - ptr => 0, - name => 'EnvironmentHandle', - index => 0, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'Attribute', - index => 1, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 2, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'BufferLength', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'StringLength', - index => 4, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLGetFunctions => { - type => 'SQLRETURN', - name => 'SQLGetFunctions', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'FunctionId', - index => 1, - }, - { - type => 'SQLUSMALLINT', - ptr => 1, - name => 'Supported', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLGetInfo => { - type => 'SQLRETURN', - name => 'SQLGetInfo', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'InfoType', - index => 1, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'InfoValue', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'BufferLength', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'StringLength', - index => 4, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLGetStmtAttr => { - type => 'SQLRETURN', - name => 'SQLGetStmtAttr', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'Attribute', - index => 1, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 2, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'BufferLength', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'StringLength', - index => 4, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLGetStmtOption => { - type => 'SQLRETURN', - name => 'SQLGetStmtOption', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Option', - index => 1, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLGetTypeInfo => { - type => 'SQLRETURN', - name => 'SQLGetTypeInfo', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'DataType', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLMoreResults => { - type => 'SQLRETURN', - name => 'SQLMoreResults', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLNativeSql => { - type => 'SQLRETURN', - name => 'SQLNativeSql', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'hdbc', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szSqlStrIn', - index => 1, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'cbSqlStrIn', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szSqlStr', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'cbSqlStrMax', - index => 4, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'pcbSqlStr', - index => 5, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLNumParams => { - type => 'SQLRETURN', - name => 'SQLNumParams', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'pcpar', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLNumResultCols => { - type => 'SQLRETURN', - name => 'SQLNumResultCols', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLSMALLINT', - ptr => 1, - name => 'ColumnCount', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLParamData => { - type => 'SQLRETURN', - name => 'SQLParamData', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLPOINTER', - ptr => 1, - name => 'Value', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLParamOptions => { - type => 'SQLRETURN', - name => 'SQLParamOptions', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLUINTEGER', - ptr => 0, - name => 'crow', - index => 1, - }, - { - type => 'SQLUINTEGER', - ptr => 1, - name => 'pirow', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLPrepare => { - type => 'SQLRETURN', - name => 'SQLPrepare', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'StatementText', - index => 1, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'TextLength', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLPrimaryKeys => { - type => 'SQLRETURN', - name => 'SQLPrimaryKeys', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szCatalogName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbCatalogName', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szSchemaName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbSchemaName', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szTableName', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbTableName', - index => 6, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLProcedureColumns => { - type => 'SQLRETURN', - name => 'SQLProcedureColumns', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szCatalogName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbCatalogName', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szSchemaName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbSchemaName', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szProcName', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbProcName', - index => 6, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szColumnName', - index => 7, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbColumnName', - index => 8, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLProcedures => { - type => 'SQLRETURN', - name => 'SQLProcedures', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szCatalogName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbCatalogName', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szSchemaName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbSchemaName', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szProcName', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbProcName', - index => 6, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLPutData => { - type => 'SQLRETURN', - name => 'SQLPutData', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Data', - index => 1, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'StrLen_or_Ind', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLRowCount => { - type => 'SQLRETURN', - name => 'SQLRowCount', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'RowCount', - index => 1, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLSetConnectAttr => { - type => 'SQLRETURN', - name => 'SQLSetConnectAttr', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'Attribute', - index => 1, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 2, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'StringLength', - index => 3, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLSetConnectOption => { - type => 'SQLRETURN', - name => 'SQLSetConnectOption', - param => [ - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Option', - index => 1, - }, - { - type => 'SQLUINTEGER', - ptr => 0, - name => 'Value', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLSetCursorName => { - type => 'SQLRETURN', - name => 'SQLSetCursorName', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'CursorName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLSetDescField => { - type => 'SQLRETURN', - name => 'SQLSetDescField', - param => [ - { - type => 'SQLHDESC', - ptr => 0, - name => 'DescriptorHandle', - index => 0, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'RecNumber', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'FieldIdentifier', - index => 2, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'BufferLength', - index => 4, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLSetDescRec => { - type => 'SQLRETURN', - name => 'SQLSetDescRec', - param => [ - { - type => 'SQLHDESC', - ptr => 0, - name => 'DescriptorHandle', - index => 0, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'RecNumber', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'Type', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'SubType', - index => 3, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'Length', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'Precision', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'Scale', - index => 6, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Data', - index => 7, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'StringLength', - index => 8, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'Indicator', - index => 9, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLSetEnvAttr => { - type => 'SQLRETURN', - name => 'SQLSetEnvAttr', - param => [ - { - type => 'SQLHENV', - ptr => 0, - name => 'EnvironmentHandle', - index => 0, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'Attribute', - index => 1, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 2, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'StringLength', - index => 3, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLSetParam => { - type => 'SQLRETURN', - name => 'SQLSetParam', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'ParameterNumber', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'ValueType', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'ParameterType', - index => 3, - }, - { - type => 'SQLUINTEGER', - ptr => 0, - name => 'LengthPrecision', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'ParameterScale', - index => 5, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'ParameterValue', - index => 6, - }, - { - type => 'SQLINTEGER', - ptr => 1, - name => 'StrLen_or_Ind', - index => 7, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLSetPos => { - type => 'SQLRETURN', - name => 'SQLSetPos', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'irow', - index => 1, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'fOption', - index => 2, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'fLock', - index => 3, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLSetScrollOptions => { - type => 'SQLRETURN', - name => 'SQLSetScrollOptions', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'fConcurrency', - index => 1, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'crowKeyset', - index => 2, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'crowRowset', - index => 3, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLSetStmtAttr => { - type => 'SQLRETURN', - name => 'SQLSetStmtAttr', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'Attribute', - index => 1, - }, - { - type => 'SQLPOINTER', - ptr => 0, - name => 'Value', - index => 2, - }, - { - type => 'SQLINTEGER', - ptr => 0, - name => 'StringLength', - index => 3, - }, - ], - odbcver => 'ODBCVER >= 0x0300', - }, - SQLSetStmtOption => { - type => 'SQLRETURN', - name => 'SQLSetStmtOption', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Option', - index => 1, - }, - { - type => 'SQLUINTEGER', - ptr => 0, - name => 'Value', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLSpecialColumns => { - type => 'SQLRETURN', - name => 'SQLSpecialColumns', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'IdentifierType', - index => 1, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'CatalogName', - index => 2, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength1', - index => 3, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'SchemaName', - index => 4, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength2', - index => 5, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'TableName', - index => 6, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength3', - index => 7, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Scope', - index => 8, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Nullable', - index => 9, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLStatistics => { - type => 'SQLRETURN', - name => 'SQLStatistics', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'CatalogName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength1', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'SchemaName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength2', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'TableName', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength3', - index => 6, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Unique', - index => 7, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'Reserved', - index => 8, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLTablePrivileges => { - type => 'SQLRETURN', - name => 'SQLTablePrivileges', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'hstmt', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szCatalogName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbCatalogName', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szSchemaName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbSchemaName', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'szTableName', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'cbTableName', - index => 6, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLTables => { - type => 'SQLRETURN', - name => 'SQLTables', - param => [ - { - type => 'SQLHSTMT', - ptr => 0, - name => 'StatementHandle', - index => 0, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'CatalogName', - index => 1, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength1', - index => 2, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'SchemaName', - index => 3, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength2', - index => 4, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'TableName', - index => 5, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength3', - index => 6, - }, - { - type => 'SQLCHAR', - ptr => 1, - name => 'TableType', - index => 7, - }, - { - type => 'SQLSMALLINT', - ptr => 0, - name => 'NameLength4', - index => 8, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, - SQLTransact => { - type => 'SQLRETURN', - name => 'SQLTransact', - param => [ - { - type => 'SQLHENV', - ptr => 0, - name => 'EnvironmentHandle', - index => 0, - }, - { - type => 'SQLHDBC', - ptr => 0, - name => 'ConnectionHandle', - index => 1, - }, - { - type => 'SQLUSMALLINT', - ptr => 0, - name => 'CompletionType', - index => 2, - }, - ], - odbcver => 'ODBCVER >= 0x0000', - }, -}; diff --git a/ndb/src/old_files/client/odbc/driver/Func.pl b/ndb/src/old_files/client/odbc/driver/Func.pl deleted file mode 100644 index 1064a6a6c6e..00000000000 --- a/ndb/src/old_files/client/odbc/driver/Func.pl +++ /dev/null @@ -1,352 +0,0 @@ -# - -use strict; -select(STDOUT); -$| = 1; -use vars qw($func); - -my $action = shift; -my @args = @ARGV; -if (! $action) { - print < ... -data -unixodbc -- write new Func.data to stdout -name [-[no]auto -type] [suffix] -- list function names -code -- write auto/*.cpp -diff -- diff against auto/*.cpp -move -- move auto/*.cpp to . -functab -- write struct entiries for SQLGetFunctions -END - exit(0); -} - -# indents -my $i1 = " " x (1*4); -my $i2 = " " x (2*4); -my $i3 = " " x (3*4); -my $i4 = " " x (4*4); - -if ($action eq 'data') { - my @entry = (); - while (@args) { - my $file = shift(@args); - if ($file eq '-unixodbc') { - unshift(@args, ); - next; - } - if ($file eq '-iodbc') { - unshift(@args, ); - next; - } - warn "read $file\n"; - open(F, "<$file") || die "$file: $!"; - my $text = undef; - my $odbcver = undef; - while ($_ = ) { - chomp; - if (/^\s*$/) { - next; - } - if (/^\s*#\s*if\s+(.*\bODBCVER\b.*)$/) { - $odbcver = $1; - $odbcver =~ s/^\s+|\s+$//g; - $odbcver =~ s/^\(+|\)+$//g; - next; - } - if (/^\s*#\s*endif\b/) { - $odbcver = undef; - next; - } - if (/^\s*SQLRETURN\b/) { - $text = ""; - } - if (defined($text)) { - $text .= $_; - if (/;\s*$/) { - push(@entry, { - text => $text, - odbcver => $odbcver || 'ODBCVER >= 0x0000', - }); - $text = undef; - } - } - } - close(F); - } - warn "@{[ scalar @entry ]} entries\n"; - $func = {}; - for my $e (@entry) { - my $text = $e->{text}; - $text =~ s!/\*.+?\*/!!g; - $text =~ s/^\s+|\s+$//g; - $text =~ s/\s\s*/\040/g; - $text =~ /^(SQLRETURN)\s+(SQL_API\s+)?(\w+)\s*\((.*)\)\s*;/ - or warn "discard: $_\n", next; - my $type = $1; - my $name = $3; - my $body = $4; - my $f = {}; - $f->{type} = $type; - $f->{name} = $name; - my @body = split(/,/, $body); - my $param = []; - for my $s (@body) { - $s =~ s/^\s+|\s+$//g; - my($ptype, $pptr, $pname); - if ($s =~ /^(\w+)\s+(\w+)$/) { - $ptype = $1; - $pptr = 0; - $pname = $2; - } elsif ($s =~ /^(\w+)\s*\*\s*(\w+)$/) { - $ptype = $1; - $pptr = 1; - $pname = $2; - } else { - warn "discard: $name: param $s\n"; - $param = undef; - last; - } - my $pindex = scalar @$param; - push(@$param, { - type => $ptype, - ptr => $pptr, - name => $pname, - index => $pindex, - }); - } - $param or next; - $f->{param} = $param; - $f->{odbcver} = $e->{odbcver}; - $func->{$name} - and warn "duplicate: $name\n", next; - $func->{$name} = $f; - } - print "\$func = {\n"; - for my $name (sort keys %$func) { - my $f = $func->{$name}; - print "${i1}$name => {\n"; - print "${i2}type => '$f->{type}',\n"; - print "${i2}name => '$f->{name}',\n"; - print "${i2}param => [\n"; - for my $p (@{$f->{param}}) { - print "${i3}\{\n"; - print "${i4}type => '$p->{type}',\n"; - print "${i4}ptr => $p->{ptr},\n"; - print "${i4}name => '$p->{name}',\n"; - print "${i4}index => $p->{index},\n"; - print "${i3}\},\n"; - } - print "${i2}],\n"; - print "${i2}odbcver => '$f->{odbcver}',\n"; - print "${i1}},\n"; - } - printf "};\n"; - $action = undef; -} - -if ($action eq 'name') { - my %functab = (); # bit in FuncTab - my $functab = "../handles/FuncTab.cpp"; - if (! open(F, "<$functab")) { - warn "$functab: $!"; - } else { - while ($_ = ) { - if (/SQL_API_([A-Z]+)[\s,]*([01])/) { - defined $functab{$1} and die "$_"; - $functab{$1} = $2; - } - } - close(F); - } - require './Func.data'; - my $auto = 1; - my $noauto = 1; - my $type = 0; - while ($args[0] =~ /^-(\w+)$/) { - $noauto = 0 if $1 eq 'auto'; - $auto = 0 if $1 eq 'noauto'; - $type = 1 if $1 eq 'type'; - shift(@args); - } - my $suffix = shift(@args); - for my $name (sort keys %$func) { - my $f = $func->{$name}; - local $/ = undef; - my($x1); - if (open(F, "<$name.cpp")) { - $x1 = ; - close(F); - if ($x1 =~ /\bauto_$name\b/) { - $auto || next; - print "A " if $type; - } else { - $noauto || next; - print "- " if $type; - } - if ($type) { - my $y = $functab{uc $name}; - $y = "?" if $y !~ /^[01]$/; - print "$y "; - my $z = $f->{odbcver}; - $z =~ s/^.*(...)$/$1/; - print "$z "; - } - } - print "$name$suffix\n"; - } - $action = undef; -} - -if ($action eq 'code') { - require './Func.data'; - system("rm -rf auto; mkdir auto"); - for my $name (sort keys %$func) { - my $f = $func->{$name}; - my $file = "auto/$name.cpp"; - open(F, ">$file") || die "$file: $!\n"; - print F "#include \"driver.hpp\"\n"; - print F "\n"; - printf F "#if $f->{odbcver}\n"; - print F "$f->{type} SQL_API\n"; - print F "$f->{name}("; - for my $p (@{$f->{param}}) { - print F "," if $p->{index} > 0; - print F "\n${i1}$p->{type}"; - for (my $i = 0; $i < $p->{ptr}; $i++) { - print F "*"; - } - print F " $p->{name}"; - } - print F ")\n"; - print F "{\n"; - print F "${i1}const char* const sqlFunction = \"$f->{name}\";\n"; - print F "#ifndef auto_$name\n"; - print F "${i1}Ctx ctx;\n"; - print F "${i1}ctx.log(1, \"*** not implemented: %s\", sqlFunction);\n"; - print F "${i1}return SQL_ERROR;\n"; - print F "#else\n"; - my @ihandle = (); - my @ohandle = (); - for my $p (@{$f->{param}}) { - if ($p->{type} =~ /^SQLH(ENV|DBC|STMT|DESC)$/) { - $p->{btype} = lc $1; - my $h = ! $p->{ptr} ? \@ihandle : \@ohandle; - push(@$h, $p); - } - } - if (! @ihandle) { # use root handle instance - push(@ihandle, { - type => 'SQLHROOT', - name => '(SQLHANDLE*)0', - }); - } - for my $p (@ihandle, @ohandle) { - $p->{htype} = "Handle" . (ucfirst lc $p->{btype}); - $p->{hname} = "p" . (ucfirst lc $p->{btype}); - } - if (@ihandle) { - print F "${i1}HandleRoot* const pRoot = HandleRoot::instance();\n"; - } - for my $p (@ihandle) { - print F "${i1}$p->{htype}* $p->{hname} = "; - print F "pRoot->find" . ucfirst($p->{btype}). "($p->{name});\n"; - print F "${i1}if ($p->{hname} == 0)\n"; - print F "${i2}return SQL_INVALID_HANDLE;\n"; - } - { - my $p = $ihandle[0]; - print F "${i1}Ctx& ctx = $p->{hname}->initCtx();\n"; - print F "${i1}ctx.logSqlEnter(sqlFunction);\n"; - } - for my $p (@ohandle) { - print F "${i1}$p->{htype}* $p->{hname} = 0;\n"; - } - { - my $p = $ihandle[0]; - my $fname = $f->{name}; - $fname =~ s/^SQL/sql/; # keep sql prefix - print F "${i1}if (ctx.ok())\n"; - print F "${i2}$p->{hname}->$fname(\n"; - print F "${i3}ctx"; - } - for my $p (@{$f->{param}}) { - if ($p == $ihandle[0]) { - next; - } - print F ","; - print F "\n${i3}"; - if (grep($_ == $p, @ihandle)) { - print F "$p->{hname}"; - } elsif (grep($_ == $p, @ohandle)) { - print F "$p->{name} != 0 ? &$p->{hname} : 0"; - } else { - print F "&" if $p->{ptr} > 0; - print F "$p->{name}"; - } - } - print F "\n${i2});\n"; - for my $p (@ohandle) { - print F "${i1}if ($p->{name} != 0)\n"; - print F "${i2}*$p->{name} = "; - print F "pRoot->from" . ucfirst($p->{btype}) . "($p->{hname});\n"; - } - { - my $p = $ihandle[0]; - print F "${i1}$p->{hname}->saveCtx(ctx);\n"; - } - print F "${i1}ctx.logSqlExit();\n"; - print F "${i1}return ctx.getCode();\n"; - print F "#endif\n"; - print F "}\n"; - print F "#endif // $f->{odbcver}\n"; - close(F); - } - $action = undef; -} - -if ($action eq 'diff' || $action eq 'move') { - require './Func.data'; - for my $name (sort keys %$func) { - local $/ = undef; - my($x1, $x2); - if (open(F, "<$name.cpp")) { - $x1 = ; - close(F); - if ($x1 !~ /\bauto_$name\b/) { - warn "$name.cpp: not auto-generated\n" if $action eq 'move'; - next; - } - } - if (! open(F, "; - close(F); - if ($x1 eq $x2) { - warn "$name: no changes\n" if $action eq 'move'; - next; - } - if ($action eq 'diff') { - print "=" x 40, "\n"; - print "diff $name.cpp auto/", "\n"; - system("diff $name.cpp auto/$name.cpp"); - } else { - rename("auto/$name.cpp", "$name.cpp") - or die "rename $name: $!\n"; - warn "$name: updated\n" if 0; - } - } - $action = undef; -} - -if ($action eq 'functab') { - require './Func.data'; - for my $name (sort keys %$func) { - printf "%4s{%3s%-30s, 0 },\n", "", "", uc "SQL_API_$name"; - } - $action = undef; -} - -$action && die "$action: undefined\n"; - -# vim: set sw=4: diff --git a/ndb/src/old_files/client/odbc/driver/Makefile b/ndb/src/old_files/client/odbc/driver/Makefile deleted file mode 100644 index 62f82371da4..00000000000 --- a/ndb/src/old_files/client/odbc/driver/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -include .defs.mk - -TYPE = * - -NONPIC_ARCHIVE = N - -PIC_ARCHIVE = Y - -ARCHIVE_TARGET = odbcdriver - -SOURCES = driver.cpp - -SOURCES_EXTRA = $(shell perl Func.pl name .cpp) - -include ../Extra.mk -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/client/odbc/driver/SQLAllocConnect.cpp b/ndb/src/old_files/client/odbc/driver/SQLAllocConnect.cpp deleted file mode 100644 index a7ffd8c89d1..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLAllocConnect.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLAllocConnect( - SQLHENV EnvironmentHandle, - SQLHDBC* ConnectionHandle) -{ - driver_enter(SQL_API_SQLALLOCCONNECT); - const char* const sqlFunction = "SQLAllocConnect"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleEnv* pEnv = pRoot->findEnv(EnvironmentHandle); - if (pEnv == 0) { - driver_exit(SQL_API_SQLALLOCCONNECT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - HandleDbc* pDbc = 0; - HandleDbc** ppDbc = 0; - if (ConnectionHandle != 0) - ppDbc = &pDbc; - try { - pEnv->sqlAllocConnect(ctx, ppDbc); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - if (ConnectionHandle != 0) - *ConnectionHandle = static_cast(pDbc); - pEnv->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLALLOCCONNECT); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLAllocEnv.cpp b/ndb/src/old_files/client/odbc/driver/SQLAllocEnv.cpp deleted file mode 100644 index a62dae61008..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLAllocEnv.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLAllocEnv( - SQLHENV* EnvironmentHandle) -{ - driver_enter(SQL_API_SQLALLOCENV); - const char* const sqlFunction = "SQLAllocEnv"; - HandleRoot* const pRoot = HandleRoot::instance(); - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - HandleEnv* pEnv = 0; - HandleEnv** ppEnv = 0; - if (EnvironmentHandle != 0) - ppEnv = &pEnv; - try { - pRoot->sqlAllocEnv(ctx, ppEnv); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - if (EnvironmentHandle != 0) - *EnvironmentHandle = static_cast(pEnv); - pRoot->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLALLOCENV); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLAllocHandle.cpp b/ndb/src/old_files/client/odbc/driver/SQLAllocHandle.cpp deleted file mode 100644 index 9daf6ead946..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLAllocHandle.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLAllocHandle( - SQLSMALLINT HandleType, - SQLHANDLE InputHandle, - SQLHANDLE* OutputHandle) -{ - driver_enter(SQL_API_SQLALLOCHANDLE); - const char* const sqlFunction = "SQLAllocHandle"; - HandleRoot* const pRoot = HandleRoot::instance(); - SQLSMALLINT parentType = pRoot->findParentType(HandleType); - if (parentType == -1) { - driver_exit(SQL_API_SQLALLOCHANDLE); - return SQL_INVALID_HANDLE; - } - HandleBase* pParent = pRoot->findBase(parentType, InputHandle); - if (pParent == 0) { - driver_exit(SQL_API_SQLALLOCHANDLE); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - HandleBase* pChild = 0; - HandleBase** ppChild = 0; - if (OutputHandle != 0) - ppChild = &pChild; - try { - pParent->sqlAllocHandle(ctx, HandleType, ppChild); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - if (OutputHandle != 0) - *OutputHandle = static_cast(pChild); - if (pRoot == pParent) - pRoot->lockHandle(); - pParent->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - if (pRoot == pParent) - pRoot->unlockHandle(); - driver_exit(SQL_API_SQLALLOCHANDLE); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLAllocHandleStd.cpp b/ndb/src/old_files/client/odbc/driver/SQLAllocHandleStd.cpp deleted file mode 100644 index 61290e37b7b..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLAllocHandleStd.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLAllocHandleStd( - SQLSMALLINT fHandleType, - SQLHANDLE hInput, - SQLHANDLE* phOutput) -{ -#ifndef auto_SQLAllocHandleStd - const char* const sqlFunction = "SQLAllocHandleStd"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLALLOCHANDLESTD); - const char* const sqlFunction = "SQLAllocHandleStd"; - HandleRoot* const pRoot = HandleRoot::instance(); - Handle* p = pRoot->find((SQLHANDLE*)0); - if (p == 0) { - driver_exit(SQL_API_SQLALLOCHANDLESTD); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - p->sqlAllocHandleStd( - ctx, - fHandleType, - hInput, - &phOutput - ); - p->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLALLOCHANDLESTD); - return ret; -#endif -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLAllocStmt.cpp b/ndb/src/old_files/client/odbc/driver/SQLAllocStmt.cpp deleted file mode 100644 index bf3f149f5de..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLAllocStmt.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLAllocStmt( - SQLHDBC ConnectionHandle, - SQLHSTMT* StatementHandle) -{ - driver_enter(SQL_API_SQLALLOCSTMT); - const char* const sqlFunction = "SQLAllocStmt"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLALLOCSTMT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - HandleStmt* pStmt = 0; - HandleStmt** ppStmt = 0; - if (StatementHandle != 0) - ppStmt = &pStmt; - try { - pDbc->sqlAllocStmt(ctx, ppStmt); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - if (StatementHandle != 0) - *StatementHandle = static_cast(pStmt); - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLALLOCSTMT); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLBindCol.cpp b/ndb/src/old_files/client/odbc/driver/SQLBindCol.cpp deleted file mode 100644 index 5562334e8cc..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLBindCol.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLBindCol( - SQLHSTMT StatementHandle, - SQLUSMALLINT ColumnNumber, - SQLSMALLINT TargetType, - SQLPOINTER TargetValue, - SQLINTEGER BufferLength, - SQLINTEGER* StrLen_or_Ind) -{ - driver_enter(SQL_API_SQLBINDCOL); - const char* const sqlFunction = "SQLBindCol"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLBINDCOL); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlBindCol(ctx, ColumnNumber, TargetType, TargetValue, BufferLength, StrLen_or_Ind); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLBINDCOL); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLBindParam.cpp b/ndb/src/old_files/client/odbc/driver/SQLBindParam.cpp deleted file mode 100644 index 2fcc17b872f..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLBindParam.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLBindParam( - SQLHSTMT StatementHandle, - SQLUSMALLINT ParameterNumber, - SQLSMALLINT ValueType, - SQLSMALLINT ParameterType, - SQLUINTEGER LengthPrecision, - SQLSMALLINT ParameterScale, - SQLPOINTER ParameterValue, - SQLINTEGER* StrLen_or_Ind) -{ - driver_enter(SQL_API_SQLBINDPARAM); - const char* const sqlFunction = "SQLBindParam"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLBINDPARAM); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlBindParam(ctx, ParameterNumber, ValueType, ParameterType, LengthPrecision, ParameterScale, ParameterValue, StrLen_or_Ind); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLBINDPARAM); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLBindParameter.cpp b/ndb/src/old_files/client/odbc/driver/SQLBindParameter.cpp deleted file mode 100644 index e4ca5bbc731..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLBindParameter.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLBindParameter( - SQLHSTMT hstmt, - SQLUSMALLINT ipar, - SQLSMALLINT fParamType, - SQLSMALLINT fCType, - SQLSMALLINT fSqlType, - SQLUINTEGER cbColDef, - SQLSMALLINT ibScale, - SQLPOINTER rgbValue, - SQLINTEGER cbValueMax, - SQLINTEGER* pcbValue) -{ - driver_enter(SQL_API_SQLBINDPARAMETER); - const char* const sqlFunction = "SQLBindParameter"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLBINDPARAMETER); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlBindParameter(ctx, ipar, fParamType, fCType, fSqlType, cbColDef, ibScale, rgbValue, cbValueMax, pcbValue); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLBINDPARAMETER); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLBrowseConnect.cpp b/ndb/src/old_files/client/odbc/driver/SQLBrowseConnect.cpp deleted file mode 100644 index 7e629e199e5..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLBrowseConnect.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLBrowseConnect( - SQLHDBC hdbc, - SQLCHAR* szConnStrIn, - SQLSMALLINT cbConnStrIn, - SQLCHAR* szConnStrOut, - SQLSMALLINT cbConnStrOutMax, - SQLSMALLINT* pcbConnStrOut) -{ -#ifndef auto_SQLBrowseConnect - const char* const sqlFunction = "SQLBrowseConnect"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLBROWSECONNECT); - const char* const sqlFunction = "SQLBrowseConnect"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(hdbc); - if (pDbc == 0) { - driver_exit(SQL_API_SQLBROWSECONNECT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pDbc->sqlBrowseConnect( - ctx, - &szConnStrIn, - cbConnStrIn, - &szConnStrOut, - cbConnStrOutMax, - &pcbConnStrOut - ); - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLBROWSECONNECT); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLBulkOperations.cpp b/ndb/src/old_files/client/odbc/driver/SQLBulkOperations.cpp deleted file mode 100644 index 7d256d66e3f..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLBulkOperations.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLBulkOperations( - SQLHSTMT StatementHandle, - SQLSMALLINT Operation) -{ -#ifndef auto_SQLBulkOperations - const char* const sqlFunction = "SQLBulkOperations"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLBULKOPERATIONS); - const char* const sqlFunction = "SQLBulkOperations"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLBULKOPERATIONS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlBulkOperations( - ctx, - Operation - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLBULKOPERATIONS); - return ret; -#endif -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLCancel.cpp b/ndb/src/old_files/client/odbc/driver/SQLCancel.cpp deleted file mode 100644 index ac4e43c6e89..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLCancel.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLCancel( - SQLHSTMT StatementHandle) -{ - driver_enter(SQL_API_SQLCANCEL); - const char* const sqlFunction = "SQLCancel"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLCANCEL); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlCancel(ctx); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLCANCEL); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLCloseCursor.cpp b/ndb/src/old_files/client/odbc/driver/SQLCloseCursor.cpp deleted file mode 100644 index 26d88c91e3b..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLCloseCursor.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLCloseCursor( - SQLHSTMT StatementHandle) -{ - driver_enter(SQL_API_SQLCLOSECURSOR); - const char* const sqlFunction = "SQLCloseCursor"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLCLOSECURSOR); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlCloseCursor(ctx); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLCLOSECURSOR); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLColAttribute.cpp b/ndb/src/old_files/client/odbc/driver/SQLColAttribute.cpp deleted file mode 100644 index 0e7e5446932..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLColAttribute.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLColAttribute( - SQLHSTMT StatementHandle, - SQLUSMALLINT ColumnNumber, - SQLUSMALLINT FieldIdentifier, - SQLPOINTER CharacterAttribute, - SQLSMALLINT BufferLength, - SQLSMALLINT* StringLength, - SQLPOINTER NumericAttribute) -{ - driver_enter(SQL_API_SQLCOLATTRIBUTE); - const char* const sqlFunction = "SQLColAttribute"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLCOLATTRIBUTE); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlColAttribute(ctx, ColumnNumber, FieldIdentifier, CharacterAttribute, BufferLength, StringLength, NumericAttribute); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLCOLATTRIBUTE); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLColAttributes.cpp b/ndb/src/old_files/client/odbc/driver/SQLColAttributes.cpp deleted file mode 100644 index 05a4c1d4d37..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLColAttributes.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLColAttributes( - SQLHSTMT hstmt, - SQLUSMALLINT icol, - SQLUSMALLINT fDescType, - SQLPOINTER rgbDesc, - SQLSMALLINT cbDescMax, - SQLSMALLINT* pcbDesc, - SQLINTEGER* pfDesc) -{ - driver_enter(SQL_API_SQLCOLATTRIBUTES); - const char* const sqlFunction = "SQLColAttributes"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLCOLATTRIBUTES); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlColAttributes(ctx, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLCOLATTRIBUTES); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLColumnPrivileges.cpp b/ndb/src/old_files/client/odbc/driver/SQLColumnPrivileges.cpp deleted file mode 100644 index cfbc9c2bc57..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLColumnPrivileges.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLColumnPrivileges( - SQLHSTMT hstmt, - SQLCHAR* szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR* szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR* szTableName, - SQLSMALLINT cbTableName, - SQLCHAR* szColumnName, - SQLSMALLINT cbColumnName) -{ -#ifndef auto_SQLColumnPrivileges - const char* const sqlFunction = "SQLColumnPrivileges"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLCOLUMNPRIVILEGES); - const char* const sqlFunction = "SQLColumnPrivileges"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLCOLUMNPRIVILEGES); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlColumnPrivileges( - ctx, - &szCatalogName, - cbCatalogName, - &szSchemaName, - cbSchemaName, - &szTableName, - cbTableName, - &szColumnName, - cbColumnName - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLCOLUMNPRIVILEGES); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLColumns.cpp b/ndb/src/old_files/client/odbc/driver/SQLColumns.cpp deleted file mode 100644 index 4e0b646ee7d..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLColumns.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLColumns( - SQLHSTMT StatementHandle, - SQLCHAR* CatalogName, - SQLSMALLINT NameLength1, - SQLCHAR* SchemaName, - SQLSMALLINT NameLength2, - SQLCHAR* TableName, - SQLSMALLINT NameLength3, - SQLCHAR* ColumnName, - SQLSMALLINT NameLength4) -{ - driver_enter(SQL_API_SQLCOLUMNS); - const char* const sqlFunction = "SQLColumns"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLCOLUMNS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - pStmt->sqlColumns(ctx, CatalogName, NameLength1, SchemaName, NameLength2, TableName, NameLength3, ColumnName, NameLength4); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLCOLUMNS); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLConnect.cpp b/ndb/src/old_files/client/odbc/driver/SQLConnect.cpp deleted file mode 100644 index d8f30ed47e7..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLConnect.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLConnect( - SQLHDBC ConnectionHandle, - SQLCHAR* ServerName, - SQLSMALLINT NameLength1, - SQLCHAR* UserName, - SQLSMALLINT NameLength2, - SQLCHAR* Authentication, - SQLSMALLINT NameLength3) -{ - driver_enter(SQL_API_SQLCONNECT); - const char* const sqlFunction = "SQLConnect"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLCONNECT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlConnect(ctx, ServerName, NameLength1, UserName, NameLength2, Authentication, NameLength3); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLCONNECT); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLCopyDesc.cpp b/ndb/src/old_files/client/odbc/driver/SQLCopyDesc.cpp deleted file mode 100644 index b4d4b2e4122..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLCopyDesc.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLCopyDesc( - SQLHDESC SourceDescHandle, - SQLHDESC TargetDescHandle) -{ -#ifndef auto_SQLCopyDesc - const char* const sqlFunction = "SQLCopyDesc"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLCOPYDESC); - const char* const sqlFunction = "SQLCopyDesc"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDesc* pDesc = pRoot->findDesc(SourceDescHandle); - if (pDesc == 0) { - driver_exit(SQL_API_SQLCOPYDESC); - return SQL_INVALID_HANDLE; - } - HandleDesc* pDesc = pRoot->findDesc(TargetDescHandle); - if (pDesc == 0) { - driver_exit(SQL_API_SQLCOPYDESC); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pDesc->sqlCopyDesc( - ctx, - pDesc - ); - pDesc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLCOPYDESC); - return ret; -#endif -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLDataSources.cpp b/ndb/src/old_files/client/odbc/driver/SQLDataSources.cpp deleted file mode 100644 index 6115e7175f9..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLDataSources.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLDataSources( - SQLHENV EnvironmentHandle, - SQLUSMALLINT Direction, - SQLCHAR* ServerName, - SQLSMALLINT BufferLength1, - SQLSMALLINT* NameLength1, - SQLCHAR* Description, - SQLSMALLINT BufferLength2, - SQLSMALLINT* NameLength2) -{ -#ifndef auto_SQLDataSources - const char* const sqlFunction = "SQLDataSources"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLDATASOURCES); - const char* const sqlFunction = "SQLDataSources"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleEnv* pEnv = pRoot->findEnv(EnvironmentHandle); - if (pEnv == 0) { - driver_exit(SQL_API_SQLDATASOURCES); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pEnv->sqlDataSources( - ctx, - Direction, - &ServerName, - BufferLength1, - &NameLength1, - &Description, - BufferLength2, - &NameLength2 - ); - pEnv->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLDATASOURCES); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLDescribeCol.cpp b/ndb/src/old_files/client/odbc/driver/SQLDescribeCol.cpp deleted file mode 100644 index f15ce8962f1..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLDescribeCol.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLDescribeCol( - SQLHSTMT StatementHandle, - SQLUSMALLINT ColumnNumber, - SQLCHAR* ColumnName, - SQLSMALLINT BufferLength, - SQLSMALLINT* NameLength, - SQLSMALLINT* DataType, - SQLUINTEGER* ColumnSize, - SQLSMALLINT* DecimalDigits, - SQLSMALLINT* Nullable) -{ - driver_enter(SQL_API_SQLDESCRIBECOL); - const char* const sqlFunction = "SQLDescribeCol"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLDESCRIBECOL); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlDescribeCol(ctx, ColumnNumber, ColumnName, BufferLength, NameLength, DataType, ColumnSize, DecimalDigits, Nullable); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLDESCRIBECOL); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLDescribeParam.cpp b/ndb/src/old_files/client/odbc/driver/SQLDescribeParam.cpp deleted file mode 100644 index beff41396fe..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLDescribeParam.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLDescribeParam( - SQLHSTMT hstmt, - SQLUSMALLINT ipar, - SQLSMALLINT* pfSqlType, - SQLUINTEGER* pcbParamDef, - SQLSMALLINT* pibScale, - SQLSMALLINT* pfNullable) -{ - driver_enter(SQL_API_SQLDESCRIBEPARAM); - const char* const sqlFunction = "SQLDescribeParam"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLDESCRIBEPARAM); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlDescribeParam(ctx, ipar, pfSqlType, pcbParamDef, pibScale, pfNullable); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLDESCRIBEPARAM); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLDisconnect.cpp b/ndb/src/old_files/client/odbc/driver/SQLDisconnect.cpp deleted file mode 100644 index 75db5604da8..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLDisconnect.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLDisconnect( - SQLHDBC ConnectionHandle) -{ - driver_enter(SQL_API_SQLDISCONNECT); - const char* const sqlFunction = "SQLDisconnect"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLDISCONNECT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlDisconnect(ctx); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLDISCONNECT); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLDriverConnect.cpp b/ndb/src/old_files/client/odbc/driver/SQLDriverConnect.cpp deleted file mode 100644 index 340babd8523..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLDriverConnect.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLDriverConnect( - SQLHDBC hdbc, - SQLHWND hwnd, - SQLCHAR* szConnStrIn, - SQLSMALLINT cbConnStrIn, - SQLCHAR* szConnStrOut, - SQLSMALLINT cbConnStrOutMax, - SQLSMALLINT* pcbConnStrOut, - SQLUSMALLINT fDriverCompletion) -{ - driver_enter(SQL_API_SQLDRIVERCONNECT); - const char* const sqlFunction = "SQLDriverConnect"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(hdbc); - if (pDbc == 0) { - driver_exit(SQL_API_SQLDRIVERCONNECT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlDriverConnect(ctx, hwnd, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLDRIVERCONNECT); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLDrivers.cpp b/ndb/src/old_files/client/odbc/driver/SQLDrivers.cpp deleted file mode 100644 index 9c52f900992..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLDrivers.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLDrivers( - SQLHENV henv, - SQLUSMALLINT fDirection, - SQLCHAR* szDriverDesc, - SQLSMALLINT cbDriverDescMax, - SQLSMALLINT* pcbDriverDesc, - SQLCHAR* szDriverAttributes, - SQLSMALLINT cbDrvrAttrMax, - SQLSMALLINT* pcbDrvrAttr) -{ -#ifndef auto_SQLDrivers - const char* const sqlFunction = "SQLDrivers"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLDRIVERS); - const char* const sqlFunction = "SQLDrivers"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleEnv* pEnv = pRoot->findEnv(henv); - if (pEnv == 0) { - driver_exit(SQL_API_SQLDRIVERS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pEnv->sqlDrivers( - ctx, - fDirection, - &szDriverDesc, - cbDriverDescMax, - &pcbDriverDesc, - &szDriverAttributes, - cbDrvrAttrMax, - &pcbDrvrAttr - ); - pEnv->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLDRIVERS); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLEndTran.cpp b/ndb/src/old_files/client/odbc/driver/SQLEndTran.cpp deleted file mode 100644 index 20b0b2203f5..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLEndTran.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLEndTran( - SQLSMALLINT HandleType, - SQLHANDLE Handle, - SQLSMALLINT CompletionType) -{ - driver_enter(SQL_API_SQLENDTRAN); - const char* const sqlFunction = "SQLEndTran"; - HandleRoot* const pRoot = HandleRoot::instance(); - if (HandleType == SQL_HANDLE_DBC) { - HandleDbc* pDbc = pRoot->findDbc(Handle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLENDTRAN); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlEndTran(ctx, CompletionType); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLENDTRAN); - return ret; - } - if (HandleType == SQL_HANDLE_ENV) { - HandleEnv* pEnv = pRoot->findEnv(Handle); - if (pEnv == 0) { - driver_exit(SQL_API_SQLENDTRAN); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pEnv->sqlEndTran(ctx, CompletionType); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pEnv->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLENDTRAN); - return ret; - } - driver_exit(SQL_API_SQLENDTRAN); - return SQL_INVALID_HANDLE; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLError.cpp b/ndb/src/old_files/client/odbc/driver/SQLError.cpp deleted file mode 100644 index af78c931d37..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLError.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLError( - SQLHENV EnvironmentHandle, - SQLHDBC ConnectionHandle, - SQLHSTMT StatementHandle, - SQLCHAR* Sqlstate, - SQLINTEGER* NativeError, - SQLCHAR* MessageText, - SQLSMALLINT BufferLength, - SQLSMALLINT* TextLength) -{ - driver_enter(SQL_API_SQLERROR); - const char* const sqlFunction = "SQLError"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleEnv* pEnv = pRoot->findEnv(EnvironmentHandle); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0 && pDbc == 0 && pEnv == 0) { - driver_exit(SQL_API_SQLERROR); - return SQL_INVALID_HANDLE; - } - Ctx ctx; // discard diagnostics - ctx.logSqlEnter(sqlFunction); - if (pStmt != 0) { - try { - pStmt->sqlError(ctx, Sqlstate, NativeError, MessageText, BufferLength, TextLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - } else if (pDbc != 0) { - try { - pDbc->sqlError(ctx, Sqlstate, NativeError, MessageText, BufferLength, TextLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - } else { - try { - pEnv->sqlError(ctx, Sqlstate, NativeError, MessageText, BufferLength, TextLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - } - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLERROR); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLExecDirect.cpp b/ndb/src/old_files/client/odbc/driver/SQLExecDirect.cpp deleted file mode 100644 index 0ad99d29cd9..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLExecDirect.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLExecDirect( - SQLHSTMT StatementHandle, - SQLCHAR* StatementText, - SQLINTEGER TextLength) -{ - driver_enter(SQL_API_SQLEXECDIRECT); - const char* const sqlFunction = "SQLExecDirect"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLEXECDIRECT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlExecDirect(ctx, StatementText, TextLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLEXECDIRECT); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLExecute.cpp b/ndb/src/old_files/client/odbc/driver/SQLExecute.cpp deleted file mode 100644 index 9c30d418f09..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLExecute.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLExecute( - SQLHSTMT StatementHandle) -{ - driver_enter(SQL_API_SQLEXECUTE); - const char* const sqlFunction = "SQLExecute"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLEXECUTE); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlExecute(ctx); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLEXECUTE); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLExtendedFetch.cpp b/ndb/src/old_files/client/odbc/driver/SQLExtendedFetch.cpp deleted file mode 100644 index e0dd078b5d0..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLExtendedFetch.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLExtendedFetch( - SQLHSTMT hstmt, - SQLUSMALLINT fFetchType, - SQLINTEGER irow, - SQLUINTEGER* pcrow, - SQLUSMALLINT* rgfRowStatus) -{ -#ifndef auto_SQLExtendedFetch - const char* const sqlFunction = "SQLExtendedFetch"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLEXTENDEDFETCH); - const char* const sqlFunction = "SQLExtendedFetch"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLEXTENDEDFETCH); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlExtendedFetch( - ctx, - fFetchType, - irow, - &pcrow, - &rgfRowStatus - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLEXTENDEDFETCH); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLFetch.cpp b/ndb/src/old_files/client/odbc/driver/SQLFetch.cpp deleted file mode 100644 index addba7b998c..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLFetch.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLFetch( - SQLHSTMT StatementHandle) -{ - driver_enter(SQL_API_SQLFETCH); - const char* const sqlFunction = "SQLFetch"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLFETCH); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlFetch(ctx); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLFETCH); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLFetchScroll.cpp b/ndb/src/old_files/client/odbc/driver/SQLFetchScroll.cpp deleted file mode 100644 index cfbfc813fca..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLFetchScroll.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLFetchScroll( - SQLHSTMT StatementHandle, - SQLSMALLINT FetchOrientation, - SQLINTEGER FetchOffset) -{ -#ifndef auto_SQLFetchScroll - const char* const sqlFunction = "SQLFetchScroll"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLFETCHSCROLL); - const char* const sqlFunction = "SQLFetchScroll"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLFETCHSCROLL); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlFetchScroll( - ctx, - FetchOrientation, - FetchOffset - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLFETCHSCROLL); - return ret; -#endif -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLForeignKeys.cpp b/ndb/src/old_files/client/odbc/driver/SQLForeignKeys.cpp deleted file mode 100644 index 886ac6bdaa5..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLForeignKeys.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLForeignKeys( - SQLHSTMT hstmt, - SQLCHAR* szPkCatalogName, - SQLSMALLINT cbPkCatalogName, - SQLCHAR* szPkSchemaName, - SQLSMALLINT cbPkSchemaName, - SQLCHAR* szPkTableName, - SQLSMALLINT cbPkTableName, - SQLCHAR* szFkCatalogName, - SQLSMALLINT cbFkCatalogName, - SQLCHAR* szFkSchemaName, - SQLSMALLINT cbFkSchemaName, - SQLCHAR* szFkTableName, - SQLSMALLINT cbFkTableName) -{ -#ifndef auto_SQLForeignKeys - const char* const sqlFunction = "SQLForeignKeys"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLFOREIGNKEYS); - const char* const sqlFunction = "SQLForeignKeys"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLFOREIGNKEYS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlForeignKeys( - ctx, - &szPkCatalogName, - cbPkCatalogName, - &szPkSchemaName, - cbPkSchemaName, - &szPkTableName, - cbPkTableName, - &szFkCatalogName, - cbFkCatalogName, - &szFkSchemaName, - cbFkSchemaName, - &szFkTableName, - cbFkTableName - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLFOREIGNKEYS); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLFreeConnect.cpp b/ndb/src/old_files/client/odbc/driver/SQLFreeConnect.cpp deleted file mode 100644 index 9ac84710cce..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLFreeConnect.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLFreeConnect( - SQLHDBC ConnectionHandle) -{ - driver_enter(SQL_API_SQLFREECONNECT); - const char* const sqlFunction = "SQLFreeConnect"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLFREECONNECT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - HandleEnv* pEnv = pDbc->getEnv(); - try { - pEnv->sqlFreeConnect(ctx, pDbc); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - if (! ctx.ok()) { - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLFREECONNECT); - return ret; - } - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - delete &ctx; - driver_exit(SQL_API_SQLFREECONNECT); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLFreeEnv.cpp b/ndb/src/old_files/client/odbc/driver/SQLFreeEnv.cpp deleted file mode 100644 index 7e35056feb5..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLFreeEnv.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLFreeEnv( - SQLHENV EnvironmentHandle) -{ - driver_enter(SQL_API_SQLFREEENV); - const char* const sqlFunction = "SQLFreeEnv"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleEnv* pEnv = pRoot->findEnv(EnvironmentHandle); - if (pEnv == 0) { - driver_exit(SQL_API_SQLFREEENV); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pRoot->sqlFreeEnv(ctx, pEnv); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - if (! ctx.ok()) { - pEnv->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLFREEENV); - return ret; - } - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - delete &ctx; - driver_exit(SQL_API_SQLFREEENV); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLFreeHandle.cpp b/ndb/src/old_files/client/odbc/driver/SQLFreeHandle.cpp deleted file mode 100644 index 284463cbb07..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLFreeHandle.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLFreeHandle( - SQLSMALLINT HandleType, - SQLHANDLE Handle) -{ - driver_enter(SQL_API_SQLFREEHANDLE); - const char* const sqlFunction = "SQLFreeHandle"; - HandleRoot* const pRoot = HandleRoot::instance(); - SQLSMALLINT parentType = pRoot->findParentType(HandleType); - if (parentType == -1) { - driver_exit(SQL_API_SQLFREEHANDLE); - return SQL_INVALID_HANDLE; - } - HandleBase* pChild = pRoot->findBase(HandleType, Handle); - if (pChild == 0) { - driver_exit(SQL_API_SQLFREEHANDLE); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - HandleBase* pParent = pChild->getParent(); - ctx_assert(pParent != 0); - try { - pParent->sqlFreeHandle(ctx, HandleType, pChild); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - if (! ctx.ok()) { - pChild->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLFREEHANDLE); - return ret; - } - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - delete &ctx; - driver_exit(SQL_API_SQLFREEHANDLE); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLFreeStmt.cpp b/ndb/src/old_files/client/odbc/driver/SQLFreeStmt.cpp deleted file mode 100644 index 7af6623a37a..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLFreeStmt.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLFreeStmt( - SQLHSTMT StatementHandle, - SQLUSMALLINT Option) -{ - driver_enter(SQL_API_SQLFREESTMT); - const char* const sqlFunction = "SQLFreeStmt"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLFREESTMT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - HandleDbc* pDbc = pStmt->getDbc(); - try { - pDbc->sqlFreeStmt(ctx, pStmt, Option); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - if (! ctx.ok() || Option != SQL_DROP) { - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLFREESTMT); - return ret; - } - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - delete &ctx; - driver_exit(SQL_API_SQLFREESTMT); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetConnectAttr.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetConnectAttr.cpp deleted file mode 100644 index 66c1f3827e1..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetConnectAttr.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLGetConnectAttr( - SQLHDBC ConnectionHandle, - SQLINTEGER Attribute, - SQLPOINTER Value, - SQLINTEGER BufferLength, - SQLINTEGER* StringLength) -{ - driver_enter(SQL_API_SQLGETCONNECTATTR); - const char* const sqlFunction = "SQLGetConnectAttr"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLGETCONNECTATTR); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlGetConnectAttr(ctx, Attribute, Value, BufferLength, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETCONNECTATTR); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetConnectOption.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetConnectOption.cpp deleted file mode 100644 index 514bedb12b9..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetConnectOption.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLGetConnectOption( - SQLHDBC ConnectionHandle, - SQLUSMALLINT Option, - SQLPOINTER Value) -{ - driver_enter(SQL_API_SQLGETCONNECTOPTION); - const char* const sqlFunction = "SQLGetConnectOption"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLGETCONNECTOPTION); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlGetConnectOption(ctx, Option, Value); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETCONNECTOPTION); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetCursorName.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetCursorName.cpp deleted file mode 100644 index d54bdf42005..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetCursorName.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLGetCursorName( - SQLHSTMT StatementHandle, - SQLCHAR* CursorName, - SQLSMALLINT BufferLength, - SQLSMALLINT* NameLength) -{ - driver_enter(SQL_API_SQLGETCURSORNAME); - const char* const sqlFunction = "SQLGetCursorName"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLGETCURSORNAME); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlGetCursorName(ctx, CursorName, BufferLength, NameLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETCURSORNAME); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetData.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetData.cpp deleted file mode 100644 index 3b6987c515d..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetData.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLGetData( - SQLHSTMT StatementHandle, - SQLUSMALLINT ColumnNumber, - SQLSMALLINT TargetType, - SQLPOINTER TargetValue, - SQLINTEGER BufferLength, - SQLINTEGER* StrLen_or_Ind) -{ - driver_enter(SQL_API_SQLGETDATA); - const char* const sqlFunction = "SQLGetData"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLGETDATA); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlGetData(ctx, ColumnNumber, TargetType, TargetValue, BufferLength, StrLen_or_Ind); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETDATA); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetDescField.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetDescField.cpp deleted file mode 100644 index 6cc390a58ed..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetDescField.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLGetDescField( - SQLHDESC DescriptorHandle, - SQLSMALLINT RecNumber, - SQLSMALLINT FieldIdentifier, - SQLPOINTER Value, - SQLINTEGER BufferLength, - SQLINTEGER* StringLength) -{ - driver_enter(SQL_API_SQLGETDESCFIELD); - const char* const sqlFunction = "SQLGetDescField"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDesc* pDesc = pRoot->findDesc(DescriptorHandle); - if (pDesc == 0) { - driver_exit(SQL_API_SQLGETDESCFIELD); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDesc->sqlGetDescField(ctx, RecNumber, FieldIdentifier, Value, BufferLength, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDesc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETDESCFIELD); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetDescRec.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetDescRec.cpp deleted file mode 100644 index c7e9631b075..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetDescRec.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLGetDescRec( - SQLHDESC DescriptorHandle, - SQLSMALLINT RecNumber, - SQLCHAR* Name, - SQLSMALLINT BufferLength, - SQLSMALLINT* StringLength, - SQLSMALLINT* Type, - SQLSMALLINT* SubType, - SQLINTEGER* Length, - SQLSMALLINT* Precision, - SQLSMALLINT* Scale, - SQLSMALLINT* Nullable) -{ - driver_enter(SQL_API_SQLGETDESCREC); - const char* const sqlFunction = "SQLGetDescRec"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDesc* pDesc = pRoot->findDesc(DescriptorHandle); - if (pDesc == 0) { - driver_exit(SQL_API_SQLGETDESCREC); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDesc->sqlGetDescRec(ctx, RecNumber, Name, BufferLength, StringLength, Type, SubType, Length, Precision, Scale, Nullable); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDesc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETDESCREC); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetDiagField.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetDiagField.cpp deleted file mode 100644 index 3eb34f7ebf6..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetDiagField.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLGetDiagField( - SQLSMALLINT HandleType, - SQLHANDLE Handle, - SQLSMALLINT RecNumber, - SQLSMALLINT DiagIdentifier, - SQLPOINTER DiagInfo, - SQLSMALLINT BufferLength, - SQLSMALLINT* StringLength) -{ - driver_enter(SQL_API_SQLGETDIAGFIELD); - const char* const sqlFunction = "SQLGetDiagField"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleBase* pBase = pRoot->findBase(HandleType, Handle); - if (pBase == 0) { - driver_exit(SQL_API_SQLGETDIAGFIELD); - return SQL_INVALID_HANDLE; - } - Ctx ctx; // discard diagnostics - ctx.logSqlEnter(sqlFunction); - try { - pBase->sqlGetDiagField(ctx, RecNumber, DiagIdentifier, DiagInfo, BufferLength, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETDIAGFIELD); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetDiagRec.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetDiagRec.cpp deleted file mode 100644 index 448c5206d76..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetDiagRec.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLGetDiagRec( - SQLSMALLINT HandleType, - SQLHANDLE Handle, - SQLSMALLINT RecNumber, - SQLCHAR* Sqlstate, - SQLINTEGER* NativeError, - SQLCHAR* MessageText, - SQLSMALLINT BufferLength, - SQLSMALLINT* TextLength) -{ - driver_enter(SQL_API_SQLGETDIAGREC); - const char* const sqlFunction = "SQLGetDiagRec"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleBase* pBase = pRoot->findBase(HandleType, Handle); - if (pBase == 0) { - driver_exit(SQL_API_SQLGETDIAGREC); - return SQL_INVALID_HANDLE; - } - Ctx ctx; // discard diagnostics - ctx.logSqlEnter(sqlFunction); - try { - pBase->sqlGetDiagRec(ctx, RecNumber, Sqlstate, NativeError, MessageText, BufferLength, TextLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETDIAGREC); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetEnvAttr.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetEnvAttr.cpp deleted file mode 100644 index c93870326e4..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetEnvAttr.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLGetEnvAttr( - SQLHENV EnvironmentHandle, - SQLINTEGER Attribute, - SQLPOINTER Value, - SQLINTEGER BufferLength, - SQLINTEGER* StringLength) -{ - driver_enter(SQL_API_SQLGETENVATTR); - const char* const sqlFunction = "SQLGetEnvAttr"; - HandleRoot* const pRoot = HandleRoot::instance(); - if (EnvironmentHandle == 0) { - // process-level attributes - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pRoot->sqlGetRootAttr(ctx, Attribute, Value, BufferLength, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pRoot->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETENVATTR); - return ret; - } else { - HandleEnv* pEnv = pRoot->findEnv(EnvironmentHandle); - if (pEnv == 0) { - driver_exit(SQL_API_SQLGETENVATTR); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pEnv->sqlGetEnvAttr(ctx, Attribute, Value, BufferLength, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pEnv->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETENVATTR); - return ret; - } - return SQL_ERROR; // not reached -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetFunctions.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetFunctions.cpp deleted file mode 100644 index 68416fab1a6..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetFunctions.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLGetFunctions( - SQLHDBC ConnectionHandle, - SQLUSMALLINT FunctionId, - SQLUSMALLINT* Supported) -{ - driver_enter(SQL_API_SQLGETFUNCTIONS); - const char* const sqlFunction = "SQLGetFunctions"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLGETFUNCTIONS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlGetFunctions(ctx, FunctionId, Supported); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETFUNCTIONS); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetInfo.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetInfo.cpp deleted file mode 100644 index 8f0a0d67cfa..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetInfo.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLGetInfo( - SQLHDBC ConnectionHandle, - SQLUSMALLINT InfoType, - SQLPOINTER InfoValue, - SQLSMALLINT BufferLength, - SQLSMALLINT* StringLength) -{ - driver_enter(SQL_API_SQLGETINFO); - const char* const sqlFunction = "SQLGetInfo"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLGETINFO); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlGetInfo(ctx, InfoType, InfoValue, BufferLength, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETINFO); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetStmtAttr.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetStmtAttr.cpp deleted file mode 100644 index 990ab68808a..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetStmtAttr.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLGetStmtAttr( - SQLHSTMT StatementHandle, - SQLINTEGER Attribute, - SQLPOINTER Value, - SQLINTEGER BufferLength, - SQLINTEGER* StringLength) -{ - driver_enter(SQL_API_SQLGETSTMTATTR); - const char* const sqlFunction = "SQLGetStmtAttr"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLGETSTMTATTR); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlGetStmtAttr(ctx, Attribute, Value, BufferLength, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETSTMTATTR); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetStmtOption.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetStmtOption.cpp deleted file mode 100644 index 0b5758b1212..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetStmtOption.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLGetStmtOption( - SQLHSTMT StatementHandle, - SQLUSMALLINT Option, - SQLPOINTER Value) -{ - driver_enter(SQL_API_SQLGETSTMTOPTION); - const char* const sqlFunction = "SQLGetStmtOption"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLGETSTMTOPTION); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlGetStmtOption(ctx, Option, Value); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETSTMTOPTION); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLGetTypeInfo.cpp b/ndb/src/old_files/client/odbc/driver/SQLGetTypeInfo.cpp deleted file mode 100644 index e6a016cc400..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLGetTypeInfo.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLGetTypeInfo( - SQLHSTMT StatementHandle, - SQLSMALLINT DataType) -{ - driver_enter(SQL_API_SQLGETTYPEINFO); - const char* const sqlFunction = "SQLGetTypeInfo"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLGETTYPEINFO); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlGetTypeInfo(ctx, DataType); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLGETTYPEINFO); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLMoreResults.cpp b/ndb/src/old_files/client/odbc/driver/SQLMoreResults.cpp deleted file mode 100644 index d23d653a319..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLMoreResults.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLMoreResults( - SQLHSTMT hstmt) -{ - driver_enter(SQL_API_SQLMORERESULTS); - const char* const sqlFunction = "SQLMoreResults"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLMORERESULTS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlMoreResults(ctx); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLMORERESULTS); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLNativeSql.cpp b/ndb/src/old_files/client/odbc/driver/SQLNativeSql.cpp deleted file mode 100644 index fb8a9bbf3d9..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLNativeSql.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLNativeSql( - SQLHDBC hdbc, - SQLCHAR* szSqlStrIn, - SQLINTEGER cbSqlStrIn, - SQLCHAR* szSqlStr, - SQLINTEGER cbSqlStrMax, - SQLINTEGER* pcbSqlStr) -{ -#ifndef auto_SQLNativeSql - const char* const sqlFunction = "SQLNativeSql"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLNATIVESQL); - const char* const sqlFunction = "SQLNativeSql"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(hdbc); - if (pDbc == 0) { - driver_exit(SQL_API_SQLNATIVESQL); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pDbc->sqlNativeSql( - ctx, - &szSqlStrIn, - cbSqlStrIn, - &szSqlStr, - cbSqlStrMax, - &pcbSqlStr - ); - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLNATIVESQL); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLNumParams.cpp b/ndb/src/old_files/client/odbc/driver/SQLNumParams.cpp deleted file mode 100644 index 7b1a6a07aec..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLNumParams.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLNumParams( - SQLHSTMT StatementHandle, - SQLSMALLINT* ParameterCountPtr) -{ - driver_enter(SQL_API_SQLNUMPARAMS); - const char* const sqlFunction = "SQLNumParams"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLNUMPARAMS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlNumParams(ctx, ParameterCountPtr); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLNUMPARAMS); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLNumResultCols.cpp b/ndb/src/old_files/client/odbc/driver/SQLNumResultCols.cpp deleted file mode 100644 index 2e70897a9a2..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLNumResultCols.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLNumResultCols( - SQLHSTMT StatementHandle, - SQLSMALLINT* ColumnCount) -{ - driver_enter(SQL_API_SQLNUMRESULTCOLS); - const char* const sqlFunction = "SQLNumResultCols"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLNUMRESULTCOLS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlNumResultCols(ctx, ColumnCount); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLNUMRESULTCOLS); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLParamData.cpp b/ndb/src/old_files/client/odbc/driver/SQLParamData.cpp deleted file mode 100644 index 4eb38a010f4..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLParamData.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLParamData( - SQLHSTMT StatementHandle, - SQLPOINTER* Value) -{ - driver_enter(SQL_API_SQLPARAMDATA); - const char* const sqlFunction = "SQLParamData"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLPARAMDATA); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlParamData(ctx, Value); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLPARAMDATA); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLParamOptions.cpp b/ndb/src/old_files/client/odbc/driver/SQLParamOptions.cpp deleted file mode 100644 index 59b7dcf7fa9..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLParamOptions.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLParamOptions( - SQLHSTMT hstmt, - SQLUINTEGER crow, - SQLUINTEGER* pirow) -{ -#ifndef auto_SQLParamOptions - const char* const sqlFunction = "SQLParamOptions"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLPARAMOPTIONS); - const char* const sqlFunction = "SQLParamOptions"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLPARAMOPTIONS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlParamOptions( - ctx, - crow, - &pirow - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLPARAMOPTIONS); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLPrepare.cpp b/ndb/src/old_files/client/odbc/driver/SQLPrepare.cpp deleted file mode 100644 index b1205fa6e3a..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLPrepare.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLPrepare( - SQLHSTMT StatementHandle, - SQLCHAR* StatementText, - SQLINTEGER TextLength) -{ - driver_enter(SQL_API_SQLPREPARE); - const char* const sqlFunction = "SQLPrepare"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLPREPARE); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlPrepare(ctx, StatementText, TextLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLPREPARE); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLPrimaryKeys.cpp b/ndb/src/old_files/client/odbc/driver/SQLPrimaryKeys.cpp deleted file mode 100644 index 2d562ae3e19..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLPrimaryKeys.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLPrimaryKeys( - SQLHSTMT hstmt, - SQLCHAR* szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR* szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR* szTableName, - SQLSMALLINT cbTableName) -{ - driver_enter(SQL_API_SQLPRIMARYKEYS); - const char* const sqlFunction = "SQLPrimaryKeys"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLPRIMARYKEYS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - pStmt->sqlPrimaryKeys(ctx, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName, szTableName, cbTableName); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLPRIMARYKEYS); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLProcedureColumns.cpp b/ndb/src/old_files/client/odbc/driver/SQLProcedureColumns.cpp deleted file mode 100644 index 2e42e428b87..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLProcedureColumns.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLProcedureColumns( - SQLHSTMT hstmt, - SQLCHAR* szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR* szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR* szProcName, - SQLSMALLINT cbProcName, - SQLCHAR* szColumnName, - SQLSMALLINT cbColumnName) -{ -#ifndef auto_SQLProcedureColumns - const char* const sqlFunction = "SQLProcedureColumns"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLPROCEDURECOLUMNS); - const char* const sqlFunction = "SQLProcedureColumns"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLPROCEDURECOLUMNS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlProcedureColumns( - ctx, - &szCatalogName, - cbCatalogName, - &szSchemaName, - cbSchemaName, - &szProcName, - cbProcName, - &szColumnName, - cbColumnName - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLPROCEDURECOLUMNS); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLProcedures.cpp b/ndb/src/old_files/client/odbc/driver/SQLProcedures.cpp deleted file mode 100644 index 1f3a9f89073..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLProcedures.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLProcedures( - SQLHSTMT hstmt, - SQLCHAR* szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR* szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR* szProcName, - SQLSMALLINT cbProcName) -{ -#ifndef auto_SQLProcedures - const char* const sqlFunction = "SQLProcedures"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLPROCEDURES); - const char* const sqlFunction = "SQLProcedures"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLPROCEDURES); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlProcedures( - ctx, - &szCatalogName, - cbCatalogName, - &szSchemaName, - cbSchemaName, - &szProcName, - cbProcName - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLPROCEDURES); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLPutData.cpp b/ndb/src/old_files/client/odbc/driver/SQLPutData.cpp deleted file mode 100644 index a4715a836d2..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLPutData.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLPutData( - SQLHSTMT StatementHandle, - SQLPOINTER Data, - SQLINTEGER StrLen_or_Ind) -{ - driver_enter(SQL_API_SQLPUTDATA); - const char* const sqlFunction = "SQLPutData"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLPUTDATA); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlPutData(ctx, Data, StrLen_or_Ind); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLPUTDATA); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLRowCount.cpp b/ndb/src/old_files/client/odbc/driver/SQLRowCount.cpp deleted file mode 100644 index d03f954386a..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLRowCount.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLRowCount( - SQLHSTMT StatementHandle, - SQLINTEGER* RowCount) -{ - driver_enter(SQL_API_SQLROWCOUNT); - const char* const sqlFunction = "SQLRowCount"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLROWCOUNT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlRowCount(ctx, RowCount); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLROWCOUNT); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetConnectAttr.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetConnectAttr.cpp deleted file mode 100644 index 05bfce5e9cd..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetConnectAttr.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLSetConnectAttr( - SQLHDBC ConnectionHandle, - SQLINTEGER Attribute, - SQLPOINTER Value, - SQLINTEGER StringLength) -{ - driver_enter(SQL_API_SQLSETCONNECTATTR); - const char* const sqlFunction = "SQLSetConnectAttr"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLSETCONNECTATTR); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlSetConnectAttr(ctx, Attribute, Value, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETCONNECTATTR); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetConnectOption.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetConnectOption.cpp deleted file mode 100644 index a4794316971..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetConnectOption.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLSetConnectOption( - SQLHDBC ConnectionHandle, - SQLUSMALLINT Option, - SQLUINTEGER Value) -{ - driver_enter(SQL_API_SQLSETCONNECTOPTION); - const char* const sqlFunction = "SQLSetConnectOption"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLSETCONNECTOPTION); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlSetConnectOption(ctx, Option, Value); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETCONNECTOPTION); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetCursorName.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetCursorName.cpp deleted file mode 100644 index 291ad817d42..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetCursorName.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLSetCursorName( - SQLHSTMT StatementHandle, - SQLCHAR* CursorName, - SQLSMALLINT NameLength) -{ - driver_enter(SQL_API_SQLSETCURSORNAME); - const char* const sqlFunction = "SQLSetCursorName"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLSETCURSORNAME); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlSetCursorName(ctx, CursorName, NameLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETCURSORNAME); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetDescField.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetDescField.cpp deleted file mode 100644 index 19d34c2f46d..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetDescField.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLSetDescField( - SQLHDESC DescriptorHandle, - SQLSMALLINT RecNumber, - SQLSMALLINT FieldIdentifier, - SQLPOINTER Value, - SQLINTEGER BufferLength) -{ - driver_enter(SQL_API_SQLSETDESCFIELD); - const char* const sqlFunction = "SQLSetDescField"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDesc* pDesc = pRoot->findDesc(DescriptorHandle); - if (pDesc == 0) { - driver_exit(SQL_API_SQLSETDESCFIELD); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDesc->sqlSetDescField(ctx, RecNumber, FieldIdentifier, Value, BufferLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDesc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETDESCFIELD); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetDescRec.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetDescRec.cpp deleted file mode 100644 index 80a00514a51..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetDescRec.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLSetDescRec( - SQLHDESC DescriptorHandle, - SQLSMALLINT RecNumber, - SQLSMALLINT Type, - SQLSMALLINT SubType, - SQLINTEGER Length, - SQLSMALLINT Precision, - SQLSMALLINT Scale, - SQLPOINTER Data, - SQLINTEGER* StringLength, - SQLINTEGER* Indicator) -{ - driver_enter(SQL_API_SQLSETDESCREC); - const char* const sqlFunction = "SQLSetDescRec"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleDesc* pDesc = pRoot->findDesc(DescriptorHandle); - if (pDesc == 0) { - driver_exit(SQL_API_SQLSETDESCREC); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDesc->sqlSetDescRec(ctx, RecNumber, Type, SubType, Length, Precision, Scale, Data, StringLength, Indicator); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDesc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETDESCREC); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetEnvAttr.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetEnvAttr.cpp deleted file mode 100644 index 86364eac5e8..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetEnvAttr.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLSetEnvAttr( - SQLHENV EnvironmentHandle, - SQLINTEGER Attribute, - SQLPOINTER Value, - SQLINTEGER StringLength) -{ - driver_enter(SQL_API_SQLSETENVATTR); - const char* const sqlFunction = "SQLSetEnvAttr"; - HandleRoot* const pRoot = HandleRoot::instance(); - if (EnvironmentHandle == 0) { - // process-level attributes - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pRoot->sqlSetRootAttr(ctx, Attribute, Value, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pRoot->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETENVATTR); - return ret; - } else { - HandleEnv* pEnv = pRoot->findEnv(EnvironmentHandle); - if (pEnv == 0) { - driver_exit(SQL_API_SQLSETENVATTR); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pEnv->sqlSetEnvAttr(ctx, Attribute, Value, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pEnv->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETENVATTR); - return ret; - } - return SQL_ERROR; // not reached -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetParam.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetParam.cpp deleted file mode 100644 index 03bde1076d8..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetParam.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLSetParam( - SQLHSTMT StatementHandle, - SQLUSMALLINT ParameterNumber, - SQLSMALLINT ValueType, - SQLSMALLINT ParameterType, - SQLUINTEGER LengthPrecision, - SQLSMALLINT ParameterScale, - SQLPOINTER ParameterValue, - SQLINTEGER* StrLen_or_Ind) -{ - driver_enter(SQL_API_SQLSETPARAM); - const char* const sqlFunction = "SQLSetParam"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLSETPARAM); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlSetParam(ctx, ParameterNumber, ValueType, ParameterType, LengthPrecision, ParameterScale, ParameterValue, StrLen_or_Ind); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETPARAM); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetPos.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetPos.cpp deleted file mode 100644 index 653030f90bc..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetPos.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLSetPos( - SQLHSTMT hstmt, - SQLUSMALLINT irow, - SQLUSMALLINT fOption, - SQLUSMALLINT fLock) -{ -#ifndef auto_SQLSetPos - const char* const sqlFunction = "SQLSetPos"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLSETPOS); - const char* const sqlFunction = "SQLSetPos"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLSETPOS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlSetPos( - ctx, - irow, - fOption, - fLock - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETPOS); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetScrollOptions.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetScrollOptions.cpp deleted file mode 100644 index a5e89d8568b..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetScrollOptions.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLSetScrollOptions( - SQLHSTMT hstmt, - SQLUSMALLINT fConcurrency, - SQLINTEGER crowKeyset, - SQLUSMALLINT crowRowset) -{ -#ifndef auto_SQLSetScrollOptions - const char* const sqlFunction = "SQLSetScrollOptions"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLSETSCROLLOPTIONS); - const char* const sqlFunction = "SQLSetScrollOptions"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLSETSCROLLOPTIONS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlSetScrollOptions( - ctx, - fConcurrency, - crowKeyset, - crowRowset - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETSCROLLOPTIONS); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetStmtAttr.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetStmtAttr.cpp deleted file mode 100644 index 9ed6a83b563..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetStmtAttr.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0300 -SQLRETURN SQL_API -SQLSetStmtAttr( - SQLHSTMT StatementHandle, - SQLINTEGER Attribute, - SQLPOINTER Value, - SQLINTEGER StringLength) -{ - driver_enter(SQL_API_SQLSETSTMTATTR); - const char* const sqlFunction = "SQLSetStmtAttr"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLSETSTMTATTR); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlSetStmtAttr(ctx, Attribute, Value, StringLength); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETSTMTATTR); - return ret; -} -#endif // ODBCVER >= 0x0300 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSetStmtOption.cpp b/ndb/src/old_files/client/odbc/driver/SQLSetStmtOption.cpp deleted file mode 100644 index b403fc8408c..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSetStmtOption.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLSetStmtOption( - SQLHSTMT StatementHandle, - SQLUSMALLINT Option, - SQLUINTEGER Value) -{ - driver_enter(SQL_API_SQLSETSTMTOPTION); - const char* const sqlFunction = "SQLSetStmtOption"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLSETSTMTOPTION); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pStmt->sqlSetStmtOption(ctx, Option, Value); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSETSTMTOPTION); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLSpecialColumns.cpp b/ndb/src/old_files/client/odbc/driver/SQLSpecialColumns.cpp deleted file mode 100644 index 5dd92c86053..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLSpecialColumns.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLSpecialColumns( - SQLHSTMT StatementHandle, - SQLUSMALLINT IdentifierType, - SQLCHAR* CatalogName, - SQLSMALLINT NameLength1, - SQLCHAR* SchemaName, - SQLSMALLINT NameLength2, - SQLCHAR* TableName, - SQLSMALLINT NameLength3, - SQLUSMALLINT Scope, - SQLUSMALLINT Nullable) -{ -#ifndef auto_SQLSpecialColumns - const char* const sqlFunction = "SQLSpecialColumns"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLSPECIALCOLUMNS); - const char* const sqlFunction = "SQLSpecialColumns"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLSPECIALCOLUMNS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlSpecialColumns( - ctx, - IdentifierType, - &CatalogName, - NameLength1, - &SchemaName, - NameLength2, - &TableName, - NameLength3, - Scope, - Nullable - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSPECIALCOLUMNS); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLStatistics.cpp b/ndb/src/old_files/client/odbc/driver/SQLStatistics.cpp deleted file mode 100644 index 941fb6249a5..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLStatistics.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLStatistics( - SQLHSTMT StatementHandle, - SQLCHAR* CatalogName, - SQLSMALLINT NameLength1, - SQLCHAR* SchemaName, - SQLSMALLINT NameLength2, - SQLCHAR* TableName, - SQLSMALLINT NameLength3, - SQLUSMALLINT Unique, - SQLUSMALLINT Reserved) -{ -#ifndef auto_SQLStatistics - const char* const sqlFunction = "SQLStatistics"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLSTATISTICS); - const char* const sqlFunction = "SQLStatistics"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLSTATISTICS); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlStatistics( - ctx, - &CatalogName, - NameLength1, - &SchemaName, - NameLength2, - &TableName, - NameLength3, - Unique, - Reserved - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLSTATISTICS); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLTablePrivileges.cpp b/ndb/src/old_files/client/odbc/driver/SQLTablePrivileges.cpp deleted file mode 100644 index 23c6ad9fc4b..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLTablePrivileges.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLTablePrivileges( - SQLHSTMT hstmt, - SQLCHAR* szCatalogName, - SQLSMALLINT cbCatalogName, - SQLCHAR* szSchemaName, - SQLSMALLINT cbSchemaName, - SQLCHAR* szTableName, - SQLSMALLINT cbTableName) -{ -#ifndef auto_SQLTablePrivileges - const char* const sqlFunction = "SQLTablePrivileges"; - Ctx ctx; - ctx_log1(("*** not implemented: %s", sqlFunction)); - return SQL_ERROR; -#else - driver_enter(SQL_API_SQLTABLEPRIVILEGES); - const char* const sqlFunction = "SQLTablePrivileges"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(hstmt); - if (pStmt == 0) { - driver_exit(SQL_API_SQLTABLEPRIVILEGES); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - if (ctx.ok()) - pStmt->sqlTablePrivileges( - ctx, - &szCatalogName, - cbCatalogName, - &szSchemaName, - cbSchemaName, - &szTableName, - cbTableName - ); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLTABLEPRIVILEGES); - return ret; -#endif -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLTables.cpp b/ndb/src/old_files/client/odbc/driver/SQLTables.cpp deleted file mode 100644 index b2496bfba87..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLTables.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLTables( - SQLHSTMT StatementHandle, - SQLCHAR* CatalogName, - SQLSMALLINT NameLength1, - SQLCHAR* SchemaName, - SQLSMALLINT NameLength2, - SQLCHAR* TableName, - SQLSMALLINT NameLength3, - SQLCHAR* TableType, - SQLSMALLINT NameLength4) -{ - driver_enter(SQL_API_SQLTABLES); - const char* const sqlFunction = "SQLTables"; - HandleRoot* const pRoot = HandleRoot::instance(); - HandleStmt* pStmt = pRoot->findStmt(StatementHandle); - if (pStmt == 0) { - driver_exit(SQL_API_SQLTABLES); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - pStmt->sqlTables(ctx, CatalogName, NameLength1, SchemaName, NameLength2, TableName, NameLength3, TableType, NameLength4); - pStmt->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLTABLES); - return ret; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/SQLTransact.cpp b/ndb/src/old_files/client/odbc/driver/SQLTransact.cpp deleted file mode 100644 index da8b46b1596..00000000000 --- a/ndb/src/old_files/client/odbc/driver/SQLTransact.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" - -#if ODBCVER >= 0x0000 -SQLRETURN SQL_API -SQLTransact( - SQLHENV EnvironmentHandle, - SQLHDBC ConnectionHandle, - SQLUSMALLINT CompletionType) -{ - driver_enter(SQL_API_SQLTRANSACT); - const char* const sqlFunction = "SQLTransact"; - HandleRoot* const pRoot = HandleRoot::instance(); - // check connection first and ignore environment - if (ConnectionHandle != SQL_NULL_HANDLE) { - HandleDbc* pDbc = pRoot->findDbc(ConnectionHandle); - if (pDbc == 0) { - driver_exit(SQL_API_SQLTRANSACT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pDbc->sqlTransact(ctx, CompletionType); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pDbc->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLTRANSACT); - return ret; - } - if (EnvironmentHandle != SQL_NULL_HANDLE) { - HandleEnv* pEnv = pRoot->findEnv(EnvironmentHandle); - if (pEnv == 0) { - driver_exit(SQL_API_SQLTRANSACT); - return SQL_INVALID_HANDLE; - } - Ctx& ctx = *new Ctx; - ctx.logSqlEnter(sqlFunction); - try { - pEnv->sqlTransact(ctx, CompletionType); - } catch (CtxAssert& ctxAssert) { - ctx.handleEx(ctxAssert); - } - pEnv->saveCtx(ctx); - ctx.logSqlExit(); - SQLRETURN ret = ctx.getCode(); - driver_exit(SQL_API_SQLTRANSACT); - return ret; - } - driver_exit(SQL_API_SQLTRANSACT); - return SQL_INVALID_HANDLE; -} -#endif // ODBCVER >= 0x0000 diff --git a/ndb/src/old_files/client/odbc/driver/driver.cpp b/ndb/src/old_files/client/odbc/driver/driver.cpp deleted file mode 100644 index f992fa70878..00000000000 --- a/ndb/src/old_files/client/odbc/driver/driver.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "driver.hpp" -#include - -#undef NDB_ODBC_SIG_DFL -#ifdef NDB_ODBC_SIG_DFL -#include -#endif - -// The big mutex (just in case). - -#ifdef NDB_WIN32 -static NdbMutex & driver_mutex = * NdbMutex_Create(); -#else -static NdbMutex driver_mutex = NDB_MUTEX_INITIALIZER; -#endif - -static void -driver_lock() -{ - NdbMutex_Lock(&driver_mutex); -} - -static void -driver_unlock() -{ - NdbMutex_Unlock(&driver_mutex); -} - -// Hooks for function entry and exit. - -static inline void -driver_enter(SQLUSMALLINT functionId) -{ - switch (functionId) { - default: - break; - } -#ifdef NDB_ODBC_SIG_DFL - // XXX need to restore old sig - for (int i = 1; i <= 30; i++) - signal(i, SIG_DFL); -#endif -} - -static inline void -driver_exit(SQLUSMALLINT functionId) -{ - switch (functionId) { - default: - break; - } -} - -// Some C++ compilers (like gcc) cannot merge template code -// in different files. So compile all in one file. - -#include "SQLAllocConnect.cpp" -#include "SQLAllocEnv.cpp" -#include "SQLAllocHandle.cpp" -#include "SQLAllocHandleStd.cpp" -#include "SQLAllocStmt.cpp" -#include "SQLBindCol.cpp" -#include "SQLBindParam.cpp" -#include "SQLBindParameter.cpp" -#include "SQLBrowseConnect.cpp" -#include "SQLBulkOperations.cpp" -#include "SQLCancel.cpp" -#include "SQLCloseCursor.cpp" -#include "SQLColAttribute.cpp" -#include "SQLColAttributes.cpp" -#include "SQLColumnPrivileges.cpp" -#include "SQLColumns.cpp" -#include "SQLConnect.cpp" -#include "SQLCopyDesc.cpp" -#include "SQLDataSources.cpp" -#include "SQLDescribeCol.cpp" -#include "SQLDescribeParam.cpp" -#include "SQLDisconnect.cpp" -#include "SQLDriverConnect.cpp" -#include "SQLDrivers.cpp" -#include "SQLEndTran.cpp" -#include "SQLError.cpp" -#include "SQLExecDirect.cpp" -#include "SQLExecute.cpp" -#include "SQLExtendedFetch.cpp" -#include "SQLFetch.cpp" -#include "SQLFetchScroll.cpp" -#include "SQLForeignKeys.cpp" -#include "SQLFreeConnect.cpp" -#include "SQLFreeEnv.cpp" -#include "SQLFreeHandle.cpp" -#include "SQLFreeStmt.cpp" -#include "SQLGetConnectAttr.cpp" -#include "SQLGetConnectOption.cpp" -#include "SQLGetCursorName.cpp" -#include "SQLGetData.cpp" -#include "SQLGetDescField.cpp" -#include "SQLGetDescRec.cpp" -#include "SQLGetDiagField.cpp" -#include "SQLGetDiagRec.cpp" -#include "SQLGetEnvAttr.cpp" -#include "SQLGetFunctions.cpp" -#include "SQLGetInfo.cpp" -#include "SQLGetStmtAttr.cpp" -#include "SQLGetStmtOption.cpp" -#include "SQLGetTypeInfo.cpp" -#include "SQLMoreResults.cpp" -#include "SQLNativeSql.cpp" -#include "SQLNumParams.cpp" -#include "SQLNumResultCols.cpp" -#include "SQLParamData.cpp" -#include "SQLParamOptions.cpp" -#include "SQLPrepare.cpp" -#include "SQLPrimaryKeys.cpp" -#include "SQLProcedureColumns.cpp" -#include "SQLProcedures.cpp" -#include "SQLPutData.cpp" -#include "SQLRowCount.cpp" -#include "SQLSetConnectAttr.cpp" -#include "SQLSetConnectOption.cpp" -#include "SQLSetCursorName.cpp" -#include "SQLSetDescField.cpp" -#include "SQLSetDescRec.cpp" -#include "SQLSetEnvAttr.cpp" -#include "SQLSetParam.cpp" -#include "SQLSetPos.cpp" -#include "SQLSetScrollOptions.cpp" -#include "SQLSetStmtAttr.cpp" -#include "SQLSetStmtOption.cpp" -#include "SQLSpecialColumns.cpp" -#include "SQLStatistics.cpp" -#include "SQLTablePrivileges.cpp" -#include "SQLTables.cpp" -#include "SQLTransact.cpp" diff --git a/ndb/src/old_files/client/odbc/driver/driver.hpp b/ndb/src/old_files/client/odbc/driver/driver.hpp deleted file mode 100644 index 96d2e052c0d..00000000000 --- a/ndb/src/old_files/client/odbc/driver/driver.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_DRIVER_driver_hpp -#define ODBC_DRIVER_driver_hpp - -#include -#include -#include - -#ifndef NDB_WIN32 -#define SQL_API -#endif - -#endif diff --git a/ndb/src/old_files/client/odbc/executor/Exec_comp_op.cpp b/ndb/src/old_files/client/odbc/executor/Exec_comp_op.cpp deleted file mode 100644 index 40d3950a592..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_comp_op.cpp +++ /dev/null @@ -1,518 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include - -void -Exec_comp_op::execInterp(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - const unsigned arity = code.m_op.arity(); - const Comp_op::Opcode opcode = code.m_op.m_opcode; - Data& data = getData(); - ctx_assert(ctl.m_scanFilter != 0); - NdbScanFilter& scanFilter = *ctl.m_scanFilter; - if (code.m_interpColumn == 0) { - // args are constant on this level so evaluate entire predicate - evaluate(ctx, ctl); - if (! ctx.ok()) - return; - if (data.m_value == Pred_value_true) - scanFilter.istrue(); - else - scanFilter.isfalse(); - return; - } - const NdbAttrId interpAttrId = code.m_interpAttrId; - if (arity == 1) { - ctx_assert(m_expr[1] != 0); - const SqlType& t1 = m_expr[1]->getCode().sqlSpec().sqlType(); - const SqlField& f1 = m_expr[1]->getData().sqlField(); - switch (code.m_op.m_opcode) { - case Comp_op::Isnull: - scanFilter.isnull(interpAttrId); - break; - case Comp_op::Isnotnull: - scanFilter.isnotnull(interpAttrId); - break; - default: - ctx_assert(false); - break; - } - } else if (arity == 2) { - ctx_assert(m_expr[1] != 0 && m_expr[2] != 0); - // one is column and the other is constant at this level - ctx_assert(code.m_interpColumn == 1 || code.m_interpColumn == 2); - const unsigned i = code.m_interpColumn; - const unsigned j = 3 - i; - // evaluate the constant - m_expr[j]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - const SqlType& t1 = m_expr[i]->getCode().sqlSpec().sqlType(); - const SqlField& f1 = m_expr[i]->getData().sqlField(); - const SqlType& t2 = m_expr[j]->getCode().sqlSpec().sqlType(); - const SqlField& f2 = m_expr[j]->getData().sqlField(); - // handle null constant - if (f2.sqlNull()) { - scanFilter.isfalse(); - return; - } - // handle null in interpreter - scanFilter.begin(NdbScanFilter::AND); - scanFilter.isnotnull(interpAttrId); - if (t1.type() == SqlType::Char || t1.type() == SqlType::Varchar) { - const char* v2 = 0; - unsigned n2 = 0; - bool nopad = false; - if (t1.type() == SqlType::Char && t2.type() == SqlType::Char) { - v2 = reinterpret_cast(f2.sqlChar()); - n2 = t2.length(); - nopad = false; - } else if (t1.type() == SqlType::Char && t2.type() == SqlType::Varchar) { - v2 = reinterpret_cast(f2.sqlVarchar(&n2)); - nopad = true; - } else if (t1.type() == SqlType::Varchar && t2.type() == SqlType::Char) { - v2 = reinterpret_cast(f2.sqlChar()); - n2 = t2.length(); - nopad = true; - } else if (t1.type() == SqlType::Varchar && t2.type() == SqlType::Varchar) { - v2 = reinterpret_cast(f2.sqlVarchar(&n2)); - nopad = true; - } else { - ctx_assert(false); - } - switch (opcode) { - case Comp_op::Eq: - scanFilter.eq(interpAttrId, v2, n2, nopad); - break; - case Comp_op::Noteq: - scanFilter.ne(interpAttrId, v2, n2, nopad); - break; - case Comp_op::Lt: - if (i == 1) { - scanFilter.lt(interpAttrId, v2, n2, nopad); - } else { - scanFilter.gt(interpAttrId, v2, n2, nopad); - } - break; - case Comp_op::Lteq: - if (i == 1) { - scanFilter.le(interpAttrId, v2, n2, nopad); - } else { - scanFilter.ge(interpAttrId, v2, n2, nopad); - } - break; - case Comp_op::Gt: - if (i == 1) { - scanFilter.gt(interpAttrId, v2, n2, nopad); - } else { - scanFilter.lt(interpAttrId, v2, n2, nopad); - } - break; - case Comp_op::Gteq: - if (i == 1) { - scanFilter.ge(interpAttrId, v2, n2, nopad); - } else { - scanFilter.le(interpAttrId, v2, n2, nopad); - } - break; - case Comp_op::Like: - scanFilter.like(interpAttrId, v2, n2, nopad); - break; - case Comp_op::Notlike: - scanFilter.notlike(interpAttrId, v2, n2, nopad); - break; - default: - ctx_assert(false); - break; - } - } else if (t1.type() == SqlType::Smallint || t1.type() == SqlType::Integer || t1.type() == SqlType::Bigint) { - ctx_assert(t1.unSigned()); - bool s2 = ! t2.unSigned(); - SqlBigint v2; - SqlUbigint uv2; - if (s2) { - v2 = - t2.type() == SqlType::Smallint ? f2.sqlSmallint() : - t2.type() == SqlType::Integer ? f2.sqlInteger() : f2.sqlBigint(); - uv2 = v2; - } else { - uv2 = - t2.type() == SqlType::Smallint ? (SqlUsmallint)f2.sqlSmallint() : - t2.type() == SqlType::Integer ? (SqlUinteger)f2.sqlInteger() : (SqlUbigint)f2.sqlBigint(); - v2 = uv2; - } - switch (code.m_op.m_opcode) { - case Comp_op::Eq: - if (s2 && v2 < 0) - scanFilter.isfalse(); - else - scanFilter.eq(interpAttrId, uv2); - break; - case Comp_op::Noteq: - if (s2 && v2 < 0) - scanFilter.istrue(); - else - scanFilter.ne(interpAttrId, uv2); - break; - case Comp_op::Lt: - if (i == 1) { - if (s2 && v2 < 0) - scanFilter.isfalse(); - else - scanFilter.lt(interpAttrId, uv2); - } else { - if (s2 && v2 < 0) - scanFilter.istrue(); - else - scanFilter.gt(interpAttrId, uv2); - } - break; - case Comp_op::Lteq: - if (i == 1) { - if (s2 && v2 < 0) - scanFilter.isfalse(); - else - scanFilter.le(interpAttrId, uv2); - } else { - if (s2 && v2 < 0) - scanFilter.istrue(); - else - scanFilter.ge(interpAttrId, uv2); - } - break; - case Comp_op::Gt: - if (i == 1) { - if (s2 && v2 < 0) - scanFilter.istrue(); - else - scanFilter.gt(interpAttrId, uv2); - } else { - if (s2 && v2 < 0) - scanFilter.isfalse(); - else - scanFilter.lt(interpAttrId, uv2); - } - break; - case Comp_op::Gteq: - if (i == 1) { - if (s2 && v2 < 0) - scanFilter.istrue(); - else - scanFilter.ge(interpAttrId, uv2); - } else { - if (s2 && v2 < 0) - scanFilter.isfalse(); - else - scanFilter.le(interpAttrId, uv2); - } - break; - default: - ctx_assert(false); - break; - } - } else { - ctx_assert(false); - } - // end null guard - scanFilter.end(); - } else { - ctx_assert(false); - } -} - -static bool -do_sqlchar_comp(Comp_op::Opcode opcode, const SqlChar* s1, unsigned n1, const SqlChar* s2, unsigned n2, bool padded) -{ - int ret = NdbSqlUtil::char_compare(reinterpret_cast(s1), n1, reinterpret_cast(s2), n2, padded); - switch (opcode) { - case Comp_op::Eq: - return ret == 0; - case Comp_op::Noteq: - return ret != 0; - case Comp_op::Lt: - return ret < 0; - case Comp_op::Lteq: - return ret <= 0; - case Comp_op::Gt: - return ret > 0; - case Comp_op::Gteq: - return ret >= 0; - default: - break; - } - ctx_assert(false); - return false; -} - -static bool -do_sqlchar_like(const SqlChar* s1, unsigned n1, const SqlChar* s2, unsigned n2, bool padded) -{ - bool ret = NdbSqlUtil::char_like(reinterpret_cast(s1), n1, reinterpret_cast(s2), n2, padded); - return ret; -} - -static bool -do_datetime_comp(Comp_op::Opcode opcode, SqlDatetime v1, SqlDatetime v2) -{ - int k = v1.less(v2) ? -1 : v2.less(v1) ? 1 : 0; - switch (opcode) { - case Comp_op::Eq: - return k == 0; - case Comp_op::Noteq: - return k != 0; - case Comp_op::Lt: - return k < 0; - case Comp_op::Lteq: - return k <= 0; - case Comp_op::Gt: - return k > 0; - case Comp_op::Gteq: - return k >= 0; - default: - break; - } - ctx_assert(false); - return false; -} - -void -Exec_comp_op::evaluate(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - const unsigned arity = code.m_op.arity(); - const Comp_op::Opcode opcode = code.m_op.m_opcode; - Data& data = getData(); - Pred_value v = Pred_value_unknown; - if (arity == 1) { - // evaluate sub-expression - ctx_assert(m_expr[1] != 0); - m_expr[1]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - if (ctl.m_postEval) - return; - // get type and value - const SqlType& t1 = m_expr[1]->getCode().sqlSpec().sqlType(); - const SqlField& f1 = ctl.m_groupIndex == 0 ? m_expr[1]->getData().sqlField() : m_expr[1]->getData().groupField(ctl.m_groupIndex); - switch (code.m_op.m_opcode) { - case Comp_op::Isnull: - v = f1.sqlNull() ? Pred_value_true : Pred_value_false; - break; - case Comp_op::Isnotnull: - v = f1.sqlNull() ? Pred_value_false : Pred_value_true; - break; - default: - ctx_assert(false); - break; - } - } else if (arity == 2) { - // evaluate sub-expressions - ctx_assert(m_expr[1] != 0 && m_expr[2] != 0); - m_expr[1]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - m_expr[2]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - if (ctl.m_postEval) - return; - // get types and values - const SqlType& t1 = m_expr[1]->getCode().sqlSpec().sqlType(); - const SqlType& t2 = m_expr[2]->getCode().sqlSpec().sqlType(); - const SqlField& f1 = ctl.m_groupIndex == 0 ? m_expr[1]->getData().sqlField() : m_expr[1]->getData().groupField(ctl.m_groupIndex); - const SqlField& f2 = ctl.m_groupIndex == 0 ? m_expr[2]->getData().sqlField() : m_expr[2]->getData().groupField(ctl.m_groupIndex); - // handle null - if (f1.sqlNull() || f2.sqlNull()) { - v = Pred_value_unknown; - } else if (t1.type() == SqlType::Char) { - const SqlChar* v1 = f1.sqlChar(); - unsigned n1 = t1.length(); - if (t2.type() == SqlType::Char) { - unsigned n2 = t2.length(); - const SqlChar* v2 = f2.sqlChar(); - bool b; - switch (opcode) { - case Comp_op::Like: - b = do_sqlchar_like(v1, n1, v2, n2, true); - break; - case Comp_op::Notlike: - b = ! do_sqlchar_like(v1, n1, v2, n2, true); - break; - default: - b = do_sqlchar_comp(opcode, v1, n1, v2, n2, true); - break; - } - v = b ? Pred_value_true : Pred_value_false; - } else if (t2.type() == SqlType::Varchar) { - unsigned n2 = 0; - const SqlChar* v2 = f2.sqlVarchar(&n2); - bool b; - switch (opcode) { - case Comp_op::Like: - b = do_sqlchar_like(v1, n1, v2, n2, true); - break; - case Comp_op::Notlike: - b = ! do_sqlchar_like(v1, n1, v2, n2, true); - break; - default: - b = do_sqlchar_comp(opcode, v1, n1, v2, n2, false); - break; - } - v = b ? Pred_value_true : Pred_value_false; - } else { - ctx_assert(false); - } - } else if (t1.type() == SqlType::Varchar) { - unsigned n1 = 0; - const SqlChar* v1 = f1.sqlVarchar(&n1); - if (t2.type() == SqlType::Char) { - unsigned n2 = t2.length(); - const SqlChar* v2 = f2.sqlChar(); - bool b; - switch (opcode) { - case Comp_op::Like: - b = do_sqlchar_like(v1, n1, v2, n2, false); - break; - case Comp_op::Notlike: - b = ! do_sqlchar_like(v1, n1, v2, n2, false); - break; - default: - b = do_sqlchar_comp(opcode, v1, n1, v2, n2, false); - break; - } - v = b ? Pred_value_true : Pred_value_false; - } else if (t2.type() == SqlType::Varchar) { - unsigned n2 = 0; - const SqlChar* v2 = f2.sqlVarchar(&n2); - bool b; - switch (opcode) { - case Comp_op::Like: - b = do_sqlchar_like(v1, n1, v2, n2, false); - break; - case Comp_op::Notlike: - b = ! do_sqlchar_like(v1, n1, v2, n2, false); - break; - default: - b = do_sqlchar_comp(opcode, v1, n1, v2, n2, false); - break; - } - v = b ? Pred_value_true : Pred_value_false; - } else { - ctx_assert(false); - } - } else if (t1.type() == SqlType::Smallint || t1.type() == SqlType::Integer || t1.type() == SqlType::Bigint) { - // convert to bigint - bool s1 = ! t1.unSigned(); - bool s2 = ! t2.unSigned(); - SqlBigint v1, v2; - SqlUbigint uv1, uv2; - if (s1) { - v1 = - t1.type() == SqlType::Smallint ? f1.sqlSmallint() : - t1.type() == SqlType::Integer ? f1.sqlInteger() : f1.sqlBigint(); - uv1 = v1; - } else { - uv1 = - t1.type() == SqlType::Smallint ? (SqlUsmallint)f1.sqlSmallint() : - t1.type() == SqlType::Integer ? (SqlUinteger)f1.sqlInteger() : (SqlUbigint)f1.sqlBigint(); - v1 = uv1; - } - if (s2) { - v2 = - t2.type() == SqlType::Smallint ? f2.sqlSmallint() : - t2.type() == SqlType::Integer ? f2.sqlInteger() : f2.sqlBigint(); - uv2 = v2; - } else { - uv2 = - t2.type() == SqlType::Smallint ? (SqlUsmallint)f2.sqlSmallint() : - t2.type() == SqlType::Integer ? (SqlUinteger)f2.sqlInteger() : (SqlUbigint)f2.sqlBigint(); - v2 = uv2; - } - bool b; - switch (opcode) { - case Comp_op::Eq: - b = s1 && s2 ? (v1 == v2) : s1 ? (v1 < 0 ? false : uv1 == uv2) : s2 ? (v2 < 0 ? false : uv1 == uv2) : (uv1 == uv2); - break; - case Comp_op::Noteq: - b = s1 && s2 ? (v1 == v2) : s1 ? (v1 < 0 ? true : uv1 != uv2) : s2 ? (v2 < 0 ? true : uv1 != uv2) : (uv1 != uv2); - break; - case Comp_op::Lt: - b = s1 && s2 ? (v1 < v2) : s1 ? (v1 < 0 ? true : uv1 < uv2) : s2 ? (v2 < 0 ? false : uv1 < uv2) : (uv1 < uv2); - break; - case Comp_op::Lteq: - b = s1 && s2 ? (v1 <= v2) : s1 ? (v1 < 0 ? true : uv1 <= uv2) : s2 ? (v2 < 0 ? false : uv1 <= uv2) : (uv1 <= uv2); - break; - case Comp_op::Gt: - b = s1 && s2 ? (v1 > v2) : s1 ? (v1 < 0 ? false : uv1 > uv2) : s2 ? (v2 < 0 ? true : uv1 > uv2) : (uv1 > uv2); - break; - case Comp_op::Gteq: - b = s1 && s2 ? (v1 >= v2) : s1 ? (v1 < 0 ? false : uv1 >= uv2) : s2 ? (v2 < 0 ? true : uv1 >= uv2) : (uv1 >= uv2); - break; - default: - ctx_assert(false); - break; - } - v = b ? Pred_value_true : Pred_value_false; - } else if (t1.type() == SqlType::Double) { - SqlDouble v1 = f1.sqlDouble(); - SqlDouble v2 = f2.sqlDouble(); - bool b; - switch (opcode) { - case Comp_op::Eq: - b = (v1 == v2); - break; - case Comp_op::Noteq: - b = (v1 != v2); - break; - case Comp_op::Lt: - b = (v1 < v2); - break; - case Comp_op::Lteq: - b = (v1 <= v2); - break; - case Comp_op::Gt: - b = (v1 > v2); - break; - case Comp_op::Gteq: - b = (v1 >= v2); - break; - default: - ctx_assert(false); - break; - } - v = b ? Pred_value_true : Pred_value_false; - } else if (t1.type() == SqlType::Datetime) { - SqlDatetime v1 = f1.sqlDatetime(); - SqlDatetime v2 = f2.sqlDatetime(); - bool b; - b = do_datetime_comp(opcode, v1, v2); - v = b ? Pred_value_true : Pred_value_false; - } else { - ctx_assert(false); - } - } else { - ctx_assert(false); - } - // set result - if (ctl.m_groupIndex == 0) - data.m_value = v; - else - data.groupValue(ctl.m_groupIndex, ctl.m_groupInit) = v; -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_create_index.cpp b/ndb/src/old_files/client/odbc/executor/Exec_create_index.cpp deleted file mode 100644 index 3966c6d5db2..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_create_index.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include - -void -Exec_create_index::execute(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbDictionary::Dictionary* ndbDictionary = ndb->getDictionary(); - if (ndbDictionary == 0) { - ctx.pushStatus(ndb, "getDictionary"); - return; - } - NdbDictionary::Index ndbIndex(code.m_indexName.c_str()); - ndbIndex.setTable(code.m_tableName.c_str()); - ndbIndex.setType((NdbDictionary::Index::Type)code.m_type); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - ndbIndex.addIndexColumn(code.m_attrList[i]); - } - // setting fragment type not supported in ndb api - ndbIndex.setLogging(code.m_logging); - dictSchema().deleteTable(ctx, code.m_tableName); - if (ndbDictionary->createIndex(ndbIndex) == -1) { - ctx.pushStatus(ndbDictionary->getNdbError(), "createIndex %s", ndbIndex.getName()); - return; - } - ctx_log1(("index %s on %s created", ndbIndex.getName(), ndbIndex.getTable())); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_create_table.cpp b/ndb/src/old_files/client/odbc/executor/Exec_create_table.cpp deleted file mode 100644 index d6274119371..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_create_table.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include - -void -Exec_create_table::execute(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbDictionary::Dictionary* ndbDictionary = ndb->getDictionary(); - if (ndbDictionary == 0) { - ctx.pushStatus(ndb, "getDictionary"); - return; - } - NdbDictionary::Table ndbTable(code.m_tableName.c_str()); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - const Code::Attr& attr = code.m_attrList[i]; - NdbDictionary::Column ndbColumn(attr.m_attrName.c_str()); - if (i == code.m_tupleId) - ndbColumn.setTupleKey(true); // XXX setTupleId() - if (ctx.logLevel() >= 3) { - char buf[100]; - attr.m_sqlType.print(buf, sizeof(buf)); - ctx_log3(("attr %s type %s", ndbColumn.getName(), buf)); - } - if (attr.m_tupleKey) - ndbColumn.setPrimaryKey(true); - attr.m_sqlType.getType(ctx, &ndbColumn); - if (! ctx.ok()) - return; - if (attr.m_autoIncrement) - ndbColumn.setAutoIncrement(true); - char defaultValue[MAX_ATTR_DEFAULT_VALUE_SIZE]; - defaultValue[0] = 0; - if (attr.m_defaultValue != 0) { - // XXX obviously should evalute it at insert time too - attr.m_defaultValue->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - const SqlField& f = attr.m_defaultValue->getData().sqlField(); - const SqlType& t = f.sqlSpec().sqlType(); - // XXX use SqlField cast method instead - SQLINTEGER ind = 0; - ExtType extType(ExtType::Char); - ExtSpec extSpec(extType); - ExtField extField(extSpec, (SQLPOINTER)defaultValue, sizeof(defaultValue), &ind); - f.copyout(ctx, extField); - if (! ctx.ok()) - return; - if (ind == SQL_NULL_DATA) // do not store NULL default - defaultValue[0] = 0; - } - if (defaultValue[0] != 0) - ndbColumn.setDefaultValue(defaultValue); - ndbTable.addColumn(ndbColumn); - } - if (code.m_fragmentType != NdbDictionary::Object::FragUndefined) - ndbTable.setFragmentType(code.m_fragmentType); - ndbTable.setLogging(code.m_logging); - dictSchema().deleteTable(ctx, code.m_tableName); - if (ndbDictionary->createTable(ndbTable) == -1) { - ctx.pushStatus(ndbDictionary->getNdbError(), "createTable %s", ndbTable.getName()); - return; - } - ctx_log1(("table %s created", ndbTable.getName())); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_delete_index.cpp b/ndb/src/old_files/client/odbc/executor/Exec_delete_index.cpp deleted file mode 100644 index 10814654a58..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_delete_index.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include - -void -Exec_delete_index::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - // execute subquery - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); - if (! ctx.ok()) - return; - // delete each row from the query - data.setCount(0); - while (m_query->fetch(ctx, ctl)) { - NdbOperation* op = tcon->getNdbIndexOperation(code.m_indexName, code.m_tableName); - if (op == 0) { - ctx.pushStatus(ndb, tcon, 0, "getIndexNdbOperation"); - return; - } - if (op->deleteTuple() == -1) { - ctx.pushStatus(ndb, tcon, op, "deleteTuple"); - return; - } - bool done = false; - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* exprMatch = code.m_keyMatch[k]; - ctx_assert(exprMatch != 0); - exprMatch->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - const SqlField& keyMatch = exprMatch->getData().sqlField(); - SqlField f(code.m_keySpecs.getEntry(k)); - if (! keyMatch.cast(ctx, f)) { - done = true; // match is not possible - break; - } - const NdbAttrId keyId = code.m_keyId[k]; - const void* addr = f.addr(); - const char* value = static_cast(addr); - if (op->equal(keyId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "equal attrId=%u", (unsigned)keyId); - return; - } - } - if (done) - continue; - if (tcon->execute(NoCommit) == -1) { - // XXX when did 626 move to connection level - if (tcon->getNdbError().code != 626 && op->getNdbError().code != 626) { - ctx.pushStatus(ndb, tcon, op, "execute without commit"); - return; - } - } else { - data.addCount(); - } - } - stmtArea().setRowCount(ctx, data.getCount()); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_delete_lookup.cpp b/ndb/src/old_files/client/odbc/executor/Exec_delete_lookup.cpp deleted file mode 100644 index d0795286122..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_delete_lookup.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include - -void -Exec_delete_lookup::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - // execute subquery - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); - if (! ctx.ok()) - return; - // delete each row from the query - data.setCount(0); - while (m_query->fetch(ctx, ctl)) { - NdbOperation* op = tcon->getNdbOperation(code.m_tableName); - if (op == 0) { - ctx.pushStatus(ndb, tcon, 0, "getNdbOperation"); - return; - } - if (op->deleteTuple() == -1) { - ctx.pushStatus(ndb, tcon, op, "deleteTuple"); - return; - } - bool done = false; - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* exprMatch = code.m_keyMatch[k]; - ctx_assert(exprMatch != 0); - exprMatch->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - const SqlField& keyMatch = exprMatch->getData().sqlField(); - SqlField f(code.m_keySpecs.getEntry(k)); - if (! keyMatch.cast(ctx, f)) { - done = true; // match is not possible - break; - } - const NdbAttrId keyId = code.m_keyId[k]; - const void* addr = f.addr(); - const char* value = static_cast(addr); - if (op->equal(keyId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "equal attrId=%u", (unsigned)keyId); - return; - } - } - if (done) - continue; - if (tcon->execute(NoCommit) == -1) { - // XXX when did 626 move to connection level - if (tcon->getNdbError().code != 626 && op->getNdbError().code != 626) { - ctx.pushStatus(ndb, tcon, op, "execute without commit"); - return; - } - } else { - data.addCount(); - } - } - stmtArea().setRowCount(ctx, data.getCount()); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_delete_scan.cpp b/ndb/src/old_files/client/odbc/executor/Exec_delete_scan.cpp deleted file mode 100644 index a0b3b8314b8..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_delete_scan.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include - -void -Exec_delete_scan::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - // execute subquery - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); - if (! ctx.ok()) - return; - ctx_assert(ctl.m_scanOp != 0); - // delete each row from the scan - data.setCount(0); - while (m_query->fetch(ctx, ctl)) { - NdbOperation* toOp = ctl.m_scanOp->takeOverForDelete(tcon); - if (toOp == 0) { - ctx.pushStatus(ndb, tcon, ctl.m_scanOp, "takeOverScanOp"); - return; - } - if (tcon->execute(NoCommit) == -1) { - if (toOp->getNdbError().code != 626) { - ctx.pushStatus(ndb, tcon, toOp, "execute without commit"); - return; - } - } else { - data.addCount(); - } - } - stmtArea().setRowCount(ctx, data.getCount()); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_drop_index.cpp b/ndb/src/old_files/client/odbc/executor/Exec_drop_index.cpp deleted file mode 100644 index 6bf451f6911..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_drop_index.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include - -void -Exec_drop_index::execute(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbDictionary::Dictionary* ndbDictionary = ndb->getDictionary(); - if (ndbDictionary == 0) { - ctx.pushStatus(ndb, "getDictionary"); - return; - } - dictSchema().deleteTableByIndex(ctx, code.m_indexName); - if (ndbDictionary->dropIndex(code.m_indexName.c_str(), code.m_tableName.c_str()) == -1) { - ctx.pushStatus(ndbDictionary->getNdbError(), "dropIndex %s on %s", code.m_indexName.c_str(), code.m_tableName.c_str()); - return; - } - ctx_log1(("index %s on %s dropped", code.m_indexName.c_str(), code.m_tableName.c_str())); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_drop_table.cpp b/ndb/src/old_files/client/odbc/executor/Exec_drop_table.cpp deleted file mode 100644 index 40d1d42fc61..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_drop_table.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include - -void -Exec_drop_table::execute(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbDictionary::Dictionary* ndbDictionary = ndb->getDictionary(); - if (ndbDictionary == 0) { - ctx.pushStatus(ndb, "getDictionary"); - return; - } - dictSchema().deleteTable(ctx, code.m_tableName); - if (ndbDictionary->dropTable(code.m_tableName.c_str()) == -1) { - ctx.pushStatus(ndbDictionary->getNdbError(), "dropTable %s", code.m_tableName.c_str()); - return; - } - ctx_log1(("table %s dropped", code.m_tableName.c_str())); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_expr_conv.cpp b/ndb/src/old_files/client/odbc/executor/Exec_expr_conv.cpp deleted file mode 100644 index 636bfda7d59..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_expr_conv.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include - -void -Exec_expr_conv::evaluate(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - const SqlType& t1 = code.sqlSpec().sqlType(); - SqlField& f1 = ctl.m_groupIndex == 0 ? data.m_sqlField : data.groupField(code.sqlSpec().sqlType() , ctl.m_groupIndex, ctl.m_groupInit); - // evaluate the subexpression - ctx_assert(m_expr != 0); - m_expr->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - if (ctl.m_postEval) - return; - const SqlType& t2 = m_expr->getCode().sqlSpec().sqlType(); - const SqlField& f2 = ctl.m_groupIndex == 0 ? m_expr->getData().sqlField() : m_expr->getData().groupField(ctl.m_groupIndex); - // conversion to null type - if (t1.type() == SqlType::Null) { - f1.sqlNull(true); - return; - } - // conversion of null data - if (f2.sqlNull()) { - f1.sqlNull(true); - return; - } - // try to convert - if (! f2.cast(ctx, f1)) { - char b1[40], b2[40], b3[40]; - t1.print(b1, sizeof(b1)); - t2.print(b2, sizeof(b2)); - f2.print(b3, sizeof(b3)); - ctx.pushStatus(Sqlstate::_22003, Error::Gen, "cannot convert %s [%s] to %s", b2, b3, b1); - return; - } -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_expr_func.cpp b/ndb/src/old_files/client/odbc/executor/Exec_expr_func.cpp deleted file mode 100644 index 093d15c6e2b..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_expr_func.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include - -void -Exec_expr_func::init(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - const SqlType& t = code.sqlSpec().sqlType(); - SqlField& f = ctl.m_groupIndex == 0 ? data.m_sqlField : data.groupField(code.sqlSpec().sqlType(), ctl.m_groupIndex, ctl.m_groupInit); - if (ctl.m_groupIndex >= data.m_groupAcc.size()) - data.m_groupAcc.resize(1 + ctl.m_groupIndex); - Data::Acc& acc = data.m_groupAcc[ctl.m_groupIndex]; - acc.m_count = 0; - Expr_func::Code fc = code.m_func.m_code; - if (fc == Expr_func::Substr || fc == Expr_func::Left || fc == Expr_func::Right) { - } else if (fc == Expr_func::Count) { - f.sqlBigint(0); - } else if (fc == Expr_func::Min || fc == Expr_func::Max) { - f.sqlNull(true); - } else if (fc == Expr_func::Sum) { - f.sqlNull(true); - switch (t.type()) { - case SqlType::Bigint: - acc.m_bigint = 0; - break; - case SqlType::Double: - acc.m_double = 0; - break; - default: - ctx_assert(false); - break; - } - } else if (fc == Expr_func::Avg) { - f.sqlNull(true); - switch (t.type()) { - case SqlType::Double: - acc.m_double = 0.0; - break; - default: - ctx_assert(false); - break; - } - } else if (fc == Expr_func::Rownum) { - // uses only m_count - } else if (fc == Expr_func::Sysdate) { - // set time once - NDB_TICKS secs = 0; - Uint32 micros = 0; - NdbTick_CurrentMicrosecond(&secs, µs); - time_t clock = secs; - struct tm* t = gmtime(&clock); - SqlDatetime& d = acc.m_sysdate; - d.cc((1900 + t->tm_year) / 100); - d.yy((1900 + t->tm_year) % 100); - d.mm(1 + t->tm_mon); - d.dd(t->tm_mday); - d.HH(t->tm_hour); - d.MM(t->tm_min); - d.SS(t->tm_sec); - d.ff(1000 * micros); - } else { - ctx_assert(false); - } -} - -void -Exec_expr_func::evaluate(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - const SqlType& t = code.sqlSpec().sqlType(); - if (ctl.m_groupInit) - init(ctx, ctl); - SqlField& f = ctl.m_groupIndex == 0 ? data.m_sqlField : data.groupField(code.sqlSpec().sqlType(), ctl.m_groupIndex, false); - Data::Acc& acc = data.m_groupAcc[ctl.m_groupIndex]; - Expr_func::Code fc = code.m_func.m_code; - const unsigned narg = code.m_narg; - Exec_expr** args = code.m_args; - ctx_assert(args != 0); - // evaluate arguments - for (unsigned i = 1; i <= narg; i++) { - ctx_assert(args[i] != 0); - unsigned save = ctl.m_groupIndex; - if (code.m_func.m_aggr) - ctl.m_groupIndex = 0; - args[i]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - ctl.m_groupIndex = save; - } - if (fc == Expr_func::Substr || fc == Expr_func::Left || fc == Expr_func::Right) { - ctx_assert((narg == (unsigned)2) || (narg == (unsigned)(fc == Expr_func::Substr ? 3 : 2))); - const SqlType& t1 = args[1]->getCode().sqlSpec().sqlType(); - const SqlField& f1 = args[1]->getData().sqlField(); - int pos, len; - for (unsigned i = 2; i <= narg; i++) { - int& num = (fc == Expr_func::Substr ? (i == 2 ? pos : len) : len); - const SqlType& t2 = args[i]->getCode().sqlSpec().sqlType(); - const SqlField& f2 = args[i]->getData().sqlField(); - switch (t2.type()) { - case SqlType::Smallint: - num = static_cast(f2.sqlSmallint()); - break; - case SqlType::Integer: - num = static_cast(f2.sqlInteger()); - break; - case SqlType::Bigint: - num = static_cast(f2.sqlBigint()); - break; - default: - ctx_assert(false); - break; - } - } - int length = 0; - const SqlChar* data = 0; - switch (t1.type()) { - case SqlType::Char: - length = t1.length(); - data = f1.sqlChar(); - break; - case SqlType::Varchar: - unsigned ulength; - data = f1.sqlVarchar(&ulength); - length = ulength; - break; - default: - ctx_assert(false); - break; - } - if (fc == Expr_func::Left) - pos = 1; - else if (fc == Expr_func::Right) - pos = len > length ? 1 : length - len + 1; - else if (pos < 0) - pos += length + 1; - if (pos <= 0 || pos > length || len <= 0) { - f.sqlNull(true); // oracle-ish - return; - } - if (len > length - pos + 1) - len = length - pos + 1; - switch (t1.type()) { - case SqlType::Char: - f.sqlChar(data + (pos - 1), len); - break; - case SqlType::Varchar: - f.sqlVarchar(data + (pos - 1), len); - break; - default: - ctx_assert(false); - break; - } - } else if (fc == Expr_func::Count) { - ctx_assert(narg == 0 || narg == 1); - if (ctl.m_postEval) - return; - if (narg == 1) { - const SqlField& f1 = args[1]->getData().sqlField(); - if (f1.sqlNull()) - return; - } - f.sqlBigint(++acc.m_count); - } else if (fc == Expr_func::Min) { - ctx_assert(narg == 1); - if (ctl.m_postEval) - return; - const SqlField& f1 = args[1]->getData().sqlField(); - if (f1.sqlNull()) - return; - if (f.sqlNull() || f1.less(f)) - f1.copy(ctx, f); - } else if (fc == Expr_func::Max) { - ctx_assert(narg == 1); - if (ctl.m_postEval) - return; - const SqlField& f1 = args[1]->getData().sqlField(); - if (f1.sqlNull()) - return; - if (f.sqlNull() || f.less(f1)) - f1.copy(ctx, f); - } else if (fc == Expr_func::Sum) { - ctx_assert(narg == 1); - if (ctl.m_postEval) - return; - const SqlType& t1 = args[1]->getCode().sqlSpec().sqlType(); - const SqlField& f1 = args[1]->getData().sqlField(); - if (f1.sqlNull()) - return; - switch (t.type()) { - case SqlType::Bigint: - switch (t1.type()) { - case SqlType::Integer: - acc.m_bigint += f1.sqlInteger(); - break; - case SqlType::Bigint: - acc.m_bigint += f1.sqlBigint(); - break; - default: - ctx_assert(false); - break; - } - f.sqlBigint(acc.m_bigint); - break; - case SqlType::Double: - switch (t1.type()) { - case SqlType::Real: - acc.m_double += f1.sqlReal(); - break; - case SqlType::Double: - acc.m_double += f1.sqlDouble(); - break; - default: - ctx_assert(false); - break; - } - f.sqlDouble(acc.m_double); - break; - default: - ctx_assert(false); - break; - } - } else if (fc == Expr_func::Avg) { - ctx_assert(narg == 1); - if (ctl.m_postEval) - return; - const SqlType& t1 = args[1]->getCode().sqlSpec().sqlType(); - const SqlField& f1 = args[1]->getData().sqlField(); - if (f1.sqlNull()) - return; - switch (t1.type()) { - case SqlType::Smallint: - acc.m_bigint += f1.sqlSmallint(); - break; - case SqlType::Integer: - acc.m_bigint += f1.sqlInteger(); - break; - case SqlType::Bigint: - acc.m_bigint += f1.sqlBigint(); - break; - case SqlType::Real: - acc.m_double += f1.sqlReal(); - break; - case SqlType::Double: - acc.m_double += f1.sqlDouble(); - break; - default: - ctx_assert(false); - break; - } - f.sqlDouble(acc.m_double / (SqlDouble)++acc.m_count); - } else if (fc == Expr_func::Rownum) { - ctx_assert(narg == 0); - if (! ctl.m_postEval) - f.sqlBigint(1 + acc.m_count); - else - acc.m_count++; - } else if (fc == Expr_func::Sysdate) { - ctx_assert(narg == 0); - if (ctl.m_postEval) - return; - f.sqlDatetime(acc.m_sysdate); - } else { - ctx_assert(false); - } -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_expr_op.cpp b/ndb/src/old_files/client/odbc/executor/Exec_expr_op.cpp deleted file mode 100644 index fc8b6df9f5b..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_expr_op.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include - -void -Exec_expr_op::evaluate(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - const SqlType& t = code.sqlSpec().sqlType(); - SqlField& f = ctl.m_groupIndex == 0 ? data.m_sqlField : data.groupField(code.sqlSpec().sqlType(), ctl.m_groupIndex, ctl.m_groupInit); - if (code.m_op.arity() == 1) { - // evaluate sub-expression - ctx_assert(m_expr[1] != 0); - m_expr[1]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - if (ctl.m_postEval) - return; - const SqlField& f1 = ctl.m_groupIndex == 0 ? m_expr[1]->getData().sqlField() : m_expr[1]->getData().groupField(ctl.m_groupIndex); - // handle null - if (f1.sqlNull()) { - f.sqlNull(true); - return; - } - if (t.type() == SqlType::Bigint) { - SqlBigint v = 0; - SqlBigint v1 = f1.sqlBigint(); - switch (code.m_op.m_opcode) { - case Expr_op::Plus: - v = v1; - break; - case Expr_op::Minus: - v = - v1; - break; - default: - ctx_assert(false); - break; - } - f.sqlBigint(v); - } else if (t.type() == SqlType::Double) { - SqlDouble v = 0; - SqlDouble v1 = f1.sqlDouble(); - switch (code.m_op.m_opcode) { - case Expr_op::Plus: - v = v1; - break; - case Expr_op::Minus: - v = - v1; - break; - default: - ctx_assert(false); - break; - } - f.sqlDouble(v); - } else { - ctx_assert(false); - } - } else if (code.m_op.arity() == 2) { - // evaluate sub-expressions - ctx_assert(m_expr[1] != 0 && m_expr[2] != 0); - m_expr[1]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - m_expr[2]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - if (ctl.m_postEval) - return; - const SqlField& f1 = ctl.m_groupIndex == 0 ? m_expr[1]->getData().sqlField() : m_expr[1]->getData().groupField(ctl.m_groupIndex); - const SqlField& f2 = ctl.m_groupIndex == 0 ? m_expr[2]->getData().sqlField() : m_expr[2]->getData().groupField(ctl.m_groupIndex); - // handle null - if (f1.sqlNull() || f2.sqlNull()) { - f.sqlNull(true); - return; - } - if (t.type() == SqlType::Bigint) { - SqlBigint v = 0; - SqlBigint v1 = f1.sqlBigint(); - SqlBigint v2 = f2.sqlBigint(); - switch (code.m_op.m_opcode) { - case Expr_op::Add: - v = v1 + v2; - break; - case Expr_op::Subtract: - v = v1 - v2; - break; - case Expr_op::Multiply: - v = v1 * v2; - break; - case Expr_op::Divide: - if (v2 == 0) { - ctx.pushStatus(Sqlstate::_22012, Error::Gen, "integer division by zero"); - return; - } - v = v1 / v2; - break; - default: - ctx_assert(false); - break; - } - f.sqlBigint(v); - } else if (t.type() == SqlType::Double) { - SqlDouble v = 0; - SqlDouble v1 = f1.sqlDouble(); - SqlDouble v2 = f2.sqlDouble(); - switch (code.m_op.m_opcode) { - case Expr_op::Add: - v = v1 + v2; - break; - case Expr_op::Subtract: - v = v1 - v2; - break; - case Expr_op::Multiply: - v = v1 * v2; - break; - case Expr_op::Divide: - v = v1 / v2; - break; - default: - ctx_assert(false); - break; - } - f.sqlDouble(v); // XXX isnan() - } else { - ctx_assert(false); - } - } else { - ctx_assert(false); - } - // result is not null - f.sqlNull(false); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_insert.cpp b/ndb/src/old_files/client/odbc/executor/Exec_insert.cpp deleted file mode 100644 index c2612c6aaab..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_insert.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include - -#ifdef NDB_WIN32 -#define FMT_I64 "%I64d" -#else -#define FMT_I64 "%lld" -#endif - -void -Exec_insert::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - // execute subquery - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); - if (! ctx.ok()) - return; - // insert each row from query - data.setCount(0); - while (m_query->fetch(ctx, ctl)) { - NdbOperation* op = tcon->getNdbOperation(code.m_tableName); - if (op == 0) { - ctx.pushStatus(ndb, tcon, 0, "getNdbOperation"); - return; - } - if (code.m_insertOp == Insert_op_insert) { - if (op->insertTuple() == -1) { - ctx.pushStatus(ndb, tcon, op, "insertTuple"); - return; - } - } else if (code.m_insertOp == Insert_op_write) { - if (op->writeTuple() == -1) { - ctx.pushStatus(ndb, tcon, op, "writeTuple"); - return; - } - } else { - ctx_assert(false); - } - const SqlRow& sqlRow = m_query->getData().sqlRow(); - if (code.m_tupleId != 0) { - Uint64 tid = op->setTupleId(); - if (tid == 0) { - ctx.pushStatus(ndb, tcon, op, "setTupleId attrId=%u", (unsigned)code.m_tupleId); - return; - } - ctx_log3(("generated TupleId " FMT_I64, tid)); - } else if (code.m_autoIncrement != 0) { - // XXX use cache size 1 for birdies and fishies - Uint64 tupleId = ndb->getAutoIncrementValue(code.m_tableName, 1); - if (tupleId == 0) { - ctx.pushStatus(ndb, "getTupleIdFromNdb"); - return; - } - NdbAttrId attrId = code.m_autoIncrement - 1; - SqlSmallint sqlSmallint = 0; - SqlInteger sqlInteger = 0; - SqlBigint sqlBigint = 0; - const char* value = 0; - if (code.m_idType.type() == SqlType::Smallint) { - sqlSmallint = tupleId; - value = (const char*)&sqlSmallint; - } else if (code.m_idType.type() == SqlType::Integer) { - sqlInteger = tupleId; - value = (const char*)&sqlInteger; - } else if (code.m_idType.type() == SqlType::Bigint) { - sqlBigint = tupleId; - value = (const char*)&sqlBigint; - } else { - ctx_assert(false); - } - if (op->equal(attrId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "equal attrId=%u", (unsigned)attrId); - return; - } - } else { - // normal key attributes - for (unsigned i = 1; i <= sqlRow.count(); i++) { - if (! code.m_isKey[i]) - continue; - NdbAttrId attrId = code.m_attrId[i]; - const SqlField& f = sqlRow.getEntry(i); - const void* addr = f.sqlNull() ? 0 : f.addr(); - const char* value = static_cast(addr); - if (op->equal(attrId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "equal attrId=%u", (unsigned)attrId); - return; - } - } - } - // non-key attributes - for (unsigned i = 1; i <= sqlRow.count(); i++) { - if (code.m_isKey[i]) - continue; - NdbAttrId attrId = code.m_attrId[i]; - const SqlField& f = sqlRow.getEntry(i); - const void* addr = f.sqlNull() ? 0 : f.addr(); - const char* value = static_cast(addr); - if (op->setValue(attrId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "setValue attrId=%u", (unsigned)attrId); - return; - } - } - // default non-key values - for (unsigned i = 1; i <= code.m_defaultCount; i++) { - NdbAttrId attrId = code.m_defaultId[i]; - const SqlField& f = code.m_defaultValue->getEntry(i); - const void* addr = f.sqlNull() ? 0 : f.addr(); - const char* value = static_cast(addr); - if (op->setValue(attrId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "setValue attrId=%u", (unsigned)attrId); - return; - } - } - if (tcon->execute(NoCommit) == -1) { - ctx.pushStatus(ndb, tcon, op, "execute without commit"); - return; - } - data.addCount(); - } - stmtArea().setRowCount(ctx, data.getCount()); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_pred_op.cpp b/ndb/src/old_files/client/odbc/executor/Exec_pred_op.cpp deleted file mode 100644 index 7caa4656473..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_pred_op.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include - -struct TableUnary { - Pred_value value1; - Pred_value result; -}; - -struct TableBinary { - Pred_value value1; - Pred_value value2; - Pred_value result; -}; - -static TableUnary -tableNot[] = { - { Pred_value_unknown, Pred_value_unknown }, - { Pred_value_false, Pred_value_true }, - { Pred_value_true, Pred_value_false }, -}; - -static TableBinary -tableAnd[] = { - { Pred_value_unknown, Pred_value_unknown, Pred_value_unknown }, - { Pred_value_unknown, Pred_value_false, Pred_value_false }, - { Pred_value_unknown, Pred_value_true, Pred_value_unknown }, - { Pred_value_false, Pred_value_unknown, Pred_value_false }, - { Pred_value_false, Pred_value_false, Pred_value_false }, - { Pred_value_false, Pred_value_true, Pred_value_false }, - { Pred_value_true, Pred_value_unknown, Pred_value_unknown }, - { Pred_value_true, Pred_value_false, Pred_value_false }, - { Pred_value_true, Pred_value_true, Pred_value_true } -}; - -static TableBinary -tableOr[] = { - { Pred_value_unknown, Pred_value_unknown, Pred_value_unknown }, - { Pred_value_unknown, Pred_value_false, Pred_value_unknown }, - { Pred_value_unknown, Pred_value_true, Pred_value_true }, - { Pred_value_false, Pred_value_unknown, Pred_value_unknown }, - { Pred_value_false, Pred_value_false, Pred_value_false }, - { Pred_value_false, Pred_value_true, Pred_value_true }, - { Pred_value_true, Pred_value_unknown, Pred_value_true }, - { Pred_value_true, Pred_value_false, Pred_value_true }, - { Pred_value_true, Pred_value_true, Pred_value_true } -}; - -void -Exec_pred_op::execInterp(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - ctx_assert(ctl.m_scanFilter != 0); - NdbScanFilter& scanFilter = *ctl.m_scanFilter; - if (code.m_op.arity() == 1) { - ctx_assert(m_pred[1] != 0); - switch (code.m_op.m_opcode) { - case Pred_op::Not: - scanFilter.begin(NdbScanFilter::NAND); - m_pred[1]-> execInterp(ctx, ctl); - if (! ctx.ok()) - return; - scanFilter.end(); - break; - default: - ctx_assert(false); - break; - } - } else if (code.m_op.arity() == 2) { - ctx_assert(m_pred[1] != 0 && m_pred[2] != 0); - switch (code.m_op.m_opcode) { - case Pred_op::And: - scanFilter.begin(NdbScanFilter::AND); - m_pred[1]-> execInterp(ctx, ctl); - if (! ctx.ok()) - return; - m_pred[2]-> execInterp(ctx, ctl); - if (! ctx.ok()) - return; - scanFilter.end(); - break; - case Pred_op::Or: - scanFilter.begin(NdbScanFilter::OR); - m_pred[1]-> execInterp(ctx, ctl); - if (! ctx.ok()) - return; - m_pred[2]-> execInterp(ctx, ctl); - if (! ctx.ok()) - return; - scanFilter.end(); - break; - default: - ctx_assert(false); - break; - } - } else { - ctx_assert(false); - } -} - -void -Exec_pred_op::evaluate(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Pred_value v = Pred_value_unknown; - if (code.m_op.arity() == 1) { - // evaluate sub-expression - ctx_assert(m_pred[1] != 0); - m_pred[1]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - if (ctl.m_postEval) - return; - Pred_value v1 = ctl.m_groupIndex == 0 ? m_pred[1]->getData().getValue() : m_pred[1]->getData().groupValue(ctl.m_groupIndex); - // look up result - TableUnary* table = 0; - unsigned size = 0; - switch (code.m_op.m_opcode) { - case Pred_op::Not: - table = tableNot; - size = sizeof(tableNot) / sizeof(tableNot[0]); - break; - default: - ctx_assert(false); - break; - } - unsigned i; - for (i = 0; i < size; i++) { - if (table[i].value1 == v1) { - v = table[i].result; - break; - } - } - ctx_assert(i < size); - } else if (code.m_op.arity() == 2) { - // evaluate sub-expressions - ctx_assert(m_pred[1] != 0 && m_pred[2] != 0); - m_pred[1]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - m_pred[2]->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - if (ctl.m_postEval) - return; - Pred_value v1 = ctl.m_groupIndex == 0 ? m_pred[1]->getData().getValue() : m_pred[1]->getData().groupValue(ctl.m_groupIndex); - Pred_value v2 = ctl.m_groupIndex == 0 ? m_pred[2]->getData().getValue() : m_pred[2]->getData().groupValue(ctl.m_groupIndex); - // look up result - TableBinary* table = 0; - unsigned size = 0; - switch (code.m_op.m_opcode) { - case Pred_op::And: - table = tableAnd; - size = sizeof(tableAnd) / sizeof(tableAnd[0]); - break; - case Pred_op::Or: - table = tableOr; - size = sizeof(tableOr) / sizeof(tableOr[0]); - break; - default: - ctx_assert(false); - break; - } - unsigned i; - for (i = 0; i < size; i++) { - if (table[i].value1 == v1 && table[i].value2 == v2) { - v = table[i].result; - break; - } - } - ctx_assert(i < size); - } else { - ctx_assert(false); - } - // set result - if (ctl.m_groupIndex == 0) - data.m_value = v; - else - data.groupValue(ctl.m_groupIndex, ctl.m_groupInit) = v; -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_query_index.cpp b/ndb/src/old_files/client/odbc/executor/Exec_query_index.cpp deleted file mode 100644 index 919743beac2..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_query_index.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include - -void -Exec_query_index::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - data.m_done = false; - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - if (data.m_con != 0) { - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - ctx_log2(("lookup closed at re-execute")); - } - const bool unco = connArea().uncommitted(); - if (! unco) { - // use new transaction to not run out of operations - data.m_con = ndb->startTransaction(); - if (data.m_con == 0) { - ctx.pushStatus(ndb, "startTransaction"); - return; - } - } else { - ctx_log3(("lookup using main transaction")); - } - data.m_op = (unco ? tcon : data.m_con)->getNdbIndexOperation(code.m_indexName, code.m_tableName); - if (data.m_op == 0) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), 0, "getNdbIndexOperation"); - return; - } - if (data.m_op->readTuple() == -1) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), data.m_op, "readTuple"); - return; - } - // key attributes - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* exprMatch = code.m_keyMatch[k]; - ctx_assert(exprMatch != 0); - exprMatch->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - const SqlField& keyMatch = exprMatch->getData().sqlField(); - SqlField f(code.m_keySpecs.getEntry(k)); - if (! keyMatch.cast(ctx, f)) { - data.m_done = true; // match is not possible - return; - } - const NdbAttrId keyId = code.m_keyId[k]; - const void* addr = f.addr(); - const char* value = static_cast(addr); - if (data.m_op->equal(keyId, value) == -1) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), data.m_op, "equal attrId=%u", (unsigned)keyId); - return; - } - } - // queried attributes - const SqlRow& sqlRow = data.sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - const NdbAttrId attrId = code.m_attrId[i]; - SqlField& f = sqlRow.getEntry(i); - char* addr = static_cast(f.addr()); - NdbRecAttr* recAttr = data.m_op->getValue(attrId, addr); - if (recAttr == 0) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), data.m_op, "getValue attrId=%u", (unsigned)attrId); - return; - } - data.m_recAttr[i] = recAttr; - } - if (code.m_attrCount == 0) { // NDB requires one - (void)data.m_op->getValue((NdbAttrId)0); - } - data.setCount(0); - if ((unco ? tcon : data.m_con)->execute(unco ? NoCommit : Commit) == -1) { - // XXX when did 626 move to connection level - if ((unco ? tcon : data.m_con)->getNdbError().code != 626 && data.m_op->getNdbError().code != 626) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), data.m_op, "execute xxx"); - return; - } - data.m_done = true; - } else { - stmtArea().incTuplesFetched(); - data.m_done = false; - } - if (! unco) { - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - ctx_log3(("index lookup closed at execute")); - } -} - -bool -Exec_query_index::fetchImpl(Ctx &ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - // returns at most one row - if (data.m_done) - return false; - // set null bits - const SqlRow& sqlRow = data.sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - NdbRecAttr* recAttr = data.m_recAttr[i]; - int isNULL = recAttr->isNULL(); - SqlField& f = sqlRow.getEntry(i); - ctx_assert(isNULL == 0 || isNULL == 1); - f.sqlNull(isNULL == 1); - } - data.m_done = true; - return true; -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_query_lookup.cpp b/ndb/src/old_files/client/odbc/executor/Exec_query_lookup.cpp deleted file mode 100644 index 599e1a36461..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_query_lookup.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include - -void -Exec_query_lookup::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - data.m_done = false; - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - if (data.m_con != 0) { - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - ctx_log2(("lookup closed at re-execute")); - } - const bool unco = connArea().uncommitted(); - if (! unco) { - // use new transaction to not run out of operations - data.m_con = ndb->startTransaction(); - if (data.m_con == 0) { - ctx.pushStatus(ndb, "startTransaction"); - return; - } - } else { - ctx_log3(("lookup using main transaction")); - } - data.m_op = (unco ? tcon : data.m_con)->getNdbOperation(code.m_tableName); - if (data.m_op == 0) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), 0, "getNdbOperation"); - return; - } - if (data.m_op->readTuple() == -1) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), data.m_op, "readTuple"); - return; - } - // key attributes - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* exprMatch = code.m_keyMatch[k]; - ctx_assert(exprMatch != 0); - exprMatch->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - const SqlField& keyMatch = exprMatch->getData().sqlField(); - SqlField f(code.m_keySpecs.getEntry(k)); - if (! keyMatch.cast(ctx, f)) { - data.m_done = true; // match is not possible - return; - } - const NdbAttrId keyId = code.m_keyId[k]; - const void* addr = f.addr(); - const char* value = static_cast(addr); - if (data.m_op->equal(keyId, value) == -1) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), data.m_op, "equal attrId=%u", (unsigned)keyId); - return; - } - } - // queried attributes - const SqlRow& sqlRow = data.sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - const NdbAttrId attrId = code.m_attrId[i]; - SqlField& f = sqlRow.getEntry(i); - char* addr = static_cast(f.addr()); - NdbRecAttr* recAttr = data.m_op->getValue(attrId, addr); - if (recAttr == 0) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), data.m_op, "getValue attrId=%u", (unsigned)attrId); - return; - } - data.m_recAttr[i] = recAttr; - } - if (code.m_attrCount == 0) { // NDB requires one - (void)data.m_op->getValue((NdbAttrId)0); - } - data.setCount(0); - if ((unco ? tcon : data.m_con)->execute(unco ? NoCommit : Commit) == -1) { - // XXX when did 626 move to connection level - if ((unco ? tcon : data.m_con)->getNdbError().code != 626 && data.m_op->getNdbError().code != 626) { - ctx.pushStatus(ndb, (unco ? tcon : data.m_con), data.m_op, "execute xxx"); - return; - } - data.m_done = true; - } else { - stmtArea().incTuplesFetched(); - data.m_done = false; - } - if (! unco) { - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - ctx_log3(("lookup closed at execute")); - } -} - -bool -Exec_query_lookup::fetchImpl(Ctx &ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - // returns at most one row - if (data.m_done) - return false; - // set null bits - const SqlRow& sqlRow = data.sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - NdbRecAttr* recAttr = data.m_recAttr[i]; - int isNULL = recAttr->isNULL(); - SqlField& f = sqlRow.getEntry(i); - ctx_assert(isNULL == 0 || isNULL == 1); - f.sqlNull(isNULL == 1); - } - data.m_done = true; - return true; -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_query_range.cpp b/ndb/src/old_files/client/odbc/executor/Exec_query_range.cpp deleted file mode 100644 index 0bc878d760d..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_query_range.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include - -#define startBuddyTransaction(x) hupp(x) - -void -Exec_query_range::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - data.m_done = false; - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - if (data.m_con != 0) { - data.m_con->stopScan(); - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - ctx_log2(("range scan closed at re-execute")); - } - data.m_con = ndb->startBuddyTransaction(tcon); - if (data.m_con == 0) { - ctx.pushStatus(ndb, tcon, 0, "startBuddyTransaction"); - return; - } - data.m_op = data.m_con->getNdbOperation(code.m_indexName, code.m_tableName); - if (data.m_op == 0) { - ctx.pushStatus(ndb, data.m_con, 0, "getNdbOperation"); - return; - } - if (! code.m_exclusive) { - if (data.m_op->openScanReadCommitted(data.m_parallel) == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "openScanReadCommitted"); - return; - } - } else { - if (data.m_op->openScanExclusive(data.m_parallel) == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "openScanExclusive"); - return; - } - } - // set bounds - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* exprMatch = code.m_keyMatch[k]; - ctx_assert(exprMatch != 0); - exprMatch->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - const SqlField& keyMatch = exprMatch->getData().sqlField(); - SqlField f(code.m_keySpecs.getEntry(k)); - if (! keyMatch.cast(ctx, f)) { - data.m_done = true; // match is not possible - return; - } - const NdbAttrId keyId = code.m_keyId[k]; - const void* addr = f.addr(); - const char* value = static_cast(addr); - const unsigned len = f.allocSize(); - if (data.m_op->setBound(keyId, NdbOperation::BoundEQ, value, len) == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "setBound attrId=%u", (unsigned)keyId); - return; - } - } - // queried attributes - const SqlRow& sqlRow = data.sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - const NdbAttrId attrId = code.m_attrId[i]; - SqlField& f = sqlRow.getEntry(i); - char* addr = static_cast(f.addr()); - NdbRecAttr* recAttr = data.m_op->getValue(attrId, addr); - if (recAttr == 0) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "getValue attrId=%u", (unsigned)attrId); - return; - } - data.m_recAttr[i] = recAttr; - } - if (code.m_attrCount == 0) { // NDB requires one - (void)data.m_op->getValue((NdbAttrId)0); - } - data.setCount(0); - if (data.m_con->executeScan() == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "executeScan"); - return; - } - ctx_log2(("range scan %s [%08x] started", ! code.m_exclusive ? "read" : "exclusive", (unsigned)this)); - ctl.m_scanOp = data.m_op; -} - -bool -Exec_query_range::fetchImpl(Ctx &ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - // if never started - if (data.m_done) - return false; - int ret = data.m_con->nextScanResult(); - if (ret != 0) { - if (ret == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "nextScanResult"); - } - data.m_con->stopScan(); - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - ctx_log2(("range scan [%08x] closed at last row", (unsigned)this)); - return false; - } - // set null bits - const SqlRow& sqlRow = data.sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - NdbRecAttr* recAttr = data.m_recAttr[i]; - int isNULL = recAttr->isNULL(); - SqlField& f = sqlRow.getEntry(i); - ctx_assert(isNULL == 0 || isNULL == 1); - f.sqlNull(isNULL == 1); - } - stmtArea().incTuplesFetched(); - return true; -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_query_scan.cpp b/ndb/src/old_files/client/odbc/executor/Exec_query_scan.cpp deleted file mode 100644 index 213dfdd616d..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_query_scan.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include - -#define startBuddyTransaction(x) hupp(x) - -void -Exec_query_scan::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - if (data.m_con != 0) { - data.m_con->stopScan(); - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - ctx_log2(("scan closed at re-execute")); - } - data.m_con = ndb->startBuddyTransaction(tcon); - if (data.m_con == 0) { - ctx.pushStatus(ndb, tcon, 0, "startBuddyTransaction"); - return; - } - data.m_op = data.m_con->getNdbOperation(code.m_tableName); - if (data.m_op == 0) { - ctx.pushStatus(ndb, data.m_con, 0, "getNdbOperation"); - return; - } - if (! code.m_exclusive) { - if (data.m_op->openScanReadCommitted(data.m_parallel) == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "openScanReadCommitted"); - return; - } - } else { - if (data.m_op->openScanExclusive(data.m_parallel) == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "openScanExclusive"); - return; - } - } - if (m_interp == 0) { - // XXX unnecessary - if (data.m_op->interpret_exit_ok() == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "interpret_exit_ok"); - return; - } - } else { - NdbScanFilter scanFilter(data.m_op); - scanFilter.begin(NdbScanFilter::AND); - ctl.m_scanFilter = &scanFilter; - m_interp->execInterp(ctx, ctl); - if (! ctx.ok()) - return; - scanFilter.end(); - } - const SqlRow& sqlRow = data.sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - const NdbAttrId attrId = code.m_attrId[i]; - SqlField& sqlField = sqlRow.getEntry(i); - char* addr = static_cast(sqlField.addr()); - NdbRecAttr* recAttr = data.m_op->getValue(attrId, addr); - if (recAttr == 0) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "getValue attrId=%u", (unsigned)attrId); - return; - } - data.m_recAttr[i] = recAttr; - } - if (code.m_attrCount == 0) { // NDB requires one - (void)data.m_op->getValue((NdbAttrId)0); - } - if (data.m_con->executeScan() == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "executeScan"); - return; - } - ctx_log2(("scan %s [%08x] started", ! code.m_exclusive ? "read" : "exclusive", (unsigned)this)); - ctl.m_scanOp = data.m_op; -} - -bool -Exec_query_scan::fetchImpl(Ctx &ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - int ret = data.m_con->nextScanResult(); - if (ret != 0) { - if (ret == -1) { - ctx.pushStatus(ndb, data.m_con, data.m_op, "nextScanResult"); - } - data.m_con->stopScan(); - ndb->closeTransaction(data.m_con); - data.m_con = 0; - data.m_op = 0; - ctx_log2(("scan [%08x] closed at last row", (unsigned)this)); - return false; - } - // set null bits - const SqlRow& sqlRow = data.sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - NdbRecAttr* recAttr = data.m_recAttr[i]; - int isNULL = recAttr->isNULL(); - SqlField& sqlField = sqlRow.getEntry(i); - ctx_assert(isNULL == 0 || isNULL == 1); - sqlField.sqlNull(isNULL == 1); - } - stmtArea().incTuplesFetched(); - return true; -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_query_sys.cpp b/ndb/src/old_files/client/odbc/executor/Exec_query_sys.cpp deleted file mode 100644 index acdc120e609..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_query_sys.cpp +++ /dev/null @@ -1,761 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include - -#define NULL_CHAR ((char*)0) -#define NULL_INT (-2147483647) - -struct Typeinfo { - const char* m_type_name; // 1 - int m_data_type; // 2 - int m_column_size; // 3 - const char* m_literal_prefix; // 4 - const char* m_literal_suffix; // 5 - const char* m_create_params; // 6 - int m_nullable; // 7 - int m_case_sensitive; // 8 - int m_searchable; // 9 - int m_unsigned_attribute; // 10 - int m_fixed_prec_scale; // 11 - int m_auto_unique_value; // 12 - const char* m_local_type_name; // 13 - int m_minimum_scale; // 14 - int m_maximum_scale; // 15 - int m_sql_data_type; // 16 - int m_sql_datetime_sub; // 17 - int m_num_prec_radix; // 18 - int m_interval_precision; // 19 -}; - -static const Typeinfo -typeinfoList[] = { - { "CHAR", // 1 - SQL_CHAR, // 2 - 8000, // 3 - "'", // 4 - "'", // 5 - "length", // 6 - SQL_NULLABLE, // 7 - SQL_TRUE, // 8 - SQL_SEARCHABLE, // 9 - NULL_INT, // 10 - SQL_FALSE, // 11 - NULL_INT, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_CHAR, // 16 - NULL_INT, // 17 - NULL_INT, // 18 - NULL_INT // 19 - }, - { "VARCHAR", // 1 - SQL_VARCHAR, // 2 - 8000, // 3 - "'", // 4 - "'", // 5 - "length", // 6 - SQL_NULLABLE, // 7 - SQL_TRUE, // 8 - SQL_SEARCHABLE, // 9 - NULL_INT, // 10 - SQL_FALSE, // 11 - NULL_INT, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_VARCHAR, // 16 - NULL_INT, // 17 - NULL_INT, // 18 - NULL_INT // 19 - }, - { "BINARY", // 1 - SQL_BINARY, // 2 - 8000, // 3 - "'", // 4 - "'", // 5 - "length", // 6 - SQL_NULLABLE, // 7 - SQL_TRUE, // 8 - SQL_SEARCHABLE, // 9 - NULL_INT, // 10 - SQL_FALSE, // 11 - NULL_INT, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_BINARY, // 16 - NULL_INT, // 17 - NULL_INT, // 18 - NULL_INT // 19 - }, - { "VARBINARY", // 1 - SQL_VARBINARY, // 2 - 8000, // 3 - "'", // 4 - "'", // 5 - "length", // 6 - SQL_NULLABLE, // 7 - SQL_TRUE, // 8 - SQL_SEARCHABLE, // 9 - NULL_INT, // 10 - SQL_FALSE, // 11 - NULL_INT, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_VARBINARY, // 16 - NULL_INT, // 17 - NULL_INT, // 18 - NULL_INT // 19 - }, - { "SMALLINT", // 1 - SQL_SMALLINT, // 2 - 4, // 3 - NULL_CHAR, // 4 - NULL_CHAR, // 5 - NULL_CHAR, // 6 - SQL_NULLABLE, // 7 - SQL_FALSE, // 8 - SQL_SEARCHABLE, // 9 - SQL_FALSE, // 10 - SQL_TRUE, // 11 - SQL_FALSE, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_SMALLINT, // 16 - NULL_INT, // 17 - 10, // 18 - NULL_INT // 19 - }, - { "SMALLINT UNSIGNED", // 1 - SQL_SMALLINT, // 2 - 4, // 3 - NULL_CHAR, // 4 - NULL_CHAR, // 5 - NULL_CHAR, // 6 - SQL_NULLABLE, // 7 - SQL_FALSE, // 8 - SQL_SEARCHABLE, // 9 - SQL_TRUE, // 10 - SQL_TRUE, // 11 - SQL_FALSE, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_SMALLINT, // 16 - NULL_INT, // 17 - 10, // 18 - NULL_INT // 19 - }, - { "INT", // 1 - SQL_INTEGER, // 2 - 9, // 3 - NULL_CHAR, // 4 - NULL_CHAR, // 5 - NULL_CHAR, // 6 - SQL_NULLABLE, // 7 - SQL_FALSE, // 8 - SQL_SEARCHABLE, // 9 - SQL_FALSE, // 10 - SQL_TRUE, // 11 - SQL_FALSE, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_INTEGER, // 16 - NULL_INT, // 17 - 10, // 18 - NULL_INT // 19 - }, - { "INT UNSIGNED", // 1 - SQL_INTEGER, // 2 - 9, // 3 - NULL_CHAR, // 4 - NULL_CHAR, // 5 - NULL_CHAR, // 6 - SQL_NULLABLE, // 7 - SQL_FALSE, // 8 - SQL_SEARCHABLE, // 9 - SQL_TRUE, // 10 - SQL_TRUE, // 11 - SQL_FALSE, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_INTEGER, // 16 - NULL_INT, // 17 - 10, // 18 - NULL_INT // 19 - }, - { "BIGINT", // 1 - SQL_BIGINT, // 2 - 19, // 3 - NULL_CHAR, // 4 - NULL_CHAR, // 5 - NULL_CHAR, // 6 - SQL_NULLABLE, // 7 - SQL_FALSE, // 8 - SQL_SEARCHABLE, // 9 - SQL_FALSE, // 10 - SQL_TRUE, // 11 - SQL_FALSE, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_BIGINT, // 16 - NULL_INT, // 17 - 10, // 18 - NULL_INT // 19 - }, - { "BIGINT UNSIGNED", // 1 - SQL_BIGINT, // 2 - 19, // 3 - NULL_CHAR, // 4 - NULL_CHAR, // 5 - NULL_CHAR, // 6 - SQL_NULLABLE, // 7 - SQL_FALSE, // 8 - SQL_SEARCHABLE, // 9 - SQL_TRUE, // 10 - SQL_TRUE, // 11 - SQL_FALSE, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_BIGINT, // 16 - NULL_INT, // 17 - 10, // 18 - NULL_INT // 19 - }, - { "REAL", // 1 - SQL_REAL, // 2 - 31, // 3 - NULL_CHAR, // 4 - NULL_CHAR, // 5 - NULL_CHAR, // 6 - SQL_NULLABLE, // 7 - SQL_FALSE, // 8 - SQL_SEARCHABLE, // 9 - SQL_FALSE, // 10 - SQL_TRUE, // 11 - SQL_FALSE, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_REAL, // 16 - NULL_INT, // 17 - 2, // 18 - NULL_INT // 19 - }, - { "FLOAT", // 1 - SQL_DOUBLE, // 2 - 63, // 3 - NULL_CHAR, // 4 - NULL_CHAR, // 5 - NULL_CHAR, // 6 - SQL_NULLABLE, // 7 - SQL_FALSE, // 8 - SQL_SEARCHABLE, // 9 - SQL_FALSE, // 10 - SQL_TRUE, // 11 - SQL_FALSE, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_DOUBLE, // 16 - NULL_INT, // 17 - 2, // 18 - NULL_INT // 19 - }, - { "DATETIME", // 1 - SQL_TYPE_TIMESTAMP, // 2 - 30, // 3 - NULL_CHAR, // 4 - NULL_CHAR, // 5 - NULL_CHAR, // 6 - SQL_NULLABLE, // 7 - SQL_FALSE, // 8 - SQL_SEARCHABLE, // 9 - SQL_FALSE, // 10 - SQL_TRUE, // 11 - SQL_FALSE, // 12 - NULL_CHAR, // 13 - NULL_INT, // 14 - NULL_INT, // 15 - SQL_DATETIME, // 16 XXX - NULL_INT, // 17 - 2, // 18 - NULL_INT // 19 - } -}; - -const unsigned -typeinfoCount = sizeof(typeinfoList)/sizeof(typeinfoList[0]); - -void -Exec_query_sys::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbDictionary::Dictionary* ndbDictionary = ndb->getDictionary(); - if (ndbDictionary == 0) { - ctx.pushStatus(ndb, "getDictionary"); - return; - } - if (code.m_sysId == DictSys::OdbcTypeinfo || code.m_sysId == DictSys::Dual) { - data.m_rowPos = 0; // at first entry - return; - } - if (code.m_sysId == DictSys::OdbcTables || code.m_sysId == DictSys::OdbcColumns || code.m_sysId == DictSys::OdbcPrimarykeys) { - // take all objects - if (ndbDictionary->listObjects(data.m_objectList) == -1) { - ctx.pushStatus(ndb, "listObjects"); - return; - } - data.m_tablePos = 0; // at first entry - data.m_attrPos = 0; - data.m_keyPos = 0; - return; - } - ctx_assert(false); -} - -static bool -isNdbTable(const NdbDictionary::Dictionary::List::Element& element) -{ - switch (element.type) { - //case NdbDictionary::Object::SystemTable: - case NdbDictionary::Object::UserTable: - case NdbDictionary::Object::UniqueHashIndex: - case NdbDictionary::Object::HashIndex: - case NdbDictionary::Object::UniqueOrderedIndex: - case NdbDictionary::Object::OrderedIndex: - return true; - default: - break; - } - return false; -} - - -bool -Exec_query_sys::fetchImpl(Ctx &ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbDictionary::Dictionary* ndbDictionary = ndb->getDictionary(); - if (ndbDictionary == 0) { - ctx.pushStatus(ndb, "getDictionary"); - return false; - } - if (code.m_sysId == DictSys::OdbcTypeinfo) { - if (data.m_rowPos >= typeinfoCount) { - return false; - } - SqlRow& row = data.m_sqlRow; - const Typeinfo& typeinfo = typeinfoList[data.m_rowPos++]; - for (unsigned i = 1; i <= code.m_attrCount; i++) { - SqlField& f = data.m_sqlRow.getEntry(i); - switch (1 + code.m_attrId[i]) { - case 1: - if (typeinfo.m_type_name == NULL_CHAR) - f.sqlNull(true); - else - f.sqlVarchar(typeinfo.m_type_name, SQL_NTS); - break; - case 2: - if (typeinfo.m_data_type == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_data_type); - break; - case 3: - if (typeinfo.m_column_size == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_column_size); - break; - case 4: - if (typeinfo.m_literal_prefix == NULL_CHAR) - f.sqlNull(true); - else - f.sqlVarchar(typeinfo.m_literal_prefix, SQL_NTS); - break; - case 5: - if (typeinfo.m_literal_suffix == NULL_CHAR) - f.sqlNull(true); - else - f.sqlVarchar(typeinfo.m_literal_suffix, SQL_NTS); - break; - case 6: - if (typeinfo.m_create_params == NULL_CHAR) - f.sqlNull(true); - else - f.sqlVarchar(typeinfo.m_create_params, SQL_NTS); - break; - case 7: - if (typeinfo.m_nullable == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_nullable); - break; - case 8: - if (typeinfo.m_case_sensitive == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_case_sensitive); - break; - case 9: - if (typeinfo.m_searchable == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_searchable); - break; - case 10: - if (typeinfo.m_unsigned_attribute == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_unsigned_attribute); - break; - case 11: - if (typeinfo.m_fixed_prec_scale == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_fixed_prec_scale); - break; - case 12: - if (typeinfo.m_auto_unique_value == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_auto_unique_value); - break; - case 13: - if (typeinfo.m_local_type_name == NULL_CHAR) - f.sqlNull(true); - else - f.sqlVarchar(typeinfo.m_local_type_name, SQL_NTS); - break; - case 14: - if (typeinfo.m_minimum_scale == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_minimum_scale); - break; - case 15: - if (typeinfo.m_maximum_scale == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_maximum_scale); - break; - case 16: - if (typeinfo.m_sql_data_type == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_sql_data_type); - break; - case 17: - if (typeinfo.m_sql_datetime_sub == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_sql_datetime_sub); - break; - case 18: - if (typeinfo.m_sql_datetime_sub == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_sql_datetime_sub); - break; - case 19: - if (typeinfo.m_interval_precision == NULL_INT) - f.sqlNull(true); - else - f.sqlInteger(typeinfo.m_interval_precision); - break; - default: - ctx_assert(false); - break; - } - } - return true; - } - if (code.m_sysId == DictSys::OdbcTables) { - if (data.m_tablePos >= data.m_objectList.count) { - return false; - } - NdbDictionary::Dictionary::List::Element& element = data.m_objectList.elements[data.m_tablePos++]; - for (unsigned i = 1; i <= code.m_attrCount; i++) { - SqlField& f = data.m_sqlRow.getEntry(i); - switch (1 + code.m_attrId[i]) { - case 1: // TABLE_CAT - f.sqlNull(true); - break; - case 2: // TABLE_SCHEM - f.sqlNull(true); - break; - case 3: // TABLE_NAME - f.sqlVarchar(element.name, SQL_NTS); - break; - case 4: { // TABLE_TYPE - if (element.type == NdbDictionary::Object::SystemTable) - f.sqlVarchar("SYSTEM TABLE", SQL_NTS); - else if (element.type == NdbDictionary::Object::UserTable) - f.sqlVarchar("TABLE", SQL_NTS); - else if (element.type == NdbDictionary::Object::UniqueHashIndex) - f.sqlVarchar("UNIQUE HASH INDEX", SQL_NTS); - else if (element.type == NdbDictionary::Object::HashIndex) - f.sqlVarchar("HASH INDEX", SQL_NTS); - else if (element.type == NdbDictionary::Object::UniqueOrderedIndex) - f.sqlVarchar("UNIQUE INDEX", SQL_NTS); - else if (element.type == NdbDictionary::Object::OrderedIndex) - f.sqlVarchar("INDEX", SQL_NTS); - else if (element.type == NdbDictionary::Object::IndexTrigger) - f.sqlVarchar("INDEX TRIGGER", SQL_NTS); - else if (element.type == NdbDictionary::Object::SubscriptionTrigger) - f.sqlVarchar("SUBSCRIPTION TRIGGER", SQL_NTS); - else if (element.type == NdbDictionary::Object::ReadOnlyConstraint) - f.sqlVarchar("READ ONLY CONSTRAINT", SQL_NTS); - else - f.sqlVarchar("UNKNOWN", SQL_NTS); - } - break; - case 5: // REMARKS - f.sqlNull(true); - break; - default: - ctx_assert(false); - break; - } - } - return true; - } - if (code.m_sysId == DictSys::OdbcColumns) { - if (data.m_tablePos >= data.m_objectList.count) { - return false; - } - const NdbDictionary::Dictionary::List::Element& element = data.m_objectList.elements[data.m_tablePos]; - unsigned nattr; - const NdbDictionary::Table* ndbTable; - nattr = 0; - if (isNdbTable(element)) { - ndbTable = ndbDictionary->getTable(element.name); - if (ndbTable == 0) { - ctx.pushStatus(ndbDictionary->getNdbError(), "getTable %s", element.name); - return false; - } - nattr = ndbTable->getNoOfColumns(); - } - while (data.m_attrPos >= nattr) { - if (++data.m_tablePos >= data.m_objectList.count) { - return false; - } - const NdbDictionary::Dictionary::List::Element& element = data.m_objectList.elements[data.m_tablePos]; - nattr = 0; - if (isNdbTable(element)) { - ndbTable = ndbDictionary->getTable(element.name); - if (ndbTable == 0) { - ctx.pushStatus(ndbDictionary->getNdbError(), "getTable %s", element.name); - return false; - } - data.m_attrPos = 0; - nattr = ndbTable->getNoOfColumns(); - } - } - int attrId = data.m_attrPos++; - const NdbDictionary::Column* ndbColumn = ndbTable->getColumn(attrId); - if (ndbColumn == 0) { - ctx.pushStatus(ndbDictionary->getNdbError(), "getColumn %s.%d", ndbTable->getName(), attrId); - return false; - } - SqlType sqlType(ctx, ndbColumn); - if (! ctx.ok()) - return false; - const char* p; - for (unsigned i = 1; i <= code.m_attrCount; i++) { - SqlField& f = data.m_sqlRow.getEntry(i); - switch (1 + code.m_attrId[i]) { - case 1: // TABLE_CAT - f.sqlNull(true); - break; - case 2: // TABLE_SCHEM - f.sqlNull(true); - break; - case 3: // TABLE_NAME - f.sqlVarchar(ndbTable->getName(), SQL_NTS); - break; - case 4: // COLUMN_NAME - f.sqlVarchar(ndbColumn->getName(), SQL_NTS); - break; - case 5: // DATA_TYPE - f.sqlInteger(sqlType.type()); - break; - case 6: // TYPE_NAME - f.sqlVarchar(sqlType.typeName(), SQL_NTS); - break; - case 7: // COLUMN_SIZE - f.sqlInteger(sqlType.displaySize()); - break; - case 8: // BUFFER_LENGTH - f.sqlInteger(sqlType.size()); - break; - case 9: // DECIMAL_DIGITS - if (sqlType.type() == SqlType::Char) - f.sqlNull(true); - else - f.sqlInteger(0); - break; - case 10: // NUM_PREC_RADIX - if (sqlType.type() == SqlType::Integer || sqlType.type() == SqlType::Bigint) - f.sqlInteger(10); - else - f.sqlNull(true); - break; - case 11: // NULLABLE - if (sqlType.nullable()) - f.sqlInteger(SQL_NULLABLE); - else - f.sqlInteger(SQL_NO_NULLS); - break; - case 12: // REMARKS - f.sqlNull(true); - break; - case 13: // COLUMN_DEF - if ((p = ndbColumn->getDefaultValue()) != 0) - f.sqlVarchar(p, SQL_NTS); - else - f.sqlNull(true); - break; - case 14: // SQL_DATA_TYPE - f.sqlInteger(sqlType.type()); - break; - case 15: // SQL_DATETIME_SUB - f.sqlNull(true); - break; - case 16: // CHAR_OCTET_LENGTH - if (sqlType.type() == SqlType::Char) - f.sqlInteger(sqlType.length()); - else - f.sqlNull(true); - break; - case 17: // ORDINAL_POSITION - f.sqlInteger(1 + attrId); - break; - case 18: // IS_NULLABLE - if (sqlType.nullable()) - f.sqlVarchar("YES", SQL_NTS); - else - f.sqlVarchar("NO", SQL_NTS); - break; - break; - default: - ctx_assert(false); - break; - } - } - return true; - } - if (code.m_sysId == DictSys::OdbcPrimarykeys) { - if (data.m_tablePos >= data.m_objectList.count) { - return false; - } - NdbDictionary::Dictionary::List::Element& element = data.m_objectList.elements[data.m_tablePos]; - unsigned nkeys; - const NdbDictionary::Table* ndbTable; - nkeys = 0; - if (isNdbTable(element)) { - ndbTable = ndbDictionary->getTable(element.name); - if (ndbTable == 0) { - ctx.pushStatus(ndbDictionary->getNdbError(), "getTable %s", element.name); - return false; - } - nkeys = ndbTable->getNoOfPrimaryKeys(); - } - while (data.m_keyPos >= nkeys) { - if (++data.m_tablePos >= data.m_objectList.count) { - return false; - } - NdbDictionary::Dictionary::List::Element& element = data.m_objectList.elements[data.m_tablePos]; - nkeys = 0; - if (isNdbTable(element)) { - ndbTable = ndbDictionary->getTable(element.name); - if (ndbTable == 0) { - ctx.pushStatus(ndbDictionary->getNdbError(), "getTable %s", element.name); - return false; - } - data.m_keyPos = 0; - nkeys = ndbTable->getNoOfPrimaryKeys(); - } - } - unsigned keyPos = data.m_keyPos++; - const char* keyName = ndbTable->getPrimaryKey(keyPos); - if (keyName == 0) - keyName = "?"; - for (unsigned i = 1; i <= code.m_attrCount; i++) { - SqlField& f = data.m_sqlRow.getEntry(i); - switch (1 + code.m_attrId[i]) { - case 1: // TABLE_CAT - f.sqlNull(true); - break; - case 2: // TABLE_SCHEM - f.sqlNull(true); - break; - case 3: // TABLE_NAME - f.sqlVarchar(ndbTable->getName(), SQL_NTS); - break; - case 4: // COLUMN_NAME - f.sqlVarchar(keyName, SQL_NTS); - break; - case 5: // KEY_SEQ - f.sqlInteger(1 + keyPos); - break; - case 6: // PK_NAME - f.sqlNull(true); - break; - default: - ctx_assert(false); - break; - } - } - return true; - } - if (code.m_sysId == DictSys::Dual) { - if (data.m_rowPos > 0) { - return false; - } - data.m_rowPos++; - for (unsigned i = 1; i <= code.m_attrCount; i++) { - SqlField& f = data.m_sqlRow.getEntry(i); - switch (1 + code.m_attrId[i]) { - case 1: // DUMMY - f.sqlVarchar("X", 1); - break; - default: - ctx_assert(false); - break; - } - } - return true; - } - ctx_assert(false); - return false; -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_update_index.cpp b/ndb/src/old_files/client/odbc/executor/Exec_update_index.cpp deleted file mode 100644 index 35b6159d8ca..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_update_index.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include - -void -Exec_update_index::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - // execute subquery - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); - if (! ctx.ok()) - return; - // update each row from the query - while (m_query->fetch(ctx, ctl)) { - NdbOperation* op = tcon->getNdbIndexOperation(code.m_indexName, code.m_tableName); - if (op == 0) { - ctx.pushStatus(ndb, tcon, 0, "getNdbIndexOperation"); - return; - } - if (op->updateTuple() == -1) { - ctx.pushStatus(ndb, tcon, op, "updateTuple"); - return; - } - // key attributes - bool done = false; - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* exprMatch = code.m_keyMatch[k]; - ctx_assert(exprMatch != 0); - exprMatch->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - const SqlField& keyMatch = exprMatch->getData().sqlField(); - SqlField f(code.m_keySpecs.getEntry(k)); - if (! keyMatch.cast(ctx, f)) { - done = true; // match is not possible - break; - } - const NdbAttrId keyId = code.m_keyId[k]; - const void* addr = f.addr(); - const char* value = static_cast(addr); - if (op->equal(keyId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "equal attrId=%u", (unsigned)keyId); - return; - } - } - if (done) - continue; - // updated attributes - const SqlRow& sqlRow = m_query->getData().sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - const NdbAttrId attrId = code.m_attrId[i]; - const SqlField& f = sqlRow.getEntry(i); - const void* addr = f.sqlNull() ? 0 : f.addr(); - const char* value = static_cast(addr); - if (op->setValue(attrId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "setValue attrId=%u", (unsigned)attrId); - return; - } - } - data.setCount(0); - if (tcon->execute(NoCommit) == -1) { - // XXX when did 626 move to connection level - if (tcon->getNdbError().code != 626 && op->getNdbError().code != 626) { - ctx.pushStatus(ndb, tcon, op, "execute without commit"); - return; - } - } else { - data.addCount(); - } - } - stmtArea().setRowCount(ctx, data.getCount()); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_update_lookup.cpp b/ndb/src/old_files/client/odbc/executor/Exec_update_lookup.cpp deleted file mode 100644 index 2c801372de3..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_update_lookup.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include - -void -Exec_update_lookup::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - // execute subquery - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); - if (! ctx.ok()) - return; - // update each row from the query - while (m_query->fetch(ctx, ctl)) { - NdbOperation* op = tcon->getNdbOperation(code.m_tableName); - if (op == 0) { - ctx.pushStatus(ndb, tcon, 0, "getNdbOperation"); - return; - } - if (op->updateTuple() == -1) { - ctx.pushStatus(ndb, tcon, op, "updateTuple"); - return; - } - // key attributes - bool done = false; - for (unsigned k = 1; k <= code.m_keyCount; k++) { - Exec_expr* exprMatch = code.m_keyMatch[k]; - ctx_assert(exprMatch != 0); - exprMatch->evaluate(ctx, ctl); - if (! ctx.ok()) - return; - const SqlField& keyMatch = exprMatch->getData().sqlField(); - SqlField f(code.m_keySpecs.getEntry(k)); - if (! keyMatch.cast(ctx, f)) { - done = true; // match is not possible - break; - } - const NdbAttrId keyId = code.m_keyId[k]; - const void* addr = f.addr(); - const char* value = static_cast(addr); - if (op->equal(keyId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "equal attrId=%u", (unsigned)keyId); - return; - } - } - if (done) - continue; - // updated attributes - const SqlRow& sqlRow = m_query->getData().sqlRow(); - ctx_assert(sqlRow.count() == code.m_attrCount); - for (unsigned i = 1; i <= code.m_attrCount; i++) { - const NdbAttrId attrId = code.m_attrId[i]; - const SqlField& f = sqlRow.getEntry(i); - const void* addr = f.sqlNull() ? 0 : f.addr(); - const char* value = static_cast(addr); - if (op->setValue(attrId, value) == -1) { - ctx.pushStatus(ndb, tcon, op, "setValue attrId=%u", (unsigned)attrId); - return; - } - } - data.setCount(0); - if (tcon->execute(NoCommit) == -1) { - // XXX when did 626 move to connection level - if (tcon->getNdbError().code != 626 && op->getNdbError().code != 626) { - ctx.pushStatus(ndb, tcon, op, "execute without commit"); - return; - } - } else { - data.addCount(); - } - } - stmtArea().setRowCount(ctx, data.getCount()); -} diff --git a/ndb/src/old_files/client/odbc/executor/Exec_update_scan.cpp b/ndb/src/old_files/client/odbc/executor/Exec_update_scan.cpp deleted file mode 100644 index a36fdd27142..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Exec_update_scan.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include - -void -Exec_update_scan::execImpl(Ctx& ctx, Ctl& ctl) -{ - const Code& code = getCode(); - Data& data = getData(); - Ndb* const ndb = ndbObject(); - NdbConnection* const tcon = ndbConnection(); - // execute subquery - ctx_assert(m_query != 0); - m_query->execute(ctx, ctl); - if (! ctx.ok()) - return; - ctx_assert(ctl.m_scanOp != 0); - // update each row from query - data.setCount(0); - while (m_query->fetch(ctx, ctl)) { - NdbOperation* toOp = ctl.m_scanOp->takeOverForUpdate(tcon); - if (toOp == 0) { - ctx.pushStatus(ndb, tcon, ctl.m_scanOp, "takeOverScanOp"); - return; - } - const SqlRow& sqlRow = m_query->getData().sqlRow(); - for (unsigned i = 1; i <= sqlRow.count(); i++) { - const SqlField& f = sqlRow.getEntry(i); - const void* addr = f.sqlNull() ? 0 : f.addr(); - const char* value = static_cast(addr); - if (toOp->setValue(code.m_attrId[i], value) == -1) { - ctx.pushStatus(ndb, tcon, toOp, "setValue"); - return; - } - } - if (tcon->execute(NoCommit) == -1) { - ctx.pushStatus(ndb, tcon, toOp, "execute without commit"); - return; - } - data.addCount(); - } - stmtArea().setRowCount(ctx, data.getCount()); -} diff --git a/ndb/src/old_files/client/odbc/executor/Executor.cpp b/ndb/src/old_files/client/odbc/executor/Executor.cpp deleted file mode 100644 index adabb28a4a5..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Executor.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include "Executor.hpp" - -void -Executor::execute(Ctx& ctx) -{ - Exec_base::Ctl ctl(0); - Exec_root* execRoot = static_cast(m_stmtArea.m_execTree); - ctx_assert(execRoot != 0); - rebind(ctx); - if (! ctx.ok()) - return; - execRoot->execute(ctx, ctl); - if (! ctx.ok()) - return; - ctx_log2(("Executor: execute done")); -} - -void -Executor::fetch(Ctx& ctx) -{ - Exec_base::Ctl ctl(0); - Exec_root* execRoot = static_cast(m_stmtArea.m_execTree); - ctx_assert(execRoot != 0); - rebind(ctx); - if (! ctx.ok()) - return; - execRoot->fetch(ctx, ctl); - if (! ctx.ok()) - return; - ctx_log2(("Executor: fetch done")); -} - -void -Executor::rebind(Ctx& ctx) -{ - Exec_root* execRoot = static_cast(m_stmtArea.m_execTree); - ctx_assert(execRoot != 0); - DescArea& apd = m_stmtArea.descArea(Desc_usage_APD); - DescArea& ard = m_stmtArea.descArea(Desc_usage_ARD); - if (! apd.isBound() || ! ard.isBound()) { - ctx_log2(("Executor: rebind required")); - execRoot->bind(ctx); - if (! ctx.ok()) - return; - apd.setBound(true); - ard.setBound(true); - } -} diff --git a/ndb/src/old_files/client/odbc/executor/Executor.hpp b/ndb/src/old_files/client/odbc/executor/Executor.hpp deleted file mode 100644 index 5edb9d509ac..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Executor.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_EXECUTOR_Executor_hpp -#define ODBC_EXECUTOR_Executor_hpp - -#include -class StmtArea; - -/** - * @class Executor - * @brief Executes an ExecTree - */ -class Executor { -public: - Executor(StmtArea& stmtArea); - ~Executor(); - // execute prepared statement - void execute(Ctx& ctx); - // fetch next row from query - void fetch(Ctx& ctx); -private: - // rebind if necessary - void rebind(Ctx& ctx); - StmtArea m_stmtArea; -}; - -inline -Executor::Executor(StmtArea& stmtArea) : - m_stmtArea(stmtArea) -{ -} - -inline -Executor::~Executor() -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/executor/Makefile b/ndb/src/old_files/client/odbc/executor/Makefile deleted file mode 100644 index d86781e212c..00000000000 --- a/ndb/src/old_files/client/odbc/executor/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -include .defs.mk - -TYPE = * - -NONPIC_ARCHIVE = N - -PIC_ARCHIVE = Y - -ARCHIVE_TARGET = odbcexecutor - -SOURCES = \ - Executor.cpp \ - Exec_query_lookup.cpp \ - Exec_query_index.cpp \ - Exec_query_scan.cpp \ - Exec_query_range.cpp \ - Exec_query_sys.cpp \ - Exec_pred_op.cpp \ - Exec_comp_op.cpp \ - Exec_expr_op.cpp \ - Exec_expr_func.cpp \ - Exec_expr_conv.cpp \ - Exec_insert.cpp \ - Exec_update_lookup.cpp \ - Exec_update_index.cpp \ - Exec_update_scan.cpp \ - Exec_delete_lookup.cpp \ - Exec_delete_index.cpp \ - Exec_delete_scan.cpp \ - Exec_create_table.cpp \ - Exec_create_index.cpp \ - Exec_drop_table.cpp \ - Exec_drop_index.cpp - -include ../Extra.mk -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/client/odbc/handles/AttrDbc.cpp b/ndb/src/old_files/client/odbc/handles/AttrDbc.cpp deleted file mode 100644 index 4768a8995a2..00000000000 --- a/ndb/src/old_files/client/odbc/handles/AttrDbc.cpp +++ /dev/null @@ -1,473 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "HandleDbc.hpp" - -static void -callback_SQL_ATTR_ACCESS_MODE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_MODE_READ_ONLY: - break; - case SQL_MODE_READ_WRITE: - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid access mode value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_ACCESS_MODE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = SQL_MODE_READ_WRITE; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ASYNC_ENABLE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_ASYNC_ENABLE_OFF: - break; - case SQL_ASYNC_ENABLE_ON: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "async enable on not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid async enable value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_ASYNC_ENABLE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = SQL_ASYNC_ENABLE_OFF; - data.setValue(value); -} - -static void -callback_SQL_ATTR_AUTO_IPD_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); - ctx_assert(false); // read-only -} - -static void -callback_SQL_ATTR_AUTO_IPD_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = SQL_FALSE; - data.setValue(value); -} - -static void -callback_SQL_ATTR_AUTOCOMMIT_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_AUTOCOMMIT_OFF: - if (pDbc->autocommit()) { - pDbc->autocommit(false); - pDbc->useConnection(ctx, true); - } - break; - case SQL_AUTOCOMMIT_ON: - if (! pDbc->autocommit()) { - pDbc->autocommit(true); - pDbc->sqlEndTran(ctx, SQL_COMMIT); - pDbc->useConnection(ctx, false); - } - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid autocommit value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_AUTOCOMMIT_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = pDbc->autocommit() ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF; - data.setValue(value); -} - -static void -callback_SQL_ATTR_CONNECTION_DEAD_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); - ctx_assert(false); // read-only -} - -static void -callback_SQL_ATTR_CONNECTION_DEAD_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = pDbc->getState() == HandleDbc::Free ? SQL_CD_TRUE : SQL_CD_FALSE; - data.setValue(value); -} - -static void -callback_SQL_ATTR_CONNECTION_TIMEOUT_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); -} - -static void -callback_SQL_ATTR_CONNECTION_TIMEOUT_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_CURRENT_CATALOG_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_ATTR_CURRENT_CATALOG_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - const char* value = "DEFAULT"; - data.setValue(value); -} - -static void -callback_SQL_ATTR_LOGIN_TIMEOUT_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - callback_SQL_ATTR_CONNECTION_TIMEOUT_set(ctx, self, data); -} - -static void -callback_SQL_ATTR_LOGIN_TIMEOUT_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - callback_SQL_ATTR_CONNECTION_TIMEOUT_default(ctx, self, data); -} - -static void -callback_SQL_ATTR_METADATA_ID_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_FALSE: - break; - case SQL_TRUE: - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid metadata id value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_METADATA_ID_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = SQL_FALSE; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ODBC_CURSORS_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_CUR_USE_DRIVER: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "cur use driver not supported"); - break; - case SQL_CUR_USE_IF_NEEDED: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "cur use if needed not supported"); - break; - case SQL_CUR_USE_ODBC: - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid odbc cursors value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_ODBC_CURSORS_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = SQL_CUR_USE_ODBC; - data.setValue(value); -} - -static void -callback_SQL_ATTR_PACKET_SIZE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "packet size (%u) not supported", (unsigned)value); -} - -static void -callback_SQL_ATTR_PACKET_SIZE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_QUIET_MODE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Pointer); -} - -static void -callback_SQL_ATTR_QUIET_MODE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - data.setValue(); -} - -static void -callback_SQL_ATTR_TRACE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); -} - -static void -callback_SQL_ATTR_TRACE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - data.setValue(); -} - -static void -callback_SQL_ATTR_TRACEFILE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_ATTR_TRACEFILE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - data.setValue(); -} - -static void -callback_SQL_ATTR_TRANSLATE_LIB_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_ATTR_TRANSLATE_LIB_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - data.setValue(); -} - -static void -callback_SQL_ATTR_TRANSLATE_OPTION_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); -} - -static void -callback_SQL_ATTR_TRANSLATE_OPTION_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - data.setValue(); -} - -static void -callback_SQL_ATTR_TXN_ISOLATION_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0 && data.type() == OdbcData::Uinteger); - if (pDbc->getState() == HandleDbc::Free) { - ctx.pushStatus(Sqlstate::_08003, Error::Gen, "not connected"); - return; - } - if (pDbc->getState() == HandleDbc::Transacting) { - ctx.pushStatus(Sqlstate::_HY011, Error::Gen, "transaction is open"); - return; - } - SQLUINTEGER value = data.uinteger(); - SQLUINTEGER mask = SQL_TXN_READ_COMMITTED; - if (! (value & mask)) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "txn isolation level %u not supported", (unsigned)value); - return; - } -} - -static void -callback_SQL_ATTR_TXN_ISOLATION_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDbc* pDbc = static_cast(self); - ctx_assert(pDbc != 0); - SQLUINTEGER value = SQL_TXN_READ_COMMITTED; - data.setValue(value); -} - -AttrSpec HandleDbc::m_attrSpec[] = { - { SQL_ATTR_ACCESS_MODE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_ACCESS_MODE_set, - callback_SQL_ATTR_ACCESS_MODE_default, - }, - { SQL_ATTR_ASYNC_ENABLE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_ASYNC_ENABLE_set, - callback_SQL_ATTR_ASYNC_ENABLE_default, - }, - { SQL_ATTR_AUTO_IPD, - OdbcData::Uinteger, - Attr_mode_readonly, - callback_SQL_ATTR_AUTO_IPD_set, - callback_SQL_ATTR_AUTO_IPD_default, - }, - { SQL_ATTR_AUTOCOMMIT, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_AUTOCOMMIT_set, - callback_SQL_ATTR_AUTOCOMMIT_default, - }, - { SQL_ATTR_CONNECTION_DEAD, - OdbcData::Uinteger, - Attr_mode_readonly, - callback_SQL_ATTR_CONNECTION_DEAD_set, - callback_SQL_ATTR_CONNECTION_DEAD_default, - }, - { SQL_ATTR_CONNECTION_TIMEOUT, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_CONNECTION_TIMEOUT_set, - callback_SQL_ATTR_CONNECTION_TIMEOUT_default, - }, - { SQL_ATTR_CURRENT_CATALOG, - OdbcData::Sqlchar, - Attr_mode_readwrite, - callback_SQL_ATTR_CURRENT_CATALOG_set, - callback_SQL_ATTR_CURRENT_CATALOG_default, - }, - { SQL_ATTR_LOGIN_TIMEOUT, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_LOGIN_TIMEOUT_set, - callback_SQL_ATTR_LOGIN_TIMEOUT_default, - }, - { SQL_ATTR_METADATA_ID, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_METADATA_ID_set, - callback_SQL_ATTR_METADATA_ID_default, - }, - { SQL_ATTR_ODBC_CURSORS, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_ODBC_CURSORS_set, - callback_SQL_ATTR_ODBC_CURSORS_default, - }, - { SQL_ATTR_PACKET_SIZE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_PACKET_SIZE_set, - callback_SQL_ATTR_PACKET_SIZE_default, - }, - { SQL_ATTR_QUIET_MODE, - OdbcData::Pointer, - Attr_mode_readwrite, - callback_SQL_ATTR_QUIET_MODE_set, - callback_SQL_ATTR_QUIET_MODE_default, - }, - { SQL_ATTR_TRACE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_TRACE_set, - callback_SQL_ATTR_TRACE_default, - }, - { SQL_ATTR_TRACEFILE, - OdbcData::Sqlchar, - Attr_mode_readwrite, - callback_SQL_ATTR_TRACEFILE_set, - callback_SQL_ATTR_TRACEFILE_default, - }, - { SQL_ATTR_TRANSLATE_LIB, - OdbcData::Sqlchar, - Attr_mode_readwrite, - callback_SQL_ATTR_TRANSLATE_LIB_set, - callback_SQL_ATTR_TRANSLATE_LIB_default, - }, - { SQL_ATTR_TRANSLATE_OPTION, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_TRANSLATE_OPTION_set, - callback_SQL_ATTR_TRANSLATE_OPTION_default, - }, - { SQL_ATTR_TXN_ISOLATION, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_TXN_ISOLATION_set, - callback_SQL_ATTR_TXN_ISOLATION_default, - }, - { 0, - OdbcData::Undef, - Attr_mode_undef, - 0, - 0, - }, -}; diff --git a/ndb/src/old_files/client/odbc/handles/AttrEnv.cpp b/ndb/src/old_files/client/odbc/handles/AttrEnv.cpp deleted file mode 100644 index 3d57fddeb57..00000000000 --- a/ndb/src/old_files/client/odbc/handles/AttrEnv.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "HandleEnv.hpp" - -static void -callback_SQL_ATTR_CP_MATCH_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleEnv* pEnv = static_cast(self); - ctx_assert(pEnv != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_CP_STRICT_MATCH: - break; - case SQL_CP_RELAXED_MATCH: - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid cp match value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_CP_MATCH_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleEnv* pEnv = static_cast(self); - ctx_assert(pEnv != 0); - SQLUINTEGER value = SQL_CP_STRICT_MATCH; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ODBC_VERSION_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleEnv* pEnv = static_cast(self); - ctx_assert(pEnv != 0 && data.type() == OdbcData::Integer); - int version = data.integer(); - switch (version) { - case SQL_OV_ODBC2: - case SQL_OV_ODBC3: - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid ODBC version %d", version); - return; - } - ctx_log1(("odbc version set to %d", version)); -} - -static void -callback_SQL_ATTR_ODBC_VERSION_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleEnv* pEnv = static_cast(self); - ctx_assert(pEnv != 0); - // no default - ctx_log1(("odbc version has not been set")); - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "odbc version has not been set"); -} - -static void -callback_SQL_ATTR_OUTPUT_NTS_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleEnv* pEnv = static_cast(self); - ctx_assert(pEnv != 0 && data.type() == OdbcData::Integer); - SQLINTEGER value = data.integer(); - switch (value) { - case SQL_TRUE: - break; - case SQL_FALSE: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "output nts FALSE not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid output nts value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_OUTPUT_NTS_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleEnv* pEnv = static_cast(self); - ctx_assert(pEnv != 0); - data.setValue(); -} - -AttrSpec HandleEnv::m_attrSpec[] = { - { SQL_ATTR_CP_MATCH, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_CP_MATCH_set, - callback_SQL_ATTR_CP_MATCH_default, - }, - { SQL_ATTR_ODBC_VERSION, - OdbcData::Integer, - Attr_mode_readwrite, - callback_SQL_ATTR_ODBC_VERSION_set, - callback_SQL_ATTR_ODBC_VERSION_default, - }, - { SQL_ATTR_OUTPUT_NTS, - OdbcData::Integer, - Attr_mode_readwrite, - callback_SQL_ATTR_OUTPUT_NTS_set, - callback_SQL_ATTR_OUTPUT_NTS_default, - }, - { 0, - OdbcData::Undef, - Attr_mode_undef, - 0, - 0, - }, -}; diff --git a/ndb/src/old_files/client/odbc/handles/AttrRoot.cpp b/ndb/src/old_files/client/odbc/handles/AttrRoot.cpp deleted file mode 100644 index d1b264835b6..00000000000 --- a/ndb/src/old_files/client/odbc/handles/AttrRoot.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "HandleRoot.hpp" - -static void -callback_SQL_ATTR_CONNECTION_POOLING_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleRoot* pRoot = static_cast(self); - ctx_assert(pRoot != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_CP_OFF: - break; - case SQL_CP_ONE_PER_DRIVER: - case SQL_CP_ONE_PER_HENV: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "connection pooling not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid connection pooling value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_CONNECTION_POOLING_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleRoot* pRoot = static_cast(self); - ctx_assert(pRoot != 0); - SQLUINTEGER value = SQL_CP_OFF; - data.setValue(value); -} - -static void -callback_SQL_ATTR_CP_MATCH_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleRoot* pRoot = static_cast(self); - ctx_assert(pRoot != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_CP_STRICT_MATCH: - break; - case SQL_CP_RELAXED_MATCH: - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid cp match value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_CP_MATCH_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleRoot* pRoot = static_cast(self); - ctx_assert(pRoot != 0); - SQLUINTEGER value = SQL_CP_STRICT_MATCH; - data.setValue(value); -} - -AttrSpec HandleRoot::m_attrSpec[] = { - { SQL_ATTR_CONNECTION_POOLING, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_CONNECTION_POOLING_set, - callback_SQL_ATTR_CONNECTION_POOLING_default, - }, - { SQL_ATTR_CP_MATCH, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_CP_MATCH_set, - callback_SQL_ATTR_CP_MATCH_default, - }, - { 0, - OdbcData::Undef, - Attr_mode_undef, - 0, - 0, - }, -}; diff --git a/ndb/src/old_files/client/odbc/handles/AttrStmt.cpp b/ndb/src/old_files/client/odbc/handles/AttrStmt.cpp deleted file mode 100644 index ce9a9c03fd1..00000000000 --- a/ndb/src/old_files/client/odbc/handles/AttrStmt.cpp +++ /dev/null @@ -1,1005 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "HandleDbc.hpp" -#include "HandleStmt.hpp" -#include "HandleDesc.hpp" - -static void -callback_SQL_ATTR_APP_PARAM_DESC_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Pointer); - pStmt->setHandleDesc(ctx, Desc_usage_APD, data.pointer()); -} - -static void -callback_SQL_ATTR_APP_PARAM_DESC_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - HandleDesc* apd = pStmt->getHandleDesc(ctx, Desc_usage_APD); - OdbcData value(reinterpret_cast(apd)); - data.setValue(value); -} - -static void -callback_SQL_ATTR_APP_ROW_DESC_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Pointer); - pStmt->setHandleDesc(ctx, Desc_usage_ARD, data.pointer()); -} - -static void -callback_SQL_ATTR_APP_ROW_DESC_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - HandleDesc* ard = pStmt->getHandleDesc(ctx, Desc_usage_ARD); - OdbcData value(reinterpret_cast(ard)); - data.setValue(value); -} - -static void -callback_SQL_ATTR_ASYNC_ENABLE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_ASYNC_ENABLE_OFF: - break; - case SQL_ASYNC_ENABLE_ON: -// ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "async enable ON not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid async enable value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_ASYNC_ENABLE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_ASYNC_ENABLE_OFF; - data.setValue(value); -} - -static void -callback_SQL_ATTR_CONCURRENCY_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_CONCUR_READ_ONLY: - break; - case SQL_CONCUR_LOCK: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "concur lock not supported"); - break; - case SQL_CONCUR_ROWVER: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "concur rowver not supported"); - break; - case SQL_CONCUR_VALUES: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "concur values not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid concurrency value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_CONCURRENCY_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_CONCUR_READ_ONLY; - data.setValue(value); -} - -static void -callback_SQL_ATTR_CURSOR_SCROLLABLE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_NONSCROLLABLE: - break; - case SQL_SCROLLABLE: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "cursor scrollable not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid concurrency value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_CURSOR_SCROLLABLE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_NONSCROLLABLE; - data.setValue(value); -} - -static void -callback_SQL_ATTR_CURSOR_SENSITIVITY_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_UNSPECIFIED: - case SQL_INSENSITIVE: - break; - case SQL_SENSITIVE: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "cursor sensitive not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid cursor sensitivity value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_CURSOR_SENSITIVITY_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_INSENSITIVE; - data.setValue(value); -} - -static void -callback_SQL_ATTR_CURSOR_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_CURSOR_FORWARD_ONLY: - break; - case SQL_CURSOR_STATIC: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "cursor static not supported"); - break; - case SQL_CURSOR_KEYSET_DRIVEN: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "cursor keyset driven not supported"); - break; - case SQL_CURSOR_DYNAMIC: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "cursor dynamic not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid cursor type value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_CURSOR_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_CURSOR_FORWARD_ONLY; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ENABLE_AUTO_IPD_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_FALSE: - break; - case SQL_TRUE: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "enable auto IPD not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid enable auto IPD value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_ENABLE_AUTO_IPD_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_FALSE; - data.setValue(value); -} - -static void -callback_SQL_ATTR_FETCH_BOOKMARK_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Pointer); - SQLPOINTER value = data.pointer(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "fetch bookmark ptr not supported"); - return; - } -} - -static void -callback_SQL_ATTR_FETCH_BOOKMARK_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLPOINTER value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_IMP_PARAM_DESC_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Pointer); - ctx_assert(false); // read-only -} - -static void -callback_SQL_ATTR_IMP_PARAM_DESC_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - HandleDesc* ipd = pStmt->getHandleDesc(ctx, Desc_usage_IPD); - OdbcData value(reinterpret_cast(ipd)); - data.setValue(value); -} - -static void -callback_SQL_ATTR_IMP_ROW_DESC_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Pointer); - ctx_assert(false); // read-only -} - -static void -callback_SQL_ATTR_IMP_ROW_DESC_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - HandleDesc* ird = pStmt->getHandleDesc(ctx, Desc_usage_IRD); - OdbcData value(reinterpret_cast(ird)); - data.setValue(value); -} - -static void -callback_SQL_ATTR_KEYSET_SIZE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "keyset size not supported"); - return; - } -} - -static void -callback_SQL_ATTR_KEYSET_SIZE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_MAX_LENGTH_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "max length not supported"); - return; - } -} - -static void -callback_SQL_ATTR_MAX_LENGTH_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_MAX_ROWS_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "max rows not supported"); - return; - } -} - -static void -callback_SQL_ATTR_MAX_ROWS_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_METADATA_ID_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_FALSE: - break; - case SQL_TRUE: - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid metadata id value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_METADATA_ID_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_FALSE; - data.setValue(value); -} - -static void -callback_SQL_ATTR_NOSCAN_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_NOSCAN_OFF: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "noscan OFF not supported"); - break; - case SQL_NOSCAN_ON: - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid no scan value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_NOSCAN_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_NOSCAN_ON; - data.setValue(value); -} - -static void -callback_SQL_ATTR_PARAM_BIND_OFFSET_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::UintegerPtr); - SQLUINTEGER* value = data.uintegerPtr(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "param bind offset ptr not supported"); - return; - } -} - -static void -callback_SQL_ATTR_PARAM_BIND_OFFSET_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER* value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_PARAM_BIND_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - if (value != SQL_PARAM_BIND_BY_COLUMN) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "row-wise param binding not supported"); - return; - } -} - -static void -callback_SQL_ATTR_PARAM_BIND_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_PARAM_BIND_BY_COLUMN; - data.setValue(value); -} - -static void -callback_SQL_ATTR_PARAM_OPERATION_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::UsmallintPtr); - SQLUSMALLINT* value = data.usmallintPtr(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "param operation ptr not supported"); - return; - } -} - -static void -callback_SQL_ATTR_PARAM_OPERATION_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUSMALLINT* value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_PARAM_STATUS_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::UsmallintPtr); - SQLUSMALLINT* value = data.usmallintPtr(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "param status ptr not supported"); - return; - } -} - -static void -callback_SQL_ATTR_PARAM_STATUS_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUSMALLINT* value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_PARAMS_PROCESSED_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::UintegerPtr); - SQLUINTEGER* value = data.uintegerPtr(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "params processed ptr not supported"); - return; - } -} - -static void -callback_SQL_ATTR_PARAMS_PROCESSED_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER* value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_PARAMSET_SIZE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - if (value != 1) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "paramset size %u not supported", (unsigned)value); - return; - } -} - -static void -callback_SQL_ATTR_PARAMSET_SIZE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = 1; - data.setValue(value); -} - -static void -callback_SQL_ATTR_QUERY_TIMEOUT_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_01S02, Error::Gen, "query timeout %u replaced by 0", (unsigned)value); - return; - } -} - -static void -callback_SQL_ATTR_QUERY_TIMEOUT_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_RETRIEVE_DATA_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_RD_ON: - break; - case SQL_RD_OFF: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "retrieve data OFF not supported"); - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid retrieve data value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_RETRIEVE_DATA_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_RD_ON; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ROW_ARRAY_SIZE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - if (value != 1) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "row array size %u != 1 not supported", (unsigned)value); - return; - } -} - -static void -callback_SQL_ATTR_ROW_ARRAY_SIZE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = 1; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ROW_BIND_OFFSET_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::UintegerPtr); - SQLUINTEGER* value = data.uintegerPtr(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "row bind offset ptr != 0 not supported"); - return; - } -} - -static void -callback_SQL_ATTR_ROW_BIND_OFFSET_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER* value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ROW_BIND_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - if (value != SQL_BIND_BY_COLUMN) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "row-wise binding not supported"); - return; - } -} - -static void -callback_SQL_ATTR_ROW_BIND_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_BIND_BY_COLUMN; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ROW_NUMBER_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - ctx_assert(false); // read-only -} - -static void -callback_SQL_ATTR_ROW_NUMBER_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = pStmt->getRowCount(); - data.setValue(value); -} - -static void -callback_SQL_ATTR_ROW_OPERATION_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::UsmallintPtr); - SQLUSMALLINT* value = data.usmallintPtr(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "row operation ptr not supported"); - return; - } -} - -static void -callback_SQL_ATTR_ROW_OPERATION_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUSMALLINT* value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ROW_STATUS_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::UsmallintPtr); - SQLUSMALLINT* value = data.usmallintPtr(); - if (value != 0) { - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "row status ptr not supported"); - return; - } -} - -static void -callback_SQL_ATTR_ROW_STATUS_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUSMALLINT* value = 0; - data.setValue(value); -} - -static void -callback_SQL_ATTR_ROWS_FETCHED_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::UintegerPtr); - SQLUINTEGER* value = data.uintegerPtr(); - HandleDesc* ird = pStmt->getHandleDesc(ctx, Desc_usage_IRD); - ird->sqlSetDescField(ctx, 0, SQL_DESC_ROWS_PROCESSED_PTR, static_cast(value), SQL_IS_POINTER); -} - -static void -callback_SQL_ATTR_ROWS_FETCHED_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER* value = 0; - HandleDesc* ird = pStmt->getHandleDesc(ctx, Desc_usage_IRD); - ird->sqlGetDescField(ctx, 0, SQL_DESC_ROWS_PROCESSED_PTR, &value, SQL_IS_POINTER, 0); - data.setValue(value); -} - -static void -callback_SQL_ATTR_SIMULATE_CURSOR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_SC_NON_UNIQUE: - break; - case SQL_SC_TRY_UNIQUE: - break; - case SQL_SC_UNIQUE: - break; - default: - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "invalid simulate cursor value %u", (unsigned)value); - break; - } -} - -static void -callback_SQL_ATTR_SIMULATE_CURSOR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_SC_UNIQUE; // XXX if we did - data.setValue(value); -} - -static void -callback_SQL_ATTR_USE_BOOKMARKS_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - SQLUINTEGER value = data.uinteger(); - switch (value) { - case SQL_UB_OFF: - break; - case SQL_UB_VARIABLE: - case SQL_UB_FIXED: - ctx.pushStatus(Sqlstate::_HYC00, Error::Gen, "bookmarks not supported"); - return; - } -} - -static void -callback_SQL_ATTR_USE_BOOKMARKS_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = SQL_UB_OFF; - data.setValue(value); -} - -// driver specific - -static void -callback_SQL_ATTR_NDB_TUPLES_FETCHED_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0 && data.type() == OdbcData::Uinteger); - ctx_assert(false); // read-only -} - -static void -callback_SQL_ATTR_NDB_TUPLES_FETCHED_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleStmt* pStmt = static_cast(self); - ctx_assert(pStmt != 0); - SQLUINTEGER value = pStmt->getTuplesFetched(); - data.setValue(value); -} - -AttrSpec HandleStmt::m_attrSpec[] = { - { SQL_ATTR_APP_PARAM_DESC, - OdbcData::Pointer, - Attr_mode_readwrite, - callback_SQL_ATTR_APP_PARAM_DESC_set, - callback_SQL_ATTR_APP_PARAM_DESC_default, - }, - { SQL_ATTR_APP_ROW_DESC, - OdbcData::Pointer, - Attr_mode_readwrite, - callback_SQL_ATTR_APP_ROW_DESC_set, - callback_SQL_ATTR_APP_ROW_DESC_default, - }, - { SQL_ATTR_ASYNC_ENABLE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_ASYNC_ENABLE_set, - callback_SQL_ATTR_ASYNC_ENABLE_default, - }, - { SQL_ATTR_CONCURRENCY, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_CONCURRENCY_set, - callback_SQL_ATTR_CONCURRENCY_default, - }, - { SQL_ATTR_CURSOR_SCROLLABLE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_CURSOR_SCROLLABLE_set, - callback_SQL_ATTR_CURSOR_SCROLLABLE_default, - }, - { SQL_ATTR_CURSOR_SENSITIVITY, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_CURSOR_SENSITIVITY_set, - callback_SQL_ATTR_CURSOR_SENSITIVITY_default, - }, - { SQL_ATTR_CURSOR_TYPE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_CURSOR_TYPE_set, - callback_SQL_ATTR_CURSOR_TYPE_default, - }, - { SQL_ATTR_ENABLE_AUTO_IPD, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_ENABLE_AUTO_IPD_set, - callback_SQL_ATTR_ENABLE_AUTO_IPD_default, - }, - { SQL_ATTR_FETCH_BOOKMARK_PTR, - OdbcData::Pointer, - Attr_mode_readwrite, - callback_SQL_ATTR_FETCH_BOOKMARK_PTR_set, - callback_SQL_ATTR_FETCH_BOOKMARK_PTR_default, - }, - { SQL_ATTR_IMP_PARAM_DESC, - OdbcData::Pointer, - Attr_mode_readonly, - callback_SQL_ATTR_IMP_PARAM_DESC_set, - callback_SQL_ATTR_IMP_PARAM_DESC_default, - }, - { SQL_ATTR_IMP_ROW_DESC, - OdbcData::Pointer, - Attr_mode_readonly, - callback_SQL_ATTR_IMP_ROW_DESC_set, - callback_SQL_ATTR_IMP_ROW_DESC_default, - }, - { SQL_ATTR_KEYSET_SIZE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_KEYSET_SIZE_set, - callback_SQL_ATTR_KEYSET_SIZE_default, - }, - { SQL_ATTR_MAX_LENGTH, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_MAX_LENGTH_set, - callback_SQL_ATTR_MAX_LENGTH_default, - }, - { SQL_ATTR_MAX_ROWS, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_MAX_ROWS_set, - callback_SQL_ATTR_MAX_ROWS_default, - }, - { SQL_ATTR_METADATA_ID, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_METADATA_ID_set, - callback_SQL_ATTR_METADATA_ID_default, - }, - { SQL_ATTR_NOSCAN, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_NOSCAN_set, - callback_SQL_ATTR_NOSCAN_default, - }, - { SQL_ATTR_PARAM_BIND_OFFSET_PTR, - OdbcData::UintegerPtr, - Attr_mode_readwrite, - callback_SQL_ATTR_PARAM_BIND_OFFSET_PTR_set, - callback_SQL_ATTR_PARAM_BIND_OFFSET_PTR_default, - }, - { SQL_ATTR_PARAM_BIND_TYPE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_PARAM_BIND_TYPE_set, - callback_SQL_ATTR_PARAM_BIND_TYPE_default, - }, - { SQL_ATTR_PARAM_OPERATION_PTR, - OdbcData::UsmallintPtr, - Attr_mode_readwrite, - callback_SQL_ATTR_PARAM_OPERATION_PTR_set, - callback_SQL_ATTR_PARAM_OPERATION_PTR_default, - }, - { SQL_ATTR_PARAM_STATUS_PTR, - OdbcData::UsmallintPtr, - Attr_mode_readwrite, - callback_SQL_ATTR_PARAM_STATUS_PTR_set, - callback_SQL_ATTR_PARAM_STATUS_PTR_default, - }, - { SQL_ATTR_PARAMS_PROCESSED_PTR, - OdbcData::UintegerPtr, - Attr_mode_readwrite, - callback_SQL_ATTR_PARAMS_PROCESSED_PTR_set, - callback_SQL_ATTR_PARAMS_PROCESSED_PTR_default, - }, - { SQL_ATTR_PARAMSET_SIZE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_PARAMSET_SIZE_set, - callback_SQL_ATTR_PARAMSET_SIZE_default, - }, - { SQL_ATTR_QUERY_TIMEOUT, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_QUERY_TIMEOUT_set, - callback_SQL_ATTR_QUERY_TIMEOUT_default, - }, - { SQL_ATTR_RETRIEVE_DATA, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_RETRIEVE_DATA_set, - callback_SQL_ATTR_RETRIEVE_DATA_default, - }, - { SQL_ATTR_ROW_ARRAY_SIZE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_ROW_ARRAY_SIZE_set, - callback_SQL_ATTR_ROW_ARRAY_SIZE_default, - }, - { SQL_ATTR_ROW_BIND_OFFSET_PTR, - OdbcData::UintegerPtr, - Attr_mode_readwrite, - callback_SQL_ATTR_ROW_BIND_OFFSET_PTR_set, - callback_SQL_ATTR_ROW_BIND_OFFSET_PTR_default, - }, - { SQL_ATTR_ROW_BIND_TYPE, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_ROW_BIND_TYPE_set, - callback_SQL_ATTR_ROW_BIND_TYPE_default, - }, - { SQL_ATTR_ROW_NUMBER, - OdbcData::Uinteger, - Attr_mode_readonly, - callback_SQL_ATTR_ROW_NUMBER_set, - callback_SQL_ATTR_ROW_NUMBER_default, - }, - { SQL_ATTR_ROW_OPERATION_PTR, - OdbcData::UsmallintPtr, - Attr_mode_readwrite, - callback_SQL_ATTR_ROW_OPERATION_PTR_set, - callback_SQL_ATTR_ROW_OPERATION_PTR_default, - }, - { SQL_ATTR_ROW_STATUS_PTR, - OdbcData::UsmallintPtr, - Attr_mode_readwrite, - callback_SQL_ATTR_ROW_STATUS_PTR_set, - callback_SQL_ATTR_ROW_STATUS_PTR_default, - }, - { SQL_ATTR_ROWS_FETCHED_PTR, - OdbcData::UintegerPtr, - Attr_mode_readwrite, - callback_SQL_ATTR_ROWS_FETCHED_PTR_set, - callback_SQL_ATTR_ROWS_FETCHED_PTR_default, - }, - { SQL_ATTR_SIMULATE_CURSOR, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_SIMULATE_CURSOR_set, - callback_SQL_ATTR_SIMULATE_CURSOR_default, - }, - { SQL_ATTR_USE_BOOKMARKS, - OdbcData::Uinteger, - Attr_mode_readwrite, - callback_SQL_ATTR_USE_BOOKMARKS_set, - callback_SQL_ATTR_USE_BOOKMARKS_default, - }, - // driver specific - { SQL_ATTR_NDB_TUPLES_FETCHED, - OdbcData::Uinteger, - Attr_mode_readonly, - callback_SQL_ATTR_NDB_TUPLES_FETCHED_set, - callback_SQL_ATTR_NDB_TUPLES_FETCHED_default, - }, - { 0, - OdbcData::Undef, - Attr_mode_undef, - 0, - 0, - }, -}; diff --git a/ndb/src/old_files/client/odbc/handles/DescSpec.cpp b/ndb/src/old_files/client/odbc/handles/DescSpec.cpp deleted file mode 100644 index 83905cf9822..00000000000 --- a/ndb/src/old_files/client/odbc/handles/DescSpec.cpp +++ /dev/null @@ -1,1140 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "HandleDbc.hpp" -#include "HandleDesc.hpp" - -static void -callback_SQL_DESC_ALLOC_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_ALLOC_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_ARRAY_SIZE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Uinteger); -} - -static void -callback_SQL_DESC_ARRAY_SIZE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_ARRAY_STATUS_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::UsmallintPtr); -} - -static void -callback_SQL_DESC_ARRAY_STATUS_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_BIND_OFFSET_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::IntegerPtr); -} - -static void -callback_SQL_DESC_BIND_OFFSET_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_BIND_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer); -} - -static void -callback_SQL_DESC_BIND_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_COUNT_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_COUNT_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_ROWS_PROCESSED_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::UintegerPtr); -} - -static void -callback_SQL_DESC_ROWS_PROCESSED_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_AUTO_UNIQUE_VALUE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer); -} - -static void -callback_SQL_DESC_AUTO_UNIQUE_VALUE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_BASE_COLUMN_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_BASE_COLUMN_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_BASE_TABLE_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_BASE_TABLE_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_CASE_SENSITIVE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer); -} - -static void -callback_SQL_DESC_CASE_SENSITIVE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_CATALOG_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_CATALOG_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_CONCISE_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_CONCISE_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_DATA_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Pointer); -} - -static void -callback_SQL_DESC_DATA_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_DATETIME_INTERVAL_CODE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_DATETIME_INTERVAL_CODE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_DATETIME_INTERVAL_PRECISION_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer); -} - -static void -callback_SQL_DESC_DATETIME_INTERVAL_PRECISION_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_DISPLAY_SIZE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer); -} - -static void -callback_SQL_DESC_DISPLAY_SIZE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_FIXED_PREC_SCALE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_FIXED_PREC_SCALE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_INDICATOR_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::IntegerPtr); -} - -static void -callback_SQL_DESC_INDICATOR_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_LABEL_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_LABEL_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_LENGTH_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Uinteger); -} - -static void -callback_SQL_DESC_LENGTH_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_LITERAL_PREFIX_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_LITERAL_PREFIX_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_LITERAL_SUFFIX_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_LITERAL_SUFFIX_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_LOCAL_TYPE_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_LOCAL_TYPE_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_NULLABLE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_NULLABLE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_NUM_PREC_RADIX_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer); -} - -static void -callback_SQL_DESC_NUM_PREC_RADIX_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_OCTET_LENGTH_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer); -} - -static void -callback_SQL_DESC_OCTET_LENGTH_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_OCTET_LENGTH_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::IntegerPtr); -} - -static void -callback_SQL_DESC_OCTET_LENGTH_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_PARAMETER_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_PARAMETER_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_PRECISION_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_PRECISION_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_ROWVER_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_ROWVER_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_SCALE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_SCALE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_SCHEMA_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_SCHEMA_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_SEARCHABLE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_SEARCHABLE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_TABLE_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_TABLE_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_TYPE_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar); -} - -static void -callback_SQL_DESC_TYPE_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_UNNAMED_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_UNNAMED_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_UNSIGNED_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_UNSIGNED_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -static void -callback_SQL_DESC_UPDATABLE_set(Ctx& ctx, HandleBase* self, const OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint); -} - -static void -callback_SQL_DESC_UPDATABLE_default(Ctx& ctx, HandleBase* self, OdbcData& data) -{ - HandleDesc* pDesc = static_cast(self); - ctx_assert(pDesc != 0); - data.setValue(); -} - -DescSpec HandleDesc::m_descSpec[] = { - { Desc_pos_header, - SQL_DESC_ALLOC_TYPE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readonly, - Desc_mode_readonly, - Desc_mode_readonly, - Desc_mode_readonly, - }, - callback_SQL_DESC_ALLOC_TYPE_set, - callback_SQL_DESC_ALLOC_TYPE_default, - }, - { Desc_pos_header, - SQL_DESC_ARRAY_SIZE, - OdbcData::Uinteger, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_readwrite - }, - callback_SQL_DESC_ARRAY_SIZE_set, - callback_SQL_DESC_ARRAY_SIZE_default, - }, - { Desc_pos_header, - SQL_DESC_ARRAY_STATUS_PTR, - OdbcData::UsmallintPtr, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readwrite - }, - callback_SQL_DESC_ARRAY_STATUS_PTR_set, - callback_SQL_DESC_ARRAY_STATUS_PTR_default, - }, - { Desc_pos_header, - SQL_DESC_BIND_OFFSET_PTR, - OdbcData::IntegerPtr, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_readwrite - }, - callback_SQL_DESC_BIND_OFFSET_PTR_set, - callback_SQL_DESC_BIND_OFFSET_PTR_default, - }, - { Desc_pos_header, - SQL_DESC_BIND_TYPE, - OdbcData::Integer, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_readwrite - }, - callback_SQL_DESC_BIND_TYPE_set, - callback_SQL_DESC_BIND_TYPE_default, - }, - { Desc_pos_header, - SQL_DESC_COUNT, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_COUNT_set, - callback_SQL_DESC_COUNT_default, - }, - { Desc_pos_header, - SQL_DESC_ROWS_PROCESSED_PTR, - OdbcData::UintegerPtr, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_readwrite, - Desc_mode_unused - }, - callback_SQL_DESC_ROWS_PROCESSED_PTR_set, - callback_SQL_DESC_ROWS_PROCESSED_PTR_default, - }, - { Desc_pos_record, - SQL_DESC_AUTO_UNIQUE_VALUE, - OdbcData::Integer, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_AUTO_UNIQUE_VALUE_set, - callback_SQL_DESC_AUTO_UNIQUE_VALUE_default, - }, - { Desc_pos_record, - SQL_DESC_BASE_COLUMN_NAME, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_BASE_COLUMN_NAME_set, - callback_SQL_DESC_BASE_COLUMN_NAME_default, - }, - { Desc_pos_record, - SQL_DESC_BASE_TABLE_NAME, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_BASE_TABLE_NAME_set, - callback_SQL_DESC_BASE_TABLE_NAME_default, - }, - { Desc_pos_record, - SQL_DESC_CASE_SENSITIVE, - OdbcData::Integer, - { Desc_mode_undef, - Desc_mode_readonly, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_CASE_SENSITIVE_set, - callback_SQL_DESC_CASE_SENSITIVE_default, - }, - { Desc_pos_record, - SQL_DESC_CATALOG_NAME, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_CATALOG_NAME_set, - callback_SQL_DESC_CATALOG_NAME_default, - }, - { Desc_pos_record, - SQL_DESC_CONCISE_TYPE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_CONCISE_TYPE_set, - callback_SQL_DESC_CONCISE_TYPE_default, - }, - { Desc_pos_record, - SQL_DESC_DATA_PTR, - OdbcData::Pointer, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_readwrite - }, - callback_SQL_DESC_DATA_PTR_set, - callback_SQL_DESC_DATA_PTR_default, - }, - { Desc_pos_record, - SQL_DESC_DATETIME_INTERVAL_CODE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_DATETIME_INTERVAL_CODE_set, - callback_SQL_DESC_DATETIME_INTERVAL_CODE_default, - }, - { Desc_pos_record, - SQL_DESC_DATETIME_INTERVAL_PRECISION, - OdbcData::Integer, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_DATETIME_INTERVAL_PRECISION_set, - callback_SQL_DESC_DATETIME_INTERVAL_PRECISION_default, - }, - { Desc_pos_record, - SQL_DESC_DISPLAY_SIZE, - OdbcData::Integer, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_DISPLAY_SIZE_set, - callback_SQL_DESC_DISPLAY_SIZE_default, - }, - { Desc_pos_record, - SQL_DESC_FIXED_PREC_SCALE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readonly, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_FIXED_PREC_SCALE_set, - callback_SQL_DESC_FIXED_PREC_SCALE_default, - }, - { Desc_pos_record, - SQL_DESC_INDICATOR_PTR, - OdbcData::IntegerPtr, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_readwrite - }, - callback_SQL_DESC_INDICATOR_PTR_set, - callback_SQL_DESC_INDICATOR_PTR_default, - }, - { Desc_pos_record, - SQL_DESC_LABEL, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_LABEL_set, - callback_SQL_DESC_LABEL_default, - }, - { Desc_pos_record, - SQL_DESC_LENGTH, - OdbcData::Uinteger, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_LENGTH_set, - callback_SQL_DESC_LENGTH_default, - }, - { Desc_pos_record, - SQL_DESC_LITERAL_PREFIX, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_LITERAL_PREFIX_set, - callback_SQL_DESC_LITERAL_PREFIX_default, - }, - { Desc_pos_record, - SQL_DESC_LITERAL_SUFFIX, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_LITERAL_SUFFIX_set, - callback_SQL_DESC_LITERAL_SUFFIX_default, - }, - { Desc_pos_record, - SQL_DESC_LOCAL_TYPE_NAME, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_readonly, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_LOCAL_TYPE_NAME_set, - callback_SQL_DESC_LOCAL_TYPE_NAME_default, - }, - { Desc_pos_record, - SQL_DESC_NAME, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_NAME_set, - callback_SQL_DESC_NAME_default, - }, - { Desc_pos_record, - SQL_DESC_NULLABLE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readonly, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_NULLABLE_set, - callback_SQL_DESC_NULLABLE_default, - }, - { Desc_pos_record, - SQL_DESC_NUM_PREC_RADIX, - OdbcData::Integer, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_NUM_PREC_RADIX_set, - callback_SQL_DESC_NUM_PREC_RADIX_default, - }, - { Desc_pos_record, - SQL_DESC_OCTET_LENGTH, - OdbcData::Integer, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_OCTET_LENGTH_set, - callback_SQL_DESC_OCTET_LENGTH_default, - }, - { Desc_pos_record, - SQL_DESC_OCTET_LENGTH_PTR, - OdbcData::IntegerPtr, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_readwrite - }, - callback_SQL_DESC_OCTET_LENGTH_PTR_set, - callback_SQL_DESC_OCTET_LENGTH_PTR_default, - }, - { Desc_pos_record, - SQL_DESC_PARAMETER_TYPE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_unused - }, - callback_SQL_DESC_PARAMETER_TYPE_set, - callback_SQL_DESC_PARAMETER_TYPE_default, - }, - { Desc_pos_record, - SQL_DESC_PRECISION, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_PRECISION_set, - callback_SQL_DESC_PRECISION_default, - }, - { Desc_pos_record, - SQL_DESC_ROWVER, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readonly, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_ROWVER_set, - callback_SQL_DESC_ROWVER_default, - }, - { Desc_pos_record, - SQL_DESC_SCALE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_SCALE_set, - callback_SQL_DESC_SCALE_default, - }, - { Desc_pos_record, - SQL_DESC_SCHEMA_NAME, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_SCHEMA_NAME_set, - callback_SQL_DESC_SCHEMA_NAME_default, - }, - { Desc_pos_record, - SQL_DESC_SEARCHABLE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_SEARCHABLE_set, - callback_SQL_DESC_SEARCHABLE_default, - }, - { Desc_pos_record, - SQL_DESC_TABLE_NAME, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_TABLE_NAME_set, - callback_SQL_DESC_TABLE_NAME_default, - }, - { Desc_pos_record, - SQL_DESC_TYPE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_readwrite, - Desc_mode_readonly, - Desc_mode_readwrite - }, - callback_SQL_DESC_TYPE_set, - callback_SQL_DESC_TYPE_default, - }, - { Desc_pos_record, - SQL_DESC_TYPE_NAME, - OdbcData::Sqlchar, - { Desc_mode_undef, - Desc_mode_readonly, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_TYPE_NAME_set, - callback_SQL_DESC_TYPE_NAME_default, - }, - { Desc_pos_record, - SQL_DESC_UNNAMED, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readwrite, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_UNNAMED_set, - callback_SQL_DESC_UNNAMED_default, - }, - { Desc_pos_record, - SQL_DESC_UNSIGNED, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_readonly, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_UNSIGNED_set, - callback_SQL_DESC_UNSIGNED_default, - }, - { Desc_pos_record, - SQL_DESC_UPDATABLE, - OdbcData::Smallint, - { Desc_mode_undef, - Desc_mode_unused, - Desc_mode_unused, - Desc_mode_readonly, - Desc_mode_unused - }, - callback_SQL_DESC_UPDATABLE_set, - callback_SQL_DESC_UPDATABLE_default, - }, - { Desc_pos_end, - 0, - OdbcData::Undef, - { Desc_mode_undef, - Desc_mode_undef, - Desc_mode_undef, - Desc_mode_undef, - Desc_mode_undef - }, - 0, - 0 - }, -}; diff --git a/ndb/src/old_files/client/odbc/handles/FuncTab.cpp b/ndb/src/old_files/client/odbc/handles/FuncTab.cpp deleted file mode 100644 index 6bd744d7a7f..00000000000 --- a/ndb/src/old_files/client/odbc/handles/FuncTab.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "HandleDbc.hpp" - -HandleDbc::FuncTab -HandleDbc::m_funcTab[] = { - { SQL_API_SQLALLOCCONNECT , 1 }, - { SQL_API_SQLALLOCENV , 1 }, - { SQL_API_SQLALLOCHANDLE , 1 }, - { SQL_API_SQLALLOCHANDLESTD , 0 }, - { SQL_API_SQLALLOCSTMT , 1 }, - { SQL_API_SQLBINDCOL , 1 }, - { SQL_API_SQLBINDPARAM , 1 }, - { SQL_API_SQLBINDPARAMETER , 1 }, - { SQL_API_SQLBROWSECONNECT , 0 }, - { SQL_API_SQLBULKOPERATIONS , 0 }, - { SQL_API_SQLCANCEL , 1 }, - { SQL_API_SQLCLOSECURSOR , 1 }, - { SQL_API_SQLCOLATTRIBUTE , 1 }, - { SQL_API_SQLCOLATTRIBUTES , 1 }, - { SQL_API_SQLCOLUMNPRIVILEGES , 0 }, - { SQL_API_SQLCOLUMNS , 1 }, - { SQL_API_SQLCONNECT , 1 }, - { SQL_API_SQLCOPYDESC , 0 }, - { SQL_API_SQLDATASOURCES , 0 }, - { SQL_API_SQLDESCRIBECOL , 1 }, - { SQL_API_SQLDESCRIBEPARAM , 0 }, - { SQL_API_SQLDISCONNECT , 1 }, - { SQL_API_SQLDRIVERCONNECT , 1 }, - { SQL_API_SQLDRIVERS , 0 }, - { SQL_API_SQLENDTRAN , 1 }, - { SQL_API_SQLERROR , 1 }, - { SQL_API_SQLEXECDIRECT , 1 }, - { SQL_API_SQLEXECUTE , 1 }, - { SQL_API_SQLEXTENDEDFETCH , 0 }, - { SQL_API_SQLFETCH , 1 }, - { SQL_API_SQLFETCHSCROLL , 0 }, - { SQL_API_SQLFOREIGNKEYS , 0 }, - { SQL_API_SQLFREECONNECT , 1 }, - { SQL_API_SQLFREEENV , 1 }, - { SQL_API_SQLFREEHANDLE , 1 }, - { SQL_API_SQLFREESTMT , 1 }, - { SQL_API_SQLGETCONNECTATTR , 1 }, - { SQL_API_SQLGETCONNECTOPTION , 1 }, - { SQL_API_SQLGETCURSORNAME , 1 }, - { SQL_API_SQLGETDATA , 1 }, - { SQL_API_SQLGETDESCFIELD , 1 }, - { SQL_API_SQLGETDESCREC , 1 }, - { SQL_API_SQLGETDIAGFIELD , 1 }, - { SQL_API_SQLGETDIAGREC , 1 }, - { SQL_API_SQLGETENVATTR , 1 }, - { SQL_API_SQLGETFUNCTIONS , 1 }, - { SQL_API_SQLGETINFO , 1 }, - { SQL_API_SQLGETSTMTATTR , 1 }, - { SQL_API_SQLGETSTMTOPTION , 1 }, - { SQL_API_SQLGETTYPEINFO , 1 }, - { SQL_API_SQLMORERESULTS , 1 }, - { SQL_API_SQLNATIVESQL , 0 }, - { SQL_API_SQLNUMPARAMS , 1 }, - { SQL_API_SQLNUMRESULTCOLS , 1 }, - { SQL_API_SQLPARAMDATA , 1 }, - { SQL_API_SQLPARAMOPTIONS , 0 }, - { SQL_API_SQLPREPARE , 1 }, - { SQL_API_SQLPRIMARYKEYS , 1 }, - { SQL_API_SQLPROCEDURECOLUMNS , 0 }, - { SQL_API_SQLPROCEDURES , 0 }, - { SQL_API_SQLPUTDATA , 1 }, - { SQL_API_SQLROWCOUNT , 1 }, - { SQL_API_SQLSETCONNECTATTR , 1 }, - { SQL_API_SQLSETCONNECTOPTION , 1 }, - { SQL_API_SQLSETCURSORNAME , 1 }, - { SQL_API_SQLSETDESCFIELD , 1 }, - { SQL_API_SQLSETDESCREC , 1 }, - { SQL_API_SQLSETENVATTR , 1 }, - { SQL_API_SQLSETPARAM , 1 }, - { SQL_API_SQLSETPOS , 0 }, - { SQL_API_SQLSETSCROLLOPTIONS , 0 }, - { SQL_API_SQLSETSTMTATTR , 1 }, - { SQL_API_SQLSETSTMTOPTION , 1 }, - { SQL_API_SQLSPECIALCOLUMNS , 0 }, - { SQL_API_SQLSTATISTICS , 0 }, - { SQL_API_SQLTABLEPRIVILEGES , 0 }, - { SQL_API_SQLTABLES , 1 }, - { SQL_API_SQLTRANSACT , 1 }, - { 0 , -1 } -}; diff --git a/ndb/src/old_files/client/odbc/handles/HandleBase.cpp b/ndb/src/old_files/client/odbc/handles/HandleBase.cpp deleted file mode 100644 index 27379cdc3f8..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleBase.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "HandleBase.hpp" - -HandleBase::~HandleBase() -{ - delete m_ctx; - m_ctx = 0; -} - -void -HandleBase::saveCtx(Ctx& ctx) -{ - delete m_ctx; - m_ctx = &ctx; -} - -// get diagnostics - -void -HandleBase::sqlGetDiagField(Ctx& ctx, SQLSMALLINT recNumber, SQLSMALLINT diagIdentifier, SQLPOINTER diagInfo, SQLSMALLINT bufferLength, SQLSMALLINT* stringLength) -{ - const DiagSpec& spec = DiagSpec::find(diagIdentifier); - if (spec.m_pos == Diag_pos_end) { - ctx.setCode(SQL_ERROR); - return; - } - const bool header = (spec.m_pos == Diag_pos_header); - const bool status = (spec.m_pos == Diag_pos_status); - ctx_assert(header || status); - if (! (spec.m_handles & odbcHandle())) { - ctx.setCode(SQL_ERROR); - return; - } - if (header) { - recNumber = 0; // ignored for header fields, so fix it - if (m_ctx == 0) { - if (diagIdentifier == SQL_DIAG_NUMBER) { - SQLINTEGER n = 0; - OdbcData data(n); - data.copyout(ctx, diagInfo, bufferLength, 0, stringLength); - return; - } - if (diagIdentifier == SQL_DIAG_RETURNCODE) { - SQLSMALLINT n = 0; - OdbcData data(n); - data.copyout(ctx, diagInfo, bufferLength, 0, stringLength); - return; - } - return; - } - } - if (status) { - if (recNumber <= 0) { - ctx.setCode(SQL_ERROR); - return; - } - if (m_ctx == 0) { - if ((unsigned)recNumber > 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - return; - } - if ((unsigned)recNumber > m_ctx->diagArea().numStatus()) { - ctx.setCode(SQL_NO_DATA); - return; - } - } - OdbcData data; - ctx_assert(m_ctx != 0); - m_ctx->diagArea().getRecord(ctx, recNumber, diagIdentifier, data); - if (data.type() != OdbcData::Undef) - data.copyout(ctx, diagInfo, bufferLength, 0, stringLength); -} - -void -HandleBase::sqlGetDiagRec(Ctx& ctx, SQLSMALLINT recNumber, SQLCHAR* sqlstate, SQLINTEGER* nativeError, SQLCHAR* messageText, SQLSMALLINT bufferLength, SQLSMALLINT* textLength) -{ - sqlGetDiagField(ctx, recNumber, SQL_DIAG_SQLSTATE, static_cast(sqlstate), 5 + 1, 0); - sqlGetDiagField(ctx, recNumber, SQL_DIAG_NATIVE, static_cast(nativeError), -1, 0); - sqlGetDiagField(ctx, recNumber, SQL_DIAG_MESSAGE_TEXT, static_cast(messageText), bufferLength, textLength); -} - -void -HandleBase::sqlError(Ctx& ctx, SQLCHAR* sqlstate, SQLINTEGER* nativeError, SQLCHAR* messageText, SQLSMALLINT bufferLength, SQLSMALLINT* textLength) -{ - if (m_ctx == 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - const SQLSMALLINT recNumber = m_ctx->diagArea().nextRecNumber(); - if (recNumber == 0) { - ctx.setCode(SQL_NO_DATA); - return; - } - sqlGetDiagField(ctx, recNumber, SQL_DIAG_SQLSTATE, static_cast(sqlstate), 5 + 1, 0); - sqlGetDiagField(ctx, recNumber, SQL_DIAG_NATIVE, static_cast(nativeError), -1, 0); - sqlGetDiagField(ctx, recNumber, SQL_DIAG_MESSAGE_TEXT, static_cast(messageText), bufferLength, textLength); -} - -// common code for attributes - -void -HandleBase::baseSetHandleAttr(Ctx& ctx, AttrArea& attrArea, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength) -{ - const AttrSpec& spec = attrArea.findSpec(attribute); - if (spec.m_mode == Attr_mode_undef) { // not found - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "undefined attribute id %d", (int)attribute); - return; - } - if (spec.m_mode == Attr_mode_readonly) { // read only - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "read-only attribute id %d", (int)attribute); - return; - } - OdbcData data; - data.copyin(ctx, spec.m_type, value, stringLength); - if (! ctx.ok()) - return; - attrArea.setAttr(ctx, attribute, data); -} - -void -HandleBase::baseGetHandleAttr(Ctx& ctx, AttrArea& attrArea, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength) -{ - const AttrSpec& spec = attrArea.findSpec(attribute); - if (spec.m_mode == Attr_mode_undef) { // not found - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "undefined attribute id %d", (int)attribute); - return; - } - OdbcData data; - attrArea.getAttr(ctx, attribute, data); - if (! ctx.ok()) - return; - data.copyout(ctx, value, bufferLength, stringLength); -} - -void -HandleBase::baseSetHandleOption(Ctx& ctx, AttrArea& attrArea, SQLUSMALLINT option, SQLUINTEGER value) -{ - baseSetHandleAttr(ctx, attrArea, static_cast(option), reinterpret_cast(value), 0); -} - -void -HandleBase::baseGetHandleOption(Ctx& ctx, AttrArea& attrArea, SQLUSMALLINT option, SQLPOINTER value) -{ - baseGetHandleAttr(ctx, attrArea, static_cast(option), value, SQL_NTS, 0); -} diff --git a/ndb/src/old_files/client/odbc/handles/HandleBase.hpp b/ndb/src/old_files/client/odbc/handles/HandleBase.hpp deleted file mode 100644 index fc35c2b559b..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleBase.hpp +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_HANDLES_HandleBase_hpp -#define ODBC_HANDLES_HandleBase_hpp - -#include -#include -#include -#include - -/** - * @class HandleBase - * @brief Base class for handles - * - * Following types of handles exist: - * - HandleRoot : root node - * - HandleEnv : environment handle (SQLHENV) - * - HandleDbc : connection handle (SQLHDBC) - * - HandleStmt : statement handle (SQLHSTMT) - * - HandleDesc : descriptor handle (SQLHDESC) - */ -class HandleRoot; -class HandleBase { -public: - HandleBase(); - virtual ~HandleBase() = 0; - virtual HandleBase* getParent() = 0; - virtual HandleRoot* getRoot() = 0; - virtual OdbcHandle odbcHandle() = 0; - void saveCtx(Ctx& ctx); - // allocate and free handles - virtual void sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild) = 0; - virtual void sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* pChild) = 0; - // get diagnostics - void sqlGetDiagField(Ctx& ctx, SQLSMALLINT recNumber, SQLSMALLINT diagIdentifier, SQLPOINTER diagInfo, SQLSMALLINT bufferLength, SQLSMALLINT* stringLength); - void sqlGetDiagRec(Ctx& ctx, SQLSMALLINT recNumber, SQLCHAR* sqlstate, SQLINTEGER* nativeError, SQLCHAR* messageText, SQLSMALLINT bufferLength, SQLSMALLINT* textLength); - void sqlError(Ctx& ctx, SQLCHAR* sqlstate, SQLINTEGER* nativeError, SQLCHAR* messageText, SQLSMALLINT bufferLength, SQLSMALLINT* textLength); // odbc2.0 - // common code for attributes - void baseSetHandleAttr(Ctx& ctx, AttrArea& attrArea, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength); - void baseGetHandleAttr(Ctx& ctx, AttrArea& attrArea, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength); - void baseSetHandleOption(Ctx& ctx, AttrArea& attrArea, SQLUSMALLINT option, SQLUINTEGER value); // odbc2.0 - void baseGetHandleOption(Ctx& ctx, AttrArea& attrArea, SQLUSMALLINT option, SQLPOINTER value); // odbc2.0 -protected: - Ctx* m_ctx; // saved from last ODBC function -}; - -inline -HandleBase::HandleBase() : - m_ctx(0) -{ -} - -#endif diff --git a/ndb/src/old_files/client/odbc/handles/HandleDbc.cpp b/ndb/src/old_files/client/odbc/handles/HandleDbc.cpp deleted file mode 100644 index 2d5ded2cc21..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleDbc.cpp +++ /dev/null @@ -1,419 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include -#include -#include "HandleRoot.hpp" -#include "HandleEnv.hpp" -#include "HandleDbc.hpp" -#include "HandleStmt.hpp" -#include "HandleDesc.hpp" -#include "PoolNdb.hpp" - -#ifndef INT_MAX -#define INT_MAX 2147483647 -#endif - -HandleDbc::HandleDbc(HandleEnv* pEnv) : - m_env(pEnv), - m_attrArea(m_attrSpec) -{ - m_attrArea.setHandle(this); -} - -HandleDbc::~HandleDbc() -{ -} - -void -HandleDbc::ctor(Ctx& ctx) -{ -} - -void -HandleDbc::dtor(Ctx& ctx) -{ - if (m_state == Connected) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "cannot delete connection handle - connection is open"); - return; - } - if (m_state == Transacting) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "cannot delete connection handle - transaction is active"); - return; - } -} - -// allocate and free handles - -void -HandleDbc::sqlAllocStmt(Ctx& ctx, HandleStmt** ppStmt) -{ - if (ppStmt == 0) { - ctx.pushStatus(Sqlstate::_HY009, Error::Gen, "cannot allocate statement handle - null return address"); - return; - } - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_08003, Error::Gen, "cannot allocate statement handle - not connected to database"); - return; - } - HandleStmt* pStmt = new HandleStmt(this); - pStmt->ctor(ctx); - if (! ctx.ok()) { - pStmt->dtor(ctx); - delete pStmt; - return; - } - m_listStmt.push_back(pStmt); - getRoot()->record(SQL_HANDLE_STMT, pStmt, true); - *ppStmt = pStmt; -} - -void -HandleDbc::sqlAllocDesc(Ctx& ctx, HandleDesc** ppDesc) -{ - if (ppDesc == 0) { - ctx.pushStatus(Sqlstate::_HY009, Error::Gen, "cannot allocate descriptor handle - null return address"); - return; - } - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_08003, Error::Gen, "cannot allocate descriptor handle - not connected to database"); - return; - } - HandleDesc* pDesc = new HandleDesc(this); - pDesc->ctor(ctx); - if (! ctx.ok()) { - pDesc->dtor(ctx); - delete pDesc; - return; - } - m_listDesc.push_back(pDesc); - getRoot()->record(SQL_HANDLE_DESC, pDesc, true); - *ppDesc = pDesc; -} - -void -HandleDbc::sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild) -{ - switch (childType) { - case SQL_HANDLE_STMT: - sqlAllocStmt(ctx, (HandleStmt**)ppChild); - return; - case SQL_HANDLE_DESC: - sqlAllocDesc(ctx, (HandleDesc**)ppChild); - return; - } - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "invalid child handle type %d", (int)childType); -} - -void -HandleDbc::sqlFreeStmt(Ctx& ctx, HandleStmt* pStmt, SQLUSMALLINT iOption) -{ - switch (iOption) { - case SQL_CLOSE: - // no error if not open - if (pStmt->getState() == HandleStmt::Open) - pStmt->sqlCloseCursor(ctx); - return; - case SQL_DROP: - pStmt->dtor(ctx); - if (! ctx.ok()) - return; - m_listStmt.remove(pStmt); - getRoot()->record(SQL_HANDLE_STMT, pStmt, false); - delete pStmt; - return; - case SQL_UNBIND: { - DescArea& ard = pStmt->getHandleDesc(ctx, Desc_usage_ARD)->descArea(); - ard.setCount(ctx, 0); - return; - } - case SQL_RESET_PARAMS: { - DescArea& apd = pStmt->getHandleDesc(ctx, Desc_usage_APD)->descArea(); - apd.setCount(ctx, 0); - // SQLFreeStmt doc misses this part - DescArea& ipd = pStmt->getHandleDesc(ctx, Desc_usage_IPD)->descArea(); - ipd.setCount(ctx, 0); - return; - } - } - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "invalid free statement option %u", (unsigned)iOption); -} - -void -HandleDbc::sqlFreeDesc(Ctx& ctx, HandleDesc* pDesc) -{ - pDesc->dtor(ctx); - if (! ctx.ok()) - return; - m_listDesc.remove(pDesc); - getRoot()->record(SQL_HANDLE_DESC, pDesc, false); - delete pDesc; -} - -void -HandleDbc::sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* pChild) -{ - switch (childType) { - case SQL_HANDLE_STMT: - sqlFreeStmt(ctx, (HandleStmt*)pChild, SQL_DROP); - return; - case SQL_HANDLE_DESC: - sqlFreeDesc(ctx, (HandleDesc*)pChild); - return; - } - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "invalid child handle type %d", (int)childType); -} - -// attributes and info functions - -static bool -ignore_attr(Ctx& ctx, SQLINTEGER attribute) -{ - switch (attribute) { - case 1246: - ctx_log2(("ignore unknown ADO.NET connect attribute %d", (int)attribute)); - return true; - } - return false; -} - -void -HandleDbc::sqlSetConnectAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength) -{ - if (ignore_attr(ctx, attribute)) - return; - baseSetHandleAttr(ctx, m_attrArea, attribute, value, stringLength); -} - -void -HandleDbc::sqlGetConnectAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength) -{ - if (ignore_attr(ctx, attribute)) - return; - baseGetHandleAttr(ctx, m_attrArea, attribute, value, bufferLength, stringLength); -} - -void -HandleDbc::sqlSetConnectOption(Ctx& ctx, SQLUSMALLINT option, SQLUINTEGER value) -{ - if (ignore_attr(ctx, option)) - return; - baseSetHandleOption(ctx, m_attrArea, option, value); -} - -void -HandleDbc::sqlGetConnectOption(Ctx& ctx, SQLUSMALLINT option, SQLPOINTER value) -{ - if (ignore_attr(ctx, option)) - return; - baseGetHandleOption(ctx, m_attrArea, option, value); -} - -void -HandleDbc::sqlGetFunctions(Ctx& ctx, SQLUSMALLINT functionId, SQLUSMALLINT* supported) -{ - if (functionId == SQL_API_ALL_FUNCTIONS) { - for (int i = 0; i < 100; i++) - supported[i] = SQL_FALSE; - FuncTab* f; - for (f = m_funcTab; f->m_supported != -1; f++) { - SQLUSMALLINT id = f->m_functionId; - if (id < 100 && f->m_supported) - supported[id] = SQL_TRUE; - } - } else if (functionId == SQL_API_ODBC3_ALL_FUNCTIONS) { - for (int i = 0; i < SQL_API_ODBC3_ALL_FUNCTIONS_SIZE; i++) - supported[i] = 0; - FuncTab* f; - for (f = m_funcTab; f->m_supported != -1; f++) { - SQLUSMALLINT id = f->m_functionId; - ctx_assert((id >> 4) < SQL_API_ODBC3_ALL_FUNCTIONS_SIZE); - if (f->m_supported) - supported[id >> 4] |= (1 << (id & 0xf)); - } - } else { - FuncTab* f; - for (f = m_funcTab; f->m_supported != -1; f++) { - if (f->m_functionId == functionId) - break; - } - if (f->m_supported != -1) - supported[0] = f->m_supported ? SQL_TRUE : SQL_FALSE; - else - ctx.pushStatus(Sqlstate::_HY095, Error::Gen, "invalid function id %u", (unsigned)functionId); - } -} - -void -HandleDbc::sqlGetInfo(Ctx& ctx, SQLUSMALLINT infoType, SQLPOINTER infoValue, SQLSMALLINT bufferLength, SQLSMALLINT* stringLength) -{ - InfoTab* f; - for (f = m_infoTab; f->m_format != InfoTab::End; f++) { - if (f->m_id == infoType) - break; - } - if (f->m_format == InfoTab::End) { - ctx.pushStatus(Sqlstate::_HY096, Error::Gen, "invalid info type %u", (unsigned)infoType); - return; - } - if (f->m_format == InfoTab::Char || f->m_format == InfoTab::YesNo) { - ctx_log3(("SQLGetInfo: type=%u value='%s'", (unsigned)infoType, f->m_str)); - OdbcData data(f->m_str); - data.copyout(ctx, infoValue, bufferLength, 0, stringLength); - return; - } - if (f->m_format == InfoTab::Short) { - ctx_log3(("SQLGetInfo: type=%u value=%d", (unsigned)infoType, (int)f->m_int)); - OdbcData data((SQLUSMALLINT)f->m_int); - data.copyout(ctx, infoValue, 0, 0); - return; - } - if (f->m_format == InfoTab::Long || f->m_format == InfoTab::Bitmask) { - ctx_log3(("SQLGetInfo: type=%u value=0x%x", (unsigned)infoType, (int)f->m_int)); - OdbcData data((SQLUINTEGER)f->m_int); - data.copyout(ctx, infoValue, 0, 0); - return; - } - ctx_assert(false); -} - -int -HandleDbc::getOdbcVersion(Ctx& ctx) -{ - return m_env->getOdbcVersion(ctx); -} - -// connect and transactions - -void -HandleDbc::sqlConnect(Ctx& ctx, SQLCHAR* serverName, SQLSMALLINT nameLength1, SQLCHAR* userName, SQLSMALLINT nameLength2, SQLCHAR* authentication, SQLSMALLINT nameLength3) -{ - if (m_state != Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "already connected"); - return; - } - OdbcData data; - m_attrArea.getAttr(ctx, SQL_ATTR_CONNECTION_TIMEOUT, data); - int timeout = data.uinteger(); - if (timeout <= 0) - timeout = INT_MAX; - PoolNdb* poolNdb = getRoot()->getPoolNdb(); - Ndb* pNdb = poolNdb->allocate(ctx, timeout); - if (pNdb == 0) { - return; - } - m_ndbObject = pNdb; - m_state = Connected; - m_autocommit = true; -} - -void -HandleDbc::sqlDriverConnect(Ctx& ctx, SQLHWND hwnd, SQLCHAR* szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR* szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT* pcbConnStrOut, SQLUSMALLINT fDriverCompletion) -{ - ctx_log2(("driver connect %.*s", cbConnStrIn, szConnStrIn == 0 ? "" : (char*)szConnStrIn)); - sqlConnect(ctx, (SQLCHAR*)"", 0, (SQLCHAR*)"", 0, (SQLCHAR*)"", 0); - if (! ctx.ok()) - return; - OdbcData data("DNS=DEFAULT"); - if (szConnStrOut != 0) // ADO NET - data.copyout(ctx, static_cast(szConnStrOut), cbConnStrOutMax, 0, pcbConnStrOut); -} - -void -HandleDbc::sqlDisconnect(Ctx& ctx) -{ - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "already disconnected"); - return; - } - // XXX missing check for uncommited changes - ListStmt::iterator i = m_listStmt.begin(); - while (i != m_listStmt.end()) { - HandleStmt* pStmt = *i; - ListStmt::iterator j = i++; - pStmt->dtor(ctx); - getRoot()->record(SQL_HANDLE_STMT, pStmt, false); - delete pStmt; - m_listStmt.erase(j); - } - PoolNdb* poolNdb = getRoot()->getPoolNdb(); - poolNdb->release(ctx, m_ndbObject); - m_ndbObject = 0; - m_state = Free; - m_autocommit = true; -} - -void -HandleDbc::sqlEndTran(Ctx& ctx, SQLSMALLINT completionType) -{ - if (completionType != SQL_COMMIT && completionType != SQL_ROLLBACK) { - ctx.pushStatus(Sqlstate::_HY012, Error::Gen, "invalid completion type %d", (int)completionType); - return; - } - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_08003, Error::Gen, "not connected"); - return; - } - Ndb* ndb = m_ndbObject; - ctx_assert(ndb != 0); - if (m_state == Connected) { - ctx_log2(("sqlEndTran: no transaction active")); - return; - } - NdbConnection* tcon = m_ndbConnection; - ctx_assert(tcon != 0); - if (completionType == SQL_COMMIT) { - if (tcon->execute(Commit) == -1) { - if (tcon->getNdbError().code != 626) - ctx.pushStatus(ndb, tcon, 0, "execute commit"); - else - ctx_log1(("ignore no data (626) at execute commit")); - } else { - ctx_log2(("sqlEndTran: transaction commit done")); - m_uncommitted = false; - } - } else { - if (tcon->execute(Rollback) == -1) { - if (tcon->getNdbError().code != 626) - ctx.pushStatus(ndb, tcon, 0, "execute rollback"); - else - ctx_log1(("ignore no data (626) at execute rollback")); - } else { - ctx_log2(("sqlEndTran: transaction rollback done")); - m_uncommitted = false; - } - } - for (ListStmt::iterator i = m_listStmt.begin(); i != m_listStmt.end(); i++) { - HandleStmt* pStmt = *i; - if (pStmt->getState() == HandleStmt::Open) { - pStmt->sqlCloseCursor(ctx); // SQL_CB_CLOSE behaviour - } - pStmt->useConnection(ctx, false); - } - if (! m_autocommit) { - useConnection(ctx, false); - useConnection(ctx, true); - } -} - -void -HandleDbc::sqlTransact(Ctx& ctx, SQLUSMALLINT completionType) -{ - sqlEndTran(ctx, completionType); -} diff --git a/ndb/src/old_files/client/odbc/handles/HandleDbc.hpp b/ndb/src/old_files/client/odbc/handles/HandleDbc.hpp deleted file mode 100644 index 130df08d02c..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleDbc.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_HANDLES_HandleDbc_hpp -#define ODBC_HANDLES_HandleDbc_hpp - -#include -#include -#include -#include "HandleBase.hpp" - -class HandleRoot; -class HandleEnv; -class HandleStmt; -class HandleDesc; - -/** - * @class HandleDbc - * @brief Connection handle (SQLHDBC). - */ -class HandleDbc : public HandleBase, public ConnArea { -public: - HandleDbc(HandleEnv* pEnv); - ~HandleDbc(); - void ctor(Ctx& ctx); - void dtor(Ctx& ctx); - HandleEnv* getEnv(); - HandleBase* getParent(); - HandleRoot* getRoot(); - OdbcHandle odbcHandle(); - // allocate and free handles - void sqlAllocStmt(Ctx& ctx, HandleStmt** ppStmt); - void sqlAllocDesc(Ctx& ctx, HandleDesc** ppDesc); - void sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild); - void sqlFreeStmt(Ctx& ctx, HandleStmt* pStmt, SQLUSMALLINT iOption); - void sqlFreeDesc(Ctx& ctx, HandleDesc* pDesc); - void sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* pChild); - // attributes and info functions - void sqlSetConnectAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength); - void sqlGetConnectAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength); - void sqlSetConnectOption(Ctx& ctx, SQLUSMALLINT option, SQLUINTEGER value); // odbc2.0 - void sqlGetConnectOption(Ctx& ctx, SQLUSMALLINT option, SQLPOINTER value); // odbc2.0 - void sqlGetFunctions(Ctx& ctx, SQLUSMALLINT functionId, SQLUSMALLINT* supported); - void sqlGetInfo(Ctx& ctx, SQLUSMALLINT infoType, SQLPOINTER infoValue, SQLSMALLINT bufferLength, SQLSMALLINT* stringLength); - int getOdbcVersion(Ctx& ctx); - // connect and transactions - void sqlConnect(Ctx& ctx, SQLCHAR* serverName, SQLSMALLINT nameLength1, SQLCHAR* userName, SQLSMALLINT nameLength2, SQLCHAR* authentication, SQLSMALLINT nameLength3); - void sqlDriverConnect(Ctx& ctx, SQLHWND hwnd, SQLCHAR* szConnStrIn, SQLSMALLINT cbConnStrIn, SQLCHAR* szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT* pcbConnStrOut, SQLUSMALLINT fDriverCompletion); - void sqlDisconnect(Ctx& ctx); - void sqlEndTran(Ctx& ctx, SQLSMALLINT completionType); - void sqlTransact(Ctx& ctx, SQLUSMALLINT completionType); // odbc2.0 -private: - HandleEnv* const m_env; - typedef std::list ListStmt; - ListStmt m_listStmt; - typedef std::list ListDesc; - ListDesc m_listDesc; - static AttrSpec m_attrSpec[]; - AttrArea m_attrArea; - struct FuncTab { - SQLUSMALLINT m_functionId; - int m_supported; - }; - static FuncTab m_funcTab[]; - struct InfoTab { - SQLUSMALLINT m_id; - enum { Char, YesNo, Short, Long, Bitmask, End } m_format; - SQLUINTEGER m_int; - const char* m_str; - }; - static InfoTab m_infoTab[]; -}; - -inline HandleEnv* -HandleDbc::getEnv() -{ - return m_env; -} - -inline HandleBase* -HandleDbc::getParent() -{ - return (HandleBase*)getEnv(); -} - -inline HandleRoot* -HandleDbc::getRoot() -{ - return getParent()->getRoot(); -} - -inline OdbcHandle -HandleDbc::odbcHandle() -{ - return Odbc_handle_dbc; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/handles/HandleDesc.cpp b/ndb/src/old_files/client/odbc/handles/HandleDesc.cpp deleted file mode 100644 index 4cff1bb8892..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleDesc.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "HandleRoot.hpp" -#include "HandleDbc.hpp" -#include "HandleDesc.hpp" - -HandleDesc::HandleDesc(HandleDbc* pDbc) : - m_dbc(pDbc), - m_descArea(this, m_descSpec) -{ -} - -HandleDesc::~HandleDesc() -{ -} - -void -HandleDesc::ctor(Ctx& ctx) -{ -} - -void -HandleDesc::dtor(Ctx& ctx) -{ -} - -// allocate and free handles (no valid case) - -void -HandleDesc::sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild) -{ - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "inappropriate handle type"); -} - -void -HandleDesc::sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* ppChild) -{ - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "inappropriate handle type"); -} - -// set and get descriptor values - -void -HandleDesc::sqlSetDescField(Ctx& ctx, SQLSMALLINT recNumber, SQLSMALLINT fieldIdentifier, SQLPOINTER value, SQLINTEGER bufferLength) -{ - const DescSpec& spec = m_descArea.findSpec(fieldIdentifier); - if (spec.m_pos == Desc_pos_end) { - ctx.pushStatus(Sqlstate::_HY091, Error::Gen, "invalid descriptor id %d", (int)fieldIdentifier); - return; - } - OdbcData data; - data.copyin(ctx, spec.m_type, value, bufferLength); - if (! ctx.ok()) - return; - const bool header = (spec.m_pos == Desc_pos_header); - const bool record = (spec.m_pos == Desc_pos_record); - ctx_assert(header || record); - DescArea& area = m_descArea; - if (header) { - area.getHeader().setField(ctx, fieldIdentifier, data); - } - if (record) { - if (recNumber < 0) { - ctx.pushStatus(Sqlstate::_07009, Error::Gen, "invalid record number %d", (int)recNumber); - return; - } - if (recNumber == 0) { // bookmark record - if (area.getUsage() == Desc_usage_IPD) { - ctx.pushStatus(Sqlstate::_07009, Error::Gen, "cannot set bookmark IPD"); - return; - } - if (area.getUsage() == Desc_usage_APD) { - ctx.pushStatus(Sqlstate::_07009, Error::Gen, "cannot set bookmark APD"); - return; - } - } - area.getRecord(recNumber).setField(ctx, fieldIdentifier, data); - } -} - -void -HandleDesc::sqlGetDescField(Ctx& ctx, SQLSMALLINT recNumber, SQLSMALLINT fieldIdentifier, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength, SQLSMALLINT* stringLength2) -{ - const DescSpec& spec = m_descArea.findSpec(fieldIdentifier); - if (spec.m_pos == Desc_pos_end) { - ctx.pushStatus(Sqlstate::_HY091, Error::Gen, "invalid descriptor id %d", (int)fieldIdentifier); - return; - } - const bool header = (spec.m_pos == Desc_pos_header); - const bool record = (spec.m_pos == Desc_pos_record); - ctx_assert(header || record); - DescArea& area = m_descArea; - OdbcData data; - if (header) { - area.getHeader().getField(ctx, fieldIdentifier, data); - if (! ctx.ok()) - return; - } - if (record) { - if (recNumber < 0) { - ctx.pushStatus(Sqlstate::_07009, Error::Gen, "invalid record number %d", (int)recNumber); - return; - } - if (recNumber == 0) { // bookmark record - if (area.getUsage() == Desc_usage_IPD) { - ctx.pushStatus(Sqlstate::_07009, Error::Gen, "cannot get bookmark IPD"); - return; - } - if (area.getUsage() == Desc_usage_IRD) { - // XXX check SQL_ATTR_USE_BOOKMARK != SQL_UB_OFF - } - } - if ((unsigned)recNumber > area.getCount()) { - ctx.setCode(SQL_NO_DATA); - return; - } - area.getRecord(recNumber).getField(ctx, fieldIdentifier, data); - if (! ctx.ok()) - return; - } - // if no data, return success and undefined value - if (data.type() == OdbcData::Undef) - return; - data.copyout(ctx, value, bufferLength, stringLength, stringLength2); -} - -void -HandleDesc::sqlColAttribute(Ctx& ctx, SQLUSMALLINT columnNumber, SQLUSMALLINT fieldIdentifier, SQLPOINTER characterAttribute, SQLSMALLINT bufferLength, SQLSMALLINT* stringLength, SQLPOINTER numericAttribute) -{ - ctx_log3(("sqlColAttribute col=%d id=%d", columnNumber, fieldIdentifier)); - if (fieldIdentifier == SQL_COLUMN_LENGTH) { // XXX iODBC workaround - fieldIdentifier = SQL_DESC_LENGTH; - } - if (fieldIdentifier == 1205 || fieldIdentifier == 1206) { - ctx_log2(("ignore unknown OSQL fieldIdentifier %d", (int)fieldIdentifier)); - if (characterAttribute != 0) - *(char*)characterAttribute = 0; - if (stringLength != 0) - *stringLength = 0; - return; - } - const DescSpec& spec = m_descArea.findSpec(fieldIdentifier); - if (spec.m_pos == Desc_pos_end) { - ctx.pushStatus(Sqlstate::_HY091, Error::Gen, "invalid descriptor id %d", (int)fieldIdentifier); - return; - } - if (spec.m_type == OdbcData::Sqlchar || spec.m_type == OdbcData::Sqlstate) - sqlGetDescField(ctx, columnNumber, fieldIdentifier, characterAttribute, bufferLength, 0, stringLength); - else { - sqlGetDescField(ctx, columnNumber, fieldIdentifier, numericAttribute, -1, 0); - } - if (ctx.getCode() == SQL_NO_DATA) { - ctx.setCode(SQL_SUCCESS); - ctx.pushStatus(Sqlstate::_07009, Error::Gen, "invalid column number %d", (int)columnNumber); - } -} - -void -HandleDesc::sqlColAttributes(Ctx& ctx, SQLUSMALLINT icol, SQLUSMALLINT fdescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT* pcbDesc, SQLINTEGER* pfDesc) -{ - ctx_log3(("sqlColAttributes col=%hu id=%hu", icol, fdescType)); - SQLUSMALLINT columnNumber = icol; - SQLUSMALLINT fieldIdentifier; - // XXX incomplete - if (fdescType == SQL_COLUMN_TYPE) { - fieldIdentifier = SQL_DESC_TYPE; - } else if (fdescType == SQL_COLUMN_PRECISION) { - SQLSMALLINT type; - sqlGetDescField(ctx, columnNumber, SQL_DESC_TYPE, static_cast(&type), -1, 0); - if (! ctx.ok()) - return; - switch (type) { - case SQL_CHAR: - case SQL_VARCHAR: - case SQL_BINARY: - case SQL_VARBINARY: - case SQL_LONGVARCHAR: - case SQL_LONGVARBINARY: - case SQL_DATE: - fieldIdentifier = SQL_DESC_LENGTH; - break; - default: - fieldIdentifier = SQL_DESC_PRECISION; - break; - } - } else if (fdescType == SQL_COLUMN_SCALE) { - SQLSMALLINT type; - sqlGetDescField(ctx, columnNumber, SQL_DESC_TYPE, static_cast(&type), -1, 0); - if (! ctx.ok()) - return; - switch (type) { - default: - fieldIdentifier = SQL_DESC_SCALE; - break; - } - } else if (fdescType == SQL_COLUMN_LENGTH) { - SQLSMALLINT type; - sqlGetDescField(ctx, columnNumber, SQL_DESC_TYPE, static_cast(&type), -1, 0); - if (! ctx.ok()) - return; - switch (type) { - default: - fieldIdentifier = SQL_DESC_LENGTH; - break; - } - } else { - fieldIdentifier = fdescType; - } - sqlColAttribute(ctx, columnNumber, fieldIdentifier, rgbDesc, cbDescMax, pcbDesc, pfDesc); -} - -// set and get several common descriptor values - -void -HandleDesc::sqlSetDescRec(Ctx& ctx, SQLSMALLINT recNumber, SQLSMALLINT type, SQLSMALLINT subType, SQLINTEGER length, SQLSMALLINT precision, SQLSMALLINT scale, SQLPOINTER data, SQLINTEGER* stringLength, SQLINTEGER* indicator) -{ - sqlSetDescField(ctx, recNumber, SQL_DESC_TYPE, reinterpret_cast(type), -1); - sqlSetDescField(ctx, recNumber, SQL_DESC_DATETIME_INTERVAL_CODE, reinterpret_cast(subType), -1); - sqlSetDescField(ctx, recNumber, SQL_DESC_OCTET_LENGTH, reinterpret_cast(length), -1); - sqlSetDescField(ctx, recNumber, SQL_DESC_PRECISION, reinterpret_cast(precision), -1); - sqlSetDescField(ctx, recNumber, SQL_DESC_SCALE, reinterpret_cast(scale), -1); - sqlSetDescField(ctx, recNumber, SQL_DESC_DATA_PTR, data, -1); - sqlSetDescField(ctx, recNumber, SQL_DESC_OCTET_LENGTH_PTR, reinterpret_cast(stringLength), -1); - sqlSetDescField(ctx, recNumber, SQL_DESC_INDICATOR_PTR, reinterpret_cast(indicator), -1); -} - -void -HandleDesc::sqlGetDescRec(Ctx& ctx, SQLSMALLINT recNumber, SQLCHAR* name, SQLSMALLINT bufferLength, SQLSMALLINT* stringLength, SQLSMALLINT* type, SQLSMALLINT* subType, SQLINTEGER* length, SQLSMALLINT* precision, SQLSMALLINT* scale, SQLSMALLINT* nullable) -{ - sqlGetDescField(ctx, recNumber, SQL_DESC_NAME, reinterpret_cast(name), bufferLength, 0, stringLength); - sqlGetDescField(ctx, recNumber, SQL_DESC_TYPE, reinterpret_cast(type), -1, 0); - sqlGetDescField(ctx, recNumber, SQL_DESC_DATETIME_INTERVAL_CODE, reinterpret_cast(subType), -1, 0); - sqlGetDescField(ctx, recNumber, SQL_DESC_OCTET_LENGTH, reinterpret_cast(length), -1, 0); - sqlGetDescField(ctx, recNumber, SQL_DESC_PRECISION, reinterpret_cast(precision), -1, 0); - sqlGetDescField(ctx, recNumber, SQL_DESC_SCALE, reinterpret_cast(scale), -1, 0); - sqlGetDescField(ctx, recNumber, SQL_DESC_NULLABLE, reinterpret_cast(nullable), -1, 0); -} diff --git a/ndb/src/old_files/client/odbc/handles/HandleDesc.hpp b/ndb/src/old_files/client/odbc/handles/HandleDesc.hpp deleted file mode 100644 index 9419697f134..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleDesc.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_HANDLES_HandleDesc_hpp -#define ODBC_HANDLES_HandleDesc_hpp - -#include -#include -#include "HandleBase.hpp" - -class HandleRoot; -class HandleDbc; - -/** - * @class HandleDesc - * @brief Descriptor handle (SQLHDESC). - */ -class HandleDesc : public HandleBase { -public: - HandleDesc(HandleDbc* pDbc); - ~HandleDesc(); - void ctor(Ctx& ctx); - void dtor(Ctx& ctx); - HandleDbc* getDbc(); - HandleBase* getParent(); - HandleRoot* getRoot(); - OdbcHandle odbcHandle(); - DescArea& descArea(); - // allocate and free handles (no valid case) - void sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild); - void sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* pChild); - // set and get descriptor values (internal use) - void sqlSetDescField(Ctx& ctx, SQLSMALLINT recNumber, SQLSMALLINT fieldIdentifier, SQLPOINTER value, SQLINTEGER bufferLength); - void sqlGetDescField(Ctx& ctx, SQLSMALLINT recNumber, SQLSMALLINT fieldIdentifier, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength, SQLSMALLINT* stringLength2 = 0); - void sqlColAttribute(Ctx& ctx, SQLUSMALLINT columnNumber, SQLUSMALLINT fieldIdentifier, SQLPOINTER characterAttribute, SQLSMALLINT bufferLength, SQLSMALLINT* stringLength, SQLPOINTER numericAttribute); - void sqlColAttributes(Ctx& ctx, SQLUSMALLINT icol, SQLUSMALLINT fdescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT* pcbDesc, SQLINTEGER* pfDesc); - // set and get several common descriptor values - void sqlSetDescRec(Ctx& ctx, SQLSMALLINT recNumber, SQLSMALLINT Type, SQLSMALLINT SubType, SQLINTEGER Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLINTEGER* StringLength, SQLINTEGER* Indicator); - void sqlGetDescRec(Ctx& ctx, SQLSMALLINT recNumber, SQLCHAR* Name, SQLSMALLINT BufferLength, SQLSMALLINT* StringLength, SQLSMALLINT* Type, SQLSMALLINT* SubType, SQLINTEGER* Length, SQLSMALLINT* Precision, SQLSMALLINT* Scale, SQLSMALLINT* Nullable); -private: - HandleDbc* const m_dbc; - static DescSpec m_descSpec[]; - DescArea m_descArea; -}; - -inline HandleDbc* -HandleDesc::getDbc() -{ - return m_dbc; -} - -inline HandleBase* -HandleDesc::getParent() -{ - return (HandleDbc*)getDbc(); -} - -inline HandleRoot* -HandleDesc::getRoot() -{ - return getParent()->getRoot(); -} - -inline OdbcHandle -HandleDesc::odbcHandle() -{ - return Odbc_handle_desc; -} - -inline DescArea& -HandleDesc::descArea() -{ - return m_descArea; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/handles/HandleEnv.cpp b/ndb/src/old_files/client/odbc/handles/HandleEnv.cpp deleted file mode 100644 index bc9d8b420a6..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleEnv.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "HandleRoot.hpp" -#include "HandleEnv.hpp" -#include "HandleDbc.hpp" - -HandleEnv::HandleEnv(HandleRoot* pRoot) : - m_root(pRoot), - m_attrArea(m_attrSpec) -{ - m_attrArea.setHandle(this); -} - -HandleEnv::~HandleEnv() { -} - -void -HandleEnv::ctor(Ctx& ctx) -{ -} - -void -HandleEnv::dtor(Ctx& ctx) -{ - if (! m_listDbc.empty()) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "cannot delete environment handle - has %u associated connection handles", (unsigned)m_listDbc.size()); - return; - } -} - -// allocate and free handles - -void -HandleEnv::sqlAllocConnect(Ctx& ctx, HandleDbc** ppDbc) -{ - if (getOdbcVersion(ctx) == -1) - return; - if (ppDbc == 0) { - ctx.pushStatus(Sqlstate::_HY009, Error::Gen, "cannot allocate connection handle - null return address"); - return; - } - HandleDbc* pDbc = new HandleDbc(this); - pDbc->ctor(ctx); - if (! ctx.ok()) { - pDbc->dtor(ctx); - delete pDbc; - return; - } - m_listDbc.push_back(pDbc); - getRoot()->record(SQL_HANDLE_DBC, pDbc, true); - *ppDbc = pDbc; -} - -void -HandleEnv::sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild) -{ - if (getOdbcVersion(ctx) == -1) - return; - switch (childType) { - case SQL_HANDLE_DBC: - sqlAllocConnect(ctx, (HandleDbc**)ppChild); - return; - } - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "invalid child handle type %d", (int)childType); -} - -void -HandleEnv::sqlFreeConnect(Ctx& ctx, HandleDbc* pDbc) -{ - if (getOdbcVersion(ctx) == -1) - return; - pDbc->dtor(ctx); - if (! ctx.ok()) - return; - m_listDbc.remove(pDbc); - getRoot()->record(SQL_HANDLE_DBC, pDbc, false); - delete pDbc; -} - -void -HandleEnv::sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* pChild) -{ - if (getOdbcVersion(ctx) == -1) - return; - switch (childType) { - case SQL_HANDLE_DBC: - sqlFreeConnect(ctx, (HandleDbc*)pChild); - return; - } - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "invalid child handle type %d", (int)childType); -} - -// attributes - -void -HandleEnv::sqlSetEnvAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength) -{ - baseSetHandleAttr(ctx, m_attrArea, attribute, value, stringLength); -} - -void -HandleEnv::sqlGetEnvAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength) -{ - baseGetHandleAttr(ctx, m_attrArea, attribute, value, bufferLength, stringLength); -} - -int -HandleEnv::getOdbcVersion(Ctx& ctx) -{ - OdbcData data; - m_attrArea.getAttr(ctx, SQL_ATTR_ODBC_VERSION, data); - if (! ctx.ok()) - return -1; - return data.integer(); -} - -// transactions - -void -HandleEnv::sqlEndTran(Ctx& ctx, SQLSMALLINT completionType) -{ - ctx_assert(false); // XXX -} - -void -HandleEnv::sqlTransact(Ctx& ctx, SQLUSMALLINT completionType) -{ - ctx_assert(false); // XXX -} diff --git a/ndb/src/old_files/client/odbc/handles/HandleEnv.hpp b/ndb/src/old_files/client/odbc/handles/HandleEnv.hpp deleted file mode 100644 index 2b13b0256bc..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleEnv.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_HANDLES_HandleEnv_hpp -#define ODBC_HANDLES_HandleEnv_hpp - -#include -#include -#include "HandleBase.hpp" - -class HandleRoot; -class HandleDbc; - -/** - * @class HandleEnv - * @brief Environment handle (SQLHENV). - */ -class HandleEnv : public HandleBase { -public: - HandleEnv(HandleRoot* pRoot); - ~HandleEnv(); - void ctor(Ctx& ctx); - void dtor(Ctx& ctx); - HandleRoot* getRoot(); - HandleBase* getParent(); - OdbcHandle odbcHandle(); - // allocate and free handles - void sqlAllocConnect(Ctx& ctx, HandleDbc** ppDbc); - void sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild); - void sqlFreeConnect(Ctx& ctx, HandleDbc* pDbc); - void sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* pChild); - // attributes - void sqlSetEnvAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength); - void sqlGetEnvAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength); - int getOdbcVersion(Ctx& ctx); // returns -1 if not set - // transactions - void sqlEndTran(Ctx& ctx, SQLSMALLINT completionType); - void sqlTransact(Ctx& ctx, SQLUSMALLINT completionType); // odbc2.0 -private: - HandleRoot* const m_root; - std::list m_listDbc; - static AttrSpec m_attrSpec[]; - AttrArea m_attrArea; -}; - -inline HandleRoot* -HandleEnv::getRoot() -{ - return m_root; -} - -inline HandleBase* -HandleEnv::getParent() -{ - return (HandleBase*)getRoot(); -} - -inline OdbcHandle -HandleEnv::odbcHandle() -{ - return Odbc_handle_env; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/handles/HandleRoot.cpp b/ndb/src/old_files/client/odbc/handles/HandleRoot.cpp deleted file mode 100644 index 13560d55028..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleRoot.cpp +++ /dev/null @@ -1,271 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "HandleRoot.hpp" -#include "HandleEnv.hpp" -#include "HandleDbc.hpp" -#include "HandleStmt.hpp" -#include "HandleDesc.hpp" -#include "PoolNdb.hpp" - -HandleRoot::HandleRoot() : - m_attrArea(m_attrSpec) -{ - m_attrArea.setHandle(this); - m_poolNdb = new PoolNdb(); -} - -HandleRoot::~HandleRoot() -{ -} - -#ifdef NDB_WIN32 -static NdbMutex & root_mutex = * NdbMutex_Create(); -#else -static NdbMutex root_mutex = NDB_MUTEX_INITIALIZER; -#endif - -HandleRoot* -HandleRoot::instance() -{ - NdbMutex_Lock(&root_mutex); - if (m_instance == 0) - m_instance = new HandleRoot(); - NdbMutex_Unlock(&root_mutex); - return m_instance; -} - -void -HandleRoot::lockHandle() -{ - NdbMutex_Lock(&root_mutex); -} - -void -HandleRoot::unlockHandle() -{ - NdbMutex_Unlock(&root_mutex); -} - -// check and find handle types and handles - -SQLSMALLINT -HandleRoot::findParentType(SQLSMALLINT childType) -{ - switch (childType) { - case SQL_HANDLE_ENV: - return SQL_HANDLE_ROOT; - case SQL_HANDLE_DBC: - return SQL_HANDLE_ENV; - case SQL_HANDLE_STMT: - return SQL_HANDLE_DBC; - case SQL_HANDLE_DESC: - return SQL_HANDLE_DBC; - } - return -1; -} - -HandleBase* -HandleRoot::findBase(SQLSMALLINT handleType, void* pHandle) -{ - switch (handleType) { - case SQL_HANDLE_ROOT: - return getRoot(); - case SQL_HANDLE_ENV: - return findEnv(pHandle); - case SQL_HANDLE_DBC: - return findDbc(pHandle); - case SQL_HANDLE_STMT: - return findStmt(pHandle); - case SQL_HANDLE_DESC: - return findDesc(pHandle); - } - return 0; -} - -HandleEnv* -HandleRoot::findEnv(void* pHandle) -{ - lockHandle(); - ValidList::iterator i = m_validList.find(pHandle); - if (i == m_validList.end() || (*i).second != SQL_HANDLE_ENV) { - unlockHandle(); - return 0; - } - unlockHandle(); - ctx_assert(pHandle != 0); - return static_cast(pHandle); -} - -HandleDbc* -HandleRoot::findDbc(void* pHandle) -{ - lockHandle(); - ValidList::iterator i = m_validList.find(pHandle); - if (i == m_validList.end() || (*i).second != SQL_HANDLE_DBC) { - unlockHandle(); - return 0; - } - unlockHandle(); - ctx_assert(pHandle != 0); - return static_cast(pHandle); -} - -HandleStmt* -HandleRoot::findStmt(void* pHandle) -{ - lockHandle(); - ValidList::iterator i = m_validList.find(pHandle); - if (i == m_validList.end() || (*i).second != SQL_HANDLE_STMT) { - unlockHandle(); - return 0; - } - unlockHandle(); - ctx_assert(pHandle != 0); - return static_cast(pHandle); -} - -HandleDesc* -HandleRoot::findDesc(void* pHandle) -{ - lockHandle(); - ValidList::iterator i = m_validList.find(pHandle); - if (i == m_validList.end() || (*i).second != SQL_HANDLE_DESC) { - unlockHandle(); - return 0; - } - unlockHandle(); - ctx_assert(pHandle != 0); - return static_cast(pHandle); -} - -// add or remove handle from validation list - -void -HandleRoot::record(SQLSMALLINT handleType, HandleBase* pHandle, bool add) -{ - switch (handleType) { - case SQL_HANDLE_ENV: - case SQL_HANDLE_DBC: - case SQL_HANDLE_STMT: - case SQL_HANDLE_DESC: - break; - default: - ctx_assert(false); - break; - } - ctx_assert(pHandle != 0); - lockHandle(); - ValidList::iterator i = m_validList.find(pHandle); - if (add) { - if (i != m_validList.end()) { - unlockHandle(); - ctx_assert(false); - } - m_validList.insert(ValidList::value_type(pHandle, handleType)); - } else { - if (i == m_validList.end() || (*i).second != handleType) { - unlockHandle(); - ctx_assert(false); - } - m_validList.erase(i); - } - unlockHandle(); -} - -// allocate and free handles - -void -HandleRoot::sqlAllocEnv(Ctx& ctx, HandleEnv** ppEnv) -{ - if (ppEnv == 0) { - ctx.pushStatus(Sqlstate::_HY009, Error::Gen, "cannot allocate environment handle - null return address"); - return; - } - HandleEnv* pEnv = new HandleEnv(this); - pEnv->ctor(ctx); - if (! ctx.ok()) { - pEnv->dtor(ctx); - delete pEnv; - return; - } - lockHandle(); - m_listEnv.push_back(pEnv); - unlockHandle(); - getRoot()->record(SQL_HANDLE_ENV, pEnv, true); - *ppEnv = pEnv; -} - -void -HandleRoot::sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild) -{ - switch (childType) { - case SQL_HANDLE_ENV: - sqlAllocEnv(ctx, (HandleEnv**)ppChild); - return; - } - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "invalid child handle type %d", (int)childType); -} - -void -HandleRoot::sqlFreeEnv(Ctx& ctx, HandleEnv* pEnv) -{ - pEnv->dtor(ctx); - if (! ctx.ok()) { - return; - } - lockHandle(); - m_listEnv.remove(pEnv); - unlockHandle(); - getRoot()->record(SQL_HANDLE_ENV, pEnv, false); - delete pEnv; -} - -void -HandleRoot::sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* pChild) -{ - switch (childType) { - case SQL_HANDLE_ENV: - sqlFreeEnv(ctx, (HandleEnv*)pChild); - return; - } - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "invalid child handle type %d", (int)childType); -} - -// process-level attributes - -void -HandleRoot::sqlSetRootAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength) -{ - lockHandle(); - baseSetHandleAttr(ctx, m_attrArea, attribute, value, stringLength); - unlockHandle(); -} - -void -HandleRoot::sqlGetRootAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength) -{ - lockHandle(); - baseGetHandleAttr(ctx, m_attrArea, attribute, value, bufferLength, stringLength); - unlockHandle(); -} - -// the instance - -HandleRoot* HandleRoot::m_instance = 0; diff --git a/ndb/src/old_files/client/odbc/handles/HandleRoot.hpp b/ndb/src/old_files/client/odbc/handles/HandleRoot.hpp deleted file mode 100644 index 08a22b3e400..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleRoot.hpp +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_HANDLES_HandleRoot_hpp -#define ODBC_HANDLES_HandleRoot_hpp - -#include -#include -#include -#include "HandleBase.hpp" - -class HandleEnv; -class HandleDbc; -class HandleStmt; -class HandleDesc; -class PoolNdb; - -/** - * @class HandleRoot - * @brief The singleton root handle. - * - * This class is the level above HandleEnv. It has a single - * instance. The instance is the root node of dynamically - * allocated handles. The instance is also used to call methods - * not tied to any handle. - */ -class HandleRoot : public HandleBase { -protected: - HandleRoot(); - ~HandleRoot(); -public: - static HandleRoot* instance(); - HandleRoot* getRoot(); - HandleBase* getParent(); - PoolNdb* getPoolNdb(); - OdbcHandle odbcHandle(); - void lockHandle(); - void unlockHandle(); - // check and find handle types and handles - SQLSMALLINT findParentType(SQLSMALLINT childType); - HandleBase* findBase(SQLSMALLINT handleType, void* pHandle); - HandleEnv* findEnv(void* pHandle); - HandleDbc* findDbc(void* pHandle); - HandleStmt* findStmt(void* pHandle); - HandleDesc* findDesc(void* pHandle); - // add or remove handle from validation list - void record(SQLSMALLINT handleType, HandleBase* pHandle, bool add); - // allocate and free handles - void sqlAllocEnv(Ctx& ctx, HandleEnv** ppEnv); - void sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild); - void sqlFreeEnv(Ctx& ctx, HandleEnv* pEnv); - void sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* pChild); - // process-level attributes - void sqlSetRootAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength); - void sqlGetRootAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength); -private: - static HandleRoot* m_instance; // the instance - std::list m_listEnv; - PoolNdb* m_poolNdb; - typedef std::map ValidList; - ValidList m_validList; - static AttrSpec m_attrSpec[]; - AttrArea m_attrArea; -}; - -inline HandleRoot* -HandleRoot::getRoot() -{ - return this; -} - -inline HandleBase* -HandleRoot::getParent() -{ - return 0; -} - -inline PoolNdb* -HandleRoot::getPoolNdb() -{ - return m_poolNdb; -} - -inline OdbcHandle -HandleRoot::odbcHandle() -{ - return Odbc_handle_root; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/handles/HandleStmt.cpp b/ndb/src/old_files/client/odbc/handles/HandleStmt.cpp deleted file mode 100644 index d33d33dbd5b..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleStmt.cpp +++ /dev/null @@ -1,823 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "HandleRoot.hpp" -#include "HandleDbc.hpp" -#include "HandleStmt.hpp" -#include "HandleDesc.hpp" - -HandleStmt::HandleStmt(HandleDbc* pDbc) : - StmtArea(*pDbc), - m_dbc(pDbc), - m_attrArea(m_attrSpec) -{ - m_attrArea.setHandle(this); - for (unsigned i = 0; i <= 1; i++) { - for (unsigned u = 0; u <= 4; u++) { - m_handleDesc[i][u] = 0; - } - } -} - -HandleStmt::~HandleStmt() -{ -} - -void -HandleStmt::ctor(Ctx& ctx) -{ - for (unsigned u = 1; u <= 4; u++) { - HandleDesc** ppDesc = &m_handleDesc[0][u]; - m_dbc->sqlAllocDesc(ctx, ppDesc); - if (! ctx.ok()) - return; - m_descArea[u] = &(*ppDesc)->descArea(); - m_descArea[u]->setAlloc(Desc_alloc_auto); - m_descArea[u]->setUsage((DescUsage)u); - } -} - -void -HandleStmt::dtor(Ctx& ctx) -{ - free(ctx); - for (unsigned u = 1; u <= 4; u++) { - HandleDesc** ppDesc = &m_handleDesc[0][u]; - if (*ppDesc != 0) - m_dbc->sqlFreeDesc(ctx, *ppDesc); - *ppDesc = 0; - } -} - -// descriptor handles - -HandleDesc* -HandleStmt::getHandleDesc(Ctx& ctx, DescUsage u) const -{ - ctx_assert(1 <= u && u <= 4); - if (m_handleDesc[1][u] != 0) - return m_handleDesc[1][u]; - return m_handleDesc[0][u]; -} - -void -HandleStmt::setHandleDesc(Ctx& ctx, DescUsage u, SQLPOINTER handle) -{ - ctx_assert(1 <= u && u <= 4); - if (handle == SQL_NULL_HDESC) { - m_handleDesc[1][u] = 0; // revert to implicit - m_descArea[u] = &m_handleDesc[0][u]->descArea(); - return; - } - HandleDesc* pDesc = getRoot()->findDesc(handle); - if (pDesc == 0) { - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "cannot set %s handle to invalid descriptor handle %x", DescArea::nameUsage(u), (unsigned)handle); - return; - } - if (pDesc == m_handleDesc[0][u]) { - m_handleDesc[1][u] = 0; // revert to implicit - m_descArea[u] = &m_handleDesc[0][u]->descArea(); - return; - } - // XXX should check implicit handles on all statements - for (unsigned v = 1; v <= 4; v++) { - if (pDesc == m_handleDesc[0][v]) { - ctx.pushStatus(Sqlstate::_HY024, Error::Gen, "cannot set %s handle to implicitly allocated %s handle", DescArea::nameUsage(u), DescArea::nameUsage((DescUsage)v)); - return; - } - } - m_handleDesc[1][u] = pDesc; - m_descArea[u] = &m_handleDesc[1][u]->descArea(); -} - -// allocate and free handles (no valid case) - -void -HandleStmt::sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild) -{ - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "inappropriate handle type"); -} - -void -HandleStmt::sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* ppChild) -{ - ctx.pushStatus(Sqlstate::_HY092, Error::Gen, "inappropriate handle type"); -} - -// attributes and info - -static bool -ignore_attr(Ctx& ctx, SQLINTEGER attribute) -{ - switch (attribute) { - case 1211: - case 1227: - case 1228: - ctx_log2(("ignore unknown ADO.NET stmt attribute %d", (int)attribute)); - return true; - } - return false; -} - -void -HandleStmt::sqlSetStmtAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength) -{ - if (ignore_attr(ctx, attribute)) - return; - baseSetHandleAttr(ctx, m_attrArea, attribute, value, stringLength); -} - -void -HandleStmt::sqlGetStmtAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength) -{ - if (ignore_attr(ctx, attribute)) - return; - baseGetHandleAttr(ctx, m_attrArea, attribute, value, bufferLength, stringLength); -} - -void -HandleStmt::sqlSetStmtOption(Ctx& ctx, SQLUSMALLINT option, SQLUINTEGER value) -{ - if (ignore_attr(ctx, option)) - return; - baseSetHandleOption(ctx, m_attrArea, option, value); -} - -void -HandleStmt::sqlGetStmtOption(Ctx& ctx, SQLUSMALLINT option, SQLPOINTER value) -{ - if (ignore_attr(ctx, option)) - return; - baseGetHandleOption(ctx, m_attrArea, option, value); -} - -void -HandleStmt::sqlGetTypeInfo(Ctx& ctx, SQLSMALLINT dataType) -{ - BaseString text; - // odbc$typeinfo is a (possible unordered) view matching SQLGetTypeInfo result set - text.append("SELECT * FROM odbc$typeinfo"); - if (dataType != SQL_ALL_TYPES) { - switch (dataType) { - case SQL_CHAR: - case SQL_VARCHAR: - case SQL_BINARY: - case SQL_VARBINARY: - case SQL_SMALLINT: - case SQL_INTEGER: - case SQL_BIGINT: - case SQL_REAL: - case SQL_DOUBLE: - break; - default: - // XXX unsupported vs illegal - ctx_log1(("sqlGetTypeInfo: unknown data type %d", (int)dataType)); - break; - } - text.appfmt(" WHERE data_type = %d", (int)dataType); - } - // sort signed before unsigned - text.append(" ORDER BY data_type, unsigned_attribute, type_name"); - sqlExecDirect(ctx, (SQLCHAR*)text.c_str(), text.length()); -} - -void -HandleStmt::sqlTables(Ctx& ctx, SQLCHAR* catalogName, SQLSMALLINT nameLength1, SQLCHAR* schemaName, SQLSMALLINT nameLength2, SQLCHAR* tableName, SQLSMALLINT nameLength3, SQLCHAR* tableType, SQLSMALLINT nameLength4) -{ - BaseString text; - // odbc$tables is a (possibly unordered) view matching SQLTables result set - text.append("SELECT * FROM odbc$tables"); - SQLUINTEGER metadata_id = SQL_FALSE; - sqlGetStmtAttr(ctx, SQL_ATTR_METADATA_ID, (SQLPOINTER)&metadata_id, SQL_IS_POINTER, 0); - if (! ctx.ok()) - return; - unsigned count = 0; - if (catalogName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)catalogName, nameLength1); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (getOdbcVersion(ctx) == 2) - text.appfmt(" table_cat = '%s'", data.sqlchar()); - else if (metadata_id == SQL_TRUE) - text.appfmt(" table_cat = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" table_cat LIKE '%s'", data.sqlchar()); - } - if (schemaName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)schemaName, nameLength2); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (metadata_id == SQL_TRUE) - text.appfmt(" table_schem = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" table_schem LIKE '%s'", data.sqlchar()); - } - if (tableName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)tableName, nameLength3); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (metadata_id == SQL_TRUE) - text.appfmt(" table_name = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" table_name LIKE '%s'", data.sqlchar()); - } - if (tableType != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)tableType, nameLength4); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - text.appfmt(" table_type IN (%s)", data.sqlchar()); // XXX UPPER, quotes - } - text.append(" ORDER BY table_type, table_cat, table_schem, table_name"); - sqlExecDirect(ctx, (SQLCHAR*)text.c_str(), text.length()); -} - -void -HandleStmt::sqlColumns(Ctx& ctx, SQLCHAR* catalogName, SQLSMALLINT nameLength1, SQLCHAR* schemaName, SQLSMALLINT nameLength2, SQLCHAR* tableName, SQLSMALLINT nameLength3, SQLCHAR* columnName, SQLSMALLINT nameLength4) -{ - BaseString text; - // odbc$columns is a (possibly unordered) view matching SQLColumns result set - text.append("SELECT * FROM odbc$columns"); - SQLUINTEGER metadata_id = SQL_FALSE; - sqlGetStmtAttr(ctx, SQL_ATTR_METADATA_ID, (SQLPOINTER)&metadata_id, SQL_IS_POINTER, 0); - if (! ctx.ok()) - return; - unsigned count = 0; - if (catalogName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)catalogName, nameLength1); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (getOdbcVersion(ctx) == 2) - text.appfmt(" table_cat = '%s'", data.sqlchar()); - else if (metadata_id == SQL_TRUE) - text.appfmt(" table_cat = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" table_cat LIKE '%s'", data.sqlchar()); - } - if (schemaName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)schemaName, nameLength2); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (metadata_id == SQL_TRUE) - text.appfmt(" table_schem = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" table_schem LIKE '%s'", data.sqlchar()); - } - if (tableName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)tableName, nameLength3); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (metadata_id == SQL_TRUE) - text.appfmt(" table_name = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" table_name LIKE '%s'", data.sqlchar()); - } - if (columnName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)columnName, nameLength4); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (metadata_id == SQL_TRUE) - text.appfmt(" column_name = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" column_name LIKE '%s'", data.sqlchar()); - } - text.append(" ORDER BY table_cat, table_schem, table_name, ordinal_position"); - sqlExecDirect(ctx, (SQLCHAR*)text.c_str(), text.length()); -} - -void -HandleStmt::sqlPrimaryKeys(Ctx& ctx, SQLCHAR* szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR* szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR* szTableName, SQLSMALLINT cbTableName) -{ - BaseString text; - // odbc$primarykeys is a (possible unordered) view matching SQLPrimaryKeys result set - text.append("SELECT * FROM odbc$primarykeys"); - SQLUINTEGER metadata_id = SQL_FALSE; - sqlGetStmtAttr(ctx, SQL_ATTR_METADATA_ID, (SQLPOINTER)&metadata_id, SQL_IS_POINTER, 0); - if (! ctx.ok()) - return; - unsigned count = 0; - if (szCatalogName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)szCatalogName, cbCatalogName); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (getOdbcVersion(ctx) == 2) - text.appfmt(" table_cat = '%s'", data.sqlchar()); - else if (metadata_id == SQL_TRUE) - text.appfmt(" table_cat = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" table_cat = '%s'", data.sqlchar()); // no pattern - } - if (szSchemaName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)szSchemaName, cbSchemaName); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (metadata_id == SQL_TRUE) - text.appfmt(" table_schem = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" table_schem = '%s'", data.sqlchar()); // no pattern - } - if (szTableName != 0) { - OdbcData data; - data.copyin(ctx, OdbcData::Sqlchar, (SQLPOINTER)szTableName, cbTableName); - if (! ctx.ok()) - return; - text.append(++count == 1 ? " WHERE" : " AND"); - if (metadata_id == SQL_TRUE) - text.appfmt(" table_name = '%s'", data.sqlchar()); // XXX UPPER - else - text.appfmt(" table_name = '%s'", data.sqlchar()); // no pattern - } else { // no null - ctx.pushStatus(Sqlstate::_HY009, Error::Gen, "null table name"); - return; - } - text.append(" ORDER BY table_cat, table_schem, table_name, key_seq"); - sqlExecDirect(ctx, (SQLCHAR*)text.c_str(), text.length()); -} - -int -HandleStmt::getOdbcVersion(Ctx& ctx) -{ - return m_dbc->getOdbcVersion(ctx); -} - -// prepare and execute - -void -HandleStmt::sqlPrepare(Ctx& ctx, SQLCHAR* statementText, SQLINTEGER textLength) -{ - if (m_state == Open) { - ctx.pushStatus(Sqlstate::_24000, Error::Gen, "cursor is open"); - return; - } - free(ctx); - const char* text = reinterpret_cast(statementText); - if (textLength == SQL_NTS) { - m_sqlText.assign(text); - } else if (textLength >= 0) { - m_sqlText.assign(text, textLength); - } else { - ctx.pushStatus(Sqlstate::_HY090, Error::Gen, "missing SQL text"); - return; - } - if (! useSchemaCon(ctx, true)) - return; - CodeGen codegen(*this); - codegen.prepare(ctx); - useSchemaCon(ctx, false); - if (! ctx.ok()) { - free(ctx); - return; - } - ctx_log2(("prepared %s statement", m_stmtInfo.getDesc())); - m_state = Prepared; -} - -void -HandleStmt::sqlExecute(Ctx& ctx) -{ - if (m_state == Open) { - ctx.pushStatus(Sqlstate::_24000, Error::Gen, "cursor is open"); - return; - } - StmtType stmtType = m_stmtInfo.getType(); - switch (stmtType) { - case Stmt_type_DDL: - if (! useSchemaCon(ctx, true)) - return; - break; - case Stmt_type_query: - case Stmt_type_DML: - if (! useConnection(ctx, true)) - return; - break; - default: - ctx_assert(false); - break; - } - CodeGen codegen(*this); - codegen.execute(ctx); - // valid only after execute says M$ XXX create this diag only on demand - setFunction(ctx); - if (ctx.getCode() == SQL_NEED_DATA) { - m_state = NeedData; - return; - } - ctx_log2(("execute: fetched %u tuples from NDB", (unsigned)m_tuplesFetched)); - switch (stmtType) { - case Stmt_type_DDL: - codegen.close(ctx); - useSchemaCon(ctx, false); - m_state = Prepared; - break; - case Stmt_type_query: - if (! ctx.ok()) { - codegen.close(ctx); - useConnection(ctx, false); - m_state = Prepared; - } else { - m_state = Open; - } - break; - case Stmt_type_DML: - codegen.close(ctx); - if (m_dbc->autocommit()) { - // even if error - m_dbc->sqlEndTran(ctx, SQL_COMMIT); - } else { - m_dbc->uncommitted(true); // uncommitted changes possible - } - useConnection(ctx, false); - m_state = Prepared; - break; - default: - ctx_assert(false); - break; - } -} - -void -HandleStmt::sqlExecDirect(Ctx& ctx, SQLCHAR* statementText, SQLINTEGER textLength) -{ - sqlPrepare(ctx, statementText, textLength); - if (! ctx.ok()) - return; - sqlExecute(ctx); -} - -void -HandleStmt::sqlFetch(Ctx& ctx) -{ - if (m_state != Open) { - ctx.pushStatus(Sqlstate::_24000, Error::Gen, "cursor is not open"); - return; - } - StmtType stmtType = m_stmtInfo.getType(); - switch (stmtType) { - case Stmt_type_query: { - CodeGen codegen(*this); - codegen.fetch(ctx); - if (! ctx.ok()) { - codegen.close(ctx); - useConnection(ctx, false); - } - break; - } - default: - ctx_assert(false); - break; - } -} - -void -HandleStmt::sqlRowCount(Ctx& ctx, SQLINTEGER* rowCount) -{ - *rowCount = m_rowCount; -} - -void -HandleStmt::sqlMoreResults(Ctx& ctx) -{ - if (m_state == Open) { - sqlCloseCursor(ctx); - if (! ctx.ok()) - return; - } - ctx.setCode(SQL_NO_DATA); -} - -void -HandleStmt::sqlCancel(Ctx& ctx) -{ - if (m_state == NeedData) { - CodeGen codegen(*this); - codegen.close(ctx); - m_state = Prepared; - } -} - -void -HandleStmt::sqlCloseCursor(Ctx& ctx) -{ - if (m_state != Open) { - ctx.pushStatus(Sqlstate::_24000, Error::Gen, "cursor is not open"); - return; - } - ctx_log2(("execute: fetched %u tuples from NDB", (unsigned)m_tuplesFetched)); - StmtType stmtType = m_stmtInfo.getType(); - switch (stmtType) { - case Stmt_type_query: { - CodeGen codegen(*this); - codegen.close(ctx); - useConnection(ctx, false); - m_state = Prepared; - m_rowCount = 0; - m_tuplesFetched = 0; - break; - } - default: - ctx_assert(false); - break; - } -} - -void -HandleStmt::sqlGetCursorName(Ctx& ctx, SQLCHAR* cursorName, SQLSMALLINT bufferLength, SQLSMALLINT* nameLength) -{ - OdbcData name("SQL_CUR_DUMMY"); - name.copyout(ctx, cursorName, bufferLength, 0, nameLength); -} - -void -HandleStmt::sqlSetCursorName(Ctx& ctx, SQLCHAR* cursorName, SQLSMALLINT nameLength) -{ -} - -// special data access - -void -HandleStmt::sqlGetData(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind) -{ - if (m_state != Open) { - ctx.pushStatus(Sqlstate::_24000, Error::Gen, "cursor is not open"); - return; - } - if (bufferLength < 0) { - ctx.pushStatus(Sqlstate::_HY090, Error::Gen, "invalid buffer length %d", (int)bufferLength); - return; - } - CodeGen codegen(*this); - codegen.sqlGetData(ctx, columnNumber, targetType, targetValue, bufferLength, strlen_or_Ind); -} - -void -HandleStmt::sqlParamData(Ctx& ctx, SQLPOINTER* value) -{ - if (m_state != NeedData) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "not expecting data-at-exec"); - return; - } - CodeGen codegen(*this); - codegen.sqlParamData(ctx, value); - if (! ctx.ok()) - return; - sqlExecute(ctx); -} - -void -HandleStmt::sqlPutData(Ctx& ctx, SQLPOINTER data, SQLINTEGER strlen_or_Ind) -{ - if (m_state != NeedData) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "not expecting data-at-exec"); - return; - } - CodeGen codegen(*this); - codegen.sqlPutData(ctx, data, strlen_or_Ind); -} - -// describe statement - -void -HandleStmt::sqlNumParams(Ctx& ctx, SQLSMALLINT* parameterCountPtr) -{ - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "statement is not prepared"); - return; - } - HandleDesc* ipd = getHandleDesc(ctx, Desc_usage_IPD); - ipd->sqlGetDescField(ctx, 0, SQL_DESC_COUNT, static_cast(parameterCountPtr), -1, 0); -} - -void -HandleStmt::sqlDescribeParam(Ctx& ctx, SQLUSMALLINT ipar, SQLSMALLINT* pfSqlType, SQLUINTEGER* pcbParamDef, SQLSMALLINT* pibScale, SQLSMALLINT* pfNullable) -{ - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "statement is not prepared"); - return; - } - HandleDesc* ipd = getHandleDesc(ctx, Desc_usage_IPD); - ipd->sqlGetDescField(ctx, ipar, SQL_DESC_CONCISE_TYPE, static_cast(pfSqlType), -1, 0); - { // XXX fix it - OdbcData data((SQLUINTEGER)0); - data.copyout(ctx, (SQLPOINTER)pcbParamDef, -1, 0); - } - { // XXX fix it - OdbcData data((SQLSMALLINT)0); - data.copyout(ctx, (SQLPOINTER)pibScale, -1, 0); - } - ipd->sqlGetDescField(ctx, ipar, SQL_DESC_NULLABLE, static_cast(pfNullable), -1, 0); -} - -void -HandleStmt::sqlNumResultCols(Ctx& ctx, SQLSMALLINT* columnCount) -{ - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "statement is not prepared"); - return; - } - HandleDesc* const ird = getHandleDesc(ctx, Desc_usage_IRD); - ird->sqlGetDescField(ctx, 0, SQL_DESC_COUNT, static_cast(columnCount), -1, 0); - setFunction(ctx); // unixODBC workaround -} - -void -HandleStmt::sqlDescribeCol(Ctx& ctx, SQLUSMALLINT columnNumber, SQLCHAR* columnName, SQLSMALLINT bufferLength, SQLSMALLINT* nameLength, SQLSMALLINT* dataType, SQLUINTEGER* columnSize, SQLSMALLINT* decimalDigits, SQLSMALLINT* nullable) -{ - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "statement is not prepared"); - return; - } - HandleDesc* const ird = getHandleDesc(ctx, Desc_usage_IRD); - ird->sqlGetDescField(ctx, columnNumber, SQL_DESC_NAME, static_cast(columnName), bufferLength, 0, nameLength); - ird->sqlGetDescField(ctx, columnNumber, SQL_DESC_CONCISE_TYPE, static_cast(dataType), -1, 0); - if (! ctx.ok()) - return; - if (columnSize != 0) { - switch (*dataType) { - case SQL_CHAR: - case SQL_VARCHAR: - case SQL_BINARY: - case SQL_VARBINARY: - ird->sqlGetDescField(ctx, columnNumber, SQL_DESC_LENGTH, static_cast(columnSize), -1, 0); - break; - case SQL_SMALLINT: - *columnSize = 5; - break; - case SQL_INTEGER: - *columnSize = 10; - break; - case SQL_BIGINT: - *columnSize = 20; // XXX 19 for signed - break; - case SQL_REAL: - *columnSize = 7; - break; - case SQL_DOUBLE: - *columnSize = 15; - break; - case SQL_TYPE_TIMESTAMP: - *columnSize = 30; - break; - default: - *columnSize = 0; - break; - } - } - if (decimalDigits != 0) { - switch (*dataType) { - case SQL_SMALLINT: - case SQL_INTEGER: - case SQL_BIGINT: - *decimalDigits = 0; - break; - case SQL_TYPE_TIMESTAMP: - *decimalDigits = 10; - break; - default: - *decimalDigits = 0; - break; - } - } - ird->sqlGetDescField(ctx, columnNumber, SQL_DESC_NULLABLE, static_cast(nullable), -1, 0); -} - -void -HandleStmt::sqlColAttribute(Ctx& ctx, SQLUSMALLINT columnNumber, SQLUSMALLINT fieldIdentifier, SQLPOINTER characterAttribute, SQLSMALLINT bufferLength, SQLSMALLINT* stringLength, SQLPOINTER numericAttribute) -{ - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "statement is not prepared"); - return; - } - HandleDesc* const ird = getHandleDesc(ctx, Desc_usage_IRD); - ird->sqlColAttribute(ctx, columnNumber, fieldIdentifier, characterAttribute, bufferLength, stringLength, numericAttribute); -} - -void -HandleStmt::sqlColAttributes(Ctx& ctx, SQLUSMALLINT icol, SQLUSMALLINT fdescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT* pcbDesc, SQLINTEGER* pfDesc) -{ - if (m_state == Free) { - ctx.pushStatus(Sqlstate::_HY010, Error::Gen, "statement is nor prepared"); - return; - } - HandleDesc* const ird = getHandleDesc(ctx, Desc_usage_IRD); - ird->sqlColAttributes(ctx, icol, fdescType, rgbDesc, cbDescMax, pcbDesc, pfDesc); -} - -// descriptor manipulation - -void -HandleStmt::sqlBindCol(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind) -{ - HandleDesc* const ard = getHandleDesc(ctx, Desc_usage_ARD); - DescArea& desc = ard->descArea(); - if (desc.getCount() < columnNumber) { - desc.setCount(ctx, columnNumber); - } - DescRec& rec = desc.getRecord(columnNumber); - rec.setField(ctx, SQL_DESC_TYPE, targetType); - rec.setField(ctx, SQL_DESC_CONCISE_TYPE, targetType); - rec.setField(ctx, SQL_DESC_DATA_PTR, targetValue); - rec.setField(ctx, SQL_DESC_OCTET_LENGTH, bufferLength); - rec.setField(ctx, SQL_DESC_OCTET_LENGTH_PTR, strlen_or_Ind); - rec.setField(ctx, SQL_DESC_INDICATOR_PTR, strlen_or_Ind); -} - -void -HandleStmt::sqlBindParameter(Ctx& ctx, SQLUSMALLINT ipar, SQLSMALLINT fParamType, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLUINTEGER cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER* pcbValue) -{ - HandleDesc* const ipd = getHandleDesc(ctx, Desc_usage_IPD); - HandleDesc* const apd = getHandleDesc(ctx, Desc_usage_APD); - DescArea& descIPD = ipd->descArea(); - DescArea& descAPD = apd->descArea(); - if (ipar < 1) { - ctx.pushStatus(Sqlstate::_07009, Error::Gen, "invalid parameter index %u", (unsigned)ipar); - return; - } - if (descIPD.getCount() < ipar) { - descIPD.setCount(ctx, ipar); - } - if (descAPD.getCount() < ipar) { - descAPD.setCount(ctx, ipar); - } - DescRec& recIPD = descIPD.getRecord(ipar); - DescRec& recAPD = descAPD.getRecord(ipar); - recIPD.setField(ctx, SQL_DESC_PARAMETER_TYPE, fParamType); - recAPD.setField(ctx, SQL_DESC_TYPE, fCType); - recAPD.setField(ctx, SQL_DESC_CONCISE_TYPE, fCType); - recIPD.setField(ctx, SQL_DESC_TYPE, fSqlType); - recIPD.setField(ctx, SQL_DESC_CONCISE_TYPE, fSqlType); - switch (fSqlType) { - case SQL_CHAR: // XXX not complete - case SQL_VARCHAR: - case SQL_BINARY: - case SQL_VARBINARY: - recIPD.setField(ctx, SQL_DESC_LENGTH, cbColDef); - break; - case SQL_DECIMAL: - case SQL_NUMERIC: - case SQL_FLOAT: - case SQL_REAL: - case SQL_DOUBLE: - recIPD.setField(ctx, SQL_DESC_PRECISION, cbColDef); - break; - } - switch (fSqlType) { - case SQL_TYPE_TIME: // XXX not complete - case SQL_TYPE_TIMESTAMP: - recIPD.setField(ctx, SQL_DESC_PRECISION, ibScale); - break; - case SQL_NUMERIC: - case SQL_DECIMAL: - recIPD.setField(ctx, SQL_DESC_SCALE, ibScale); - break; - } - recAPD.setField(ctx, SQL_DESC_DATA_PTR, rgbValue); - recAPD.setField(ctx, SQL_DESC_OCTET_LENGTH, cbValueMax); - recAPD.setField(ctx, SQL_DESC_OCTET_LENGTH_PTR, pcbValue); - recAPD.setField(ctx, SQL_DESC_INDICATOR_PTR, pcbValue); -} - -void -HandleStmt::sqlBindParam(Ctx& ctx, SQLUSMALLINT parameterNumber, SQLSMALLINT valueType, SQLSMALLINT parameterType, SQLUINTEGER lengthPrecision, SQLSMALLINT parameterScale, SQLPOINTER parameterValue, SQLINTEGER* strLen_or_Ind) -{ - sqlBindParameter(ctx, parameterNumber, SQL_PARAM_INPUT_OUTPUT, valueType, parameterType, lengthPrecision, parameterScale, parameterValue, SQL_SETPARAM_VALUE_MAX, strLen_or_Ind); -} - -void -HandleStmt::sqlSetParam(Ctx& ctx, SQLUSMALLINT parameterNumber, SQLSMALLINT valueType, SQLSMALLINT parameterType, SQLUINTEGER lengthPrecision, SQLSMALLINT parameterScale, SQLPOINTER parameterValue, SQLINTEGER* strLen_or_Ind) -{ - sqlBindParameter(ctx, parameterNumber, SQL_PARAM_INPUT_OUTPUT, valueType, parameterType, lengthPrecision, parameterScale, parameterValue, SQL_SETPARAM_VALUE_MAX, strLen_or_Ind); -} diff --git a/ndb/src/old_files/client/odbc/handles/HandleStmt.hpp b/ndb/src/old_files/client/odbc/handles/HandleStmt.hpp deleted file mode 100644 index 0bee138bfc6..00000000000 --- a/ndb/src/old_files/client/odbc/handles/HandleStmt.hpp +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_HANDLES_HandleStmt_hpp -#define ODBC_HANDLES_HandleStmt_hpp - -#include -#include -#include -#include "HandleBase.hpp" - -class HandleDbc; -class HandleDesc; - -/** - * @class HandleStmt - * @brief Statement handle (SQLHSTMT). - */ -class HandleStmt : public HandleBase, public StmtArea { -public: - HandleStmt(HandleDbc* pDbc); - ~HandleStmt(); - void ctor(Ctx& ctx); - void dtor(Ctx& ctx); - HandleDbc* getDbc(); - HandleBase* getParent(); - HandleRoot* getRoot(); - OdbcHandle odbcHandle(); - // descriptor handles - HandleDesc* getHandleDesc(Ctx& ctx, DescUsage u) const; - void setHandleDesc(Ctx& ctx, DescUsage u, SQLPOINTER handle); - // allocate and free handles (no valid case) - void sqlAllocHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase** ppChild); - void sqlFreeHandle(Ctx& ctx, SQLSMALLINT childType, HandleBase* pChild); - // attributes and info - void sqlSetStmtAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER stringLength); - void sqlGetStmtAttr(Ctx& ctx, SQLINTEGER attribute, SQLPOINTER value, SQLINTEGER bufferLength, SQLINTEGER* stringLength); - void sqlSetStmtOption(Ctx& ctx, SQLUSMALLINT option, SQLUINTEGER value); // odbc2.0 - void sqlGetStmtOption(Ctx& ctx, SQLUSMALLINT option, SQLPOINTER value); // odbc2.0 - void sqlGetTypeInfo(Ctx& ctx, SQLSMALLINT dataType); - void sqlTables(Ctx& ctx, SQLCHAR* catalogName, SQLSMALLINT nameLength1, SQLCHAR* schemaName, SQLSMALLINT nameLength2, SQLCHAR* tableName, SQLSMALLINT nameLength3, SQLCHAR* tableType, SQLSMALLINT nameLength4); - void sqlColumns(Ctx& ctx, SQLCHAR* catalogName, SQLSMALLINT nameLength1, SQLCHAR* schemaName, SQLSMALLINT nameLength2, SQLCHAR* tableName, SQLSMALLINT nameLength3, SQLCHAR* columnName, SQLSMALLINT nameLength4); - void sqlPrimaryKeys(Ctx& ctx, SQLCHAR* szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR* szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR* szTableName, SQLSMALLINT cbTableName); - int getOdbcVersion(Ctx& ctx); - // prepare and execute - void sqlPrepare(Ctx& ctx, SQLCHAR* statementText, SQLINTEGER textLength); - void sqlExecute(Ctx& ctx); - void sqlExecDirect(Ctx& ctx, SQLCHAR* statementText, SQLINTEGER textLength); - void sqlFetch(Ctx& ctx); - void sqlRowCount(Ctx& ctx, SQLINTEGER* rowCount); - void sqlMoreResults(Ctx& ctx); - void sqlCancel(Ctx& ctx); - void sqlCloseCursor(Ctx& ctx); - void sqlGetCursorName(Ctx& ctx, SQLCHAR* cursorName, SQLSMALLINT bufferLength, SQLSMALLINT* nameLength); - void sqlSetCursorName(Ctx& ctx, SQLCHAR* cursorName, SQLSMALLINT nameLength); - // special data access - void sqlGetData(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind); - void sqlParamData(Ctx& ctx, SQLPOINTER* value); - void sqlPutData(Ctx& ctx, SQLPOINTER data, SQLINTEGER strlen_or_Ind); - // describe statement - void sqlNumParams(Ctx& ctx, SQLSMALLINT* ParameterCountPtr); - void sqlDescribeParam(Ctx& ctx, SQLUSMALLINT ipar, SQLSMALLINT* pfSqlType, SQLUINTEGER* pcbParamDef, SQLSMALLINT* pibScale, SQLSMALLINT* pfNullable); - void sqlNumResultCols(Ctx& ctx, SQLSMALLINT* columnCount); - void sqlDescribeCol(Ctx& ctx, SQLUSMALLINT columnNumber, SQLCHAR* columnName, SQLSMALLINT bufferLength, SQLSMALLINT* nameLength, SQLSMALLINT* dataType, SQLUINTEGER* columnSize, SQLSMALLINT* decimalDigits, SQLSMALLINT* nullable); - void sqlColAttribute(Ctx& ctx, SQLUSMALLINT columnNumber, SQLUSMALLINT fieldIdentifier, SQLPOINTER characterAttribute, SQLSMALLINT bufferLength, SQLSMALLINT* stringLength, SQLPOINTER numericAttribute); - void sqlColAttributes(Ctx& ctx, SQLUSMALLINT icol, SQLUSMALLINT fdescType, SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT* pcbDesc, SQLINTEGER* pfDesc); // odbc2.0 - // descriptor manipulation - void sqlBindCol(Ctx& ctx, SQLUSMALLINT columnNumber, SQLSMALLINT targetType, SQLPOINTER targetValue, SQLINTEGER bufferLength, SQLINTEGER* strlen_or_Ind); - void sqlBindParameter(Ctx& ctx, SQLUSMALLINT ipar, SQLSMALLINT fParamType, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLUINTEGER cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER* pcbValue); - void sqlBindParam(Ctx& ctx, SQLUSMALLINT parameterNumber, SQLSMALLINT valueType, SQLSMALLINT parameterType, SQLUINTEGER lengthPrecision, SQLSMALLINT parameterScale, SQLPOINTER parameterValue, SQLINTEGER* strLen_or_Ind); - void sqlSetParam(Ctx& ctx, SQLUSMALLINT parameterNumber, SQLSMALLINT valueType, SQLSMALLINT parameterType, SQLUINTEGER lengthPrecision, SQLSMALLINT parameterScale, SQLPOINTER parameterValue, SQLINTEGER* strLen_or_Ind); -private: - HandleDbc* const m_dbc; - static AttrSpec m_attrSpec[]; - AttrArea m_attrArea; - // descriptor handles (0-automatic 1-application) - HandleDesc* m_handleDesc[2][1+4]; -}; - -inline HandleDbc* -HandleStmt::getDbc() -{ - return m_dbc; -} - -inline HandleBase* -HandleStmt::getParent() -{ - return (HandleBase*)getDbc(); -} - -inline HandleRoot* -HandleStmt::getRoot() -{ - return getParent()->getRoot(); -} - -inline OdbcHandle -HandleStmt::odbcHandle() -{ - return Odbc_handle_stmt; -} - -#endif diff --git a/ndb/src/old_files/client/odbc/handles/InfoTab.cpp b/ndb/src/old_files/client/odbc/handles/InfoTab.cpp deleted file mode 100644 index 1a93c4da264..00000000000 --- a/ndb/src/old_files/client/odbc/handles/InfoTab.cpp +++ /dev/null @@ -1,878 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "HandleDbc.hpp" - -HandleDbc::InfoTab -HandleDbc::m_infoTab[] = { - { SQL_ACCESSIBLE_PROCEDURES, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_ACCESSIBLE_TABLES, - InfoTab::YesNo, - 0L, - "Y" - }, - { SQL_ACTIVE_ENVIRONMENTS, - InfoTab::Short, - 0L, - 0 - }, - { SQL_AGGREGATE_FUNCTIONS, - InfoTab::Bitmask, - SQL_AF_AVG | SQL_AF_COUNT | SQL_AF_MAX | SQL_AF_MIN | SQL_AF_SUM, - 0 - }, - { SQL_ALTER_DOMAIN, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_ALTER_TABLE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_ASYNC_MODE, - InfoTab::Long, - SQL_AM_NONE, - 0 - }, - { SQL_BATCH_ROW_COUNT, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_BATCH_SUPPORT, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_BOOKMARK_PERSISTENCE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CATALOG_LOCATION, - InfoTab::Short, - 0L, - 0 - }, - { SQL_CATALOG_NAME, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_CATALOG_NAME_SEPARATOR, - InfoTab::Char, - 0L, - "" - }, - { SQL_CATALOG_TERM, - InfoTab::Char, - 0L, - "" - }, - { SQL_CATALOG_USAGE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_COLLATION_SEQ, - InfoTab::Char, - 0L, - "ISO 8859-1" - }, - { SQL_COLUMN_ALIAS, - InfoTab::YesNo, - 0L, - "Y" - }, - { SQL_CONCAT_NULL_BEHAVIOR, - InfoTab::Short, - 0L, - 0 - }, - { SQL_CONVERT_BIGINT, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_BINARY, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_BIT, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_CHAR, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_DATE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_DECIMAL, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_DOUBLE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_FLOAT, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_FUNCTIONS, - InfoTab::Bitmask, - 0L, - 0 - }, -#if 0 - { SQL_CONVERT_GUID, - InfoTab::Bitmask, - 0L, - 0 - }, -#endif - { SQL_CONVERT_INTEGER, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_INTERVAL_DAY_TIME, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_INTERVAL_YEAR_MONTH, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_LONGVARBINARY, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_LONGVARCHAR, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_NUMERIC, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_REAL, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_SMALLINT, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_TIME, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_TIMESTAMP, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_TINYINT, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_VARBINARY, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CONVERT_VARCHAR, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CORRELATION_NAME, - InfoTab::Bitmask, - SQL_CN_ANY, - 0 - }, - { SQL_CREATE_ASSERTION, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CREATE_CHARACTER_SET, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CREATE_COLLATION, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CREATE_DOMAIN, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CREATE_SCHEMA, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CREATE_TABLE, - InfoTab::Bitmask, - SQL_CT_CREATE_TABLE, - 0 - }, - { SQL_CREATE_TRANSLATION, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CREATE_VIEW, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_CURSOR_COMMIT_BEHAVIOR, - InfoTab::Short, - SQL_CB_CLOSE, - 0 - }, - { SQL_CURSOR_ROLLBACK_BEHAVIOR, - InfoTab::Short, - SQL_CB_CLOSE, - 0 - }, - { SQL_CURSOR_SENSITIVITY, - InfoTab::Long, - 0L, - 0 - }, - { SQL_DATABASE_NAME, - InfoTab::Char, - 0L, - "" - }, - { SQL_DATA_SOURCE_NAME, - InfoTab::Char, - 0L, - "" - }, - { SQL_DATA_SOURCE_READ_ONLY, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_DATETIME_LITERALS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DBMS_NAME, - InfoTab::Char, - 0L, - "" - }, - { SQL_DBMS_VER, - InfoTab::Char, - 0L, - "01.43.0000" - }, - { SQL_DDL_INDEX, - InfoTab::Long, - 0L, - 0 - }, - { SQL_DEFAULT_TXN_ISOLATION, - InfoTab::Long, - SQL_TXN_READ_COMMITTED, - 0 - }, - { SQL_DESCRIBE_PARAMETER, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_DM_VER, - InfoTab::Char, - 0L, - "" - }, - { SQL_DRIVER_HDBC, - InfoTab::Long, - 0L, - 0 - }, - { SQL_DRIVER_HDESC, - InfoTab::Long, - 0L, - 0 - }, - { SQL_DRIVER_HLIB, - InfoTab::Long, - 0L, - 0 - }, - { SQL_DRIVER_HSTMT, - InfoTab::Long, - 0L, - 0 - }, - { SQL_DRIVER_NAME, - InfoTab::Char, - 0L, - "" - }, - { SQL_DRIVER_ODBC_VER, - InfoTab::Char, - 0L, - "03.00" - }, - { SQL_DRIVER_VER, - InfoTab::Char, - 0L, - "00.10.0000" - }, - { SQL_DROP_ASSERTION, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DROP_CHARACTER_SET, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DROP_COLLATION, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DROP_DOMAIN, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DROP_SCHEMA, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DROP_TABLE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DROP_TRANSLATION, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DROP_VIEW, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DTC_TRANSITION_COST, // not in older MS docs - InfoTab::Bitmask, - 0L, - 0 // SQL_DTC_ENLIST_EXPENSIVE | SQL_DTC_UNENLIST_EXPENSIVE - }, - { SQL_DYNAMIC_CURSOR_ATTRIBUTES1, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_DYNAMIC_CURSOR_ATTRIBUTES2, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_EXPRESSIONS_IN_ORDERBY, - InfoTab::Char, - 0L, - "Y" - }, - { SQL_FILE_USAGE, - InfoTab::Short, - 0L, - 0 - }, - { SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_GETDATA_EXTENSIONS, - InfoTab::Bitmask, - SQL_GD_ANY_COLUMN | SQL_GD_ANY_ORDER | SQL_GD_BOUND, - 0 - }, - { SQL_GROUP_BY, - InfoTab::Short, - SQL_GB_NOT_SUPPORTED, - 0 - }, - { SQL_IDENTIFIER_CASE, - InfoTab::Short, - SQL_IC_UPPER, - 0 - }, - { SQL_IDENTIFIER_QUOTE_CHAR, - InfoTab::Char, - 0L, - "\"" - }, - { SQL_INDEX_KEYWORDS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_INFO_SCHEMA_VIEWS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_INSERT_STATEMENT, - InfoTab::Bitmask, - SQL_IS_INSERT_LITERALS | SQL_IS_SELECT_INTO, - 0 - }, - { SQL_INTEGRITY, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_KEYSET_CURSOR_ATTRIBUTES1, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_KEYSET_CURSOR_ATTRIBUTES2, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_KEYWORDS, - InfoTab::Char, - 0L, - "" - }, - { SQL_LIKE_ESCAPE_CLAUSE, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_MAX_ASYNC_CONCURRENT_STATEMENTS, - InfoTab::Long, - 0L, - 0 - }, - { SQL_MAX_BINARY_LITERAL_LEN, - InfoTab::Long, - 0L, - 0 - }, - { SQL_MAX_CATALOG_NAME_LEN, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_CHAR_LITERAL_LEN, - InfoTab::Long, - 0L, - 0 - }, - { SQL_MAX_COLUMN_NAME_LEN, - InfoTab::Short, - 16, - 0 - }, - { SQL_MAX_COLUMNS_IN_GROUP_BY, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_COLUMNS_IN_INDEX, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_COLUMNS_IN_ORDER_BY, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_COLUMNS_IN_SELECT, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_COLUMNS_IN_TABLE, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_CONCURRENT_ACTIVITIES, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_CURSOR_NAME_LEN, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_DRIVER_CONNECTIONS, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_IDENTIFIER_LEN, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_INDEX_SIZE, - InfoTab::Long, - 0L, - 0 - }, - { SQL_MAX_PROCEDURE_NAME_LEN, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_ROW_SIZE, - InfoTab::Long, - 8000, - 0 - }, - { SQL_MAX_ROW_SIZE_INCLUDES_LONG, - InfoTab::YesNo, - 0L, - "Y" - }, - { SQL_MAX_SCHEMA_NAME_LEN, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_STATEMENT_LEN, - InfoTab::Long, - 0L, - 0 - }, - { SQL_MAX_TABLE_NAME_LEN, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_TABLES_IN_SELECT, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MAX_USER_NAME_LEN, - InfoTab::Short, - 0L, - 0 - }, - { SQL_MULTIPLE_ACTIVE_TXN, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_MULT_RESULT_SETS, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_NEED_LONG_DATA_LEN, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_NON_NULLABLE_COLUMNS, - InfoTab::Short, - SQL_NNC_NON_NULL, - 0 - }, - { SQL_NULL_COLLATION, - InfoTab::Short, - SQL_NC_HIGH, - 0 - }, - { SQL_NUMERIC_FUNCTIONS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_ODBC_INTERFACE_CONFORMANCE, - InfoTab::Long, - SQL_OIC_CORE, - 0 - }, - { SQL_ODBC_VER, - InfoTab::Char, - 0L, - "" - }, - { SQL_OJ_CAPABILITIES, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_ORDER_BY_COLUMNS_IN_SELECT, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_PARAM_ARRAY_ROW_COUNTS, - InfoTab::Long, - 0L, - 0 - }, - { SQL_PARAM_ARRAY_SELECTS, - InfoTab::Long, - 0L, - 0 - }, - { SQL_POS_OPERATIONS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_PROCEDURES, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_PROCEDURE_TERM, - InfoTab::Char, - 0L, - "" - }, - { SQL_QUOTED_IDENTIFIER_CASE, - InfoTab::Short, - SQL_IC_SENSITIVE, - 0 - }, - { SQL_ROW_UPDATES, - InfoTab::YesNo, - 0L, - "N" - }, - { SQL_SCHEMA_TERM, - InfoTab::Char, - 0L, - "" - }, - { SQL_SCHEMA_USAGE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SCROLL_OPTIONS, - InfoTab::Bitmask, - SQL_SO_FORWARD_ONLY, - 0 - }, - { SQL_SEARCH_PATTERN_ESCAPE, - InfoTab::Char, - 0L, - "" - }, - { SQL_SERVER_NAME, - InfoTab::Char, - 0L, - "" - }, - { SQL_SPECIAL_CHARACTERS, - InfoTab::Char, - 0L, - "" - }, - { SQL_SQL92_DATETIME_FUNCTIONS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SQL92_FOREIGN_KEY_DELETE_RULE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SQL92_FOREIGN_KEY_UPDATE_RULE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SQL92_GRANT, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SQL92_NUMERIC_VALUE_FUNCTIONS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SQL92_PREDICATES, - InfoTab::Bitmask, - SQL_SP_COMPARISON | SQL_SP_IN | SQL_SP_ISNOTNULL | SQL_SP_ISNULL | SQL_SP_LIKE, - 0 - }, - { SQL_SQL92_RELATIONAL_JOIN_OPERATORS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SQL92_REVOKE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SQL92_ROW_VALUE_CONSTRUCTOR, - InfoTab::Bitmask, - SQL_SRVC_VALUE_EXPRESSION, - 0 - }, - { SQL_SQL92_STRING_FUNCTIONS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SQL92_VALUE_EXPRESSIONS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SQL_CONFORMANCE, - InfoTab::Long, - 0L, - 0 - }, - { SQL_STANDARD_CLI_CONFORMANCE, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_STATIC_CURSOR_ATTRIBUTES1, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_STATIC_CURSOR_ATTRIBUTES2, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_STRING_FUNCTIONS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SUBQUERIES, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_SYSTEM_FUNCTIONS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_TABLE_TERM, - InfoTab::Char, - 0L, - "TABLE" - }, - { SQL_TIMEDATE_ADD_INTERVALS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_TIMEDATE_DIFF_INTERVALS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_TIMEDATE_FUNCTIONS, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_TXN_CAPABLE, - InfoTab::Short, - SQL_TC_DDL_COMMIT, // XXX do it - 0 - }, - { SQL_TXN_ISOLATION_OPTION, - InfoTab::Bitmask, - SQL_TXN_READ_COMMITTED, - 0 - }, - { SQL_UNION, - InfoTab::Bitmask, - 0L, - 0 - }, - { SQL_USER_NAME, - InfoTab::Char, - 0L, - "" - }, - { SQL_XOPEN_CLI_YEAR, - InfoTab::Char, - 0L, - "" - }, - { 0, - InfoTab::End, - 0L, - 0 - } -}; diff --git a/ndb/src/old_files/client/odbc/handles/Makefile b/ndb/src/old_files/client/odbc/handles/Makefile deleted file mode 100644 index d37e7d286ba..00000000000 --- a/ndb/src/old_files/client/odbc/handles/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -include .defs.mk - -TYPE = * - -NONPIC_ARCHIVE = N - -PIC_ARCHIVE = Y - -ARCHIVE_TARGET = odbchandles - -SOURCES = \ - HandleBase.cpp \ - HandleRoot.cpp \ - HandleEnv.cpp \ - HandleDbc.cpp \ - HandleStmt.cpp \ - HandleDesc.cpp \ - AttrRoot.cpp \ - AttrEnv.cpp \ - AttrDbc.cpp \ - AttrStmt.cpp \ - PoolNdb.cpp \ - DescSpec.cpp \ - FuncTab.cpp \ - InfoTab.cpp - -include ../Extra.mk -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/client/odbc/handles/PoolNdb.cpp b/ndb/src/old_files/client/odbc/handles/PoolNdb.cpp deleted file mode 100644 index 45d3c67ec77..00000000000 --- a/ndb/src/old_files/client/odbc/handles/PoolNdb.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include -#include "PoolNdb.hpp" - -#ifdef NDB_WIN32 -static NdbMutex & ndb_mutex = * NdbMutex_Create(); -#else -static NdbMutex ndb_mutex = NDB_MUTEX_INITIALIZER; -#endif - -PoolNdb::PoolNdb() : - m_cntUsed(0), - m_cntFree(0) -{ -} - -PoolNdb::~PoolNdb() -{ -} - -Ndb* -PoolNdb::allocate(Ctx& ctx, int timeout) -{ - NdbMutex_Lock(&ndb_mutex); - Ndb* pNdb; - if (m_cntFree == 0) { - pNdb = new Ndb("TEST_DB"); - pNdb->useFullyQualifiedNames(true); - if (pNdb->init(64) < 0) { - ctx.pushStatus(pNdb, "init"); - delete pNdb; - NdbMutex_Unlock(&ndb_mutex); - return 0; - } - if (pNdb->waitUntilReady(timeout) < 0) { - ctx.pushStatus(Sqlstate::_HYT00, Error::Gen, "connection timeout after %d seconds", timeout); - ctx.pushStatus(pNdb, "waitUntilReady"); - delete pNdb; - NdbMutex_Unlock(&ndb_mutex); - return 0; - } - m_listFree.push_back(pNdb); - m_cntFree++; - } - pNdb = m_listFree.front(); - m_listFree.pop_front(); - m_cntFree--; - m_cntUsed++; - ctx_log1(("alloc Ndb: used=%u free=%u", m_cntUsed, m_cntFree)); - NdbMutex_Unlock(&ndb_mutex); - return pNdb; -} - -void -PoolNdb::release(Ctx& ctx, Ndb* pNdb) -{ - NdbMutex_Lock(&ndb_mutex); - m_listUsed.remove(pNdb); - m_listFree.push_back(pNdb); - m_cntFree++; - m_cntUsed--; - ctx_log1(("free Ndb: used=%u free=%u", m_cntUsed, m_cntFree)); - NdbMutex_Unlock(&ndb_mutex); -} diff --git a/ndb/src/old_files/client/odbc/handles/PoolNdb.hpp b/ndb/src/old_files/client/odbc/handles/PoolNdb.hpp deleted file mode 100644 index 35eac055c30..00000000000 --- a/ndb/src/old_files/client/odbc/handles/PoolNdb.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef ODBC_HANDLES_PoolNdb_hpp -#define ODBC_HANDLES_PoolNdb_hpp - -#include -#include - -class Ndb; - -/** - * @class PoolNdb - * @brief Pool of Ndb objects. - * - * A class implementing pool of Ndb objects. - */ -class PoolNdb { -public: - PoolNdb(); - ~PoolNdb(); - Ndb* allocate(Ctx& ctx, int timeout); - void release(Ctx& ctx, Ndb* pNdb); -private: - std::list m_listUsed; - std::list m_listFree; - unsigned m_cntUsed; - unsigned m_cntFree; -}; - -#endif diff --git a/ndb/src/old_files/client/odbc/handles/handles.hpp b/ndb/src/old_files/client/odbc/handles/handles.hpp deleted file mode 100644 index a9f0fcae888..00000000000 --- a/ndb/src/old_files/client/odbc/handles/handles.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef OBDC_HANDLES_handles_hpp -#define OBDC_HANDLES_handles_hpp - -#include -#include "HandleBase.hpp" -#include "HandleRoot.hpp" -#include "HandleEnv.hpp" -#include "HandleDbc.hpp" -#include "HandleStmt.hpp" -#include "HandleDesc.hpp" - -#endif diff --git a/ndb/src/old_files/ndbbaseclient/Makefile b/ndb/src/old_files/ndbbaseclient/Makefile deleted file mode 100644 index f4c49a95ffa..00000000000 --- a/ndb/src/old_files/ndbbaseclient/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -include .defs.mk - -TYPE := * - -PIC_ARCHIVE := Y -NONPIC_ARCHIVE := Y -ARCHIVE_TARGET := ndbbaseclient - -A_LIB := Y -SO_LIB := Y -PIC_LIB := Y -LIB_TARGET := ndbclient - -LIB_TARGET_ARCHIVES := $(ARCHIVE_TARGET) \ - ndbapi \ - mgmapi \ - newtonapi \ - transporter \ - general \ - signaldataprint \ - mgmsrvcommon \ - portlib \ - logger \ - trace - -SOURCES = ndbbaseclient_dummy.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/src/old_files/ndbbaseclient/ndbbaseclient_dummy.cpp b/ndb/src/old_files/ndbbaseclient/ndbbaseclient_dummy.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ndb/src/old_files/ndbclient/Makefile b/ndb/src/old_files/ndbclient/Makefile deleted file mode 100644 index 2c597eccfa1..00000000000 --- a/ndb/src/old_files/ndbclient/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -include .defs.mk - -TYPE := * - -PIC_ARCHIVE := Y -NONPIC_ARCHIVE := Y -ARCHIVE_TARGET := ndbclient - -A_LIB := N -SO_LIB := Y -PIC_LIB := Y -LIB_TARGET := ndbclient_extra - -LDFLAGS_LAST = -lstdc++ -lm - -LIB_TARGET_ARCHIVES := $(ARCHIVE_TARGET) \ - ndbapi \ - mgmapi \ - newtonapi \ - transporter \ - general \ - signaldataprint \ - mgmsrvcommon \ - portlib \ - logger \ - trace \ - odbcdriver \ - odbchandles \ - odbcdictionary \ - odbccodegen \ - odbcexecutor \ - odbccommon - -SOURCES = ndbclient_dummy.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/src/old_files/ndbclient/ndbclient_dummy.cpp b/ndb/src/old_files/ndbclient/ndbclient_dummy.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ndb/src/old_files/newtonapi/Makefile b/ndb/src/old_files/newtonapi/Makefile deleted file mode 100644 index bed179046a5..00000000000 --- a/ndb/src/old_files/newtonapi/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -include .defs.mk - -TYPE := ndbapiclient - -PIC_ARCHIVE := Y -ARCHIVE_TARGET := newtonapi - -A_LIB := Y -SO_LIB := Y -PIC_LIB := Y - -LIB_TARGET := NEWTON_API -LIB_TARGET_ARCHIVES := $(ARCHIVE_TARGET) NDB_API - -SOURCES = \ - dba_binding.cpp \ - dba_process.cpp \ - dba_dac.cpp \ - dba_init.cpp \ - dba_schema.cpp \ - dba_bulkread.cpp \ - dba_error.cpp \ - dba_config.cpp - -CCFLAGS_LOC += -I../include -I$(call fixpath,$(NDB_TOP)/include/portlib) -I$(call fixpath,$(NDB_TOP)/include/util) -I$(call fixpath,$(NDB_TOP)/include/newtonapi) -DDEBUG - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/newtonapi/dba_binding.cpp b/ndb/src/old_files/newtonapi/dba_binding.cpp deleted file mode 100644 index 63e48110b1d..00000000000 --- a/ndb/src/old_files/newtonapi/dba_binding.cpp +++ /dev/null @@ -1,439 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include "dba_internal.hpp" - -static bool matchType(NdbDictionary::Column::Type, DBA_DataTypes_t); -static bool matchSize(NdbDictionary::Column::Type, unsigned, Size_t); -static int computeChecksum(const DBA_Binding_t * bindings); - -struct DBA__Array { - int count; - int data[1]; - - bool exists(int value) const { - for(int i = 0; igetDictionary(); - if(dict == 0){ - DBA__SetLatestError(DBA_NDB_ERROR, 0, - "Internal NDB error: No dictionary"); - return 0; - } - - const NdbDictionary::Table * table = dict->getTable(TableName); - if(table == 0){ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, - "No such table: %s", TableName); - return 0; - } - - /** - * Keys/Columns in table - */ - const int tabColumns = table->getNoOfColumns(); - const int tabKeys = table->getNoOfPrimaryKeys(); - - /** - * Ok, ok... I alloc four bytes extra so what... - */ - struct DBA__Array * keys = (struct DBA__Array *)malloc - (sizeof(struct DBA__Array)+tabKeys*sizeof(int)); - - if(keys == 0){ - DBA__SetLatestError(DBA_ERROR, 0, - "malloc(%d) failed", - sizeof(struct DBA__Array)+tabKeys*sizeof(int)); - return 0; - } - - struct DBA__Array * columns = (struct DBA__Array *)malloc - (sizeof(struct DBA__Array)+tabColumns*sizeof(int)); - - if(columns == 0){ - DBA__SetLatestError(DBA_ERROR, 0, - "malloc(%d) failed", - sizeof(struct DBA__Array)+tabColumns*sizeof(int)); - free(keys); - return 0; - } - - columns->count = 0; - keys->count = 0; - - DBA_Binding_t * bindings = createBinding(TableName, - NbCol, - ColsBindings, - StructSz, - table, - keys, - columns); - - for(int i = 0; igetColumn(i); - if(col->getPrimaryKey()){ - if(!keys->exists(i)){ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, - "Key column: %s not specified in binding", - col->getName()); - - free(keys); free(columns); - DBA_DestroyBinding(bindings); - return 0; - } - } - } - - free(keys); free(columns); - - DBA__ValidBinding(bindings); - - return bindings; -} - -DBA_Binding_t * -createBinding(const char* TableName, - int NbCol, - const DBA_ColumnBinding_t ColsBindings[], - Size_t StructSz, - const NdbDictionary::Table * table, - struct DBA__Array * keys, - struct DBA__Array * columns){ - /** - * Counters for this part of binding - */ - int noOfKeys = 0; - int noOfColumns = 0; - int noOfSubBindings = 0; - - /** - * Check names and types and sizes - */ - for(int i = 0; igetColumn(ColsBindings[i].Name); - const Uint32 attrId = col->getColumnNo(); - - if(col == 0){ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, - "Unknown column: %s", ColsBindings[i].Name); - return 0; - } - const NdbDictionary::Column::Type type = col->getType(); - if(!matchType(type, ColsBindings[i].DataType)){ - DBA_DEBUG("Incorrect type for: " << ColsBindings[i].Name); - DBA_DEBUG("type: " << type); - DBA_DEBUG("ColsBindings[i].DataType: " << ColsBindings[i].DataType); - - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, - "Incorrect type for column: %s", - ColsBindings[i].Name); - - return 0; - } - - if(!matchSize(type, col->getLength(), ColsBindings[i].Size)){ - DBA_DEBUG("Incorrect size for: " << ColsBindings[i].Name); - DBA_DEBUG("type: " << type); - DBA_DEBUG("length: " << col->getLength()); - DBA_DEBUG("ColsBindings[i].Size" << (Uint64)ColsBindings[i].Size); - - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, - "Incorrect size for column: %s", - ColsBindings[i].Name); - return 0; - } - - if(col->getPrimaryKey()){ - noOfKeys++; - } else { - noOfColumns++; - } - - /** - * Check only in "validate" phase - */ - if(columns != 0 && keys != 0){ - if(columns->exists(attrId) || keys->exists(attrId)){ - DBA_DEBUG("Column bound multiple times: " << ColsBindings[i].Name); - - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, - "Column bound multiple times: %s", - ColsBindings[i].Name); - return 0; - } - - if(col->getPrimaryKey()){ - keys->insert(attrId); - } else { - columns->insert(attrId); - } - } - } - } - - /** - * Validation is all set - */ - - /** - * Allocate memory - */ - const int szOfStruct = - sizeof(DBA_Binding_t) - + strlen(TableName) + 4 - + (2 * sizeof(int) * noOfKeys) - + (2 * sizeof(int) * noOfColumns) - + ((sizeof(struct DBA_Binding *) + sizeof(int)) * noOfSubBindings) - - 4; - - DBA_Binding * ret = (DBA_Binding *)malloc(szOfStruct); - if(ret == 0){ - DBA__SetLatestError(DBA_ERROR, 0, - "malloc(%d) failed", szOfStruct); - return 0; - } - - for(int i = 0; imagic[i] = DBA__TheMagic[i]; - - ret->noOfKeys = noOfKeys; - ret->noOfColumns = noOfColumns; - ret->noOfSubBindings = noOfSubBindings; - - ret->keyIds = (int *)&(ret->data[0]); - ret->keyOffsets = ret->keyIds + noOfKeys; - - ret->columnIds = ret->keyOffsets + noOfKeys; - ret->columnOffsets = ret->columnIds + noOfColumns; - - ret->subBindingOffsets = ret->columnOffsets + noOfColumns; - ret->subBindings = (DBA_Binding **) - (ret->subBindingOffsets + noOfSubBindings); - - ret->tableName = (char *)(ret->subBindings + noOfSubBindings); - ret->structSz = StructSz; - ret->checkSum = computeChecksum(ret); - - /** - * Populate arrays - */ - strcpy(ret->tableName, TableName); - - int k = 0; - int c = 0; - int p = 0; - - for(int i = 0; isubBindings[p] = createBinding(TableName, - ColsBindings[i].Size, - ColsBindings[i].SubBinding, - StructSz, - table, - 0, - 0); - - DBA__ValidBinding(ret->subBindings[p]); - - ret->subBindingOffsets[p] = ColsBindings[i].Offset; - p++; - } else { - const NdbDictionary::Column * col = - table->getColumn(ColsBindings[i].Name); - - if(col->getPrimaryKey()){ - ret->keyIds[k] = col->getColumnNo(); - ret->keyOffsets[k] = ColsBindings[i].Offset; - k++; - } else { - ret->columnIds[c] = col->getColumnNo(); - ret->columnOffsets[c] = ColsBindings[i].Offset; - c++; - } - } - } - - return ret; -} - - -extern "C" -DBA_Error_t -DBA_DestroyBinding( DBA_Binding_t* Binding ){ - - for(int i = 0; inoOfSubBindings; i++) - DBA_DestroyBinding(Binding->subBindings[i]); - - free(Binding); - - return DBA_NO_ERROR; -} - -static -bool -matchType(NdbDictionary::Column::Type t1, DBA_DataTypes_t t2){ - for(int i = 0; imagic[i] != DBA__TheMagic[i]){ - DBA_DEBUG("Invalid magic in validBinding"); - return false; - } - - const int cs = computeChecksum(bindings); - if(cs != bindings->checkSum){ - DBA_DEBUG("Invalid checksum in validBinding"); - DBA_DEBUG("cs = " << cs << " b->cs= " << bindings->checkSum); - return false; - } - - return true; -} - -bool -DBA__ValidBindings(const DBA_Binding_t * const * pBindings, int n){ - for(int i = 0; istructSz; -} diff --git a/ndb/src/old_files/newtonapi/dba_bulkread.cpp b/ndb/src/old_files/newtonapi/dba_bulkread.cpp deleted file mode 100644 index 1f75037046b..00000000000 --- a/ndb/src/old_files/newtonapi/dba_bulkread.cpp +++ /dev/null @@ -1,267 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include "dba_internal.hpp" - -struct DBA__BulkReadData { - const DBA_Binding_t * const * pBindings; // The bindings - DBA_BulkReadResultSet_t * pData; // The data - - int NbRows; // NbRows per binding - int NbBindings; // NbBindings - int TotalRows; // Total rows (NbRows*NbBindings) - - DBA_AsyncCallbackFn_t CbFunc; // Users callback - DBA_ReqId_t RequestId; // Users request id - DBA_Error_t Status; // Request status - DBA_ErrorCode_t ErrorCode; /**< Request error - Only valid if request is - aborted */ - - int RowsSubmitted; // No of read sent to NDB - int RowsAcknowledged; // No of read responses - int OpPerTrans; // Operations per transaction - - struct Index { - int binding; - int row; - int datarow; - - void init() { row = binding = datarow = 0;} - void next(int rows) { - datarow++; row++; - if(row == rows){ row = 0; binding++; } - } - }; - Index lastSend; - Index nextSend; - - /** - * If "simple" bulkread - * use this storage - */ - const DBA_Binding_t * bindings[1]; - - DBA__BulkReadData() { - RequestId = DBA_INVALID_REQID; - } - void ProcessBulkRead(); - bool ProcessCallback(int errorCode, NdbConnection * connection); -}; - -static -void -NewtonCallback(int errorCode, - NdbConnection * connection, - void * anyObject){ - - DBA__BulkReadData * brd = (DBA__BulkReadData*)anyObject; - - brd->ProcessCallback(errorCode, connection); - - DBA__TheNdb->closeTransaction(connection); - - if(brd->RowsSubmitted == brd->TotalRows){ - - /** - * The entire bulk read is finished, - * call users callback - */ - DBA_ReqId_t reqId = brd->RequestId; - - // Invalidate BulkReadData - brd->RequestId = DBA_INVALID_REQID; - - brd->CbFunc(reqId, brd->Status, brd->ErrorCode); - return; - } - - brd->ProcessBulkRead(); -} - -/** - * A BulkReadData structure - */ -static DBA__BulkReadData theBRD; - -#define CHECK_BINDINGS(Bindings) \ - if(!DBA__ValidBinding(Bindings)){ \ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, "Invalid bindings"); \ - return DBA_INVALID_REQID; \ - } - -#define CHECK_BINDINGS2(Bindings, NbBindings) \ - if(!DBA__ValidBindings(Bindings, NbBindings)){ \ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, "Invalid bindings"); \ - return DBA_INVALID_REQID; \ - } - -DBA_ReqId_t -DBA_BulkReadRows(const DBA_Binding_t * pBindings, - DBA_BulkReadResultSet_t pData[], - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ){ - - CHECK_BINDINGS(pBindings); - - DBA__BulkReadData * brd = &theBRD; - - NdbMutex_Lock(DBA__TheNewtonMutex); - - if(brd->RequestId != DBA_INVALID_REQID){ - DBA__SetLatestError(DBA_ERROR, 0, - "DBA only permits 1 concurrent bulkread"); - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return DBA_ERROR; - } - - theBRD.RequestId = 1; - - /** - * - */ - brd->bindings[0] = pBindings; - brd->pBindings = brd->bindings; - brd->pData = pData; - - /** - * Control data - */ - brd->NbRows = NbRows; - brd->NbBindings = 1; - brd->TotalRows = NbRows; - brd->CbFunc = CbFunc; - brd->Status = DBA_NO_ERROR; - brd->ErrorCode = 0; - brd->OpPerTrans = DBA__BulkReadCount; - - brd->RowsSubmitted = 0; - brd->RowsAcknowledged = 0; - - brd->lastSend.init(); - brd->nextSend.init(); - - brd->ProcessBulkRead(); - NdbMutex_Unlock(DBA__TheNewtonMutex); - - return brd->RequestId; -} - -DBA_ReqId_t -DBA_BulkMultiReadRows(const DBA_Binding_t * const * pBindings, - DBA_BulkReadResultSet_t pData[], - int NbBindings, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ){ - - CHECK_BINDINGS2(pBindings, NbBindings); - - DBA__BulkReadData * brd = &theBRD; - - NdbMutex_Lock(DBA__TheNewtonMutex); - - if(brd->RequestId != DBA_INVALID_REQID){ - DBA__SetLatestError(DBA_ERROR, 0, - "DBA only permits 1 concurrent bulkread"); - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return DBA_ERROR; - } - - brd->RequestId = 1; - - /** - * - */ - brd->pBindings = pBindings; - brd->pData = pData; - - /** - * Control data - */ - brd->NbRows = NbRows; - brd->NbBindings = NbBindings; - brd->TotalRows = (NbRows * NbBindings); - brd->CbFunc = CbFunc; - brd->Status = DBA_NO_ERROR; - brd->ErrorCode = 0; - brd->OpPerTrans = DBA__BulkReadCount; - - brd->RowsSubmitted = 0; - brd->RowsAcknowledged = 0; - - brd->lastSend.init(); - brd->nextSend.init(); - - brd->ProcessBulkRead(); - - NdbMutex_Unlock(DBA__TheNewtonMutex); - - return brd->RequestId; -} - -bool -DBA__BulkReadData::ProcessCallback(int errorCode, NdbConnection * con){ - - Index tmp = lastSend; - const NdbOperation * op = con->getNextCompletedOperation(0); - - for(int i = 0; igetNdbError().code == 0) - pData[tmp.datarow].RowFoundIndicator = 1; - else - pData[tmp.datarow].RowFoundIndicator = 0; - - RowsAcknowledged++; - tmp.next(NbRows); - op = con->getNextCompletedOperation(op); - } - return true; -} - -void -DBA__BulkReadData::ProcessBulkRead(){ - - NdbConnection * con = DBA__TheNdb->startTransaction(); - - Index tmp = nextSend; - - for(int i = 0; igetNdbOperation(binding->tableName); - - op->simpleRead(); - - require(DBA__EqualGetValue(op, binding, data)); - - RowsSubmitted++; - tmp.next(NbRows); - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)this, - CommitAsMuchAsPossible); - - lastSend = nextSend; - nextSend = tmp; -} diff --git a/ndb/src/old_files/newtonapi/dba_config.cpp b/ndb/src/old_files/newtonapi/dba_config.cpp deleted file mode 100644 index d84386a9438..00000000000 --- a/ndb/src/old_files/newtonapi/dba_config.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include "dba_internal.hpp" - -int DBA__NBP_Intervall = 10; -int DBA__BulkReadCount = 1000; -int DBA__StartTransactionTimout = 0; -int DBA__NBP_Force = 1; - -struct DBA__Config { - int ParamId; - int * Param; - int min; - int max; - const char * Description; -}; - -static -DBA__Config Parameters[] = { - { 0, &DBA__NBP_Intervall, 4, INT_MAX, - "Newton Batch Process Interval(ms)" }, - { 1, &DBA__BulkReadCount, 1, 5000, - "Operations per transaction during bulkread" }, - { 2, &DBA__StartTransactionTimout, 0, INT_MAX, - "Start transaction timeout(ms)" }, - { 3, &DBA__NBP_Force, 0, 2, - "Newton Batch Process Force send algorithm" } -}; - -static const int Params = sizeof(Parameters)/sizeof(DBA__Config); - -static -DBA__Config * -getParam(int id){ - for(int i = 0; imin){ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, - "Value too small for parameter %d (min = %d)", - Value, p->min); - return DBA_APPLICATION_ERROR; - } - - if(Value > p->max){ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, - "Value too big for parameter %d (max = %d)", - Value, p->max); - return DBA_APPLICATION_ERROR; - } - - * p->Param = Value; - return DBA_NO_ERROR; -} - -extern "C" -DBA_Error_t -DBA_GetParameter(int ParameterId, int * Value){ - if(ParameterId == -1){ - if(DBA__TheNdb == 0){ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, "DBA_Open() is not called" - ); - return DBA_APPLICATION_ERROR; - } - * Value = DBA__TheNdb->getNodeId(); - return DBA_NO_ERROR; - } - - DBA__Config * p = getParam(ParameterId); - if(p == 0){ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, "Invalid parameter id: %d", - ParameterId); - return DBA_APPLICATION_ERROR; - } - - * Value = * p->Param; - - return DBA_NO_ERROR; -} - diff --git a/ndb/src/old_files/newtonapi/dba_dac.cpp b/ndb/src/old_files/newtonapi/dba_dac.cpp deleted file mode 100644 index fcb4e676e46..00000000000 --- a/ndb/src/old_files/newtonapi/dba_dac.cpp +++ /dev/null @@ -1,842 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include "dba_internal.hpp" -#include - -static void -DBA__ErrorMapping(const NdbError & err, DBA_Error_t * status){ - switch(err.classification){ - case NdbError::ConstraintViolation: - * status = DBA_CONSTRAINT_VIOLATION; - break; - - case NdbError::NoDataFound: - * status = DBA_NO_DATA; - break; - - case NdbError::TemporaryResourceError: - case NdbError::NodeRecoveryError: - * status = DBA_TEMPORARY_ERROR; - break; - - case NdbError::InsufficientSpace: - * status = DBA_INSUFFICIENT_SPACE; - break; - - case NdbError::UnknownResultError: - * status = DBA_UNKNOWN_RESULT; - break; - - case NdbError::OverloadError: - * status = DBA_OVERLOAD; - break; - - case NdbError::TimeoutExpired: - * status = DBA_TIMEOUT; - break; - - case NdbError::SchemaError: - * status = DBA_SCHEMA_ERROR; - break; - - case NdbError::ApplicationError: - * status = DBA_APPLICATION_ERROR; - break; - - case NdbError::InternalError: - default: - * status = DBA_NDB_ERROR; - break; - } -} - -/** - * Map between NDB error codes and DBA error codes - */ -static -void -DBA__CallbackErrorCodeMapping(int errorCode, - NdbConnection * connection, - DBA_Error_t * status, - DBA_ErrorCode_t * errCode) { - if(errorCode == 0){ - * status = DBA_NO_ERROR; - * errCode = 0; - return; - } - const NdbError & err = connection->getNdbError(); - DBA__ErrorMapping(err, status); - * errCode = err.code; -} - -/** - * When startTransaction fails - */ -static -void -DBA__ConnectionErrorMapping(Ndb * theNdb){ - const NdbError & err = theNdb->getNdbError(); - - DBA_Error_t status; - DBA__ErrorMapping(err, &status); - - DBA__SetLatestError(status, err.code, - err.message); -} - -/** - * When getNdbOperation fails - */ -static -void -DBA__OperationErrorMapping(Ndb * theNdb, NdbConnection * con){ - const NdbError & err = theNdb->getNdbError(); - - DBA_Error_t status; - DBA__ErrorMapping(err, &status); - - DBA__SetLatestError(status, err.code, - err.message); -} - -/** - * When equal/get/set value fails - */ -static -void -DBA__EqualErrorMapping(Ndb * theNdb, NdbConnection * con, NdbOperation * op){ - const NdbError & err = theNdb->getNdbError(); - - DBA_Error_t status; - DBA__ErrorMapping(err, &status); - - DBA__SetLatestError(status, err.code, - err.message); -} - -static -void -NewtonCallback(int errorCode, - NdbConnection * connection, - void * anyObject){ - - DBA_AsyncCallbackFn_t CbFunc = (DBA_AsyncCallbackFn_t)anyObject; - DBA_ReqId_t ReqId = (DBA_ReqId_t) connection; - - DBA_Error_t Status = (DBA_Error_t) errorCode; - DBA_ErrorCode_t Impl_Status ; - - DBA__CallbackErrorCodeMapping(errorCode, connection, &Status, &Impl_Status); - - DBA__TheNdb->closeTransaction(connection); - - DBA__RecvTransactions++; - - CbFunc(ReqId, Status, Impl_Status); -} - -/** - * Start transaction - */ -NdbConnection * -startTransaction(){ - NdbConnection * con = DBA__TheNdb->startTransaction(); - if(con != 0) - return con; - - const int _t = (DBA__SentTransactions - DBA__RecvTransactions); - const int t = (_t>0?_t:-_t); - - if(!(DBA__TheNdb->getNdbError().code == 4006 && t > 1000)){ - DBA_DEBUG("DBA__TheNdb->getNdbError() = " << - DBA__TheNdb->getNdbError()); - } - - int sum = 0; - int sleepTime = 10; - for(; con == 0 && sum < DBA__StartTransactionTimout; ){ - NdbMutex_Unlock(DBA__TheNewtonMutex); - NdbSleep_MilliSleep(sleepTime); - NdbMutex_Lock(DBA__TheNewtonMutex); - con = DBA__TheNdb->startTransaction(); - - sum += sleepTime; - sleepTime += 10; - } - - return con; -} - -#define CHECK_BINDINGS(Bindings) \ - if(!DBA__ValidBinding(Bindings)){ \ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, "Invalid bindings"); \ - return DBA_INVALID_REQID; \ - } - -#define CHECK_BINDINGS2(Bindings, NbBindings) \ - if(!DBA__ValidBindings(Bindings, NbBindings)){ \ - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, "Invalid bindings"); \ - return DBA_INVALID_REQID; \ - } - -#define CHECK_CONNECTION(Connection) \ - if(Connection == 0){ \ - DBA__ConnectionErrorMapping(DBA__TheNdb); \ - NdbMutex_Unlock(DBA__TheNewtonMutex); \ - return DBA_INVALID_REQID; \ - } - -#define CHECK_OPERATION(Connection, Operation) \ - if(Operation == 0){ \ - DBA__OperationErrorMapping(DBA__TheNdb, Connection); \ - DBA__TheNdb->closeTransaction(Connection); \ - NdbMutex_Unlock(DBA__TheNewtonMutex); \ - return DBA_INVALID_REQID; \ - } - -#define EQUAL_ERROR(Connection, Operation) { \ - DBA__EqualErrorMapping(DBA__TheNdb, Connection, Operation); \ - DBA__TheNdb->closeTransaction(Connection); \ - NdbMutex_Unlock(DBA__TheNewtonMutex); \ - return DBA_INVALID_REQID; \ - } - -/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/ - -extern "C" -DBA_ReqId_t -DBA_ReadRows( const DBA_Binding_t* pBindings, void* const * _pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ) { - - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->simpleRead(); - - void * pData = _pData[i]; - - if(!DBA__EqualGetValue(op, pBindings, pData)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_ArrayReadRows( const DBA_Binding_t* pBindings, void * pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ){ - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->simpleRead(); - - if(!DBA__EqualGetValue(op, pBindings, - ((char*)pData)+i*pBindings->structSz)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_MultiReadRow(const DBA_Binding_t * const * pBindings, - void * const * pData, - int NbBindings, - DBA_AsyncCallbackFn_t CbFunc ) { - CHECK_BINDINGS2(pBindings, NbBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings[i]->tableName); - - CHECK_OPERATION(con, op); - - op->simpleRead(); - - if(!DBA__EqualGetValue(op, pBindings[i], pData[i])){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/ - -extern "C" -DBA_ReqId_t -DBA_InsertRows( const DBA_Binding_t* pBindings, const void * const * _pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ) { - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->insertTuple(); - - const void * pData = _pData[i]; - - if(!DBA__EqualSetValue(op, pBindings, pData)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_ArrayInsertRows( const DBA_Binding_t* pBindings, const void * pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ){ - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->insertTuple(); - - if(!DBA__EqualSetValue(op, pBindings, - ((char*)pData)+i*pBindings->structSz)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_MultiInsertRow(const DBA_Binding_t * const * pBindings, - const void * const * pData, - int NbBindings, - DBA_AsyncCallbackFn_t CbFunc ) { - CHECK_BINDINGS2(pBindings, NbBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings[i]->tableName); - - CHECK_OPERATION(con, op); - - op->insertTuple(); - - if(!DBA__EqualSetValue(op, pBindings[i], pData[i])){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/ - -extern "C" -DBA_ReqId_t -DBA_UpdateRows( const DBA_Binding_t* pBindings, const void * const * _pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ) { - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->updateTuple(); - - const void * pData = _pData[i]; - - if(!DBA__EqualSetValue(op, pBindings, pData)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_ArrayUpdateRows( const DBA_Binding_t* pBindings, const void * pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ){ - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->updateTuple(); - - if(!DBA__EqualSetValue(op, pBindings, - ((char*)pData)+i*pBindings->structSz)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_MultiUpdateRow(const DBA_Binding_t * const * pBindings, - const void * const * pData, - int NbBindings, - DBA_AsyncCallbackFn_t CbFunc ) { - CHECK_BINDINGS2(pBindings, NbBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings[i]->tableName); - - CHECK_OPERATION(con, op); - - op->updateTuple(); - - if(!DBA__EqualSetValue(op, pBindings[i], pData[i])){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/ - -extern "C" -DBA_ReqId_t -DBA_WriteRows( const DBA_Binding_t* pBindings, const void * const * _pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ) { - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->writeTuple(); - - const void * pData = _pData[i]; - - if(!DBA__EqualSetValue(op, pBindings, pData)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_ArrayWriteRows( const DBA_Binding_t* pBindings, const void * pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ){ - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->writeTuple(); - - if(!DBA__EqualSetValue(op, pBindings, - ((char*)pData)+i*pBindings->structSz)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_MultiWriteRow(const DBA_Binding_t * const * pBindings, - const void * const * pData, - int NbBindings, - DBA_AsyncCallbackFn_t CbFunc ) { - CHECK_BINDINGS2(pBindings, NbBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings[i]->tableName); - - CHECK_OPERATION(con, op); - - op->writeTuple(); - - if(!DBA__EqualSetValue(op, pBindings[i], pData[i])){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/ - -extern "C" -DBA_ReqId_t -DBA_DeleteRows( const DBA_Binding_t* pBindings, const void * const * _pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ) { - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->deleteTuple(); - - const void * pData = _pData[i]; - - if(!DBA__Equal(op, pBindings, pData)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_ArrayDeleteRows( const DBA_Binding_t* pBindings, const void * pData, - int NbRows, - DBA_AsyncCallbackFn_t CbFunc ){ - CHECK_BINDINGS(pBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings->tableName); - - CHECK_OPERATION(con, op); - - op->deleteTuple(); - - if(!DBA__Equal(op, pBindings, - ((char*)pData)+i*pBindings->structSz)){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -extern "C" -DBA_ReqId_t -DBA_MultiDeleteRow(const DBA_Binding_t * const * pBindings, - const void * const * pData, - int NbBindings, - DBA_AsyncCallbackFn_t CbFunc ) { - CHECK_BINDINGS2(pBindings, NbBindings); - - NdbMutex_Lock(DBA__TheNewtonMutex); - NdbConnection * con = startTransaction(); - - CHECK_CONNECTION(con); - - for(int i = 0; igetNdbOperation(pBindings[i]->tableName); - - CHECK_OPERATION(con, op); - - op->deleteTuple(); - - if(!DBA__Equal(op, pBindings[i], pData[i])){ - EQUAL_ERROR(con, op); - } - } - - con->executeAsynchPrepare(Commit, - NewtonCallback, - (void*)CbFunc); - - DBA__SentTransactions++; - - NdbMutex_Unlock(DBA__TheNewtonMutex); - return (DBA_ReqId_t) con; -} - -/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/ - -bool -DBA__EqualGetValue(NdbOperation * op, - const DBA_Binding_t* pBindings, - void * pData){ - for(int i = 0; inoOfKeys; i++){ - if(op->equal(pBindings->keyIds[i], - (const char*)pData+pBindings->keyOffsets[i]) == -1){ - return false; - } - } - - for(int i = 0; inoOfColumns; i++){ - if(op->getValue(pBindings->columnIds[i], - (char*)pData+pBindings->columnOffsets[i]) == 0){ - return false; - } - } - - for(int i = 0; inoOfSubBindings; i++){ - void * tData = *(void**)((char *)pData+pBindings->subBindingOffsets[i]); - const DBA_Binding_t * tBinding = pBindings->subBindings[i]; - if(!DBA__EqualGetValue(op, tBinding, tData)) - return false; - } - - return true; -} - -bool -DBA__EqualSetValue(NdbOperation * op, - const DBA_Binding_t* pBindings, - const void * pData){ - - for(int i = 0; inoOfKeys; i++){ - if(op->equal(pBindings->keyIds[i], - (const char*)pData+pBindings->keyOffsets[i]) == -1){ - return false; - } - } - - for(int i = 0; inoOfColumns; i++){ - if(op->setValue(pBindings->columnIds[i], - (char*)pData+pBindings->columnOffsets[i]) == -1){ - return false; - } - } - - for(int i = 0; inoOfSubBindings; i++){ - void * tData = * (void**)((char *)pData+pBindings->subBindingOffsets[i]); - const DBA_Binding_t * tBinding = pBindings->subBindings[i]; - if(!DBA__EqualSetValue(op, tBinding, tData)) - return false; - } - - return true; -} - -bool -DBA__Equal(NdbOperation * op, - const DBA_Binding_t* pBindings, - const void * pData){ - - for(int i = 0; inoOfKeys; i++) - if(op->equal(pBindings->keyIds[i], - (const char*)pData+pBindings->keyOffsets[i]) == -1){ - return false; - } - - for(int i = 0; inoOfSubBindings; i++){ - void * tData = *(void**)((char *)pData+pBindings->subBindingOffsets[i]); - const DBA_Binding_t * tBinding = pBindings->subBindings[i]; - if(!DBA__Equal(op, tBinding, tData)) - return false; - } - - return true; -} - diff --git a/ndb/src/old_files/newtonapi/dba_error.cpp b/ndb/src/old_files/newtonapi/dba_error.cpp deleted file mode 100644 index f05446522b0..00000000000 --- a/ndb/src/old_files/newtonapi/dba_error.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include - -#include "dba_internal.hpp" - -static DBA_Error_t latestError = DBA_NO_ERROR; -static DBA_ErrorCode_t latestNdbError = 0; -static char latestMsg[1024]; - -/** - * Private - */ -void -DBA__SetLatestError(DBA_Error_t le, - DBA_ErrorCode_t lnb, - const char * msg, ...){ - - require(msg != 0); - - latestError = le; - latestNdbError = lnb; - - va_list ap; - - va_start(ap, msg); - vsnprintf(latestMsg, sizeof(latestMsg)-1, msg, ap); - va_end(ap); -} - -/** - * Get latest DBA error - */ -extern "C" -DBA_Error_t -DBA_GetLatestError(){ - return latestError; -} - -/** - * Get latest error string associated with GetLatestError - * - * String must not be free by caller of this method - */ -extern "C" -const char * -DBA_GetLatestErrorMsg(){ - return latestMsg; -} - -/** - * Get the latest NDB error - * - * Note only applicable to synchronous methods - */ -extern "C" -DBA_ErrorCode_t -DBA_GetLatestNdbError(){ - return latestNdbError; -} - -extern "C" -const -char * -DBA_GetNdbErrorMsg(DBA_ErrorCode_t code){ - return DBA__TheNdb->getNdbError(code).message; -} - -struct DBA_ErrorTxtMap { - DBA_Error_t Error; - const char * Msg; -}; - -static -const DBA_ErrorTxtMap errMap[] = { - { DBA_NO_ERROR, "No error" }, - { DBA_NOT_IMPLEMENTED, "Function Not Implemented" }, - { DBA_NDB_ERROR, "Uncategorised NDB error" }, - { DBA_ERROR, "Uncategorised DBA implementation error" }, - { DBA_APPLICATION_ERROR, - "Function called with invalid argument(s)/invalid sequence(s)" }, - { DBA_NO_DATA, "No row with specified PK existed" }, - { DBA_CONSTRAINT_VIOLATION, "There already existed a row with that PK" }, - - { DBA_TEMPORARY_ERROR, "Request failed due to temporary reasons" }, - { DBA_INSUFFICIENT_SPACE, - "The DB is full" }, - { DBA_OVERLOAD, "Request was rejected in NDB due to high load situation" }, - { DBA_TIMEOUT, "The request timed out, probably due to dead-lock" } -}; - -static const int ErrMsgs = sizeof(errMap)/sizeof(DBA_ErrorTxtMap); - -extern "C" -const -char * -DBA_GetErrorMsg(DBA_Error_t e){ - for(int i = 0; i - - -#ifdef NDB_WIN32 -static NdbMutex & DBA__InitMutex = * NdbMutex_Create(); -#else -static NdbMutex DBA__InitMutex = NDB_MUTEX_INITIALIZER; -#endif - -Ndb * DBA__TheNdb = 0; -NdbMutex * DBA__TheNewtonMutex = 0; -unsigned DBA__SentTransactions = 0; -unsigned DBA__RecvTransactions = 0; -NewtonBatchProcess * DBA__TheNBP = 0; - -extern "C" -DBA_Error_t -DBA_Open( ) { - NdbMutex_Lock(&DBA__InitMutex); - - if(DBA__TheNdb != 0){ - NdbMutex_Unlock(&DBA__InitMutex); - return DBA_NO_ERROR; - } - - DBA__TheNdb = new Ndb("Newton"); - DBA__TheNdb->init(1024); - if(DBA__TheNdb->waitUntilReady() != 0){ - delete DBA__TheNdb; DBA__TheNdb = 0; - NdbMutex_Unlock(&DBA__InitMutex); - return DBA_NDB_ERROR; - } - DBA__TheNewtonMutex = NdbMutex_Create(); - DBA__TheNBP = new NewtonBatchProcess(* DBA__TheNdb, * DBA__TheNewtonMutex); - DBA__TheNBP->doStart(); - NdbMutex_Unlock(&DBA__InitMutex); - return DBA_NO_ERROR; -} - - -/** - * Closes the database. - * - * @return Error status - */ -extern "C" -DBA_Error_t -DBA_Close(void){ - - NdbMutex_Lock(&DBA__InitMutex); - - if(DBA__TheNBP != 0) - DBA__TheNBP->doStop(true); - delete DBA__TheNBP; - DBA__TheNBP = 0; - - if(DBA__TheNdb != 0) - delete DBA__TheNdb; - DBA__TheNdb = 0; - - if(DBA__TheNewtonMutex != 0) - NdbMutex_Destroy(DBA__TheNewtonMutex); - DBA__TheNewtonMutex = 0; - - NdbMutex_Unlock(&DBA__InitMutex); - return DBA_NO_ERROR; -} diff --git a/ndb/src/old_files/newtonapi/dba_internal.hpp b/ndb/src/old_files/newtonapi/dba_internal.hpp deleted file mode 100644 index 84ae7ba222b..00000000000 --- a/ndb/src/old_files/newtonapi/dba_internal.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef DBA_INTERNAL_HPP -#define DBA_INTERNAL_HPP - -#include - -extern "C" { -#include "dba.h" -} - -#include -#include -#include - -#ifndef INT_MAX -#define INT_MAX 2147483647 -#endif - -#ifdef DEBUG -#define DBA_DEBUG(x) ndbout << x << endl -#else -#define DBA_DEBUG(x) -#endif - -extern Ndb * DBA__TheNdb; -extern NdbMutex * DBA__TheNewtonMutex; - -extern unsigned DBA__SentTransactions; -extern unsigned DBA__RecvTransactions; - -/** - * Configuration - */ -extern int DBA__NBP_Intervall; // Param 0 -extern int DBA__BulkReadCount; // Param 1 -extern int DBA__StartTransactionTimout; // Param 2 -extern int DBA__NBP_Force; // Param 3 - -/** - * Error handling - */ -void DBA__SetLatestError(DBA_Error_t, DBA_ErrorCode_t, const char *, ...); - -/** - * Magic string - * - * Used to make sure that user passes correct pointers - */ -const int DBA__MagicLength = 4; -const char DBA__TheMagic[DBA__MagicLength] = { 'K', 'E', 'S', 'O' }; - -struct DBA_Binding { - char magic[DBA__MagicLength]; - int checkSum; - - char * tableName; - int structSz; - - int noOfKeys; - int *keyIds; - int *keyOffsets; - - int noOfColumns; - int *columnIds; - int *columnOffsets; - - int noOfSubBindings; - struct DBA_Binding **subBindings; - int * subBindingOffsets; - - int data[1]; -}; - -struct DBA__DataTypesMapping { - DBA_DataTypes_t newtonType; - NdbDictionary::Column::Type ndbType; -}; - -const DBA__DataTypesMapping DBA__DataTypesMappings[] = { - { DBA_CHAR, NdbDictionary::Column::Char }, - { DBA_INT, NdbDictionary::Column::Int } -}; - -const int DBA__NoOfMappings = sizeof(DBA__DataTypesMappings)/ - sizeof(DBA__DataTypesMapping); - -/** - * Validate magic string and checksum of a binding - */ -bool DBA__ValidBinding(const DBA_Binding_t * bindings); -bool DBA__ValidBindings(const DBA_Binding_t * const * pBindings, int n); - -/** - * Recursive equalGetValue (used for read) - * equalSetValue (used for write) - * equal (used for delete) - */ -bool DBA__EqualGetValue(NdbOperation *, const DBA_Binding_t *, void *); -bool DBA__EqualSetValue(NdbOperation *, const DBA_Binding_t *, const void *); -bool DBA__Equal (NdbOperation *, const DBA_Binding_t *, const void *); - -inline void require(bool test){ - if(!test) - abort(); -} - -#endif diff --git a/ndb/src/old_files/newtonapi/dba_process.cpp b/ndb/src/old_files/newtonapi/dba_process.cpp deleted file mode 100644 index ddb6e62f180..00000000000 --- a/ndb/src/old_files/newtonapi/dba_process.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include "dba_process.hpp" - -NewtonBatchProcess::NewtonBatchProcess(Ndb & ndb, NdbMutex & mutex) : - theNdb(ndb), - theMutex(mutex) -{ - theThread = 0; - startStopMutex = NdbMutex_Create(); - - _running = false; - _stop = false; -} - -NewtonBatchProcess::~NewtonBatchProcess(){ - doStop(true); - - if(theThread != 0) - NdbThread_Destroy(&theThread); - - if(startStopMutex != 0) - NdbMutex_Destroy(startStopMutex); - startStopMutex = 0; -} - -extern "C" -void* -runNDB_C(void * _nbp){ - NewtonBatchProcess * nbp = (NewtonBatchProcess*)_nbp; - nbp->_running = true; - nbp->run(); - nbp->_running = false; - - /** - * This sleep is to make sure that the transporter - * send thread will come in and send any - * signal buffers that this thread may have allocated. - * If that doesn't happen an error will occur in OSE - * when trying to restore a signal buffer allocated by a thread - * that have been killed. - */ - NdbSleep_MilliSleep(50); - NdbThread_Exit(0); - return 0; -} - -void -NewtonBatchProcess::doStart(){ - NdbMutex_Lock(startStopMutex); - if(_running && !_stop){ - NdbMutex_Unlock(startStopMutex); - return ; - } - - while(_running){ - NdbMutex_Unlock(startStopMutex); - NdbSleep_MilliSleep(200); - NdbMutex_Lock(startStopMutex); - } - - require(!_running); - _stop = false; - - if(theThread != 0) - NdbThread_Destroy(&theThread); - - theThread = NdbThread_Create(runNDB_C, - (void**)this, - 65535, - "Newton_BP", - NDB_THREAD_PRIO_LOWEST); - - NdbMutex_Unlock(startStopMutex); -} - -void -NewtonBatchProcess::doStop(bool wait){ - NdbMutex_Lock(startStopMutex); - _stop = true; - - if(wait){ - while(_running){ - NdbSleep_MilliSleep(200); - } - } - NdbMutex_Unlock(startStopMutex); -} - -bool -NewtonBatchProcess::isRunning() const { - return _running; -} - -bool -NewtonBatchProcess::isStopping() const { - return _stop; -} - -void -NewtonBatchProcess::run(){ - while(!_stop){ - NdbMutex_Lock(&theMutex); - theNdb.sendPollNdb(0, 1, DBA__NBP_Force); - NdbMutex_Unlock(&theMutex); - NdbSleep_MilliSleep(DBA__NBP_Intervall); - } -} diff --git a/ndb/src/old_files/newtonapi/dba_process.hpp b/ndb/src/old_files/newtonapi/dba_process.hpp deleted file mode 100644 index ef24fbd9142..00000000000 --- a/ndb/src/old_files/newtonapi/dba_process.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef NEWTON_BP_HPP -#define NEWTON_BP_HPP - -#include "dba_internal.hpp" - -#include -#include -#include - -extern "C" void* runNDB_C(void * nbp); - -/** - * This class implements the NewtonBatchProcess - */ -class NewtonBatchProcess { - friend void* runNDB_C(void * nbp); -public: - NewtonBatchProcess(Ndb &, NdbMutex &); - ~NewtonBatchProcess(); - - void doStart(); - void doStop(bool wait); - - bool isRunning() const ; - bool isStopping() const ; - -private: - void run(); - - bool _running; - bool _stop; - - Ndb & theNdb; - NdbMutex & theMutex; - - NdbThread * theThread; - NdbMutex * startStopMutex; -}; - -#endif diff --git a/ndb/src/old_files/newtonapi/dba_schema.cpp b/ndb/src/old_files/newtonapi/dba_schema.cpp deleted file mode 100644 index 1bf21f1fe80..00000000000 --- a/ndb/src/old_files/newtonapi/dba_schema.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "dba_internal.hpp" -#include "NdbSchemaCon.hpp" - -static bool getNdbAttr(DBA_DataTypes_t, - Size_t, - int * attrSize, - int * arraySize, - AttrType * attrType); - -extern "C" -DBA_Error_t -DBA_CreateTable(const char* TableName, - int NbColumns, - const DBA_ColumnDesc_t Columns[] ){ - - if(DBA_TableExists(TableName)) - return DBA_NO_ERROR; - - NdbSchemaCon * schemaCon = NdbSchemaCon::startSchemaTrans(DBA__TheNdb); - if(schemaCon == 0){ - DBA__SetLatestError(DBA_NDB_ERROR, 0, - "Internal NDB error: No schema transaction"); - return DBA_NDB_ERROR; - } - - NdbSchemaOp * schemaOp = schemaCon->getNdbSchemaOp(); - if(schemaOp == 0){ - NdbSchemaCon::closeSchemaTrans(schemaCon); - DBA__SetLatestError(DBA_NDB_ERROR, 0, - "Internal NDB error: No schema op"); - return DBA_NDB_ERROR; - } - - if(schemaOp->createTable( TableName, - 8, // Data Size - TupleKey, - 2, // Index size - All, - 6, - 78, - 80, - 1, - false) == -1){ - NdbSchemaCon::closeSchemaTrans(schemaCon); - DBA__SetLatestError(DBA_NDB_ERROR, 0, - "Internal NDB error: Create table failed"); - return DBA_NDB_ERROR; - } - - for (int i = 0; i < NbColumns; i++){ - int attrSize; - int arraySize; - AttrType attrType; - - if(!getNdbAttr(Columns[i].DataType, Columns[i].Size, - &attrSize, - &arraySize, - &attrType)){ - NdbSchemaCon::closeSchemaTrans(schemaCon); - DBA__SetLatestError(DBA_APPLICATION_ERROR, 0, - "Invalid datatype/size combination"); - return DBA_APPLICATION_ERROR; - } - - if(schemaOp->createAttribute( Columns[i].Name, - Columns[i].IsKey ? TupleKey : NoKey, - attrSize, - arraySize, - attrType) == -1){ - NdbSchemaCon::closeSchemaTrans(schemaCon); - DBA__SetLatestError(DBA_NDB_ERROR, 0, - "Internal NDB error: Create attribute failed"); - return DBA_NDB_ERROR; - } - } - - if(schemaCon->execute() == -1){ - NdbSchemaCon::closeSchemaTrans(schemaCon); - DBA__SetLatestError(DBA_NDB_ERROR, 0, - "Internal NDB error: Execute schema failed"); - return DBA_NDB_ERROR; - } - - NdbSchemaCon::closeSchemaTrans(schemaCon); - - return DBA_NO_ERROR; -} - -DBA_Error_t -DBA_DropTable( char* TableName ){ - return DBA_NOT_IMPLEMENTED; -} - -Boolean_t -DBA_TableExists( const char* TableName ){ - NdbDictionary::Dictionary * dict = DBA__TheNdb->getDictionary(); - if(dict == 0){ - return 0; - } - - const NdbDictionary::Table * tab = dict->getTable(TableName); - if(tab == 0){ - return 0; - } - return 1; -} - -static -bool -getNdbAttr(DBA_DataTypes_t type, - Size_t size, - int * attrSize, - int * arraySize, - AttrType * attrType) { - - if(type == DBA_CHAR){ - * attrType = String; - * attrSize = 8; - * arraySize = size; - return true; - } - - * attrType = Signed; - if((size % 4) == 0){ - * attrSize = 32; - * arraySize = size / 4; - return true; - } - - * attrSize = 8; - * arraySize = size; - - return true; -} diff --git a/ndb/src/old_files/rep/ExtSender.cpp b/ndb/src/old_files/rep/ExtSender.cpp deleted file mode 100644 index cf31001a85f..00000000000 --- a/ndb/src/old_files/rep/ExtSender.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "ExtSender.hpp" - -/***************************************************************************** - * Constructor / Destructor / Init / Get / Set - *****************************************************************************/ - -/** - * @todo: signalErrorHandler is not finished. Just infrastructure. - */ - -ExtSender::ExtSender() { - m_tf = NULL; - m_nodeId = 0; - m_ownRef = 0; -} - -ExtSender::~ExtSender() { - if (m_tf) delete m_tf; -} - -void -ExtSender::setNodeId(Uint32 nodeId) -{ -#if 0 - ndbout_c("ExtSender: Set nodeid to %d", nodeId); -#endif - - m_nodeId = nodeId; -} - -Uint32 -ExtSender::getOwnRef() const -{ - if(!m_ownRef) REPABORT("No m_ownRef set"); - - return m_ownRef; -} - -void -ExtSender::setOwnRef(Uint32 ref) -{ - // Can only be set once - if (m_ownRef != 0) REPABORT("Trying to change m_ownRef"); - - m_ownRef = ref; -} - -/***************************************************************************** - * Usage - *****************************************************************************/ - -int -ExtSender::sendSignal(class NdbApiSignal * s) { -#if 0 - ndbout_c("ExtSender: Sending signal %d to %d", - s->readSignalNumber(), m_nodeId); -#endif - - if (m_tf == NULL || m_nodeId == 0 || s==0) abort(); - m_tf->lock_mutex(); - int retvalue = m_tf->sendSignal(s, m_nodeId); - if (retvalue) { - RLOG(("sendSignal returned %d for send to node %d", retvalue, m_nodeId)); - } -#if 0 - ndbout_c("ExtSender: Sent signal to %d", m_nodeId); -#endif - m_tf->unlock_mutex(); - return retvalue; -} - -int -ExtSender::sendFragmentedSignal(NdbApiSignal * s, - LinearSectionPtr ptr[3], - Uint32 sections) { - if (m_tf == NULL || m_nodeId == 0) abort(); - m_tf->lock_mutex(); - int retvalue = m_tf->sendFragmentedSignal(s, m_nodeId, ptr, sections); - if (retvalue) { - RLOG(("sendFragmentedSignal returned %d for send to node %d", - retvalue, m_nodeId)); - } - m_tf->unlock_mutex(); - return retvalue; -} - -/** - * Check that TransporterFacade is connected to at least one DB node - */ -bool -ExtSender::connected(Uint32 timeOutMillis){ -#if 0 - ndbout_c("ExtSender: Waiting for remote component to be ready!"); -#endif - - NDB_TICKS start = NdbTick_CurrentMillisecond(); - NDB_TICKS now = start; - // while(m_tf->theClusterMgr->getNoOfConnectedNodes() == 0 && - while((m_tf->get_an_alive_node() == 0) && - (timeOutMillis == 0 || (now - start) < timeOutMillis)){ - NdbSleep_MilliSleep(100); - now = NdbTick_CurrentMillisecond(); - } - return m_tf->theClusterMgr->getNoOfConnectedNodes() > 0; -} - -bool -ExtSender::connected(Uint32 timeOutMillis, Uint32 nodeId){ - NDB_TICKS start = NdbTick_CurrentMillisecond(); - NDB_TICKS now = start; - - // while(m_tf->theClusterMgr->getNoOfConnectedNodes() == 0 && - while((m_tf->get_node_alive(nodeId) != 0) && - (timeOutMillis == 0 || (now - start) < timeOutMillis)){ - NdbSleep_MilliSleep(100); - now = NdbTick_CurrentMillisecond(); - } - return m_tf->theClusterMgr->getNoOfConnectedNodes() > 0; -} - -NdbApiSignal * -ExtSender::getSignal() -{ - /** - * @todo This should use some kind of list of NdbApiSignals, - * similar to the NDBAPI and the MGRSRVR. - * The best thing would be to have set of code - * shared between the programs. - * Thus the NDBAPI and MGMSRVR should be refactored. - * /Lars - */ - return new NdbApiSignal(getOwnRef()); -} diff --git a/ndb/src/old_files/rep/ExtSender.hpp b/ndb/src/old_files/rep/ExtSender.hpp deleted file mode 100644 index 0bdabd68f37..00000000000 --- a/ndb/src/old_files/rep/ExtSender.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef EXT_SENDER_HPP -#define EXT_SENDER_HPP - -#include -#include -#include -#include - -/** - * @todo Johan comment: - * - * ext->sendSignal should return something if send failed. - * I.e., i think all methods sending a signal should return int - * so that we can take care of errors. ALternatively take care of - * the error like this: - * if(ext->sendSignal(..) < 0 ) - * handleSignalError(...) - * - * or a combination.... - * - * Should go through all places that sends signals and check that - * they do correct error handling. - */ - -/** - * @class ExtSender - * @brief Manages connection to a transporter facade - */ -class ExtSender { -public: - /*************************************************************************** - * Constructor / Destructor / Init / Get / Set (Only set once!) - ***************************************************************************/ - ExtSender(); - ~ExtSender(); - - void setTransporterFacade(TransporterFacade * tf) { m_tf = tf; } - void setNodeId(Uint32 nodeId); - Uint32 getOwnRef() const; - void setOwnRef(Uint32 ref); - - /*************************************************************************** - * Usage - ***************************************************************************/ - int sendSignal(NdbApiSignal * s); - int sendFragmentedSignal(NdbApiSignal * s, LinearSectionPtr ptr[3], - Uint32 sections); - - bool connected(Uint32 TimeOutInMilliSeconds); - bool connected(Uint32 TimeOutInMilliSeconds, Uint32 nodeId); - - NdbApiSignal * getSignal(); - -private: - TransporterFacade * m_tf; - Uint32 m_nodeId; - Uint32 m_ownRef; -}; - -#endif diff --git a/ndb/src/old_files/rep/Makefile b/ndb/src/old_files/rep/Makefile deleted file mode 100644 index 9688a68ec74..00000000000 --- a/ndb/src/old_files/rep/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -include .defs.mk - -# -# This "kernel" type should be removed (only need types) -# -TYPE := repserver kernel - -DIRS := adapters storage state transfer repapi - -BIN_TARGET := ndb_rep - -BIN_TARGET_LIBS := -BIN_TARGET_ARCHIVES += editline repstorage repadapters reprequestor reptransfer mgmapi NDB_API mgmsrvcommon - -SOURCES = \ - RepMain.cpp \ - Requestor.cpp \ - RequestorSubscriptions.cpp \ - \ - RepComponents.cpp \ - RepCommandInterpreter.cpp \ - RepApiService.cpp \ - RepApiInterpreter.cpp \ - SignalQueue.cpp \ - ExtSender.cpp \ - dbug_hack.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/rep/NodeConnectInfo.hpp b/ndb/src/old_files/rep/NodeConnectInfo.hpp deleted file mode 100644 index 403f92a5999..00000000000 --- a/ndb/src/old_files/rep/NodeConnectInfo.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef NODE_CONNECTINFO_HPP -#define NODE_CONNECTINFO_HPP - -#include - -struct NodeConnectInfo { - NodeConnectInfo(Uint16 n, bool c): nodeId(n), connected(c) {}; - Uint32 nodeId; - bool connected; -}; - - -#endif diff --git a/ndb/src/old_files/rep/README b/ndb/src/old_files/rep/README deleted file mode 100644 index 7be5e230eb3..00000000000 --- a/ndb/src/old_files/rep/README +++ /dev/null @@ -1,147 +0,0 @@ - =========================================== - MySQL Replication Servers - Lars Thalmann and Johan Andersson - 2003 MySQL AB - =========================================== - -------------------------------------------------------------------------------- - - PRIMARY SYSTEM STANDBY SYSTEM - REPLICATION SERVER REPLICATION SERVER - (PS or SOURCE SYSTEM) (SS or DESTINATION SYSTEM) - +------------------+ +-------------------------+ - | RepMain | | RepMain [Requests] | - | | +-------------------------+ - | | | Requestor [Executes] | - +------------------+ +-------------------------+ - PS --- | ExtNDB | TransPS | --- | TransSS | AppNDB | --- SS - +------------------+ +-------------------------+ - (GCIContainer) (GCIContainer) - (RepState) - - Figure 1: Replication Server Threads - -Component List --------------- -RepMain - Main thread that runs command-line interpreter [Requests] - -Requestor - Thread that runs RepState::execute [Executes] - -ExtNDB - Extracts transaction epochs from NDB Cluster - -TransPS, TransSS - Transfers information (control and epoch buffers) between - Replication Servers. - -AppNDB - Applies transaction epochs to NDB Cluster - -------------------------------------------------------------------------------- - - RepState Control - Object - +------------------+ - | RepState | - | [Requests] | - | [Executes] | - +------------------+ - | RepStateRequest | --- ExtSender - +------------------+ - - Figure 2: RepState Object - - -The RepState object is shared by all components. - - -------------------------------------------------------------------------------- - -Dependent Directories ---------------------- -rep/adapters Appliers and Extractors - All code dependent on the database system - -rep/transfer - Depends on NDB transporters - -rep/state - Shared resources for all components - -Independent Directories ------------------------ -rep/storage Storage of epochs - Should not depend on any transporters/NDB specific - -rep/repstate - Should only have a reference to an ExtSender for the external PS REP node - - -------------------------------------------------------------------------------- - -Replication Teminology ----------------------- -GLOBAL CHECKPOINT -A global checkpoint is a point in time when all database server -are synchronized. - -NODE -A database server with information. - -NODE GROUP -A set of database servers, all storing the same information. - -SUBSCRIPTION . -A "subscription" is a collection of services that a source system -provides. The main to services belonging to a subscription are -"log" and "scan". Log provides the replication servers with -log entries (epochs) and scan provides the replication servers -with scanned data (also stored in epochs). - -EPOCH -An "epoch" is a log of all database changes between two time points. -(An epoch can have redundant log entries.) An epoch is named by the -number of the time slice between the two time points. - -EPOCH BUFFER -An "epoch buffer" is a part of the log belonging to an epoch. An -epoch buffer does not contain any redundancy. - -Two epoch buffers with the same subscription id and gci can be -"complements" or "duplicates" to each other. If they are complements, -they store different information, if they are duplicates then they -store equivalent information (the information need not be identical, -but it is equivalent for the purpose of restoring the original -information). If they are duplicates then they have the same name, -i.e. same subscription id, gci, and node group id. - -CHANNEL -A "channel" is a collection of epoch buffers belonging to -a specific subscription. (The channel can exist before it is -assigned to a subscription.) - -SUBSCRIPTION CONSISTENT -A database is "subscription consistent" or "consistent with respect -to a subscription" if ... - -Architectural Terminology -------------------------- -ADAPTER -An "adapter" is either an applier or an extractor. - -APPLIER -An "applier" is a a collection of threads in the replication server -that applies epochs to a destination database system. - -EXTRACTOR -An "extractor" is a collection of theads in the replication server -that receives epochs from a source database system. - -TRANSFER COMPONENT -A "transfer component" is a thread in the replication server that is -responsible for the connection with another replication server. - -REQUESTOR -A thread in the replication server that controls replication. diff --git a/ndb/src/old_files/rep/RepApiInterpreter.cpp b/ndb/src/old_files/rep/RepApiInterpreter.cpp deleted file mode 100644 index 6e6f150713a..00000000000 --- a/ndb/src/old_files/rep/RepApiInterpreter.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "RepApiInterpreter.hpp" -#include - -RepApiInterpreter::RepApiInterpreter(RepComponents * comps, int port) -{ - m_repComponents = comps; - m_repState = comps->getRepState(); - m_port = port; - ss = new SocketServer(); - serv = new RepApiService(*this); -} - - -RepApiInterpreter::~RepApiInterpreter() -{ -} - -void -RepApiInterpreter::startInterpreter() -{ - if(!ss->setup(serv, m_port)){ - sleep(1); - delete ss; - delete serv; - } - ss->startServer(); -} - - -void -RepApiInterpreter::stopInterpreter() -{ - delete ss; -} - - -Properties * -RepApiInterpreter::execCommand(const Properties & props) -{ - Properties * result = new Properties(); - Uint32 req = 0; - Uint32 epoch = 0; - props.get("request", &req); - props.get("epoch", &epoch); - GrepError::Code err = m_repState->protectedRequest((GrepReq::Request)req, - epoch); - result->put("err", err); - return result; -} - -Properties * -RepApiInterpreter::getStatus() -{ - - return m_repState->getStatus(); -} - - -Properties * -RepApiInterpreter::query(Uint32 counter, Uint32 replicationId) -{ - return m_repState->query((QueryCounter)counter, replicationId); -} - diff --git a/ndb/src/old_files/rep/RepApiInterpreter.hpp b/ndb/src/old_files/rep/RepApiInterpreter.hpp deleted file mode 100644 index 78f190156b3..00000000000 --- a/ndb/src/old_files/rep/RepApiInterpreter.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef REP_API_INTERPRETER_HPP -#define REP_API_INTERPRETER_HPP - -#include - -#include -#include -#include -#include -#include - -/** - * @class RepCommandInterpreter - * @brief - */ - -class RepApiInterpreter { -public: - RepApiInterpreter(class RepComponents * comps, int port); - ~RepApiInterpreter(); - void startInterpreter(); - void stopInterpreter(); - Properties * execCommand(const Properties & props); - Properties * getStatus(); - Properties * query(Uint32 counter, Uint32 replicationId); - bool readAndExecute(); - -private: - char * readline_gets() const; - void request(Uint32 request); - int m_port; - class RepComponents * m_repComponents; - class RepState * m_repState; - SocketServer * ss; - RepApiService * serv; -}; - -#endif diff --git a/ndb/src/old_files/rep/RepApiService.cpp b/ndb/src/old_files/rep/RepApiService.cpp deleted file mode 100644 index d07f7a59375..00000000000 --- a/ndb/src/old_files/rep/RepApiService.cpp +++ /dev/null @@ -1,318 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include -#include -#include -#include -#include "RepApiService.hpp" -#include "RepApiInterpreter.hpp" -#include "repapi/repapi.h" -#include -#include - -/** - const char * name; - const char * realName; - const Type type; - const ArgType argType; - const ArgRequired argRequired; - const ArgMinMax argMinMax; - const int minVal; - const int maxVal; - void (T::* function)(const class Properties & args); - const char * description; -*/ - -#define REP_CMD(name, fun, desc) \ - { name, \ - 0, \ - ParserRow::Cmd, \ - ParserRow::String, \ - ParserRow::Optional, \ - ParserRow::IgnoreMinMax, \ - 0, 0, \ - fun, \ - desc } - -#define REP_ARG(name, type, opt, desc) \ - { name, \ - 0, \ - ParserRow::Arg, \ - ParserRow::type, \ - ParserRow::opt, \ - ParserRow::IgnoreMinMax, \ - 0, 0, \ - 0, \ - desc } - -#define REP_ARG2(name, type, opt, min, max, desc) \ - { name, \ - 0, \ - ParserRow::Arg, \ - ParserRow::type, \ - ParserRow::opt, \ - ParserRow::IgnoreMinMax, \ - min, max, \ - 0, \ - desc } - -#define REP_END() \ - { 0, \ - 0, \ - ParserRow::Arg, \ - ParserRow::Int, \ - ParserRow::Optional, \ - ParserRow::IgnoreMinMax, \ - 0, 0, \ - 0, \ - 0 } - -#define REP_CMD_ALIAS(name, realName, fun) \ - { name, \ - realName, \ - ParserRow::CmdAlias, \ - ParserRow::Int, \ - ParserRow::Optional, \ - ParserRow::IgnoreMinMax, \ - 0, 0, \ - 0, \ - 0 } - -#define REP_ARG_ALIAS(name, realName, fun) \ - { name, \ - realName, \ - ParserRow::ArgAlias, \ - ParserRow::Int, \ - ParserRow::Optional, \ - ParserRow::IgnoreMinMax, \ - 0, 0, \ - 0, \ - 0 } - - -const -ParserRow commands[] = -{ - - REP_CMD("rep" , &RepApiSession::execCommand, ""), - REP_ARG("request", Int, Mandatory, "Grep::Request."), - REP_ARG("id", Int, Mandatory, "Replication id "), - REP_ARG("epoch", Int, Optional, "Epoch. Used by stop epoch ..."), - - REP_CMD("rep status" , &RepApiSession::getStatus, ""), - REP_ARG("request", Int, Optional, "Grep::Request."), - - REP_CMD("rep query" , &RepApiSession::query, ""), - REP_ARG("id", Int, Mandatory, "Replication Id"), - REP_ARG("counter", Int, Mandatory, "QueryCounter."), - REP_ARG("request", Int, Mandatory, "Grep::Request."), - - REP_END() -}; -RepApiSession::RepApiSession(NDB_SOCKET_TYPE sock, - class RepApiInterpreter & rep) - : SocketServer::Session(sock) - , m_rep(rep) -{ - m_input = new SocketInputStream(sock); - m_output = new SocketOutputStream(sock); - m_parser = new Parser(commands, *m_input, true, true, true); -} - -RepApiSession::RepApiSession(FILE * f, class RepApiInterpreter & rep) - : SocketServer::Session(1) - , m_rep(rep) -{ - m_input = new FileInputStream(f); - m_parser = new Parser(commands, *m_input, true, true, true); -} - -RepApiSession::~RepApiSession() -{ - delete m_input; - delete m_parser; -} - -void -RepApiSession::runSession() -{ - Parser_t::Context ctx; - while(!m_stop){ - m_parser->run(ctx, * this); - if(ctx.m_currentToken == 0) - break; - - switch(ctx.m_status){ - case Parser_t::Ok: - for(size_t i = 0; i %s", - ctx.m_aliasUsed[i]->name, ctx.m_aliasUsed[i]->realName); - break; - case Parser_t::NoLine: - case Parser_t::EmptyLine: - break; - default: - break; - } - } - NDB_CLOSE_SOCKET(m_socket); -} - -void -RepApiSession::execCommand(Parser_t::Context & /* unused */, - const class Properties & args) -{ - Uint32 err; - Uint32 replicationId; - args.get("id", &replicationId); - Properties * result = m_rep.execCommand(args); - if(result == NULL) { - m_output->println("global replication reply"); - m_output->println("result: %d", -1); - m_output->println("id: %d",replicationId); - m_output->println(""); - return; - } - result->get("err", &err); - m_output->println("global replication reply"); - m_output->println("result: %d", err); - m_output->println("id: %d", 0); - m_output->println(""); - delete result; -} - - -void -RepApiSession::getStatus(Parser_t::Context & /* unused */, - const class Properties & args) -{ - Uint32 err; - Properties * result = m_rep.getStatus(); - result->get("err", &err); - Uint32 subId; - result->get("subid", &subId); - Uint32 subKey; - result->get("subkey", &subKey); - Uint32 connected_rep; - result->get("connected_rep", &connected_rep); - Uint32 connected_db; - result->get("connected_db", &connected_db); - Uint32 state; - result->get("state", &state); - Uint32 state_sub; - result->get("state", &state_sub); - - m_output->println("global replication status reply"); - m_output->println("result: %d",0); - m_output->println("id: %d",0); - m_output->println("subid: %d", subId); - m_output->println("subkey: %d", subKey); - m_output->println("connected_rep: %d", connected_rep); - m_output->println("connected_db: %d", connected_db); - m_output->println("state_sub: %d", state_sub); - m_output->println("state: %d", state); - m_output->println(""); - delete result; -} - - -void -RepApiSession::query(Parser_t::Context & /* unused */, - const class Properties & args) -{ - Uint32 err; - Uint32 counter, replicationId; - args.get("counter", &counter); - args.get("id", &replicationId); - Properties * result = m_rep.query(counter, replicationId); - if(result == NULL) { - m_output->println("global replication query reply"); - m_output->println("result: %s","Failed"); - m_output->println("id: %d",replicationId); - m_output->println(""); - return; - } - - BaseString first; - BaseString last; - Uint32 subid = 0, subkey = 0, no_of_nodegroups = 0; - Uint32 connected_rep = 0, connected_db = 0; - Uint32 state = 0 , state_sub = 0; - result->get("err", &err); - result->get("no_of_nodegroups", &no_of_nodegroups); - result->get("subid", &subid); - result->get("subkey", &subkey); - result->get("connected_rep", &connected_rep); - result->get("connected_db", &connected_db); - result->get("first", first); - result->get("last", last); - result->get("state", &state); - result->get("state_sub", &state_sub); - m_output->println("global replication query reply"); - m_output->println("result: %s","Ok"); - m_output->println("id: %d",replicationId); - m_output->println("no_of_nodegroups: %d",no_of_nodegroups); - m_output->println("subid: %d", subid); - m_output->println("subkey: %d", subkey); - m_output->println("connected_rep: %d", connected_rep); - m_output->println("connected_db: %d", connected_db); - m_output->println("state_sub: %d", state_sub); - m_output->println("state: %d", state); - m_output->println("first: %s", first.c_str()); - m_output->println("last: %s", last.c_str()); - m_output->println(""); - delete result; -} - - - -static const char * -propToString(Properties *prop, const char *key) { - static char buf[32]; - const char *retval = NULL; - PropertiesType pt; - - prop->getTypeOf(key, &pt); - switch(pt) { - case PropertiesType_Uint32: - Uint32 val; - prop->get(key, &val); - snprintf(buf, sizeof buf, "%d", val); - retval = buf; - break; - case PropertiesType_char: - const char *str; - prop->get(key, &str); - retval = str; - break; - default: - snprintf(buf, sizeof buf, "(unknown)"); - retval = buf; - } - return retval; -} - -void -RepApiSession::printProperty(Properties *prop, const char *key) { - m_output->println("%s: %s", key, propToString(prop, key)); -} - -void -RepApiSession::stopSession(){ - -} diff --git a/ndb/src/old_files/rep/RepApiService.hpp b/ndb/src/old_files/rep/RepApiService.hpp deleted file mode 100644 index e1137e53258..00000000000 --- a/ndb/src/old_files/rep/RepApiService.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef REP_APISERVICE_HPP -#define REP_APISERVICE_HPP - -#include -#include -#include - -class RepApiInterpreter; - -class RepApiSession : public SocketServer::Session { - typedef Parser Parser_t; - - class RepApiInterpreter & m_rep; - InputStream *m_input; - OutputStream *m_output; - Parser_t *m_parser; - -void printProperty(Properties *prop, const char *key); -public: - RepApiSession(NDB_SOCKET_TYPE, class RepApiInterpreter &); - RepApiSession(FILE * f, class RepApiInterpreter & rep); - ~RepApiSession(); - - virtual void runSession(); - virtual void stopSession(); - - void execCommand(Parser_t::Context & ctx, const class Properties & args); - void getStatus(Parser_t::Context & ctx, const class Properties & args); - void query(Parser_t::Context & ctx, const class Properties & args); - -}; - -class RepApiService : public SocketServer::Service { - class RepApiInterpreter & m_rep; -public: - RepApiService(class RepApiInterpreter & rep) : m_rep(rep) {} - - RepApiSession * newSession(NDB_SOCKET_TYPE theSock){ - return new RepApiSession(theSock, m_rep); - } -}; - -#endif diff --git a/ndb/src/old_files/rep/RepCommandInterpreter.cpp b/ndb/src/old_files/rep/RepCommandInterpreter.cpp deleted file mode 100644 index a0daf9529ab..00000000000 --- a/ndb/src/old_files/rep/RepCommandInterpreter.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "RepCommandInterpreter.hpp" - -static const char* -helpTextRep = -"+-------------------------------------------------------------------------+\n" -"| MySQL Replication Server |\n" -"| Commands should be executed on the standby Replication Server |\n" -"+-------------------------------------------------------------------------+\n" -"| Simple Commands |\n" -"+-------------------------------------------------------------------------+\n" -"| START Start replication |\n" -"| STATUS Show replication status |\n" -"+-------------------------------------------------------------------------+\n" -"| Advanced Commands |\n" -"+-------------------------------------------------------------------------+\n" -"| STOP Stop replication after epoch number |\n" -"| STOP IMMEDIATELY Stop replication after applying the current epoch |\n" -"| ADD TABLE // |\n" -"| Note: // is case sensitive! |\n" -"| Use 'STATUS' to see added tables. |\n" -"| REMOVE TABLE // |\n" -"| Note: // is case sensitive! |\n" -"| ENABLE Starts protocol |\n" -"| DISABLE Stops protocol |\n" -"| DEBUG Toggle logging of replication messages on console |\n" -"| |\n" -"| ::= REQUESTOR | TRANSFER | APPLY | DELETE |\n" -"+-------------------------------------------------------------------------+\n" -; - -/** - * @todo -"| ::= SUBID | SUBSCRIPTION |\n" -"| ::= METALOG | METASCAN | DATALOG | DATASCAN |\n" -"| ::= PRIMARY | STANDBY | TWOWAY |\n" -"| CONNECT Connects to NDB Cluster and other replication server |\n" -"| DELETE Removes all epochs stored in replication servers |\n" -"| DROP Drops table in standby system identified by table id |\n" -"| ::= Any integer (naming the last epoch to be applied) |\n" -*/ - -RepCommandInterpreter::RepCommandInterpreter(RepComponents * comps) -{ - m_repComponents = comps; - m_repState = comps->getRepState(); -} - -RepCommandInterpreter::~RepCommandInterpreter() -{ -} - -/** - * Read a string, and return a pointer to it. - * - * @return NULL on EOF. - */ -char * -RepCommandInterpreter::readline_gets() const -{ - static char *line_read = (char *)NULL; - - // Disable the default file-name completion action of TAB - // rl_bind_key ('\t', rl_insert); - - /* If the buffer has already been allocated, return the memory - to the free pool. */ - if (line_read) - { - NdbMem_Free(line_read); - line_read = (char *)NULL; - } - - /* Get a line from the user. */ - line_read = readline ("REP> "); - - /* If the line has any text in it, save it on the history. */ - if (line_read && *line_read) - add_history (line_read); - - return (line_read); -} - -bool emptyString(const char* s) -{ - if (s == NULL) { - return true; - } - - for (unsigned int i = 0; i < strlen(s); ++i) { - if (! isspace(s[i])) { - return false; - } - } - - return true; -} - -/** - * Converts a string to a Uint32 pointed value! - */ -bool convert(const char* s, Uint32 * val) -{ - if (s == NULL) { - return false; - } - - if (strlen(s) == 0) { - return false; - } - - errno = 0; - char* p; - long v = strtol(s, &p, 10); - if (errno != 0) { - return false; - } - if (p != &s[strlen(s)]) { - return false; - } - - *val = v; - return true; -} - -void -printError(GrepError::Code err) -{ - if (err == GrepError::NO_ERROR) { ndbout << "Ok" << endl; } - else { ndbout << GrepError::getErrorDesc(err) << endl; } -} - -bool -RepCommandInterpreter::readAndExecute() -{ - GrepError::Code err; - - char* _line = readline_gets(); - char * line; - if(_line == NULL) { - ndbout << endl; - return true; - } - - line = strdup(_line); - - if (emptyString(line)) { - return true; - } - - /* I have to uncomment this, since otherwise // - is converted to capitals, but it is case sensitive! - for (unsigned int i = 0; i < strlen(line); ++i) { - line[i] = toupper(line[i]); - } - */ - // if there is anything in the line proceed - char* firstToken = strtok(line, " "); - for (unsigned int i = 0; i < strlen(firstToken); ++i) { - firstToken[i] = toupper(firstToken[i]); - } - char* allAfterFirstToken = strtok(NULL, "\0"); - - /** - * Commands for REP Client only - */ - if (strcmp(firstToken, "ADD") == 0) { - if (m_repState->m_channel.getStateSub() != - Channel::NO_SUBSCRIPTION_EXISTS) { - ndbout_c("Subscription already exists"); - ndbout_c("Tables must be added before subscription exists"); - return true; - } - char * secondToken = strtok(allAfterFirstToken, " "); - char * fullTableName = strtok(NULL, "\0"); - if(fullTableName == NULL) { - ndbout_c("Table name not specified"); - return true; - } - for (unsigned int i = 0; i < strlen(secondToken); ++i) { - secondToken[i] = toupper(secondToken[i]); - } - - if (strcmp(secondToken, "TABLE") == 0) { - err = m_repState->protectedAddTable(fullTableName); - printError(err); - return true; - } - return true; - } - if (strcmp(firstToken, "REMOVE") == 0) { - if (m_repState->m_channel.getStateSub() != - Channel::NO_SUBSCRIPTION_EXISTS) { - ndbout_c("Subscription already exists"); - ndbout_c("Tables can not be removed after subscription is created"); - return true; - } - char * secondToken = strtok(allAfterFirstToken, " "); - char * fullTableName = strtok(NULL, "\0"); - if(fullTableName == NULL) { - ndbout_c("Table name not specified"); - return true; - } - for (unsigned int i = 0; i < strlen(secondToken); ++i) { - secondToken[i] = toupper(secondToken[i]); - } - - if (strcmp(secondToken, "TABLE") == 0) { - err = m_repState->protectedRemoveTable(fullTableName); - printError(err); - return true; - } - return true; - } - /** - * now, we can convert allAfterFirstToken to capitals - */ - if(allAfterFirstToken != 0) { - for (unsigned int i = 0; i < strlen(allAfterFirstToken); ++i) { - allAfterFirstToken[i] = toupper(allAfterFirstToken[i]); - } - } - if (strcmp(firstToken, "CONNECT") == 0) { - - if (strcmp(allAfterFirstToken, "PRIMARY") == 0) { - m_repComponents->connectPS(); - return true; - } - if (strcmp(allAfterFirstToken, "STANDBY") == 0) { - m_repComponents->connectPS(); - return true; - } - if (strcmp(allAfterFirstToken, "TWOWAY") == 0) { - m_repComponents->connectPS(); - return true; - } - ndbout_c("Unknown argument: %s to command: %s", - allAfterFirstToken, firstToken); - return true; - } - - if (strcmp(firstToken, "HELP") == 0) { - ndbout << helpTextRep; - return true; - } - - if (strcmp(firstToken, "QUIT") == 0 || - strcmp(firstToken, "BYE") == 0 || - strcmp(firstToken, "EXIT") == 0) { - return false; - } - - /** - * Commands for REP Server API - */ - if (strcmp(firstToken, "STATUS") == 0 || - strcmp(firstToken, "INFO") == 0 || - strcmp(firstToken, "I") == 0) { - m_repState->protectedRequest(GrepReq::STATUS, 0); - return true; - } - - if (strcmp(firstToken, "DEBUG") == 0) { - if (replogEnabled) - { - ndbout_c("Debugging disabled."); - replogEnabled = false; - } - else - { - ndbout_c("Debugging enabled."); - replogEnabled = true; - } - return true; - } - - if (strcmp(firstToken, "ENABLE") == 0) { - if (strcmp(allAfterFirstToken, "REQUESTOR") == 0) { - err = m_repState->protectedRequest(GrepReq::START_REQUESTOR, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "TRANSFER") == 0) { - err = m_repState->protectedRequest(GrepReq::START_TRANSFER, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "APPLY") == 0) { - err = m_repState->protectedRequest(GrepReq::START_APPLY, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "DELETE") == 0) { - err = m_repState->protectedRequest(GrepReq::START_DELETE, 0); - printError(err); - return true; - } - ndbout_c("Unknown argument: %s to command: %s", - allAfterFirstToken, firstToken); - return true; - } - - if (strcmp(firstToken, "DISABLE") == 0) { - if (strcmp(allAfterFirstToken, "REQUESTOR") == 0) { - err = m_repState->protectedRequest(GrepReq::STOP_REQUESTOR, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "TRANSFER") == 0) { - err = m_repState->protectedRequest(GrepReq::STOP_TRANSFER, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "APPLY") == 0) { - err = m_repState->protectedRequest(GrepReq::STOP_APPLY, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "DELETE") == 0) { - err = m_repState->protectedRequest(GrepReq::STOP_DELETE, 0); - printError(err); - return true; - } - ndbout_c("Unknown argument: %s to command: %s", - allAfterFirstToken, firstToken); - return true; - } - - if (strcmp(firstToken, "START") == 0) { - if (allAfterFirstToken == NULL) { - err = m_repState->protectedRequest(GrepReq::START, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "SUBID") == 0) { - err = m_repState->protectedRequest(GrepReq::CREATE_SUBSCR, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "SUBSCR") == 0 || - strcmp(allAfterFirstToken, "SUBSCRIPTION") == 0) { - err = m_repState->protectedRequest(GrepReq::START_SUBSCR, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "METALOG") == 0) { - err = m_repState->protectedRequest(GrepReq::START_METALOG, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "METASCAN") == 0) { - err = m_repState->protectedRequest(GrepReq::START_METASCAN, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "DATALOG") == 0) { - err = m_repState->protectedRequest(GrepReq::START_DATALOG, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "DATASCAN") == 0) { - err = m_repState->protectedRequest(GrepReq::START_DATASCAN, 0); - printError(err); - return true; - } - ndbout_c("Unknown argument: %s to command: %s", - allAfterFirstToken, firstToken); - return true; - } - - if (strcmp(firstToken, "STOP") == 0) { - if (allAfterFirstToken == NULL) { - ndbout_c("Please use either 'STOP IMMEDIATELY' or 'STOP ', " - "where\n is greater than or equal to " - "the last applied epoch."); - return true; - } - - char * secondToken = strtok(allAfterFirstToken, " "); - char * subscription = strtok(NULL, "\0"); - if (strcmp(secondToken, "SUBSCR") == 0 || - strcmp(secondToken, "SUBSCRIPTION") == 0) { - char * sSubId = strtok(subscription," "); - char * sSubKey = strtok(NULL, "\0"); - int subId = atoi(sSubId); - int subKey = atoi(sSubKey); - err = m_repState->protectedRequest(GrepReq::STOP_SUBSCR, subId, subKey ); - printError(err); - return true; - } - - if (strcmp(allAfterFirstToken, "SUBID") == 0) { - ndbout_c("Not implemented"); - return true; - } - - - if (strcmp(allAfterFirstToken, "METALOG") == 0) { - err = m_repState->protectedRequest(GrepReq::STOP_METALOG, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "METASCAN") == 0) { - err = m_repState->protectedRequest(GrepReq::STOP_METASCAN, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "DATALOG") == 0) { - err = m_repState->protectedRequest(GrepReq::STOP_DATALOG, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "DATASCAN") == 0) { - err = m_repState->protectedRequest(GrepReq::STOP_DATASCAN, 0); - printError(err); - return true; - } - if (strcmp(allAfterFirstToken, "IM") == 0 || - strcmp(allAfterFirstToken, "IMM") == 0 || - strcmp(allAfterFirstToken, "IMMEDIATELY") == 0) { - err = m_repState->protectedRequest(GrepReq::STOP, 0); - printError(err); - return true; - } - Uint32 stopEpoch; - if (convert(allAfterFirstToken, &stopEpoch)) { - err = m_repState->protectedRequest(GrepReq::STOP, stopEpoch); - printError(err); - return true; - } - - ndbout_c("Unknown argument: %s to command: %s", - allAfterFirstToken, firstToken); - return true; - } - - ndbout_c("Unknown Command: %s", firstToken); - ndbout_c("Type HELP for help."); - ndbout << endl; - return true; -} diff --git a/ndb/src/old_files/rep/RepCommandInterpreter.hpp b/ndb/src/old_files/rep/RepCommandInterpreter.hpp deleted file mode 100644 index 398a7c0318c..00000000000 --- a/ndb/src/old_files/rep/RepCommandInterpreter.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef REP_COMMAND_INTERPRETER_HPP -#define REP_COMMAND_INTERPRETER_HPP - -#include - -#include -#include - -/** - * @class RepCommandInterpreter - * @brief - */ - -class RepCommandInterpreter { -public: - RepCommandInterpreter(class RepComponents * comps); - ~RepCommandInterpreter(); - - bool readAndExecute(); - -private: - char * readline_gets() const; - void request(Uint32 request); - - class RepComponents * m_repComponents; - class RepState * m_repState; -}; - -#endif diff --git a/ndb/src/old_files/rep/RepComponents.cpp b/ndb/src/old_files/rep/RepComponents.cpp deleted file mode 100644 index 04b2e0e5fa5..00000000000 --- a/ndb/src/old_files/rep/RepComponents.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "RepComponents.hpp" - -RepComponents::RepComponents() -{ - /** - * @todo Fix proper reporting of errors - */ - m_connectStringPS = NULL; - m_connectStringSS = NULL; - - /** - * Phase 1: Containers, RepState - */ - m_gciContainer = new GCIContainer(MAX_NODE_GROUPS); - if (!m_gciContainer) REPABORT("Could not allocate object"); - m_gciContainerPS = new GCIContainerPS(MAX_NODE_GROUPS); - if (!m_gciContainerPS) REPABORT("Could not allocate object"); - m_repState = new RepState(); - if (!m_repState) REPABORT("Could not allocate object"); - - /** - * Phase 2: PS - */ - m_transPS = new TransPS(m_gciContainerPS); - if (!m_transPS) REPABORT("Could not allocate object"); - - - m_extAPI = new ExtAPI(); - if (!m_extAPI) REPABORT("Could not allocate object"); - - m_extNDB = new ExtNDB(m_gciContainerPS, m_extAPI); - if (!m_extNDB) REPABORT("Could not allocate object"); - - /** - * Phase 3: SS - */ - m_transSS = new TransSS(m_gciContainer, m_repState); - if (!m_transSS) REPABORT("Could not allocate object"); - m_appNDB = new AppNDB(m_gciContainer, m_repState); - if (!m_appNDB) REPABORT("Could not allocate object"); - - /** - * Phase 4: Requestor - */ - m_requestor = new Requestor(m_gciContainer, m_appNDB, m_repState); - if (!m_requestor) REPABORT("Could not allocate object"); - - /** - * Phase 5 - */ - m_repState->init(m_transSS->getRepSender()); - m_repState->setApplier(m_appNDB); - m_repState->setGCIContainer(m_gciContainer); - - m_requestor->setRepSender(m_transSS->getRepSender()); - - m_extNDB->setRepSender(m_transPS->getRepSender()); - - m_transPS->setGrepSender(m_extNDB->getGrepSender()); -} - -RepComponents::~RepComponents() -{ - if (m_requestor) delete m_requestor; - - if (m_appNDB) delete m_appNDB; - if (m_extNDB) delete m_extNDB; - if (m_extAPI) delete m_extAPI; - - if (m_repState) delete m_repState; - - if (m_transPS) delete m_transPS; - if (m_transSS) delete m_transSS; - - if (m_gciContainer) delete m_gciContainer; - if (m_gciContainerPS) delete m_gciContainerPS; -} - -int -RepComponents::connectPS() -{ - /** - * @todo Fix return values of this function - */ - - /** - * Phase 1: TransporterFacade 1, Block number: 2 (PS) - */ - if (!m_extNDB->init(m_connectStringPS)) return -1; - - /** - * Phase 2: TransporterFacade 2, Block number: 2 (PS) - */ - m_transPS->init(m_transSS->getTransporterFacade(), m_connectStringPS); - - return 0; -} - -int -RepComponents::connectSS() -{ - /** - * @todo Fix return values of this function - */ - - /** - * Phase 1: TransporterFacade 1, Block number: 1 (SS) - */ - m_appNDB->init(m_connectStringSS); - - /** - * Phase 2: TransporterFacade 2, Block number: 1 (SS) - */ - m_transSS->init(m_connectStringSS); - - /** - * Phase 3: Has no TransporterFacade, just starts thread - */ - m_requestor->init(); - - return 0; -} diff --git a/ndb/src/old_files/rep/RepComponents.hpp b/ndb/src/old_files/rep/RepComponents.hpp deleted file mode 100644 index ff0f29e2128..00000000000 --- a/ndb/src/old_files/rep/RepComponents.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef REPCOMPONENTS_HPP -#define REPCOMPONENTS_HPP - -#include -#include -#include -#include -#include -#include - -#include - -/** - * Connection data - */ -class RepComponents { -public: - RepComponents(); - ~RepComponents(); - - int connectPS(); - int connectSS(); - - ExtNDB * m_extNDB; - ExtAPI * m_extAPI; - TransPS * m_transPS; - - TransSS * m_transSS; - AppNDB * m_appNDB; - - Requestor * m_requestor; - - GCIContainer * m_gciContainer; - GCIContainerPS * m_gciContainerPS; - - char * m_connectStringPS; - char * m_connectStringSS; - - RepState * getRepState() { return m_repState; } -private: - RepState * m_repState; -}; - -#endif diff --git a/ndb/src/old_files/rep/RepMain.cpp b/ndb/src/old_files/rep/RepMain.cpp deleted file mode 100644 index d9f057be9a1..00000000000 --- a/ndb/src/old_files/rep/RepMain.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include - -#include -#include - -#include - -#include "rep_version.hpp" -#include -#include - - -int -main(int argc, const char **argv) -{ - RepComponents comps; - RepCommandInterpreter cmd(&comps); - - - int helpFlag = false; - int noConnectFlag = false; - int onlyPrimaryFlag = false; - int onlyStandbyFlag = false; - int port = 18000; - replogEnabled = false; - - struct getargs args[] = { - { "psc", '1', arg_string, &comps.m_connectStringPS, - "Connect string", "connectstring" }, - { "ssc", '2', arg_string, &comps.m_connectStringSS, - "Connect string", "connectstring" }, - { "port", 'p', arg_integer, &port, - "port for rep api. Default 18000", "" }, - { "usage", '?', arg_flag, &helpFlag, - "Print help", "" }, -/* @todo - { "noConnect", 'n', arg_flag, &noConnectFlag, - "Do not connect adapters", "" }, -*/ - { "debug", 'd', arg_flag, &replogEnabled, - "Enable debug printouts on console", "" }, - { "onlyStandby", 's', arg_flag, &onlyStandbyFlag, - "Let Replication Server view DBMS as standby (destination) system only", - "" } - }; - int num_args = sizeof(args) / sizeof(args[0]); - int optind = 0; - char desc[] = - "\nWhen working as a primary system node, this program receives\n"\ - "records from the primary NDB Cluster and forwards them to\n"\ - "the standby system.\n\n"\ - "When working as a standby system node, this program receives\n"\ - "records from another replication node and inserts them into\n"\ - "the standby NDB Cluster.\n\n"\ - "Example: ndb_rep --psc=\"nodeid=3;host=localhost:10000\"\n"; - - if(getarg(args, num_args, argc, argv, &optind) || - //argv[optind] == NULL || - helpFlag) - { - arg_printusage(args, num_args, argv[0], desc); - return -1; //NDBT_ProgramExit(NDBT_WRONGARGS); - } - - RepApiInterpreter api(&comps,port); - api.startInterpreter(); - - /************************** - * Command-line interface * - **************************/ - if (!noConnectFlag && !onlyPrimaryFlag) comps.connectSS(); - if (!noConnectFlag && !onlyStandbyFlag) comps.connectPS(); - - - while (true) { - if(!cmd.readAndExecute()) { - api.stopInterpreter(); - exit(1); - } - } -} diff --git a/ndb/src/old_files/rep/Requestor.cpp b/ndb/src/old_files/rep/Requestor.cpp deleted file mode 100644 index 3c93a6394a4..00000000000 --- a/ndb/src/old_files/rep/Requestor.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Requestor.hpp" -#include "ConfigRetriever.hpp" - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#define TIME_BETWEEN_EXECUTES_MS 250 - -/* - * @todo The requestor still has a TF, but this is not used... - * (We will need a (set of) TF(s) for REP-REP - * on the same system though....) - */ - - -/***************************************************************************** - * Constructor / Destructor / Init - *****************************************************************************/ -Requestor::Requestor(GCIContainer * gciContainer, - AppNDB * appNDB, - RepState * repState) -{ - m_gciContainer = gciContainer; - m_applier = appNDB; - m_repState = repState; - - //m_grepSender = new ExtSender(); - //if (!m_grepSender) REPABORT(""); - - m_repState->setSubscriptionRequests(&requestCreateSubscriptionId, - &requestCreateSubscription, - &requestRemoveSubscription); - m_repState->setIntervalRequests(&requestTransfer, - &requestApply, - &requestDeleteSS, - &requestDeletePS); - m_repState->setStartRequests(&requestStartMetaLog, - &requestStartDataLog, - &requestStartMetaScan, - &requestStartDataScan, - &requestEpochInfo); -} - -Requestor::~Requestor() { - //delete m_grepSender; -} - -bool -Requestor::init(const char * connectString) -{ - m_signalExecThread = NdbThread_Create(signalExecThread_C, - (void **)this, - 32768, - "Requestor_Service", - NDB_THREAD_PRIO_LOW); - - if (m_signalExecThread == NULL) - return false; - - return true; -} - -/***************************************************************************** - * Signal Queue Executor - *****************************************************************************/ - -void * -Requestor::signalExecThread_C(void *g) { - - Requestor *requestor = (Requestor*)g; - requestor->signalExecThreadRun(); - NdbThread_Exit(0); - - /* NOTREACHED */ - return 0; -} - -class SigMatch -{ -public: - int gsn; - void (Requestor::* function)(NdbApiSignal *signal); - - SigMatch() { gsn = 0; function = NULL; }; - - SigMatch(int _gsn, void (Requestor::* _function)(NdbApiSignal *signal)) { - gsn = _gsn; - function = _function; - }; - - bool check(NdbApiSignal *signal) { - if(signal->readSignalNumber() == gsn) - return true; - return false; - }; -}; - -void -Requestor::signalExecThreadRun() -{ - while(1) - { - /** - * @todo Here we would like to measure the usage size of the - * receive buffer of TransSS. If the buffer contains - * more than X signals (maybe 1k or 10k), then we should - * not do a protectedExecute. - * By having the usage size measure thingy, - * we avoid having the Requestor requesting more - * things than the TransSS can handle. - * /Lars - * - * @todo A different implementation of this functionality - * would be to send a signal to myself when the protected - * execute is finished. This solution could be - * discussed. - * /Lars - */ - m_repState->protectedExecute(); - NdbSleep_MilliSleep(TIME_BETWEEN_EXECUTES_MS); - } -} - -void -Requestor::sendSignalRep(NdbApiSignal * s) { - m_repSender->sendSignal(s); -} - -void -Requestor::execSignal(void* executorObj, NdbApiSignal* signal, - class LinearSectionPtr ptr[3]){ - - Requestor * executor = (Requestor*)executorObj; - - const Uint32 gsn = signal->readSignalNumber(); - const Uint32 len = signal->getLength(); - - NdbApiSignal * s = new NdbApiSignal(executor->m_ownRef); - switch (gsn) { - case GSN_REP_GET_GCI_CONF: - case GSN_REP_GET_GCI_REQ: - case GSN_REP_GET_GCIBUFFER_REQ: - case GSN_REP_INSERT_GCIBUFFER_REQ: - case GSN_REP_CLEAR_SS_GCIBUFFER_REQ: - case GSN_REP_CLEAR_PS_GCIBUFFER_REQ: - case GSN_REP_DROP_TABLE_REQ: - case GSN_GREP_SUB_CREATE_REQ: - case GSN_GREP_SUB_START_REQ: - case GSN_GREP_SUB_SYNC_REQ: - case GSN_GREP_SUB_REMOVE_REQ: - case GSN_GREP_CREATE_SUBID_REQ: - s->set(0, PSREPBLOCKNO, gsn, len); - memcpy(s->getDataPtrSend(), signal->getDataPtr(), 4 * len); - executor->m_signalRecvQueue.receive(s); - break; - default: - REPABORT1("Illegal signal received in execSignal", gsn); - } -#if 0 - ndbout_c("Requestor: Inserted signal into queue (GSN: %d, Len: %d)", - signal->readSignalNumber(), len); -#endif -} - -void -Requestor::execNodeStatus(void* obj, Uint16 nodeId, - bool alive, bool nfCompleted) -{ - //Requestor * thisObj = (Requestor*)obj; - - RLOG(("Node changed status (NodeId %d, Alive %d, nfCompleted %d)", - nodeId, alive, nfCompleted)); - - if(alive) { - /** - * Connected - set node as connected - * - * @todo Make it possible to have multiple External REP nodes - */ -#if 0 - for(Uint32 i=0; im_nodeConnectList.size(); i++) { - if(thisObj->m_nodeConnectList[i]->nodeId == nodeId) - thisObj->m_nodeConnectList[i]->connected = true; - } - thisObj->m_grepSender->setNodeId(thisObj->m_nodeConnectList[0]->nodeId); -#endif - } - - if(!alive && !nfCompleted){ - /** - * ??? - */ - } - - if(!alive && nfCompleted){ - /** - * Re-connect - */ - } -} diff --git a/ndb/src/old_files/rep/Requestor.hpp b/ndb/src/old_files/rep/Requestor.hpp deleted file mode 100644 index 735d2094bde..00000000000 --- a/ndb/src/old_files/rep/Requestor.hpp +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef REQUESTOR_HPP -#define REQUESTOR_HPP - -#include - -#include -#include -#include -#include -#include -#include - -#include - -/** - * @todo Remove this dependency - */ -#include - -#include -#include - - -/** - * @class Requestor - * @brief Connects to GREP Coordinator on the standby system - */ -class Requestor { -public: - /*************************************************************************** - * Constructor / Destructor / Init - ***************************************************************************/ - Requestor(GCIContainer * gciContainer, AppNDB * applier, RepState * repSt); - ~Requestor(); - bool init(const char * connectString = NULL); - - /*************************************************************************** - * Public Methods - ***************************************************************************/ - void setRepSender(ExtSender * es) { m_repSender = es; }; - -private: - static void * signalExecThread_C(void *); ///< SignalQueue executor thread - void signalExecThreadRun(); - - static void execSignal(void* executorObj, NdbApiSignal* signal, - class LinearSectionPtr ptr[3]); - static void execNodeStatus(void* executorObj, NodeId, bool alive, - bool nfCompleted); - - void sendSignalRep(NdbApiSignal *); - void sendSignalGrep(NdbApiSignal *); - - void connectToNdb(); - - /*************************************************************************** - * Signal Executors - ***************************************************************************/ - void execREP_GET_GCIBUFFER_CONF(NdbApiSignal*); - void execREP_CLEAR_GCIBUFFER_REP(NdbApiSignal*); - void execREP_INSERT_GCIBUFFER_REQ(NdbApiSignal*); - void execREP_CLEAR_SS_GCIBUFFER_REQ(NdbApiSignal*); - void execREP_DROP_TABLE_REQ(NdbApiSignal*); - - /*************************************************************************** - * Signal Executors 2 - ***************************************************************************/ - void execGREP_CREATE_SUBID_CONF(NdbApiSignal*); - void execGREP_CREATE_SUBID_REF(NdbApiSignal*); - void createSubscription(NdbApiSignal*); - void createSubscriptionId(NdbApiSignal*); - void execGREP_SUB_CREATE_CONF(NdbApiSignal*); - void execGREP_SUB_CREATE_REF(NdbApiSignal*); - void execGREP_SUB_START_CONF(NdbApiSignal*); - void execGREP_SUB_START_REF(NdbApiSignal*); - void removeSubscription(NdbApiSignal*); - void execGREP_SUB_REMOVE_REF(NdbApiSignal*); - void execGREP_SUB_SYNC_CONF(NdbApiSignal*); - void execGREP_SUB_SYNC_REF(NdbApiSignal*); - void execREP_CLEAR_SS_GCIBUFFER_CONF(NdbApiSignal*); - void execREP_CLEAR_SS_GCIBUFFER_REF(NdbApiSignal*); - void execREP_GET_GCIBUFFER_REF(NdbApiSignal*); - void execREP_DISCONNECT_REP(NdbApiSignal*); - - /*************************************************************************** - * Ref signal senders - ***************************************************************************/ - void sendREP_INSERT_GCIBUFFER_REF(NdbApiSignal * signal, - Uint32 gci, - Uint32 nodeGrp, - GrepError::Code err); - - void sendREP_CLEAR_SS_GCIBUFFER_REF(NdbApiSignal* signal, - Uint32 firstGCI, - Uint32 lastGCI, - Uint32 currentGCI, - Uint32 nodeGrp, - GrepError::Code err); - - /*************************************************************************** - * Private Variables - ***************************************************************************/ - class SignalQueue m_signalRecvQueue; - struct NdbThread * m_signalExecThread; - - RepState * m_repState; - - Uint32 m_ownNodeId; ///< NodeId of this node - Uint32 m_ownBlockNo; ///< BlockNo of this "block" - BlockReference m_ownRef; ///< Reference to this - - TransporterFacade * m_transporterFacade; - - GCIContainer * m_gciContainer; - - AppNDB * m_applier; - ExtSender * m_repSender; - - friend void startSubscription(void * cbObj, NdbApiSignal* signal, int type); - friend void scanSubscription(void * cbObj, NdbApiSignal* signal, int type); - - friend RepState::FuncRequestCreateSubscriptionId requestCreateSubscriptionId; - friend RepState::FuncRequestCreateSubscription requestCreateSubscription; - friend RepState::FuncRequestRemoveSubscription requestRemoveSubscription; - - friend RepState::FuncRequestTransfer requestTransfer; - friend RepState::FuncRequestApply requestApply; - friend RepState::FuncRequestDeleteSS requestDeleteSS; - friend RepState::FuncRequestDeletePS requestDeletePS; - - friend RepState::FuncRequestStartMetaLog requestStartMetaLog; - friend RepState::FuncRequestStartDataLog requestStartDataLog; - friend RepState::FuncRequestStartMetaScan requestStartMetaScan; - friend RepState::FuncRequestStartDataScan requestStartDataScan; - friend RepState::FuncRequestEpochInfo requestEpochInfo; -}; - -#endif diff --git a/ndb/src/old_files/rep/RequestorSubscriptions.cpp b/ndb/src/old_files/rep/RequestorSubscriptions.cpp deleted file mode 100644 index 75b41fae037..00000000000 --- a/ndb/src/old_files/rep/RequestorSubscriptions.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Requestor.hpp" - -#include -#include - -#include - -/***************************************************************************** - * Create Subscription Id - *****************************************************************************/ - - -/***************************************************************************** - * Create Subscription - *****************************************************************************/ - - -/***************************************************************************** - * Start Subscription - *****************************************************************************/ - -/***************************************************************************** - * Remove Subscription - *****************************************************************************/ - -void -Requestor::execGREP_SUB_REMOVE_REF(NdbApiSignal* signal) -{ -#if 0 - GrepSubRemoveRef * const ref = (GrepSubRemoveRef *)signal->getDataPtr(); - Uint32 subId = ref->subscriptionId; - Uint32 subKey = ref->subscriptionKey; - Uint32 err = ref->err; - - signal->theData[0] = EventReport::GrepSubscriptionAlert; - signal->theData[1] = GrepEvent::GrepSS_SubRemoveRef; - signal->theData[2] = subId; - signal->theData[3] = subKey; - signal->theData[4] = (Uint32)err; - sendSignal(CMVMI_REF,GSN_EVENT_REP,signal, 5, JBB); -#endif -} - - diff --git a/ndb/src/old_files/rep/SignalQueue.cpp b/ndb/src/old_files/rep/SignalQueue.cpp deleted file mode 100644 index 9b356a14b7d..00000000000 --- a/ndb/src/old_files/rep/SignalQueue.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include - -#include "SignalQueue.hpp" - -SignalQueue::SignalQueue() { - m_mutex = NdbMutex_Create(); - m_cond = NdbCondition_Create(); - m_signalQueueHead = NULL; - m_queueSize = 0; -} - -SignalQueue::~SignalQueue() { - { - Guard g(m_mutex); - while(m_signalQueueHead != NULL) - delete pop(); - } - NdbMutex_Destroy(m_mutex); - m_mutex = NULL; - NdbCondition_Destroy(m_cond); - m_cond = NULL; -} - -NdbApiSignal * -SignalQueue::pop() { - NdbApiSignal *ret; - - if(m_signalQueueHead == NULL) - return NULL; - - ret = m_signalQueueHead->signal; - - QueueEntry *old = m_signalQueueHead; - m_signalQueueHead = m_signalQueueHead->next; - - delete old; - m_queueSize--; - return ret; -} - -void -SignalQueue::receive(void *me, NdbApiSignal *signal) { - SignalQueue *q = (SignalQueue *)me; - q->receive(signal); -} - -void -SignalQueue::receive(NdbApiSignal *signal) { - QueueEntry *n = new QueueEntry(); - n->signal = signal; - n->next = NULL; - - Guard guard(m_mutex); - - if(m_signalQueueHead == NULL) { - m_signalQueueHead = n; - m_queueSize++; - NdbCondition_Broadcast(m_cond); - return; - } - - QueueEntry *cur = m_signalQueueHead; - - while(cur->next != NULL) - cur = cur->next; - - cur->next = n; - m_queueSize++; - NdbCondition_Broadcast(m_cond); -} - -NdbApiSignal * -SignalQueue::waitFor(int gsn, NodeId nodeid, Uint32 timeout) { - Guard g(m_mutex); - - if(m_signalQueueHead == NULL) - NdbCondition_WaitTimeout(m_cond, m_mutex, timeout); - - if(m_signalQueueHead == NULL) - return NULL; - - if(gsn != 0 && m_signalQueueHead->signal->readSignalNumber() != gsn) - return NULL; - - if(nodeid != 0 && - refToNode(m_signalQueueHead->signal->theSendersBlockRef) != nodeid) - return NULL; - - return pop(); -} diff --git a/ndb/src/old_files/rep/SignalQueue.hpp b/ndb/src/old_files/rep/SignalQueue.hpp deleted file mode 100644 index 697bca85893..00000000000 --- a/ndb/src/old_files/rep/SignalQueue.hpp +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef __SIGNALQUEUE_HPP_INCLUDED__ -#define __SIGNALQUEUE_HPP_INCLUDED__ - -#include -#include -#include -#include - -/* XXX Look for an already existing definition */ -#define DEFAULT_TIMEOUT 10000 - -/** - * @class SignalQueue - * @brief - */ -class SignalQueue { -public: - typedef void (* SignalHandler)(void *obj, int gsn, NdbApiSignal *signal); - - SignalQueue(); - ~SignalQueue(); - - /** - * Static wrapper making it possible to call receive without knowing the - * type of the receiver - */ - static void receive(void *me, NdbApiSignal *signal); - - /** - * Enqueues a signal, and notifies any thread waiting for signals. - */ - void receive(NdbApiSignal *signal); - - NdbApiSignal *waitFor(int gsn, - NodeId nodeid = 0, - Uint32 timeout = DEFAULT_TIMEOUT); - template bool waitFor(Vector &t, - T *&handler, - NdbApiSignal *&signal, - Uint32 timeout); - - /** - * size() - */ - - Uint32 size() {return m_queueSize;}; - -private: - NdbMutex *m_mutex; /* Locks all data in SignalQueue */ - NdbCondition *m_cond; /* Notifies about new signal in the queue */ - - /** - * Returns the last recently received signal. - * Must be called with m_mutex locked. - * - * The caller takes responsibility for deleting the returned object. - * - * @returns NULL if failed, or a received signal - */ - NdbApiSignal *pop(); - - class QueueEntry { - public: - NdbApiSignal *signal; - QueueEntry *next; - }; - QueueEntry *m_signalQueueHead; /** Head of the queue. - * New entries added on the tail - */ - Uint32 m_queueSize; -}; - -template bool -SignalQueue::waitFor(Vector &t, - T *&handler, - NdbApiSignal *&signal, - Uint32 timeout) { - Guard g(m_mutex); - - if(m_signalQueueHead == NULL) - NdbCondition_WaitTimeout(m_cond, m_mutex, timeout); - - if(m_signalQueueHead == NULL) - return false; - - for(size_t i = 0; i < t.size(); i++) { - if(t[i].check(m_signalQueueHead->signal)) { - handler = &t[i]; - signal = pop(); - return true; - } - } - - ndbout_c("SignalQueue: Queued signal without true check function (GSN: %d)", - m_signalQueueHead->signal->theVerId_signalNumber); - abort(); - - return false; -} - -#endif /* !__SIGNALQUEUE_HPP_INCLUDED__ */ diff --git a/ndb/src/old_files/rep/TODO b/ndb/src/old_files/rep/TODO deleted file mode 100644 index a2462fae6cd..00000000000 --- a/ndb/src/old_files/rep/TODO +++ /dev/null @@ -1,119 +0,0 @@ -REQUIREMENTS ------------- -- It should be possible to run two systems with replication using the - same configuration file on both systems. - -FEATURES TO IMPLEMENT ---------------------- -- Fix so that execute and command uses ExtSender. - None of them should have their own signals, this should - instead by abstacted to the RepStateRequest layer. -- Delete signals - GSN_REP_INSERT_GCIBUFFER_CONF - GSN_REP_INSERT_GCIBUFFER_REF -- Fix so that all ExtSenders are set at one point in the code only. -- Verify the following signals: - GSN_REP_INSERT_GCIBUFFER_REQ - GSN_REP_CLEAR_SS_GCIBUFFER_REQ - GSN_REP_DROP_TABLE_REQ -- Fix all @todo's in the code -- Remove all #if 1, #if 0 etc. -- Fix correct usage of dbug package used in MySQL source code. -- System table storing all info about channels -- Think about how channels, subscriptions etc map to SUMA Subscriptions -- TableInfoPS must be secured if SS REP is restarted and PS REP still - has all log records needed to sync. (This could be saved in a system - table instead of using the struct.) - -KNOWN BUGS AND LIMITATIONS --------------------------- -- REP#1: Non-consistency due to non-logging stop [LIMITATION] - Problem: - - Stopping replication in state other than "Logging" can - lead to a non-consistent state of the destination database - Suggested solution: - - Implement a cleanData flag (= false) that indicates that - this has happend. - -- REP#2: PS REP uses epochs from old subscription [BUG] - The following scenario can lead to a non-correct replication: - - Start replication X - - Wait until replication is in "Logging" state - - Kill SS REP - - Let PS REP be alive - - Start new replication Y - - Replication Y can use old PS REP epochs from replication X. - Suggested solution: - - Mark PS buffers with channel ids - - Make sure that all epoch requests use channel number in the requests. - -- REP#3: When having two node groups, there is sometimes 626 [FIXED] - Problem: - - Sometimes (when doing updated) there is 626 error code when - using 2 node groups. - - 626 = Tuple does not exists. - - Current code in RepState.cpp is: - if(s == Channel::App && - m_channel.getState() == Channel::DATASCAN_COMPLETED && - i.last() >= m_channel.getDataScanEpochs().last() && - i.last() >= m_channel.getMetaScanEpochs().last()) - { - m_channel.setState(Channel::LOG); - disableAutoStart(); - } - When the system gets into LOG state, force flag is turned off - Suggested solution: - - During DATASCAN, force=true (i.e. updates are treated as writes, - deletes error due to non-existing tuple are ignored) - - The code above must take ALL node groups into account. - -- REP#4: User requests sometime vanish when DB node is down [LIMITATION] - Problem: - - PS REP node does not always REF when no connection to GREP exists - Suggested solution: - - All REP->GREP signalsends should be checked. If they return <0, - then a REF signal should be returned. - -- REP#5: User requests sometime vanish when PS REP is down [BUG] - Scenario: - - Execute "Start" with PS REP node down - Solution: - - When start is executed, the connect flag should be checked - -- REP#6: No warning if table exists [Lars, BUG!] - Problem: - - There is no warning if a replicated table already exists in the - database. - Suggested solution: - - Print warning - - Set cleanData = false - -- REP#7: Starting 2nd subscription crashes DB node (Grep.cpp:994) [FIXED] - Scenario: - - Start replication - - Wait until replication is in "Logging" state - - Kill SS REP - - Let PS REP be alive - - Start new replication - - Now GREP crashes in Grep.cpp:994. - Suggested fix: - - If a new subscription is requested with same subscriberData - as already exists, then SUMA (or GREP) sends a REF signal - indicating that SUMA does not allow a new subscription to be - created. [Now no senderData is sent from REP.] - -- REP#8: Dangling subscriptions in GREP/SUMA [Johan,LIMITATION] - Problem: - - If both REP nodes die, then there is no possibility to remove - subscriptions from GREP/SUMA - Suggested solution 1: - - Fix so that GREP/SUMA can receive a subscription removal - signal with subid 0. This means that ALL subscriptions are - removed. This meaning should be documented in the - signaldata class. - - A new user command "STOP ALL" is implemented that sends - a request to delete all subscriptions. - Suggested solution 2: - - When GREP detects that ALL PS REP nodes associated with a s - subscription are killed, then that subscription should be - deleted. diff --git a/ndb/src/old_files/rep/adapters/AppNDB.cpp b/ndb/src/old_files/rep/adapters/AppNDB.cpp deleted file mode 100644 index 05f6d52807f..00000000000 --- a/ndb/src/old_files/rep/adapters/AppNDB.cpp +++ /dev/null @@ -1,583 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "AppNDB.hpp" -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/***************************************************************************** - * Constructor / Destructor / Init - *****************************************************************************/ - -AppNDB::~AppNDB() -{ - delete m_tableInfoPs; - delete m_ndb; - m_tableInfoPs = 0; -} - -AppNDB::AppNDB(GCIContainer * gciContainer, RepState * repState) -{ - m_gciContainer = gciContainer; - m_repState = repState; - m_cond = NdbCondition_Create(); - m_started = true; -} - -void -AppNDB::init(const char* connectString) { - - // NdbThread_SetConcurrencyLevel(1+ 2); - m_ndb = new Ndb(""); - - m_ndb->useFullyQualifiedNames(false); - - m_ndb->setConnectString(connectString); - /** - * @todo Set proper max no of transactions?? needed?? Default 12?? - */ - m_ndb->init(2048); - m_dict = m_ndb->getDictionary(); - - m_ownNodeId = m_ndb->getNodeId(); - - ndbout << "-- NDB Cluster -- REP node " << m_ownNodeId << " -- Version " - << REP_VERSION_ID << " --" << endl; - ndbout_c("Connecting to NDB Cluster..."); - if (m_ndb->waitUntilReady() != 0){ - REPABORT("NDB Cluster not ready for connections"); - } - ndbout_c("Phase 1 (AppNDB): Connection 1 to NDB Cluster opened (Applier)"); - - m_tableInfoPs = new TableInfoPs(); - - m_applierThread = NdbThread_Create(runAppNDB_C, - (void**)this, - 32768, - "AppNDBThread", - NDB_THREAD_PRIO_LOW); -} - - -/***************************************************************************** - * Threads - *****************************************************************************/ - -extern "C" -void* -runAppNDB_C(void * me) -{ - ((AppNDB *) me)->threadMainAppNDB(); - NdbThread_Exit(0); - return me; -} - -void -AppNDB::threadMainAppNDB() { - MetaRecord * mr; - LogRecord * lr; - GCIBuffer::iterator * itBuffer; - GCIPage::iterator * itPage; - GCIBuffer * buffer; - GCIPage * page; - Uint32 gci=0; - - bool force; - while(true){ - - m_gciBufferList.lock(); - if(m_gciBufferList.size()==0) - NdbCondition_Wait(m_cond, m_gciBufferList.getMutex()); - m_gciBufferList.unlock(); - - /** - * Do nothing if we are not started! - */ - if(!m_started) - continue; - - if(m_gciBufferList.size()>0) { - m_gciBufferList.lock(); - buffer = m_gciBufferList[0]; - assert(buffer!=0); - if(buffer==0) { - m_gciBufferList.unlock(); -// stopApplier(GrepError::REP_APPLY_NULL_GCIBUFFER); - return; - } - m_gciBufferList.unlock(); - - RLOG(("Applying %d:[%d]", buffer->getId(), buffer->getGCI())); - gci = buffer->getGCI(); - /** - * Do stuff with buffer - */ - - force = buffer->m_force; - itBuffer = new GCIBuffer::iterator(buffer); - page = itBuffer->first(); - - Record * record; - while(page!=0 && m_started) { - - itPage = new GCIPage::iterator(page); - record = itPage->first(); - - while(record!=0 && m_started) { - switch(Record::RecordType(record->recordType)) { - case Record::META: - mr = (MetaRecord*)record; - if(applyMetaRecord(mr, gci) < 0){ - /** - * If we fail with a meta record then - * we should fail the replication! - */ - //stopApplier(GrepError::REP_APPLY_METARECORD_FAILED); - } - break; - case Record::LOG: - lr = (LogRecord*)record; - if(applyLogRecord(lr, force, gci) < 0) { - /** - * If we fail to apply a log record AND - * we have sent a ref to repstate event, - * then we should not try to apply another one! - */ -// stopApplier(GrepError::REP_APPLY_LOGRECORD_FAILED); - } - break; - default: - REPABORT("Illegal record type"); - }; - record = itPage->next(); - } - delete itPage; - itPage = 0; - page = itBuffer->next(); - } - - m_gciBufferList.erase(0, true); - /** - * "callback" to RepState to send REP_INSERT_GCIBUFFER_CONF - */ - m_repState->eventInsertConf(buffer->getGCI(), buffer->getId()); - delete itBuffer; - itBuffer = 0; - mr = 0; - lr = 0; - page = 0; - buffer = 0; - } - } - - -} - -void AppNDB::startApplier(){ - m_started = true; -} - - -void AppNDB::stopApplier(GrepError::Code err){ - m_started = false; - m_repState->eventInsertRef(0,0,0, err); -} - - -GrepError::Code -AppNDB::applyBuffer(Uint32 nodeGrp, Uint32 epoch, Uint32 force) -{ - m_gciBufferList.lock(); - - GCIBuffer * buffer = m_gciContainer->getGCIBuffer(epoch, nodeGrp); - if (buffer == NULL) { - RLOG(("WARNING! Request to apply NULL buffer %d[%d]. Force %d", - nodeGrp, epoch, force)); - return GrepError::NO_ERROR; - } - if (!buffer->isComplete()) { - RLOG(("WARNING! Request to apply non-complete buffer %d[%d]. Force %d", - nodeGrp, epoch, force)); - return GrepError::REP_APPLY_NONCOMPLETE_GCIBUFFER; - } - buffer->m_force = force; - - assert(buffer!=0); - m_gciBufferList.push_back(buffer, false); - NdbCondition_Broadcast(m_cond); - m_gciBufferList.unlock(); - return GrepError::NO_ERROR; -} - -int -AppNDB::applyLogRecord(LogRecord* lr, bool force, Uint32 gci) -{ -#if 0 - RLOG(("Applying log record (force %d, Op %d, GCI %d)", - force, lr->operation, gci)); -#endif - - int retries =0; - retry: - if(retries == 10) { - m_repState->eventInsertRef(gci, 0, lr->tableId, - GrepError::REP_APPLIER_EXECUTE_TRANSACTION); - return -1; - } - NdbConnection * trans = m_ndb->startTransaction(); - if (trans == NULL) { - /** - * Transaction could not be started - * @todo Handle the error by: - * 1. Return error code - * 2. Print log message - * 3. On higher level indicate that DB has been tainted - */ - ndbout_c("AppNDB: Send the following error msg to NDB Cluster support"); - reportNdbError("Cannot start transaction!", trans->getNdbError()); - m_repState->eventInsertRef(gci, 0, 0, - GrepError::REP_APPLIER_START_TRANSACTION); - REPABORT("Can not start transaction"); - } - - /** - * Resolve table name based on table id - */ - const Uint32 tableId = lr->tableId; - const char * tableName = m_tableInfoPs->getTableName(tableId); - - /** - * Close trans and return if it is systab_0. - */ - if (tableId == 0) { - RLOG(("WARNING! System table log record received")); - m_ndb->closeTransaction(trans); - return -1; - } - - if (tableName==0) { - /** - * Table probably does not exist - * (Under normal operation this should not happen - * since log records should not appear unless the - * table has been created.) - * - * @todo Perhaps the table is not cached due to a restart, - * so let's check in the dictionary if it exists. - */ - m_ndb->closeTransaction(trans); - m_repState->eventInsertRef(gci, 0, tableId, - GrepError::REP_APPLIER_NO_TABLE); - return -1; - } - - const NdbDictionary::Table * table = m_dict->getTable(tableName); - - NdbOperation * op = trans->getNdbOperation(tableName); - if (op == NULL) { - ndbout_c("AppNDB: Send the following error msg to NDB Cluster support"); - reportNdbError("Cannot get NdbOperation record", - trans->getNdbError()); - m_repState->eventInsertRef(gci,0,tableId, - GrepError::REP_APPLIER_NO_OPERATION); - REPABORT("Can not get NdbOperation record"); - } - - int check=0; - switch(lr->operation) { - case TriggerEvent::TE_INSERT: // INSERT - check = op->insertTuple(); - break; - case TriggerEvent::TE_DELETE: // DELETE - check = op->deleteTuple(); - break; - case TriggerEvent::TE_UPDATE: // UPDATE - if (force) { - check = op->writeTuple(); - } else { - check = op->updateTuple(); - } - break; - case TriggerEvent::TE_CUSTOM: //SCAN - check = op->writeTuple(); - break; - default: - m_ndb->closeTransaction(trans); - return -1; - }; - - if (check<0) { - ndbout_c("AppNDB: Something is weird"); - } - - /** - * @todo index inside LogRecord struct somewhat prettier - * Now it 4 (sizeof(Uint32)), and 9 the position inside the struct - * where the data starts. - */ - AttributeHeader * ah=(AttributeHeader *)((char *)lr + sizeof(Uint32) * 9); - AttributeHeader *end = (AttributeHeader *)(ah + lr->attributeHeaderWSize); - Uint32 * dataPtr = (Uint32 *)(end); - - /** - * @note attributeheader for operaration insert includes a duplicate - * p.k. The quick fix for this problem/bug is to skip the first set of - * of p.k, and start from the other set of P.Ks. Data is duplicated for - * the p.k. - */ - if (lr->operation == 0) { - for(int i = 0; i< table->getNoOfPrimaryKeys(); i++) { - ah+=ah->getHeaderSize(); - dataPtr = dataPtr + ah->getDataSize(); - } - } - - while (ah < end) { - const NdbDictionary::Column * column = - table->getColumn(ah->getAttributeId()); - /** - * @todo: Here is a limitation. I don't care if it is a tuplekey - * that is autogenerated or an ordinary pk. I just whack it in. - * However, this must be examined. - */ - if(column->getPrimaryKey()) { - if(op->equal(ah->getAttributeId(), (const char *)dataPtr) < 0) { - ndbout_c("AppNDB: Equal failed id %d op %d name %s, gci %d force %d", - ah->getAttributeId(), - lr->operation, - column->getName(), gci, force); - reportNdbError("Equal!", trans->getNdbError()); - } - - } else { - if(op->setValue(ah->getAttributeId(), (const char *)dataPtr) < 0) - ndbout_c("AppNDB: setvalue failed id %d op %d name %s, gci %d force %d", - ah->getAttributeId(), - lr->operation, - column->getName(), gci, force); - } - - dataPtr = dataPtr + ah->getDataSize(); - ah = ah + ah->getHeaderSize() ; - } - - if(trans->execute(Commit) != 0) { - /** - * Transaction commit failure - */ - const NdbError err = trans->getNdbError(); - m_ndb->closeTransaction(trans); - switch(err.status){ - case NdbError::Success: - { - m_repState->eventInsertRef(gci, 0, tableId, - GrepError::REP_APPLIER_EXECUTE_TRANSACTION); - return -1; - } - break; - case NdbError::TemporaryError: - { - NdbSleep_MilliSleep(50); - retries++; - goto retry; - } - break; - case NdbError::UnknownResult: - { - ndbout_c("AppNDB: Send the following error msg to NDB Cluster support"); - reportNdbError("Execute transaction failed!", - trans->getNdbError()); - m_repState->eventInsertRef(gci, 0, tableId, - GrepError::REP_APPLIER_EXECUTE_TRANSACTION); - return -1; - } - break; - case NdbError::PermanentError: - { - if(err.code == 626) { - if(force && lr->operation == TriggerEvent::TE_DELETE) /**delete*/ { - /**tuple was not found. Ignore this, since - * we are trying to apply a "delete a tuple"-log record before - * having applied the scan data. - */ - return -1; - } - } - - ndbout_c("AppNDB: Send the following error msg to NDB Cluster support"); reportNdbError("Execute transaction failed!", - trans->getNdbError()); - ndbout_c("\n\nAppNDB: RepNode will now crash."); - m_ndb->closeTransaction(trans); - m_repState->eventInsertRef(gci, 0, tableId, - GrepError::REP_APPLIER_EXECUTE_TRANSACTION); - return -1; - } - break; - } - } - - /** - * No errors. Close transaction and continue in applierThread. - */ - m_ndb->closeTransaction(trans); - return 1; -} - - -int -AppNDB::applyMetaRecord(MetaRecord* mr, Uint32 gci) -{ - /** - * Validate table id - */ - Uint32 tableId = mr->tableId; - if (tableId==0) { - RLOG(("WARNING! Meta record contained record with tableId 0")); - return 0; - } - - /** - * Prepare meta record - */ - NdbDictionary::Table * table = prepareMetaRecord(mr); - if(table == 0) { - RLOG(("WARNING! Prepare table meta record failed for table %d", tableId)); - m_dict->getNdbError(); - m_repState->eventInsertRef(gci,0,tableId, - GrepError::REP_APPLIER_PREPARE_TABLE); - return -1; - } - - /** - * Table does not exist in TableInfoPs -> add it - */ - if(m_tableInfoPs->getTableName(tableId)==0) { - RLOG(("Table %d:%s added to m_tableInfoPs", tableId, table->getName())); - m_tableInfoPs->insert(tableId,table->getName()); - } - - /** - * Validate that table does not exist in Dict - */ - - const NdbDictionary::Table * tmpTable = m_dict->getTable(table->getName()); - if(tmpTable !=0) { - /** - * Oops, a table with the same name exists - */ - if(tmpTable->getObjectVersion()!=table->getObjectVersion()) { - char buf[100]; - sprintf(buf,"WARNING! Another version of table %d:%s already exists." - "Currently, we dont support versions, so will abort now!", - tableId, table->getName()); - - REPABORT(buf); - - } - RLOG(("WARNING! An identical table %d:%s already exists.", - tableId, table->getName())); - return -1; - } - - - /** - * @todo WARNING! Should scan table MR for columns that are not supported - */ - /* - NdbDictionary::Column * column; - - for(int i=0; igetNoOfColumns(); i++) { - column = table->getColumn(i); - if(column->getAutoIncrement()) { - reportWarning(table->getName(), column->getName(), - "Uses AUTOINCREMENT of PK"); - } - } - */ - - - /** - * Create table - */ - if(m_dict->createTable(*table)<0) { - ndbout_c("AppNDB: Send the following error msg to NDB Cluster support"); - reportNdbError("Create table failed!", m_dict->getNdbError()); - m_repState->eventCreateTableRef(gci, - tableId, - table->getName(), - GrepError::REP_APPLIER_CREATE_TABLE); - return -1; - } - - RLOG(("Table %d:%s created", tableId, table->getName())); - return 0; -} - -NdbDictionary::Table* -AppNDB::prepareMetaRecord(MetaRecord* mr) { - NdbTableImpl * tmp = 0; - NdbDictionary::Table * table =0; - Uint32 * data =(Uint32*)( ((char*)mr + sizeof(Uint32)*6)); - int res = NdbDictInterface::parseTableInfo(&tmp, data, mr->dataLen, - m_ndb->usingFullyQualifiedNames()); - if(res == 0) { - table = tmp; - return table; - } else{ - return 0; - } -} - -void -AppNDB::reportNdbError(const char * msg, const NdbError & err) { - ndbout_c("%s : Error code %d , error message %s", - msg, err.code, - (err.message ? err.message : "")); -} - -void -AppNDB::reportWarning(const char * tableName, const char * message) { - ndbout_c("WARNING: Table %s, %s", tableName, message); -} - -void -AppNDB::reportWarning(const char * tableName, const char * columnName, - const char * message) { - ndbout_c("WARNING: Table %s, column %s, %s", tableName, columnName,message); -} - -int -AppNDB::dropTable(Uint32 tableId) -{ - char * tableName = m_tableInfoPs->getTableName(tableId); - if(tableName == 0) return -1; - ndbout_c("AppNDB: Dropping table "); - if(m_dict->dropTable(tableName) != 0) { - reportNdbError("Failed dropping table",m_dict->getNdbError()); - return -1; - } - m_tableInfoPs->del(tableId); - return 1; -} diff --git a/ndb/src/old_files/rep/adapters/AppNDB.hpp b/ndb/src/old_files/rep/adapters/AppNDB.hpp deleted file mode 100644 index 9563a1e41ab..00000000000 --- a/ndb/src/old_files/rep/adapters/AppNDB.hpp +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef APPNDB_HPP -#define APPNDB_HPP -#include "NdbApi.hpp" - -#include -#include -#include -#include - -#include -#include - -#include "TableInfoPs.hpp" -#include -#include - -#include - -extern "C" { - void * runAppNDB_C(void *); -} - -/** - * @class AppNDB - * @brief Connects to NDB and appliers log records into standby system - */ -class AppNDB { -public: - /*************************************************************************** - * Constructor / Destructor / Init - ***************************************************************************/ - AppNDB(class GCIContainer * gciContainer, class RepState * repState); - ~AppNDB(); - - void init(const char * connectString); - - GrepError::Code - applyBuffer(Uint32 nodeGrp, Uint32 first, Uint32 force); - - /** - * Takes a table id and drops it. - * @param tableId Name of table to be dropped - * @return Returns 1 = ok, -1 failed - * - * @todo Fix: 0 usually means ok... - */ - int dropTable(Uint32 tableId); - void startApplier(); - void stopApplier(GrepError::Code err); -private: - /*************************************************************************** - * Methods - ***************************************************************************/ - friend void* runAppNDB_C(void*); - - void threadMainAppNDB(void); - - /** - * Takes a log records and does the operation specified in the log record - * on NDB. - * @param - lr (LogRecord) - * @param - force true if GREP:SSCoord is in phase STARTING. - * Ignore "Execute" errors if true. - */ - int applyLogRecord(LogRecord * lr, bool force, Uint32 gci); - - /** - * Applies a table based on a meta record and creates the table - * in NDB. - * @param - meta record - * @return - 0 on success, -1 if something went wrong - */ - int applyMetaRecord(MetaRecord * mr, Uint32 gci); - - /** - * Takes a meta record and uses NdbDictionaryXXX::parseInfoTable - * and returns a table - * @param mr - MetaRecord - * @return - a table based on the meta record - */ - NdbDictionary::Table* prepareMetaRecord(MetaRecord * mr); - - /** - * Prints out an NDB error message if a ndb operation went wrong. - * @param msg - text explaining the error - * @param err - NDB error type - */ - void reportNdbError(const char * msg, const NdbError & err); - - /** - * Prints out a warning message. Used if support for something - * is not implemented. - * @param tableName - the name of the table this warning occured on - * @param message - warning message - */ - void reportWarning(const char * tableName, const char * message); - - /** - * Prints out a warning message. Used if support for something - * is not implemented. - * @param tableName - the name of the table this warning occured on - * @param columnName - the name of the column this warning occured on - * @param message - warning message - */ - void reportWarning(const char * tableName, const char * columnName, - const char * message); - - - /*************************************************************************** - * Variables - ***************************************************************************/ - GCIContainer * m_gciContainer; - RepState * m_repState; - - Ndb* m_ndb; - NdbDictionary::Dictionary * m_dict; - NodeId m_ownNodeId; - bool m_started; - TableInfoPs * m_tableInfoPs; - NdbThread* m_applierThread; - NdbCondition * m_cond; - MutexVector m_gciBufferList; -}; - -#endif diff --git a/ndb/src/old_files/rep/adapters/ExtAPI.cpp b/ndb/src/old_files/rep/adapters/ExtAPI.cpp deleted file mode 100644 index 0dcd1e85465..00000000000 --- a/ndb/src/old_files/rep/adapters/ExtAPI.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "ExtAPI.hpp" - -GrepError::Code -ExtAPI::eventSubscriptionIdCreated(Uint32 subId, Uint32 subKey) -{ - NdbApiSignal* signal = m_repSender->getSignal(); - CreateSubscriptionIdConf * conf = - (CreateSubscriptionIdConf *)signal->getDataPtrSend(); - conf->subscriptionId = subId; - conf->subscriptionKey = subKey; - signal->set(0, SSREPBLOCKNO, GSN_GREP_CREATE_SUBID_CONF, - CreateSubscriptionIdConf::SignalLength); - m_repSender->sendSignal(signal); - return GrepError::NO_ERROR; -} diff --git a/ndb/src/old_files/rep/adapters/ExtAPI.hpp b/ndb/src/old_files/rep/adapters/ExtAPI.hpp deleted file mode 100644 index f10b6c7d682..00000000000 --- a/ndb/src/old_files/rep/adapters/ExtAPI.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef EXTAPI_HPP -#define EXTAPI_HPP - -#include -#include -#include - -#include - -/** - * The abstract class for all extractors - */ -class ExtAPI -{ -public: - /*************************************************************************** - * Constructor / Destructor - ***************************************************************************/ -#if 0 - bool init(const char * connectString = NULL); - - GrepError::Code dataLogStarted(Uint32 epoch, - Uint32 subId, Uint32 subKey) = 0; - GrepError::Code metaLogStarted(Uint32 epoch, - Uint32 subId, Uint32 subKey) = 0; - GrepError::Code epochComleted() = 0; - GrepError::Code subscriptionCreated() = 0; - GrepError::Code subscriptionRemoved() = 0; - GrepError::Code metaScanCompleted() = 0; - GrepError::Code dataScanCompleted() = 0; - GrepError::Code subscriptionRemoveFailed() = 0; - GrepError::Code metaScanFailed() = 0; - GrepError::Code dataScanFailed() = 0; - GrepError::Code subscriptiodIdCreateFailed() = 0; - GrepError::Code dataLogFailed() = 0; - GrepError::Code metaLogFailed() = 0; - GrepError::Code subscriptionCreateFailed() = 0; - - /**Above to be deleted*/ -#endif - - virtual GrepError::Code - eventSubscriptionIdCreated(Uint32 subId, Uint32 subKey) ; - -#if 0 - GrepError::Code - eventSubscriptionDeleted(Uint32 subId, Uint32 subKey); - - GrepError::Code - eventMetaLogStarted(NdbApiSignal*, Uint32 subId, Uint32 subKey); - - GrepError::Code - eventDataLogStarted(NdbApiSignal*, Uint32 subId, Uint32 subKey); - - GrepError::Code - eventMetaScanCompleted(NdbApiSignal*, Uint32 subId, Uint32 subKey, - Interval epochs); - - GrepError::Code - eventDataScanCompleted(NdbApiSignal*, Uint32 subId, Uint32 subKey, - Interval epochs); - - GrepError::Code - eventMetaScanFailed(Uint32 subId, Uint32 subKey, GrepError::Code error); - - GrepError::Code - eventDataScanFailed(Uint32 subId, Uint32 subKey, GrepError::Code error); -#endif - - /*************************************************************************** - * Public Methods - ***************************************************************************/ - void setRepSender(ExtSender * es) { m_repSender = es; }; - //void signalErrorHandler(NdbApiSignal * s, Uint32 nodeId); - -protected: - ExtSender * m_repSender; -}; - - -#if 0 -class TestExtAPI : public ExtAPI -{ - GrepError::Code - eventSubscriptionIdCreated(Uint32 subId, Uint32 subKey) { - ndbout_c("Received subscription:%d-%d"); - }; -}; -#endif - -#endif // EXTAPI_HPP diff --git a/ndb/src/old_files/rep/adapters/ExtNDB.cpp b/ndb/src/old_files/rep/adapters/ExtNDB.cpp deleted file mode 100644 index 6642b750b57..00000000000 --- a/ndb/src/old_files/rep/adapters/ExtNDB.cpp +++ /dev/null @@ -1,559 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "ExtNDB.hpp" -#include "ConfigRetriever.hpp" -#include - -#include - -#include -#include -#include -#include -#include -#include - -/***************************************************************************** - * Constructor / Destructor / Init - *****************************************************************************/ -ExtNDB::ExtNDB(GCIContainerPS * gciContainer, ExtAPI * extAPI) -{ - m_grepSender = new ExtSender(); - if (!m_grepSender) REPABORT("Could not allocate object"); - m_gciContainerPS = gciContainer; - - m_nodeGroupInfo = new NodeGroupInfo(); - m_gciContainerPS->setNodeGroupInfo(m_nodeGroupInfo); - - m_doneSetGrepSender = false; - m_subId = 0; - m_subKey = 0; - m_firstGCI = 0; - m_dataLogStarted = false; - - m_extAPI = extAPI; - if (!m_extAPI) REPABORT("Could not allocate object"); -} - -ExtNDB::~ExtNDB() -{ - delete m_grepSender; - delete m_nodeGroupInfo; -} - -void -ExtNDB::signalErrorHandler(NdbApiSignal * signal, Uint32 nodeId) -{ - //const Uint32 gsn = signal->readSignalNumber(); - //const Uint32 len = signal->getLength(); - RLOG(("Send signal failed. Signal %p", signal)); -} - -bool -ExtNDB::init(const char * connectString) -{ - m_signalExecThread = NdbThread_Create(signalExecThread_C, - (void **)this, - 32768, - "ExtNDB_Service", - NDB_THREAD_PRIO_LOW); - -#if 0 - /** - * I don't see that this does anything - * - * Jonas 13/2-04 - */ - ConfigRetriever cr; cr.setConnectString(connectString); - - ndb_mgm_configuration * config = cr.getConfig(NDB_VERSION, NODE_TYPE_REP); - if (config == 0) { - ndbout << "ExtNDB: Configuration error: "; - const char* erString = cr.getErrorString(); - if (erString == 0) { - erString = "No error specified!"; - } - ndbout << erString << endl; - return false; - } - NdbAutoPtr autoPtr(config); - m_ownNodeId = r.getOwnNodeId(); - - /** - * Check which GREPs to connect to (in configuration) - * - * @note SYSTEM LIMITATION: Only connects to one GREP - */ - Uint32 noOfConnections=0; - NodeId grepNodeId=0; - const Properties * connection; - - config->get("NoOfConnections", &noOfConnections); - for (Uint32 i=0; iget("Connection", i, &connection); - connection->get("NodeId1", &nodeId1); - connection->get("NodeId2", &nodeId2); - if (!connection->contains("System1") && - !connection->contains("System2") && - (nodeId1 == m_ownNodeId || nodeId2 == m_ownNodeId)) { - /** - * Found connection - */ - if (nodeId1 == m_ownNodeId) { - grepNodeId = nodeId2; - } else { - grepNodeId = nodeId1; - } - } - } -#endif - - m_transporterFacade = TransporterFacade::instance(); - - assert(m_transporterFacade != 0); - - m_ownBlockNo = m_transporterFacade->open(this, execSignal, execNodeStatus); - assert(m_ownBlockNo > 0); - m_ownRef = numberToRef(m_ownBlockNo, m_ownNodeId); - ndbout_c("EXTNDB blockno %d ownref %d ", m_ownBlockNo, m_ownRef); - assert(m_ownNodeId == m_transporterFacade->ownId()); - - m_grepSender->setOwnRef(m_ownRef); - m_grepSender->setTransporterFacade(m_transporterFacade); - - if(!m_grepSender->connected(50000)){ - ndbout_c("ExtNDB: Failed to connect to DB nodes!"); - ndbout_c("ExtNDB: Tried to create transporter as (node %d, block %d).", - m_ownNodeId, m_ownBlockNo); - ndbout_c("ExtNDB: Check that DB nodes are started."); - return false; - } - ndbout_c("Phase 3 (ExtNDB): Connection %d to NDB Cluster opened (Extractor)", - m_ownBlockNo); - - for (Uint32 i=1; igetIsDbNode(i) && - m_transporterFacade->getIsNodeSendable(i)) - { - Uint32 nodeGrp = m_transporterFacade->getNodeGrp(i); - m_nodeGroupInfo->addNodeToNodeGrp(i, true, nodeGrp); - Uint32 nodeId = m_nodeGroupInfo->getFirstConnectedNode(nodeGrp); - m_grepSender->setNodeId(nodeId); - if(m_nodeGroupInfo->getPrimaryNode(nodeGrp) == 0) { - m_nodeGroupInfo->setPrimaryNode(nodeGrp, nodeId); - } - m_doneSetGrepSender = true; -#if 0 - RLOG(("Added node %d to node group %d", i, nodeGrp)); -#endif - } - } - - return true; -} - -/***************************************************************************** - * Signal Queue Executor - *****************************************************************************/ - -class SigMatch -{ -public: - int gsn; - void (ExtNDB::* function)(NdbApiSignal *signal); - - SigMatch() { gsn = 0; function = NULL; }; - - SigMatch(int _gsn, void (ExtNDB::* _function)(NdbApiSignal *signal)) { - gsn = _gsn; - function = _function; - }; - - bool check(NdbApiSignal *signal) { - if(signal->readSignalNumber() == gsn) - return true; - return false; - }; -}; - -extern "C" -void *signalExecThread_C(void *r) -{ - ExtNDB *grepps = (ExtNDB*)r; - - grepps->signalExecThreadRun(); - - NdbThread_Exit(0); - /* NOTREACHED */ - return 0; -} - - -void -ExtNDB::signalExecThreadRun() -{ - Vector sl; - - /** - * Signals to be executed - */ - sl.push_back(SigMatch(GSN_SUB_GCP_COMPLETE_REP, - &ExtNDB::execSUB_GCP_COMPLETE_REP)); - - /** - * Is also forwarded to SSCoord - */ - sl.push_back(SigMatch(GSN_GREP_SUB_START_CONF, - &ExtNDB::execGREP_SUB_START_CONF)); - sl.push_back(SigMatch(GSN_GREP_SUB_CREATE_CONF, - &ExtNDB::execGREP_SUB_CREATE_CONF)); - sl.push_back(SigMatch(GSN_GREP_SUB_REMOVE_CONF, - &ExtNDB::execGREP_SUB_REMOVE_CONF)); - /** - * Signals to be forwarded - */ - sl.push_back(SigMatch(GSN_GREP_CREATE_SUBID_CONF, - &ExtNDB::execGREP_CREATE_SUBID_CONF)); - - sl.push_back(SigMatch(GSN_GREP_SUB_SYNC_CONF, &ExtNDB::sendSignalRep)); - - sl.push_back(SigMatch(GSN_GREP_SUB_REMOVE_REF, &ExtNDB::sendSignalRep)); - sl.push_back(SigMatch(GSN_GREP_SUB_SYNC_REF, &ExtNDB::sendSignalRep)); - sl.push_back(SigMatch(GSN_GREP_CREATE_SUBID_REF, &ExtNDB::sendSignalRep)); - - sl.push_back(SigMatch(GSN_GREP_SUB_START_REF, &ExtNDB::sendSignalRep)); - sl.push_back(SigMatch(GSN_GREP_SUB_CREATE_REF, &ExtNDB::sendSignalRep)); - - - while(1) { - SigMatch *handler = NULL; - NdbApiSignal *signal = NULL; - - if(m_signalRecvQueue.waitFor(sl, handler, signal, DEFAULT_TIMEOUT)) { -#if 0 - RLOG(("Removed signal from queue (GSN: %d, QSize: %d)", - signal->readSignalNumber(), m_signalRecvQueue.size())); -#endif - if(handler->function != 0) { - (this->*handler->function)(signal); - delete signal; signal = 0; - } else { - REPABORT("Illegal handler for signal"); - } - } - } -} - -void -ExtNDB::sendSignalRep(NdbApiSignal * s) -{ - if(m_repSender->sendSignal(s) == -1) - { - signalErrorHandler(s, 0); - } -} - -void -ExtNDB::execSignal(void* executorObj, NdbApiSignal* signal, - class LinearSectionPtr ptr[3]) -{ - ExtNDB * executor = (ExtNDB*)executorObj; - - const Uint32 gsn = signal->readSignalNumber(); - const Uint32 len = signal->getLength(); - - NdbApiSignal * s = new NdbApiSignal(executor->m_ownRef); - switch(gsn){ - case GSN_SUB_GCP_COMPLETE_REP: - case GSN_GREP_CREATE_SUBID_CONF: - case GSN_GREP_SUB_CREATE_CONF: - case GSN_GREP_SUB_START_CONF: - case GSN_GREP_SUB_SYNC_CONF: - case GSN_GREP_SUB_REMOVE_CONF: - case GSN_GREP_CREATE_SUBID_REF: - case GSN_GREP_SUB_CREATE_REF: - case GSN_GREP_SUB_START_REF: - case GSN_GREP_SUB_SYNC_REF: - case GSN_GREP_SUB_REMOVE_REF: - s->set(0, SSREPBLOCKNO, gsn, len); - memcpy(s->getDataPtrSend(), signal->getDataPtr(), 4 * len); - executor->m_signalRecvQueue.receive(s); - break; - case GSN_SUB_TABLE_DATA: - executor->execSUB_TABLE_DATA(signal, ptr); - delete s; s=0; - break; - case GSN_SUB_META_DATA: - executor->execSUB_META_DATA(signal, ptr); - delete s; s=0; - break; - default: - REPABORT1("Illegal signal received in execSignal", gsn); - } - s=0; -#if 0 - ndbout_c("ExtNDB: Inserted signal into queue (GSN: %d, Len: %d)", - signal->readSignalNumber(), len); -#endif -} - -void -ExtNDB::execNodeStatus(void* obj, Uint16 nodeId, bool alive, bool nfCompleted) -{ - ExtNDB * thisObj = (ExtNDB*)obj; - - RLOG(("Changed node status (Id %d, Alive %d, nfCompleted %d)", - nodeId, alive, nfCompleted)); - - if(alive) { - /** - * Connected - */ - Uint32 nodeGrp = thisObj->m_transporterFacade->getNodeGrp(nodeId); - RLOG(("DB node %d of node group %d connected", nodeId, nodeGrp)); - - thisObj->m_nodeGroupInfo->addNodeToNodeGrp(nodeId, true, nodeGrp); - Uint32 firstNode = thisObj->m_nodeGroupInfo->getPrimaryNode(nodeGrp); - - if(firstNode == 0) - thisObj->m_nodeGroupInfo->setPrimaryNode(nodeGrp, nodeId); - - if (!thisObj->m_doneSetGrepSender) { - thisObj->m_grepSender->setNodeId(firstNode); - thisObj->m_doneSetGrepSender = true; - } - - RLOG(("Connect: First connected node in nodegroup: %d", - thisObj->m_nodeGroupInfo->getPrimaryNode(nodeGrp))); - - } else if (!nfCompleted) { - - /** - * Set node as "disconnected" in m_nodeGroupInfo until - * node comes up again. - */ - Uint32 nodeGrp = thisObj->m_transporterFacade->getNodeGrp(nodeId); - RLOG(("DB node %d of node group %d disconnected", - nodeId, nodeGrp)); - thisObj->m_nodeGroupInfo->setConnectStatus(nodeId, false); - /** - * The node that crashed was also the primary node, the we must change - * primary node - */ - if(nodeId == thisObj->m_nodeGroupInfo->getPrimaryNode(nodeGrp)) { - Uint32 node = thisObj->m_nodeGroupInfo->getFirstConnectedNode(nodeGrp); - if(node > 0) { - thisObj->m_grepSender->setNodeId(node); - thisObj->m_nodeGroupInfo->setPrimaryNode(nodeGrp, node); - } - else { - thisObj->sendDisconnectRep(nodeGrp); - } - } - RLOG(("Disconnect: First connected node in nodegroup: %d", - thisObj->m_nodeGroupInfo->getPrimaryNode(nodeGrp))); - - } else if(nfCompleted) { - } else { - REPABORT("Function execNodeStatus with wrong parameters"); - } -} - -/***************************************************************************** - * Signal Receivers for LOG and SCAN - *****************************************************************************/ - -/** - * Receive datalog/datascan from GREP/SUMA - */ -void -ExtNDB::execSUB_TABLE_DATA(NdbApiSignal * signal, LinearSectionPtr ptr[3]) -{ - SubTableData * const data = (SubTableData*)signal->getDataPtr(); - Uint32 tableId = data->tableId; - Uint32 operation = data->operation; - Uint32 gci = data->gci; - Uint32 nodeId = refToNode(signal->theSendersBlockRef); - - if((SubTableData::LogType)data->logType == SubTableData::SCAN) - { - Uint32 nodeGrp = m_nodeGroupInfo->findNodeGroup(nodeId); - - NodeGroupInfo::iterator * it; - it = new NodeGroupInfo::iterator(nodeGrp, m_nodeGroupInfo); - for(NodeConnectInfo * nci=it->first(); it->exists();nci=it->next()) { - m_gciContainerPS->insertLogRecord(nci->nodeId, tableId, - operation, ptr, gci); - } - delete it; it = 0; - } else { - m_gciContainerPS->insertLogRecord(nodeId, tableId, operation, ptr, gci); - } -} - -/** - * Receive metalog/metascan from GREP/SUMA - */ -void -ExtNDB::execSUB_META_DATA(NdbApiSignal * signal, LinearSectionPtr ptr[3]) -{ - Uint32 nodeId = refToNode(signal->theSendersBlockRef); - SubMetaData * const data = (SubMetaData*)signal->getDataPtr(); - Uint32 tableId = data->tableId; - Uint32 gci = data->gci; - - Uint32 nodeGrp = m_nodeGroupInfo->findNodeGroup(nodeId); - - NodeGroupInfo::iterator * it; - it = new NodeGroupInfo::iterator(nodeGrp, m_nodeGroupInfo); - for(NodeConnectInfo * nci=it->first(); it->exists();nci=it->next()) { - m_gciContainerPS->insertMetaRecord(nci->nodeId, tableId, ptr, gci); - RLOG(("Received meta record in %d[%d]", nci->nodeId, gci)); - } - - delete it; it = 0; -} - - -/***************************************************************************** - * Signal Receivers (Signals that are actually just forwarded to SS REP) - *****************************************************************************/ - -void -ExtNDB::execGREP_CREATE_SUBID_CONF(NdbApiSignal * signal) -{ - CreateSubscriptionIdConf const * conf = - (CreateSubscriptionIdConf *)signal->getDataPtr(); - Uint32 subId = conf->subscriptionId; - Uint32 subKey = conf->subscriptionKey; - ndbout_c("GREP_CREATE_SUBID_CONF m_extAPI=%p\n", m_extAPI); - m_extAPI->eventSubscriptionIdCreated(subId, subKey); -} - -/***************************************************************************** - * Signal Receivers - *****************************************************************************/ - -/** - * Receive information about completed GCI from GREP/SUMA - * - * GCI completed, i.e. no more unsent log records exists in SUMA - * @todo use node id to identify buffers? - */ -void -ExtNDB::execSUB_GCP_COMPLETE_REP(NdbApiSignal * signal) -{ - SubGcpCompleteRep * const rep = (SubGcpCompleteRep*)signal->getDataPtr(); - const Uint32 gci = rep->gci; - Uint32 nodeId = refToNode(rep->senderRef); - - RLOG(("Epoch %d completed at node %d", gci, nodeId)); - m_gciContainerPS->setCompleted(gci, nodeId); - - if(m_firstGCI == gci && !m_dataLogStarted) { - sendGREP_SUB_START_CONF(signal, m_firstGCI); - m_dataLogStarted = true; - } -} - -/** - * Send info that scan is competed to SS REP - * - * @todo Use node id to identify buffers? - */ -void -ExtNDB::sendGREP_SUB_START_CONF(NdbApiSignal * signal, Uint32 gci) -{ - RLOG(("Datalog started (Epoch %d)", gci)); - GrepSubStartConf * conf = (GrepSubStartConf *)signal->getDataPtrSend(); - conf->firstGCI = gci; - conf->subscriptionId = m_subId; - conf->subscriptionKey = m_subKey; - conf->part = SubscriptionData::TableData; - signal->m_noOfSections = 0; - signal->set(0, SSREPBLOCKNO, GSN_GREP_SUB_START_CONF, - GrepSubStartConf::SignalLength); - sendSignalRep(signal); -} - -/** - * Scan is completed... says SUMA/GREP - * - * @todo Use node id to identify buffers? - */ -void -ExtNDB::execGREP_SUB_START_CONF(NdbApiSignal * signal) -{ - GrepSubStartConf * const conf = (GrepSubStartConf *)signal->getDataPtr(); - Uint32 part = conf->part; - //Uint32 nodeId = refToNode(conf->senderRef); - m_firstGCI = conf->firstGCI; - - if (part == SubscriptionData::TableData) { - RLOG(("Datalog started (Epoch %d)", m_firstGCI)); - return; - } - RLOG(("Metalog started (Epoch %d)", m_firstGCI)); - - signal->set(0, SSREPBLOCKNO, GSN_GREP_SUB_START_CONF, - GrepSubStartConf::SignalLength); - sendSignalRep(signal); -} - -/** - * Receive no of node groups that PS has and pass signal on to SS - */ -void -ExtNDB::execGREP_SUB_CREATE_CONF(NdbApiSignal * signal) -{ - GrepSubCreateConf * conf = (GrepSubCreateConf *)signal->getDataPtrSend(); - m_subId = conf->subscriptionId; - m_subKey = conf->subscriptionKey; - - conf->noOfNodeGroups = m_nodeGroupInfo->getNoOfNodeGroups(); - sendSignalRep(signal); -} - -/** - * Receive conf that subscription has been remove in GREP/SUMA - * - * Pass signal on to TransPS - */ -void -ExtNDB::execGREP_SUB_REMOVE_CONF(NdbApiSignal * signal) -{ - m_gciContainerPS->reset(); - sendSignalRep(signal); -} - -/** - * If all PS nodes has disconnected, then remove all epochs - * for this subscription. - */ -void -ExtNDB::sendDisconnectRep(Uint32 nodeId) -{ - NdbApiSignal * signal = new NdbApiSignal(m_ownRef); - signal->set(0, SSREPBLOCKNO, GSN_REP_DISCONNECT_REP, - RepDisconnectRep::SignalLength); - RepDisconnectRep * rep = (RepDisconnectRep*) signal->getDataPtrSend(); - rep->nodeId = nodeId; - rep->subId = m_subId; - rep->subKey = m_subKey; - sendSignalRep(signal); -} diff --git a/ndb/src/old_files/rep/adapters/ExtNDB.hpp b/ndb/src/old_files/rep/adapters/ExtNDB.hpp deleted file mode 100644 index 228c980fd06..00000000000 --- a/ndb/src/old_files/rep/adapters/ExtNDB.hpp +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef EXTNDB_HPP -#define EXTNDB_HPP - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include "ExtAPI.hpp" - -extern "C" { -static void * signalExecThread_C(void *); -} - -/** - * @class ExtNDB - * @brief Class responsible for connection to primary system GREP - */ -class ExtNDB -{ -public: - /*************************************************************************** - * Constructor / Destructor - ***************************************************************************/ - ExtNDB(GCIContainerPS * gciContainer, ExtAPI * extAPI); - ~ExtNDB(); - bool init(const char * connectString = NULL); - - /*************************************************************************** - * Public Methods - ***************************************************************************/ - void setGrepSender(ExtSender * es) { m_grepSender = es; }; - ExtSender * getGrepSender() { return m_grepSender; }; - void setRepSender(ExtSender * es) { - m_extAPI->setRepSender(es); m_repSender = es; }; - void signalErrorHandler(NdbApiSignal * s, Uint32 nodeId); - -private: - friend void * signalExecThread_C(void *); - void signalExecThreadRun(); - - static void execSignal(void* signalSender, NdbApiSignal* signal, - class LinearSectionPtr ptr[3]); - - static void execNodeStatus(void* signalSender, NodeId, - bool alive, bool nfCompleted); - - void sendSignalRep(NdbApiSignal *); - void sendDisconnectRep(Uint32 nodeId); - - /*************************************************************************** - * Signal Executors - ***************************************************************************/ - void execSUB_GCP_COMPLETE_REP(NdbApiSignal*); - void execGREP_SUB_CREATE_CONF(NdbApiSignal * signal); - void execGREP_SUB_REMOVE_CONF(NdbApiSignal * signal); - void execGREP_SUB_START_CONF(NdbApiSignal * signal); - void sendGREP_SUB_START_CONF(NdbApiSignal * signal, Uint32 gci); - void execSUB_TABLE_DATA(NdbApiSignal * signal,LinearSectionPtr ptr[3]); - void execSUB_META_DATA(NdbApiSignal * signal,LinearSectionPtr ptr[3]); - - // Signals that are actually just fowarded to REP - void execGREP_CREATE_SUBID_CONF(NdbApiSignal *); - - /*************************************************************************** - * Private Variables - ***************************************************************************/ - struct NdbThread * m_signalExecThread; - class SignalQueue m_signalRecvQueue; - - Uint32 m_ownNodeId; ///< NodeId of this node - Uint32 m_ownBlockNo; ///< BlockNo of this "block" - BlockReference m_ownRef; ///< Reference to this - - ExtSender * m_grepSender; ///< Responsible send to GREP - ExtSender * m_repSender; ///< Responsible send to SS REP - - NodeGroupInfo * m_nodeGroupInfo; - GCIContainerPS * m_gciContainerPS; ///< Interface to GCICotainer - ///< seen by PS - TransporterFacade * m_transporterFacade; - - bool m_doneSetGrepSender; ///< Only done once - bool m_dataLogStarted; - Uint32 m_subId; - Uint32 m_subKey; - Uint32 m_firstGCI; - - ExtAPI * m_extAPI; -}; - -#endif diff --git a/ndb/src/old_files/rep/adapters/Makefile b/ndb/src/old_files/rep/adapters/Makefile deleted file mode 100644 index bdd711510c3..00000000000 --- a/ndb/src/old_files/rep/adapters/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapi repserver kernel - -ARCHIVE_TARGET := repadapters - -SOURCES = ExtNDB.cpp \ - AppNDB.cpp \ - ExtAPI.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/rep/adapters/TableInfoPs.hpp b/ndb/src/old_files/rep/adapters/TableInfoPs.hpp deleted file mode 100644 index 3fa25979255..00000000000 --- a/ndb/src/old_files/rep/adapters/TableInfoPs.hpp +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef TABLEINFO_PS_HPP -#define TABLEINFO_PS_HPP - -#include -#include -#include -#include - -struct TableInfo { - Uint32 tableId; - char* tableName; -}; - -/** - * @class TableInfoPS - * @brief Meta information about tables stored on PS - */ -class TableInfoPs { -public: - inline void insert(const Uint32 tableId, const char * tableName); - - inline bool del(const Uint32 tableId); - - inline char * getTableName(const Uint32 tableId) const; - -private: - Vector tableInfo; - - inline TableInfo * lookup(const Uint32 tableId) const; - inline TableInfo * lookup(const Uint32 tableId , Uint32 * pos) const; -}; - -inline -TableInfo * -TableInfoPs::lookup(const Uint32 tableId) const{ - TableInfo * table; - Uint32 i=0; - - while(itableId == tableId) - return table; - i++; - } - return 0; -} - -inline -TableInfo * -TableInfoPs::lookup(const Uint32 tableId, Uint32 * pos ) const{ - TableInfo * table; - Uint32 i=0; - while(itableId == tableId) { - *pos=i; - return table; - } - i++; - } - return 0; -} - - -inline -char * -TableInfoPs::getTableName(const Uint32 tableId) const{ - TableInfo * table; - table=lookup(tableId); - if(table!=0) - return table->tableName; - return 0; -} - - -inline -void -TableInfoPs::insert(const Uint32 tableId, const char * tableName) { - TableInfo * table = new TableInfo; - table->tableId=tableId; - table->tableName=strdup(tableName); - tableInfo.push_back(table); -} - -inline -bool -TableInfoPs::del(const Uint32 tableId) { - - TableInfo * table; - Uint32 i=0; - table = lookup(tableId, &i); - - if(table!=0) { - NdbMem_Free(table->tableName); - delete table; - tableInfo.erase(i); - return true; - } - return false; -} - -#endif diff --git a/ndb/src/old_files/rep/dbug_hack.cpp b/ndb/src/old_files/rep/dbug_hack.cpp deleted file mode 100644 index 74e5f080777..00000000000 --- a/ndb/src/old_files/rep/dbug_hack.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include - -#include -#include "NdbOut.hpp" -#include "rep_version.hpp" - -int replogEnabled; - -/** - * @todo This should be implemented using MySQLs dbug library - */ -#if 0 -extern "C" -void -DBUG_PRINT(const char * fmt, ...) -{ -#ifdef DBUG - va_list ap; - char buf[1000]; - - va_start(ap, fmt); - if (fmt != 0) - vsnprintf(buf, sizeof(buf)-1, fmt, ap); - ndbout << buf << endl; - va_end(ap); -#endif -} -#endif - -extern "C" -void -replog(const char * fmt, ...) -{ - if (replogEnabled) - { - va_list ap; - char buf[1000]; - - va_start(ap, fmt); - if (fmt != 0) - vsnprintf(buf, sizeof(buf)-1, fmt, ap); - ndbout << buf << endl; - va_end(ap); - } -} - -extern "C" -void -rlog(const char * fmt, ...) -{ - va_list ap; - char buf[1000]; - - va_start(ap, fmt); - if (fmt != 0) - vsnprintf(buf, sizeof(buf)-1, fmt, ap); - ndbout << buf; - va_end(ap); -} diff --git a/ndb/src/old_files/rep/rep_version.hpp b/ndb/src/old_files/rep/rep_version.hpp deleted file mode 100644 index 3830f9c351c..00000000000 --- a/ndb/src/old_files/rep/rep_version.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef REP_VERSION_HPP -#define REP_VERSION_HPP - -/** - * Block number for REP - */ -#define SSREPBLOCKNO 1 -#define PSREPBLOCKNO 2 - -#define DBUG - -#include - -extern "C" -void -DBUG_PRINT__(const char * fmt, ...); - -extern "C" -void -replog(const char * fmt, ...); - -extern "C" -void -rlog(const char * fmt, ...); - -#define RLOG(ARGS) \ - do { if (replogEnabled) { \ - rlog ARGS; \ - ndbout << " (" << __FILE__ << ":" << __LINE__ << ")" << endl; \ - } \ - } while (0) - -/** - * Replication logging on or off - */ -extern int replogEnabled; - -/** - * Used for config id - */ -#define REP_VERSION_ID NDB_VERSION - -#define MAX_NODE_GROUPS 6 - -#define REPABORT(string) \ - { \ - ndbout_c("\nInternal error in %s:%d: %s", __FILE__, __LINE__, string); \ - abort(); \ - } -#define REPABORT1(string, data1) \ - { \ - ndbout_c("\nInternal error in %s:%d: %s" \ - "\n (data1: %d)", \ - __FILE__, __LINE__, string, data1); \ - abort(); \ - } -#define REPABORT2(string, data1, data2) \ - { \ - ndbout_c("\nInternal error in %s:%d: %s" \ - "\n (data1: %d, data2: %d)", \ - __FILE__, __LINE__, string, data1, data2); \ - abort(); \ - } -#define REPABORT3(string, data1, data2, data3) \ - { \ - ndbout_c("\nInternal error in %s:%d: %s" \ - "\n (data1: %d, data2: %d data3: %d)", \ - __FILE__, __LINE__, string, data1, data2, data3); \ - abort(); \ - } - -#endif diff --git a/ndb/src/old_files/rep/repapi/Makefile b/ndb/src/old_files/rep/repapi/Makefile deleted file mode 100644 index fdd153f1060..00000000000 --- a/ndb/src/old_files/rep/repapi/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -include .defs.mk - -TYPE := util - -PIC_ARCHIVE := Y -ARCHIVE_TARGET := repapi - -A_LIB := Y -SO_LIB := Y -PIC_LIB := Y - -#DIRS := test - -LIB_TARGET := REP_API -LIB_TARGET_ARCHIVES := $(ARCHIVE_TARGET) general portlib - -# Source files of non-templated classes (.C files) -SOURCES = repapi.cpp - -CCFLAGS_LOC += -I$(call fixpath,$(NDB_TOP)/include/mgmapi) \ - -I$(call fixpath,$(NDB_TOP)/src/common/mgmcommon) - -CCFLAGS += -DNO_DEBUG_MESSAGES - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/rep/repapi/repapi.cpp b/ndb/src/old_files/rep/repapi/repapi.cpp deleted file mode 100644 index d34ab098c9c..00000000000 --- a/ndb/src/old_files/rep/repapi/repapi.cpp +++ /dev/null @@ -1,598 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include "repapi.h" -//#include "mgmapi_debug.h" -#include - -#include -#include -#include -#include -#include - -#if defined VM_TRACE && !defined NO_DEBUG_MESSAGES -#define DEBUG(x) ndbout << x << endl; -#elif defined NO_DEBUG_MESSAGES -#define DEBUG(x) -#endif - -#ifdef NDB_WIN32 -#define EBADMSG EFAULT -#endif - - - -class ParserDummy2 : SocketServer::Session { -public: - ParserDummy2(NDB_SOCKET_TYPE sock); -}; - -ParserDummy2::ParserDummy2(NDB_SOCKET_TYPE sock) : SocketServer::Session(sock) { - -} - -typedef Parser Parser_t; - - -#define REP_CMD(name, fun, desc) \ - { name, \ - 0, \ - ParserRow::Cmd, \ - ParserRow::String, \ - ParserRow::Optional, \ - ParserRow::IgnoreMinMax, \ - 0, 0, \ - fun, \ - desc, 0 } - -#define REP_ARG(name, type, opt, desc) \ - { name, \ - 0, \ - ParserRow::Arg, \ - ParserRow::type, \ - ParserRow::opt, \ - ParserRow::IgnoreMinMax, \ - 0, 0, \ - 0, \ - desc, 0 } - -#define REP_END() \ - { 0, \ - 0, \ - ParserRow::Arg, \ - ParserRow::Int, \ - ParserRow::Optional, \ - ParserRow::IgnoreMinMax, \ - 0, 0, \ - 0, \ - 0, 0 } - -struct ndb_rep_handle { - char * hostname; - unsigned short port; - - int connected; - int last_error; - int last_error_line; - int read_timeout; - int write_timeout; - - NDB_SOCKET_TYPE socket; - -#ifdef REPAPI_LOG - FILE* logfile; -#endif -}; - -#define SET_ERROR(h, e) \ - h->last_error = e; \ - h->last_error_line = __LINE__; - -extern "C" -NdbRepHandle -ndb_rep_create_handle(){ - NdbRepHandle h = (NdbRepHandle)malloc(sizeof(ndb_rep_handle)); - h->connected = 0; - h->last_error = 0; - h->last_error_line = 0; - h->hostname = 0; - h->socket = -1; - h->read_timeout = 50000; - h->write_timeout = 100; - -#ifdef REPAPI_LOG - h->logfile = 0; -#endif - - return h; -} - -/** - * Destroy a handle - */ -extern "C" -void -ndb_rep_destroy_handle(NdbRepHandle * handle){ - if(!handle) - return; - if((* handle)->connected){ - ndb_rep_disconnect(* handle); - } - if((* handle)->hostname != 0){ - free((* handle)->hostname); - } -#ifdef REPAPI_LOG - if ((* handle)->logfile != 0){ - fclose((* handle)->logfile); - (* handle)->logfile = 0; - } -#endif - free(* handle); - * handle = 0; -} - -/** - * Get latest error associated with a handle - */ -extern "C" -int -ndb_rep_get_latest_error(const NdbRepHandle h){ - return h->last_error; -} - -/** - * Get latest error line associated with a handle - */ -extern "C" -int -ndb_rep_get_latest_error_line(const NdbRepHandle h){ - return h->last_error_line; -} - -static -int -parse_connect_string(const char * connect_string, - NdbRepHandle handle){ - - if(connect_string == 0){ - DEBUG("connect_string == 0"); - SET_ERROR(handle, EINVAL); - return -1; - } - - char * line = strdup(connect_string); - if(line == 0){ - DEBUG("line == 0"); - SET_ERROR(handle, ENOMEM); - return -1; - } - - char * tmp = strchr(line, ':'); - if(tmp == 0){ - DEBUG("tmp == 0"); - free(line); - SET_ERROR(handle, EINVAL); - return -1; - } - * tmp = 0; tmp++; - - int port = 0; - if(sscanf(tmp, "%d", &port) != 1){ - DEBUG("sscanf() != 1"); - free(line); - SET_ERROR(handle, EINVAL); - return -1; - } - - if(handle->hostname != 0) - free(handle->hostname); - - handle->hostname = strdup(line); - handle->port = port; - free(line); - return 0; -} - -/* - * Call an operation, and return the reply - */ -static const Properties * -ndb_rep_call(NdbRepHandle handle, - const ParserRow *command_reply, - const char *cmd, - const Properties *cmd_args) { - SocketOutputStream out(handle->socket); - SocketInputStream in(handle->socket, handle->read_timeout); - - out.println(cmd); -#ifdef REPAPI_LOG - /** - * Print command to log file - */ - FileOutputStream f(handle->logfile); - f.println("OUT: %s", cmd); -#endif - - if(cmd_args != NULL) { - Properties::Iterator iter(cmd_args); - const char *name; - while((name = iter.next()) != NULL) { - PropertiesType t; - Uint32 val_i; - BaseString val_s; - - cmd_args->getTypeOf(name, &t); - switch(t) { - case PropertiesType_Uint32: - cmd_args->get(name, &val_i); - out.println("%s: %d", name, val_i); - break; - case PropertiesType_char: - cmd_args->get(name, val_s); - out.println("%s: %s", name, val_s.c_str()); - break; - default: - /* Ignore */ - break; - } - } -#ifdef REPAPI_LOG - /** - * Print arguments to log file - */ - cmd_args->print(handle->logfile, "OUT: "); -#endif - } - out.println(""); - - Parser_t::Context ctx; - ParserDummy2 session(handle->socket); - Parser_t parser(command_reply, in, true, true, true); - -#if 1 - const Properties* p = parser.parse(ctx, session); - if (p == NULL){ - /** - * Print some info about why the parser returns NULL - */ - ndbout << " status=" << ctx.m_status << ", curr="<print(handle->logfile, "IN: "); - } -#endif - return p; -#else - return parser.parse(ctx, session); -#endif -} - -/** - * Connect to a rep server - * - * Returns 0 if OK, sets ndb_rep_handle->last_error otherwise - */ -extern "C" -int -ndb_rep_connect(NdbRepHandle handle, const char * repsrv){ - - if(handle == 0) - return -1; - - if(parse_connect_string(repsrv, handle) != 0) - return -1; - - -#ifdef REPAPI_LOG - /** - * Open the log file - */ - char logname[64]; - snprintf(logname, 64, "repapi.log"); - handle->logfile = fopen(logname, "w"); -#endif - - /** - * Do connect - */ - const NDB_SOCKET_TYPE sockfd = socket(AF_INET, SOCK_STREAM, 0); - if (sockfd == NDB_INVALID_SOCKET) { - DEBUG("socket() == INVALID_SOCKET"); - return -1; - } - - struct sockaddr_in servaddr; - memset(&servaddr, 0, sizeof(servaddr)); - servaddr.sin_family = AF_INET; - servaddr.sin_port = htons(handle->port); - // Convert ip address presentation format to numeric format - const int res1 = Ndb_getInAddr(&servaddr.sin_addr, handle->hostname); - if (res1 != 0) { - DEBUG("Ndb_getInAddr(...) == -1"); - return -1; - } - - const int res2 = connect(sockfd, (struct sockaddr*) &servaddr, - sizeof(servaddr)); - if (res2 == -1) { - DEBUG("connect() == -1"); - NDB_CLOSE_SOCKET(sockfd); - return -1; - } - - handle->socket = sockfd; - handle->connected = 1; - - return 0; -} - -/** - * Disconnect from a rep server - */ -extern "C" -void -ndb_rep_disconnect(NdbRepHandle handle){ - if(handle == 0) - return; - - if(handle->connected != 1){ - return; - } - - NDB_CLOSE_SOCKET(handle->socket); - handle->socket = -1; - handle->connected = 0; - - return; -} - - - -/****************************************************************************** - * Global Replication - ******************************************************************************/ -extern "C" -int ndb_rep_command(NdbRepHandle handle, - unsigned int request, - unsigned int* replication_id, - struct ndb_rep_reply* /*reply*/, - unsigned int epoch) { - - *replication_id = 0; - - const ParserRow replication_reply[] = { - REP_CMD("global replication reply", NULL, ""), - REP_ARG("result", Int, Mandatory, "Error message"), - REP_ARG("id", Int, Optional, "Id of global replication"), - REP_END() - }; - - if (handle == 0) { - return -1; - } - - if (handle->connected != 1) { - handle->last_error = EINVAL; - return -1; - } - - Properties args; - args.put("request", request); - args.put("id", *replication_id); - if(epoch > 0) - args.put("epoch",epoch); - else - args.put("epoch",(unsigned int)0); - - const Properties *reply; - reply = ndb_rep_call(handle, replication_reply, "rep", &args); - - if(reply == NULL) { - handle->last_error = EIO; - return -1; - } - - reply->get("id", replication_id); - Uint32 result; - reply->get("result", &result); - delete reply; - return result; -} - -extern "C" -int convert2int(char * first, char * last, unsigned int f[], unsigned int l[]) -{ - char * ftok = strtok(first, ","); - char * ltok = strtok(last, ","); - Uint32 i=0; - while(ftok!=NULL && ltok!=NULL) - { - f[i] = atoi(ftok); - l[i] = atoi(ltok); - ftok = strtok(NULL, ","); - ltok = strtok(NULL, ","); - i++; - } - - return 0; -} - - -int ndb_rep_query(NdbRepHandle handle, - QueryCounter counter, - unsigned int* replicationId, - struct ndb_rep_reply* /*reply*/, - struct rep_state * state) -{ - *replicationId = 0; // not used currently. - - if(state == 0) - return -1; - - const ParserRow replication_reply[] = { - REP_CMD("global replication query reply", NULL, ""), - REP_ARG("result", String, Mandatory, "Error message"), - REP_ARG("id", Int, Mandatory, "replicationId"), - REP_ARG("no_of_nodegroups", Int, Optional, "number of nodegroups"), - REP_ARG("subid", Int, Optional, "Id of subscription"), - REP_ARG("subkey", Int, Optional, "Key of subscription"), - REP_ARG("connected_rep", Int, Optional, "connected to rep"), - REP_ARG("connected_db", Int, Optional, "connected to db"), - REP_ARG("first", String, Optional, ""), - REP_ARG("last", String, Optional, ""), - REP_ARG("state_sub", Int, Optional, "state of subsription"), - REP_ARG("state", Int, Optional, "state"), - REP_END() - }; - - if (handle == 0) { - return -1; - } - - if (handle->connected != 1) { - handle->last_error = EINVAL; - return -1; - } - - const Properties *props; - Properties args; - Uint32 request = 0; - args.put("request", request); - args.put("id", *replicationId); - args.put("counter" , (Uint32)counter); - props = ndb_rep_call(handle, replication_reply, "rep query", &args); - - BaseString result; - props->get("result", result); - if(strcmp(result.c_str(), "Ok") != 0) - { - delete props; - return 1; - } - state->queryCounter = counter; - unsigned int no_of_nodegroups; - props->get("no_of_nodegroups", &no_of_nodegroups); - state->no_of_nodegroups = no_of_nodegroups; - - if(counter >= 0) - { - BaseString first, last; - props->get("first", first); - props->get("last", last); - convert2int((char*)first.c_str(), (char*)last.c_str(), - state->first , state->last ); - } else - { - for(Uint32 i = 0; ifirst[i] = 0; - state->last[i] = 0; - } - } - - unsigned int connected_rep = 0; - props->get("connected_rep", &connected_rep); - state->connected_rep = connected_rep; - - unsigned int connected_db = 0; - props->get("connected_rep", &connected_db); - state->connected_db = connected_db; - - unsigned int subid; - props->get("subid", &subid); - state->subid = subid; - - unsigned int subkey; - props->get("subkey", &subkey); - state->subkey = subkey; - - unsigned int _state; - props->get("state", &_state); - state->state = _state; - - unsigned int state_sub; - props->get("state_sub", &state_sub); - state->state_sub = state_sub; - - if(props == NULL) { - handle->last_error = EIO; - return -1; - } - delete props; - - return 0; -} - - -extern "C" -int -ndb_rep_get_status(NdbRepHandle handle, - unsigned int* replication_id, - struct ndb_rep_reply* /*reply*/, - struct rep_state * repstate) { - - const ParserRow replication_reply[] = { - REP_CMD("global replication status reply", NULL, ""), - REP_ARG("result", String, Mandatory, "Error message"), - REP_ARG("id", Int, Optional, "Error message"), - REP_ARG("subid", Int, Optional, "Id of subscription"), - REP_ARG("subkey", Int, Optional, "Key of subscription"), - REP_ARG("connected_rep", Int, Optional, "connected to rep"), - REP_ARG("connected_db", Int, Optional, "connected to db"), - REP_ARG("state_sub", Int, Optional, "state of subsription"), - REP_ARG("state", Int, Optional, "state"), - REP_END() - }; - - if (handle == 0) { - return -1; - } - - if (handle->connected != 1) { - handle->last_error = EINVAL; - return -1; - } - - const Properties *reply; - Properties args; - Uint32 request = 0; - args.put("request", request); - reply = ndb_rep_call(handle, replication_reply, "rep status", &args); - - if(reply == NULL) { - handle->last_error = EIO; - return -1; - } - - Uint32 result; - reply->get("result", &result); - reply->get("id", replication_id); - reply->get("subid", (Uint32*)&repstate->subid); - reply->get("subkey", (Uint32*)&repstate->subkey); - reply->get("connected_rep", (Uint32*)&repstate->connected_rep); - reply->get("connected_db", (Uint32*)&repstate->connected_db); - reply->get("state", (Uint32*)&repstate->state); - reply->get("state_sub", (Uint32*)&repstate->state_sub); - - delete reply; - return result; -} diff --git a/ndb/src/old_files/rep/repapi/repapi.h b/ndb/src/old_files/rep/repapi/repapi.h deleted file mode 100644 index 170e493cd86..00000000000 --- a/ndb/src/old_files/rep/repapi/repapi.h +++ /dev/null @@ -1,216 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef REPAPI_H -#define REPAPI_H - -/** - * @mainpage NDB Cluster REP API - * - * The NDB Cluster Replication API (REP API) consists of a C API - * which is used to: - * - Start and stop replication - * - Other administrative tasks - * - * The functions use simple ASCII based - * commands to interact with thw Replication Server. - * - * - * @section General Concepts - * - * Each REP API function call needs an rep_C_Api::NdbRepHandle - * which initally is created by - * calling the function ndb_rep_create_handle(). - * - * A function can return: - * -# An integer value. If it returns 0 then this indicates success. - * -# A pointer value. If it returns NULL then check the latest error. - * If it didn't return NULL, then "something" is returned. - * This "something" has to be free:ed by the user of the REP API. - */ - -/** @addtogroup REP_C_API - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#define REPAPI_MAX_NODE_GROUPS 4 - /** - * The NdbRepHandle. - */ - typedef struct ndb_rep_handle * NdbRepHandle; - - - /** - * Default reply from the server - */ - struct ndb_rep_reply { - int return_code; ///< 0 if successful, - ///< otherwise error code - char message[256]; ///< Error or reply message. - }; - - enum QueryCounter { - PS = 0, ///< Stored on Primary System REP - SSReq = 1, ///< Requested for transfer to Standby System - SS = 2, ///< Stored on Standby System REP - AppReq = 3, ///< Requested to be applied to Standby System - App = 4, ///< Has been applied to Standby System - DelReq = 5, ///< Has been requested to be deleted on PS REP & SS REP - Subscription = 6, - ConnectionRep = 7, - ConnectionDb = 8 - }; - - - struct rep_state { - QueryCounter queryCounter; - unsigned int no_of_nodegroups; - unsigned int connected_rep; - unsigned int connected_db; - unsigned int subid; - unsigned int subkey; - unsigned int state; - unsigned int state_sub; - unsigned int first[REPAPI_MAX_NODE_GROUPS]; //4 = max no of nodegroups - unsigned int last[REPAPI_MAX_NODE_GROUPS]; //4 = max no of nodegroups - }; - - - - - - - /*************************************************************************** - * FUNCTIONS - ***************************************************************************/ - /** - * Create a handle - * - * @return A handle != 0 - * or 0 if failed to create one. (Check errno then). - */ - NdbRepHandle ndb_rep_create_handle(); - - /** - * Destroy a handle - * - * @param handle Rep server handle - */ - void ndb_rep_destroy_handle(NdbRepHandle * handle); - - /** - * Get latest error associated with a handle - * - * @param handle Rep server handle - * @return Latest error. - */ - int ndb_rep_get_latest_error(const NdbRepHandle handle); - - /** - * Get latest error line associated with a handle - * - * @param handle Rep server handle. - * @return Latest error line. - */ - int ndb_rep_get_latest_error_line(const NdbRepHandle handle); - - /** - * Connect to a REP server - * - * @param handle Rep server handle. - * @param repsrv Hostname and port of the REP server, - * "hostname:port". - * @return 0 if OK, sets ndb_rep_handle->last_error otherwise. - */ - int ndb_rep_connect(NdbRepHandle handle, const char * repsrv); - - /** - * Disconnect from a REP server - * - * @param handle Rep server handle. - */ - void ndb_rep_disconnect(NdbRepHandle handle); - - - /** - * Global Replication Command - * - * @param handle NDB REP handle. - * @param request Type of request - * @param replicationId Replication id is returned from function. - * @param reply Reply message. - * @param epoch Currenty used to STOP at a certain EPOCH - * @return 0 if successful, error code otherwise. - */ - int ndb_rep_command(NdbRepHandle handle, - unsigned int request, - unsigned int* replicationId, - struct ndb_rep_reply* reply, - unsigned int epoch = 0); - - - /** - * Global Replication Command - * - * @param handle NDB REP handle. - * @param counter Type of request. If <0, then - "first" and "last" in repstate - is set to 0;x - * @param replicationId Replication id is returned from function. - * @param reply Reply message. - * @param repstate Struct containing queried data. (Note! - * All values are set in the struct, regardless - which QueryCounter that has been set - * @return 0 if successful, error code otherwise. - */ - int ndb_rep_query(NdbRepHandle handle, - QueryCounter counter, - unsigned int* replicationId, - struct ndb_rep_reply* reply, - struct rep_state * repstate); - - -/** - * @deprecated (will probably be). Can use ndb_rep_query instead. - */ - int ndb_rep_get_status(NdbRepHandle handle, - unsigned int* replication_id, - struct ndb_rep_reply* /*reply*/, - struct rep_state * repstate); - - - - enum RequestStatusCode { - OK = 0, ///< Everything OK - Error = 1, ///< Generic error - AlreadyExists = 2, ///< Entry already exists in list - NotExists = 3, ///< Entry does not exist in list - AlreadyStopped = 4 - }; - - - -#ifdef __cplusplus -} -#endif - -/** @} */ - -#endif diff --git a/ndb/src/old_files/rep/state/Channel.cpp b/ndb/src/old_files/rep/state/Channel.cpp deleted file mode 100644 index a7f7b90d3fe..00000000000 --- a/ndb/src/old_files/rep/state/Channel.cpp +++ /dev/null @@ -1,487 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Channel.hpp" - -Channel::Channel() -{ - reset(); -} - -Channel::~Channel() -{ - /** - * Destroy list of selected tables - */ - for(Uint32 i=0; i < m_selectedTables.size(); i++) { - delete m_selectedTables[i]; - m_selectedTables[i] = 0; - } - m_selectedTables=0; -} - -void -Channel::reset() -{ - for (Uint32 i=0; ionlyLeft(GREP_SYSTEM_TABLE_MAX_RANGE); - i->onlyUpToValue(m_stopEpochId); - if (i->isEmpty()) return false; - - add(SSReq, nodeGrp, *i); - invariant(); - return true; -} - -bool -Channel::requestApply(Uint32 nodeGrp, Uint32 * epoch) -{ - invariant(); - Interval tmp1, tmp2; - - // tmp2 = SS - AppReq - App - intervalLeftMinus(state[nodeGrp][SS], state[nodeGrp][AppReq], &tmp1); - intervalLeftMinus(tmp1, state[nodeGrp][App], &tmp2); - - tmp2.onlyUpToValue(m_stopEpochId); - if (tmp2.isEmpty()) return false; - tmp2.onlyLeft(1); - - // Check that all GCI Buffers for epoch exists in SS - for (Uint32 i=0; iisEmpty()) return false; - i->onlyLeft(GREP_SYSTEM_TABLE_MAX_RANGE); - - invariant(); - add(DelReq, nodeGrp, *i); - invariant(); - return true; -} - -void -Channel::add(Position pos, Uint32 nodeGrp, const Interval i) -{ - Interval r; - intervalAdd(state[nodeGrp][pos], i, &r); - state[nodeGrp][pos].set(r); -} - -void -Channel::clear(Position p, Uint32 nodeGrp, const Interval i) -{ - Interval r; - intervalLeftMinus(state[nodeGrp][p], i, &r); - state[nodeGrp][p].set(r); -} - -bool -Channel::isSynchable(Uint32 nodeGrp) -{ - return true; - /* - @todo This should be implemented... - - Interval tmp1, tmp2; - intervalAdd(state[nodeGrp][PS], state[nodeGrp][SSReq], &tmp1); - intervalAdd(tmp1, state[nodeGrp][SSReq], &tmp2); - intervalAdd(tmp2, state[nodeGrp][SS], &tmp1); - intervalAdd(tmp1, state[nodeGrp][AppReq], &tmp2); - intervalAdd(tmp2, state[nodeGrp][App], &tmp1); - if (intervalInclude(state[nodeGrp][PS], tmp1.right())) - return true; - else - return false; - */ -} - -/** - * Return the cut of all App:s. - */ -void -Channel::getFullyAppliedEpochs(Interval * interval) -{ - if (m_noOfNodeGroups < 1) { - *interval = emptyInterval; - return; - } - - *interval = universeInterval; - for (Uint32 i=0; ifirst() < state[i][App].first()) { - interval->setFirst(state[i][App].first()); - } - if (state[i][App].last() < interval->last()) { - interval->setLast(state[i][App].last()); - } - } - interval->normalize(); - return; -} - -/** - * Return true if it is ok to remove the subscription and then stop channel - */ -bool -Channel::isStoppable() -{ - /** - * Check that AppReq are empty for all nodegrps - */ - for (Uint32 i=0; i interval.last()) { - RLOG(("Stop disallowed. AppReq empty. Stop %d, LastApplied %d", - m_stopEpochId, interval.last())); - return false; - } - - return true; -} - -GrepError::Code -Channel::setStopEpochId(Uint32 n) -{ - /** - * If n equal to zero, use next possible epoch (max(App, AppReq)) - */ - if (n == 0) { - for (Uint32 i=0; i n) ? state[i][App].last() : n; - n = (state[i][AppReq].last() > n) ? state[i][AppReq].last() : n; - } - } - - /** - * If n >= max(App, AppReq) then set value, else return error code - */ - for (Uint32 i=0; iMAX_TAB_NAME_SIZE) - return GrepError::REP_NOT_PROPER_TABLE; - /** - * No of separators are the number of table_name_separator found in tableName - * since a table is defined as //tablename. - * if noOfSeparators is not equal to 2, then it is not a valid - * table name. - */ - Uint32 noOfSeps = 0; - if(strlen(tableName) < 5) - return GrepError::REP_NOT_PROPER_TABLE; - for(Uint32 i =0; i < strlen(tableName); i++) - if(tableName[i]==table_name_separator) - noOfSeps++; - if(noOfSeps!=2) - return GrepError::REP_NOT_PROPER_TABLE; - table * t= new table(tableName); - for(Uint32 i=0; itableName)==0) - return GrepError::REP_TABLE_ALREADY_SELECTED; - } - m_selectedTables.push_back(t); - return GrepError::NO_ERROR; -} - -GrepError::Code -Channel::removeTable(const char * tableName) -{ - if(strlen(tableName)>MAX_TAB_NAME_SIZE) - return GrepError::REP_NOT_PROPER_TABLE; - /** - * No of separators are the number of table_name_separator found in tableName - * since a table is defined as //tablename. - * If noOfSeparators is not equal to 2, - * then it is not a valid table name. - */ - Uint32 noOfSeps = 0; - if(strlen(tableName) < 5) - return GrepError::REP_NOT_PROPER_TABLE; - for(Uint32 i =0; i < strlen(tableName); i++) - if(tableName[i]==table_name_separator) - noOfSeps++; - if(noOfSeps!=2) - return GrepError::REP_NOT_PROPER_TABLE; - for(Uint32 i=0; itableName)==0) { - delete m_selectedTables[i]; - m_selectedTables.erase(i); - return GrepError::NO_ERROR; - } - } - return GrepError::REP_TABLE_NOT_FOUND; -} - -void -Channel::printTables() -{ - if(m_selectedTables.size() == 0) - ndbout_c("| ALL TABLES " - " |"); - else { - for(Uint32 i=0; itableName); - } -} - -Vector * -Channel::getSelectedTables() -{ - if(m_selectedTables.size() == 0) return 0; - return &m_selectedTables; -} - -/***************************************************************************** - * PRINT - *****************************************************************************/ - -void -Channel::print(Position pos) -{ - switch(pos){ - case PS: ndbout << "PS Rep"; break; - case SSReq: ndbout << "Tra-Req"; break; - case SS: ndbout << "SS Rep"; break; - case AppReq: ndbout << "App-Req"; break; - case App: ndbout << "Applied"; break; - case DelReq: ndbout << "Del-Req"; break; - default: REPABORT("Unknown replication position"); - } -} - -void -Channel::print() -{ - for (Uint32 i=0; i -#include -#include -#include - - -/** - * Max number of requested epochs from PS - */ -#define GREP_SYSTEM_TABLE_MAX_RANGE 20 - -#define MAX_NO_OF_NODE_GROUPS 32 - -/** - * This table struct is used in m_selectedTables - */ -struct table{ - table(const char * n) {strncpy(tableName, n, MAX_TAB_NAME_SIZE);} - char tableName[MAX_TAB_NAME_SIZE]; -}; - -/** - * @class Channel - * @brief Represents location of various epochs belonging to a subscription - */ -class Channel { -public: - enum StateSub - { - NO_SUBSCRIPTION_EXISTS, - - CREATING_SUBSCRIPTION_ID, - SUBSCRIPTION_ID_CREATED, - - STARTING_SUBSCRIPTION, - SUBSCRIPTION_STARTED - }; - - enum StateRep - { - CONSISTENT, ///< Consistent database. Grep not running. - METALOG_STARTING, ///< Starting. Starting METALOG subscription - METALOG_STARTED, - METASCAN_STARTING, ///< Starting. Starting METASCAN subscription - METASCAN_COMPLETED, - DATALOG_STARTING, ///< Starting. Starting DATALOG subscription - DATALOG_STARTED, - DATASCAN_STARTING, ///< Starting. Starting DATASCAN subscription - DATASCAN_COMPLETED, - LOG, ///< Started. Cons/Inconsistent. Grep running. - ///< All scan records have been applied. - STOPPING ///< Channel is stopping - }; - - /** - * Storage "positions" of Epochs - */ - enum Position { - PS = 0, ///< Stored on Primary System REP - SSReq = 1, ///< Requested for transfer to Standby System - SS = 2, ///< Stored on Standby System REP - AppReq = 3, ///< Requested to be applied to Standby System - App = 4, ///< Has been applied to Standby System - DelReq = 5, ///< Has been requested to be deleted on PS REP & SS REP - NO_OF_POSITIONS = 6 - }; //DONT FORGET TO ADD STUFF in position2Name if u add somehting here, - - /*************************************************************************** - * CONSTRUCTOR / DESTRUCTOR - ***************************************************************************/ - Channel(); - ~Channel(); - - /** - * Get and set no of nodegroups that actually exists on PS - */ - void setNoOfNodeGroups(Uint32 n) { m_noOfNodeGroups = n; }; - Uint32 getNoOfNodeGroups() { return m_noOfNodeGroups; }; - void getEpochState(Position p, - Uint32 nodeGrp, - Uint32 * first, - Uint32 * last); - Uint32 getEpochState(Position p, Uint32 nodegroup); - bool m_requestorEnabled; - bool m_transferEnabled; - bool m_applyEnabled; - bool m_deleteEnabled; - bool m_autoStartEnabled; - - /*************************************************************************** - * GETTERS and SETTERS - ***************************************************************************/ - bool requestTransfer(Uint32 nodeGrp, Interval * i); - bool requestApply(Uint32 nodeGrp, Uint32 * epoch); - bool requestDelete(Uint32 nodeGrp, Interval * i); - - void add(Position pos, Uint32 nodeGrp, const Interval i); - void clear(Position pos, Uint32 nodeGrp, const Interval i); - - void setSubId(Uint32 subId) { m_subId=subId; }; - Uint32 getSubId() { return m_subId; }; - - Uint32 getSubKey() { return m_subKey; }; - void setSubKey(Uint32 subKey) { m_subKey=subKey; }; - - bool isSynchable(Uint32 nodeGrp); - GrepError::Code addTable(const char * tableName); - GrepError::Code removeTable(const char * tableName); - void printTables(); - bool isSelective() {return m_selectedTables.size()>0;}; - Vector * getSelectedTables(); - - void reset(); - - StateRep getState() { return m_stateRep; } - void setState(StateRep sr) { m_stateRep = sr; } - - StateSub getStateSub() { return m_stateSub; } - void setStateSub(StateSub ss) { m_stateSub = ss; } - - Interval getMetaScanEpochs() { return m_metaScanEpochs; } - void setMetaScanEpochs(Interval i) { m_metaScanEpochs = i; } - Interval getDataScanEpochs() { return m_dataScanEpochs; } - void setDataScanEpochs(Interval i) { m_dataScanEpochs = i; } - - GrepError::Code setStopEpochId(Uint32 n); - Uint32 getStopEpochId() { return m_stopEpochId; }; - - bool isStoppable(); - bool shouldStop(); - - bool subscriptionExists() { return (m_subId != 0 && m_subKey != 0); } - - /*************************************************************************** - * GETTERS - ***************************************************************************/ - Uint32 getFirst(Position pos, Uint32 nodeGrp) { - return state[nodeGrp][pos].first(); - } - - Uint32 getLast(Position pos, Uint32 nodeGrp) { - return state[nodeGrp][pos].last(); - } - - void getFullyAppliedEpochs(Interval * i); - - /*************************************************************************** - * PRINT METHODS - ***************************************************************************/ - void print(); - void print(Position pos); - void print(Position pos, Uint32 nodeGrp); - void print(Uint32 nodeGrp); - - /*************************************************************************** - * PUBLIC ATTRIBUTES - ***************************************************************************/ - -private: - /*************************************************************************** - * PRIVATE ATTRIBUTES - ***************************************************************************/ - StateRep m_stateRep; // Replication state - StateSub m_stateSub; // Subscription state - - Uint32 m_subId; - Uint32 m_subKey; - - Uint32 m_noOfNodeGroups; // Number of node grps in this channel - Uint32 m_stopEpochId; // Epoch id to stop subscription - - Interval state[MAX_NO_OF_NODE_GROUPS][NO_OF_POSITIONS]; - - Interval m_metaScanEpochs; - Interval m_dataScanEpochs; - - - Vector m_selectedTables; - void invariant(); // Abort if channel metadata is inconsistent - char * position2Name(Position p); -public: - bool copy(Position from, Position to, Uint32 range, - Uint32 * f, Uint32 * l, Uint32 nodeGrp); -}; - -#endif diff --git a/ndb/src/old_files/rep/state/Interval.cpp b/ndb/src/old_files/rep/state/Interval.cpp deleted file mode 100644 index 8266f19c58d..00000000000 --- a/ndb/src/old_files/rep/state/Interval.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "Interval.hpp" - -#undef min -#undef max -Uint32 max(Uint32 a, Uint32 b) { return a > b ? a : b; } -Uint32 min(Uint32 a, Uint32 b) { return a < b ? a : b; } - -Interval::Interval() -{ - set(1, 0); // EmptyInterval -} - -Interval::Interval(Uint32 f, Uint32 l) -{ - set(f, l); -} - -bool -Interval::isEmpty() const -{ - return (m_first > m_last) ? true : false; -} - -bool -Interval::isEqual(Uint32 a, Uint32 b) const -{ - return (a==m_first && b==m_last); -} - -bool -Interval::inInterval(Uint32 a) const -{ - return (m_first <= a && a <= m_last); -} - -void -Interval::set(Uint32 first, Uint32 last) -{ - m_first = first; - m_last = last; - normalize(); -} - -void -Interval::set(const Interval i) -{ - m_first = i.first(); - m_last = i.last(); - normalize(); -} - -void -Interval::setFirst(Uint32 first) -{ - m_first = first; -} - -void -Interval::setLast(Uint32 last) -{ - m_last = last; -} - -void -Interval::onlyLeft(Uint32 n) -{ - if (size() > n) m_last = m_first + n - 1; -} - -void -Interval::onlyUpToValue(Uint32 n) -{ - m_last = min(n, m_last); - normalize(); -} - -/*****************************************************************************/ - -void -Interval::normalize() -{ - if (isEmpty()) { - m_first = 1; - m_last = 0; - } -} - - -/*****************************************************************************/ - -bool -intervalAdd(const Interval a, const Interval b, Interval * r) -{ - /** - * Non-empty disjoint intervals - */ - if (!a.isEmpty() && - !b.isEmpty() && - (a.last() + 1 < b.first() || - b.last() + 1 < a.first()) ) { - return false; // Illegal add - } - - /** - * Interval A empty -> return B - */ - if (a.isEmpty()) { - r->set(b); - return true; - } - - /** - * Interval B empty -> return A - */ - if (b.isEmpty()) { - r->set(a); - return true; - } - - r->set(min(a.first(), b.first()), - max(a.last(), b.last())); - return true; -} - -/** - * Subtract the left part of interval 'a' up to last of 'b'. - * - * @note This is NOT ordinary arithmetic interval minus. - * In ordinary arithmetic, [11-25] - [12-15] would be undefined, - * but here it is [11-25] - [12-15] = [16-25]. - */ -void -intervalLeftMinus(const Interval a, const Interval b, Interval * r) -{ - if(b.last() != intervalMax) - r->set(max(a.first(), b.last()+1), a.last()); - else - r->set(max(a.first(), intervalMax), a.last()); -} - -void -intervalCut(const Interval a, const Interval b, Interval * r) -{ - r->set(max(a.first(), b.first()), min(a.last(), b.last())); - r->normalize(); -} - -bool -intervalDisjoint(const Interval a, const Interval b) -{ - return (a.isEmpty() || - b.isEmpty() || - a.last() < b.first() || - b.last() < a.first()); -} diff --git a/ndb/src/old_files/rep/state/Interval.hpp b/ndb/src/old_files/rep/state/Interval.hpp deleted file mode 100644 index 935adaf26b1..00000000000 --- a/ndb/src/old_files/rep/state/Interval.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef INTERVAL_HPP -#define INTERVAL_HPP - -#include -#include - -/** - * @class Interval - * @brief Represents an interval - */ -class Interval { -public: - Interval(); - Interval(Uint32, Uint32); - - /** - * Getters of first and last - */ - inline Uint32 first() const { return m_first; } - inline Uint32 last() const { return m_last; } - - /** - * Check if interval is empty - */ - bool isEmpty() const; - bool isEqual(Uint32 a, Uint32 b) const; - bool inInterval(Uint32 a) const; - - /** - * Size of interval - */ - Uint32 size() const { - return (!isEmpty()) ? m_last - m_first + 1 : 0; - } - - /** - * Set interval - */ - void set(Uint32 first, Uint32 last); - void set(const Interval i); - - void setFirst(Uint32 first); - void setLast(Uint32 last); - - /** - * Reduce the interval to only the n left elements of the - * interval. If the interval is shorter than n, then - * interval is not changed. - */ - void onlyLeft(Uint32 n); - - /** - * Reduce the interval to have at most the value n - * as the last value. - * This method can make the interval empty. - */ - void onlyUpToValue(Uint32 n); - - /** - * Print - */ - void print() { - ndbout << "[" << m_first << "," << m_last << "]"; - } - - void normalize(); -private: - Uint32 m_first; - Uint32 m_last; -}; - -const Uint32 intervalMin = 0; -const Uint32 intervalMax = 0xffffffff; -const Interval emptyInterval(1, 0); -const Interval universeInterval(intervalMin, intervalMax); - -/** - * @return true if intervals could be added - */ -bool intervalAdd(const Interval a, const Interval b, Interval * c); - -void intervalLeftMinus(const Interval a, const Interval b, Interval * c); - -void intervalCut(const Interval a, const Interval b, Interval * c); - -/** - * @return true if intervals are disjoint - */ -bool intervalDisjoint(const Interval a, const Interval b); - -#endif diff --git a/ndb/src/old_files/rep/state/Makefile b/ndb/src/old_files/rep/state/Makefile deleted file mode 100644 index 3eed69a97dd..00000000000 --- a/ndb/src/old_files/rep/state/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -include .defs.mk - -TYPE := repserver kernel - -ARCHIVE_TARGET := reprequestor - -DIR := testRepState \ - testInterval - -SOURCES = RepState.cpp \ - RepStateEvent.cpp \ - RepStateRequests.cpp \ - \ - Channel.cpp \ - Interval.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/rep/state/RepState.cpp b/ndb/src/old_files/rep/state/RepState.cpp deleted file mode 100644 index d8a50961a3c..00000000000 --- a/ndb/src/old_files/rep/state/RepState.cpp +++ /dev/null @@ -1,869 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "RepState.hpp" - -#include -#include -#include -//#define DBUG_REQUESTOR - -#ifdef DBUG_REQUESTOR -#define DBUG_REQUESTOR_PRINT(X) ndbout_c(X); -#else -#define DBUG_REQUESTOR_PRINT(X) -#endif - -/**************************************************************************** - * Constructor / Destructor / Init - ****************************************************************************/ -RepState::RepState() -{ - m_connected = UNKNOWN; - m_repConnected = UNKNOWN; - m_mutex = NdbMutex_Create(); - m_stopEpoch = 0; - m_subIdToRemove = 0; - m_subKeyToRemove = 0; -} - -RepState::~RepState() -{ - NdbMutex_Destroy(m_mutex); -} - -void -RepState::setSubscriptionRequests(FuncRequestCreateSubscriptionId f1, - FuncRequestCreateSubscription f2, - FuncRequestRemoveSubscription f3) -{ - m_funcRequestCreateSubscriptionId = f1; - m_funcRequestCreateSubscription = f2; - m_funcRequestRemoveSubscription = f3; -} - -void -RepState::setIntervalRequests(FuncRequestTransfer f1, - FuncRequestApply f2, - FuncRequestDeleteSS f3, - FuncRequestDeletePS f4) -{ - m_funcRequestTransfer = f1; - m_funcRequestApply = f2; - m_funcRequestDeleteSS = f3; - m_funcRequestDeletePS = f4; -} - -void -RepState::setStartRequests(FuncRequestStartMetaLog * f5, - FuncRequestStartDataLog * f6, - FuncRequestStartMetaScan * f7, - FuncRequestStartDataScan * f8, - FuncRequestEpochInfo * f9) -{ - m_funcRequestStartMetaLog = f5; - m_funcRequestStartDataLog = f6; - m_funcRequestStartMetaScan = f7; - m_funcRequestStartDataScan = f8; - m_funcRequestEpochInfo = f9; -} - - -/**************************************************************************** - * Private Helper functions - ****************************************************************************/ - -void -RepState::requestTransfer(NdbApiSignal * signal) -{ - DBUG_REQUESTOR_PRINT("RepState: Transfer calculations started"); - for(Uint32 nodeGrp=0; nodeGrp= m_channel.getDataScanEpochs().last() && - fullEpochs.last() >= m_channel.getMetaScanEpochs().last()) - { - RLOG(("[%d-%d] fully applied. Channel state changed to LOG", - fullEpochs.first(), fullEpochs.last())); - m_channel.setState(Channel::LOG); - disableAutoStart(); - } - - return GrepError::NO_ERROR; -} - -GrepError::Code -RepState::clear(Channel::Position s, Uint32 nodeGrp, const Interval i) -{ - m_channel.clear(s, nodeGrp, i); - return GrepError::NO_ERROR; -} - -/**************************************************************************** - * Execute - * - * This method should only be called from Requestor! - ****************************************************************************/ - -GrepError::Code -RepState::protectedExecute() -{ - GrepError::Code err; - - NdbMutex_Lock(m_mutex); - - NdbApiSignal* signal = m_extSender->getSignal(); - if (signal == NULL) { - err = GrepError::COULD_NOT_ALLOCATE_MEM_FOR_SIGNAL; - } else { - err = execute(signal); - } - NdbMutex_Unlock(m_mutex); - return err; -} - -GrepError::Code -RepState::execute(NdbApiSignal* signal) -{ - Uint32 subId = m_channel.getSubId(); - Uint32 subKey = m_channel.getSubKey(); - - if (!m_channel.m_requestorEnabled) - return GrepError::NO_ERROR; - - /** - * @todo Should have subscriptions in here - */ - requestEpochInfo(signal); - - /** - * Update connected counter (Silence time) - */ - m_connected_counter++; - if (m_connected_counter > REQUESTOR_EXECUTES_NEEDED_FOR_UNKNOWN_CONNECTION) { - m_connected = UNKNOWN; - } - - switch (m_channel.getState()) - { - case Channel::CONSISTENT: - if (isAutoStartEnabled()) { - switch (m_channel.getStateSub()) - { - case Channel::NO_SUBSCRIPTION_EXISTS: - m_funcRequestCreateSubscriptionId(m_extSender, signal); - m_channel.setStateSub(Channel::CREATING_SUBSCRIPTION_ID); - break; - - case Channel::CREATING_SUBSCRIPTION_ID: - break; - - case Channel::SUBSCRIPTION_ID_CREATED: - if(m_channel.isSelective()) - m_funcRequestCreateSubscription(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey(), - m_channel.getSelectedTables()); - else - m_funcRequestCreateSubscription(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey(), - 0); - m_channel.setStateSub(Channel::STARTING_SUBSCRIPTION); - break; - - case Channel::STARTING_SUBSCRIPTION: - break; - - case Channel::SUBSCRIPTION_STARTED: - m_funcRequestStartMetaLog(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey()); - m_channel.setState(Channel::METALOG_STARTING); - break; - } - } - break; - - case Channel::METALOG_STARTING: - break; - - case Channel::METALOG_STARTED: - if (isAutoStartEnabled()) { - m_funcRequestStartMetaScan(m_extSender, signal, subId, subKey); - m_channel.setState(Channel::METASCAN_STARTING); - } - break; - - case Channel::METASCAN_STARTING: - break; - - case Channel::METASCAN_COMPLETED: - if (isAutoStartEnabled()) { - m_funcRequestStartDataLog(m_extSender, signal, subId, subKey); - m_channel.setState(Channel::DATALOG_STARTING); - } - break; - - case Channel::DATALOG_STARTING: - break; - - case Channel::DATALOG_STARTED: - if (isAutoStartEnabled()) { - m_funcRequestStartDataScan(m_extSender, signal, subId, subKey); - m_channel.setState(Channel::DATASCAN_STARTING); - } - break; - - case Channel::DATASCAN_STARTING: - break; - - case Channel::DATASCAN_COMPLETED: - break; - - case Channel::LOG: - if (m_channel.shouldStop()) { - disableTransfer(); - m_channel.setState(Channel::STOPPING); - } - break; - - case Channel::STOPPING: - if (m_channel.m_transferEnabled) - { - REPABORT("Illegal stopping state while transfer is still enabled"); - } - /** - * check if channel has a subscription, if not, - * check if we have marked a subscription that we want to remove - * and remove it. This is used to clean up "dangling subscriptions" - * after various crashes - */ - if(!m_channel.subscriptionExists()) - { - if(m_subIdToRemove && m_subKeyToRemove) - { - m_funcRequestRemoveSubscription(m_extSender, signal, - m_subIdToRemove, - m_subKeyToRemove); - eventSubscriptionDeleted( m_subIdToRemove, - m_subKeyToRemove); - return GrepError::NO_ERROR; - } - else { - return GrepError::SUBSCRIPTION_ID_NOT_FOUND; - } - } else { - if (m_channel.isStoppable()) - { - - m_funcRequestRemoveSubscription(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey()); - eventSubscriptionDeleted(m_channel.getSubId(), - m_channel.getSubKey()); - } - else - return GrepError::CHANNEL_NOT_STOPPABLE; - - } - break; - - default: - REPABORT("Illegal replication state"); - } - if (m_channel.m_transferEnabled) requestTransfer(signal); - if (m_channel.m_applyEnabled) requestApply(signal); - if (m_channel.m_deleteEnabled) requestDelete(signal); - return GrepError::NO_ERROR; -} - -/**************************************************************************** - * Request - * - * This method should only be called from Main Thread! - ****************************************************************************/ - -GrepError::Code -RepState::protectedRequest(GrepReq::Request req, Uint32 arg) -{ - return protectedRequest(req, arg, 0); -} - -GrepError::Code -RepState::protectedRequest(GrepReq::Request req, Uint32 arg1, Uint32 arg2) -{ - GrepError::Code code; - NdbMutex_Lock(m_mutex); - - NdbApiSignal* signal = m_extSender->getSignal(); - if (signal == NULL) { - code = GrepError::COULD_NOT_ALLOCATE_MEM_FOR_SIGNAL; - } else { - code = request(req, arg1, arg2, signal); - } - - NdbMutex_Unlock(m_mutex); - return code; -} - -GrepError::Code -RepState::protectedAddTable(const char * fullTableName) -{ - GrepError::Code code; - NdbMutex_Lock(m_mutex); - code = m_channel.addTable(fullTableName); - NdbMutex_Unlock(m_mutex); - return code; -} - -GrepError::Code -RepState::protectedRemoveTable(const char * fullTableName) -{ - GrepError::Code code; - if(m_channel.getStateSub() != Channel::NO_SUBSCRIPTION_EXISTS) - return GrepError::START_ALREADY_IN_PROGRESS; - NdbMutex_Lock(m_mutex); - code = m_channel.removeTable(fullTableName); - NdbMutex_Unlock(m_mutex); - return code; -} - -GrepError::Code -RepState::request(GrepReq::Request request, Uint32 arg1, Uint32 arg2, - NdbApiSignal* signal) -{ - switch (request) - { - /************************************************************************* - * STATUS etc - *************************************************************************/ - - case GrepReq::STATUS: - printStatus(); - break; - - case GrepReq::REMOVE_BUFFERS: - return GrepError::NOT_YET_IMPLEMENTED; - - /************************************************************************* - * START - *************************************************************************/ - - case GrepReq::CREATE_SUBSCR: - if (m_channel.getStateSub() != Channel::NO_SUBSCRIPTION_EXISTS) - return GrepError::SUBSCRIPTION_ID_ALREADY_EXIST; - - m_funcRequestCreateSubscriptionId(m_extSender, signal); - m_channel.setStateSub(Channel::CREATING_SUBSCRIPTION_ID); - return GrepError::NO_ERROR; - - case GrepReq::START_SUBSCR: - if (m_channel.getState() == Channel::STOPPING) - return GrepError::ILLEGAL_ACTION_WHEN_STOPPING; - if (m_channel.getStateSub() != Channel::SUBSCRIPTION_ID_CREATED) - return GrepError::SUBSCRIPTION_ID_NOT_FOUND; - if(m_channel.isSelective()) - m_funcRequestCreateSubscription(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey(), - m_channel.getSelectedTables()); - else - m_funcRequestCreateSubscription(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey(), - 0); - m_channel.setStateSub(Channel::STARTING_SUBSCRIPTION); - return GrepError::NO_ERROR; - - case GrepReq::START_METALOG: - if (m_channel.getState() == Channel::STOPPING) - return GrepError::ILLEGAL_ACTION_WHEN_STOPPING; - if (m_channel.getStateSub() != Channel::SUBSCRIPTION_STARTED) - return GrepError::SUBSCRIPTION_NOT_STARTED; - if (m_channel.getState() != Channel::CONSISTENT) - return GrepError::START_OF_COMPONENT_IN_WRONG_STATE; - - m_funcRequestStartMetaLog(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey()); - m_channel.setState(Channel::METALOG_STARTING); - return GrepError::NO_ERROR; - - case GrepReq::START_METASCAN: - if (m_channel.getState() == Channel::STOPPING) - return GrepError::ILLEGAL_ACTION_WHEN_STOPPING; - if (m_channel.getStateSub() != Channel::SUBSCRIPTION_STARTED) - return GrepError::SUBSCRIPTION_NOT_STARTED; - if (m_channel.getState() != Channel::METALOG_STARTED) - return GrepError::START_OF_COMPONENT_IN_WRONG_STATE; - - m_funcRequestStartMetaScan(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey()); - m_channel.setState(Channel::METASCAN_STARTING); - return GrepError::NO_ERROR; - - case GrepReq::START_DATALOG: - if (m_channel.getState() == Channel::STOPPING) - return GrepError::ILLEGAL_ACTION_WHEN_STOPPING; - if (m_channel.getStateSub() != Channel::SUBSCRIPTION_STARTED) - return GrepError::SUBSCRIPTION_NOT_STARTED; - if (m_channel.getState() != Channel::METASCAN_COMPLETED) - return GrepError::START_OF_COMPONENT_IN_WRONG_STATE; - - m_funcRequestStartDataLog(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey()); - m_channel.setState(Channel::DATALOG_STARTING); - return GrepError::NO_ERROR; - - case GrepReq::START_DATASCAN: - if (m_channel.getState() == Channel::STOPPING) - return GrepError::ILLEGAL_ACTION_WHEN_STOPPING; - if (m_channel.getStateSub() != Channel::SUBSCRIPTION_STARTED) - return GrepError::SUBSCRIPTION_NOT_STARTED; - if (m_channel.getState() != Channel::DATALOG_STARTED) - return GrepError::START_OF_COMPONENT_IN_WRONG_STATE; - - m_funcRequestStartDataScan(m_extSender, signal, - m_channel.getSubId(), - m_channel.getSubKey()); - m_channel.setState(Channel::DATASCAN_STARTING); - return GrepError::NO_ERROR; - - case GrepReq::START_REQUESTOR: - enable(); - return GrepError::NO_ERROR; - - case GrepReq::START_TRANSFER: - if (m_channel.getState() == Channel::STOPPING) - return GrepError::ILLEGAL_ACTION_WHEN_STOPPING; - enableTransfer(); - return GrepError::NO_ERROR; - - case GrepReq::START_APPLY: - enableApply(); - return GrepError::NO_ERROR; - - case GrepReq::START_DELETE: - enableDelete(); - return GrepError::NO_ERROR; - - case GrepReq::START: - if (isAutoStartEnabled()) - return GrepError::START_ALREADY_IN_PROGRESS; - - enableAutoStart(); - return GrepError::NO_ERROR; - - /************************************************************************* - * STOP - *************************************************************************/ - - case GrepReq::STOP: - if (m_channel.getStateSub() == Channel::NO_SUBSCRIPTION_EXISTS) - return GrepError::SUBSCRIPTION_NOT_STARTED; - if (m_channel.getState() == Channel::STOPPING) - return GrepError::ILLEGAL_ACTION_WHEN_STOPPING; - - if (arg1 == 0) { - /** - * Stop immediately - */ - disableTransfer(); - m_channel.setState(Channel::STOPPING); - m_channel.setStopEpochId(0); - return GrepError::NO_ERROR; - } else { - /** - * Set future stop epoch - */ - return m_channel.setStopEpochId(arg1); - } - - case GrepReq::STOP_SUBSCR: - { - if(m_subIdToRemove == 0 && m_subKeyToRemove == 0) { - m_subIdToRemove = arg1; - m_subKeyToRemove = arg2; - } else { - return GrepError::ILLEGAL_ACTION_WHEN_STOPPING; - } - - if(m_channel.getSubId() != 0 && m_channel.getSubKey() != 0) - return GrepError::ILLEGAL_USE_OF_COMMAND; - if (m_channel.getState() == Channel::STOPPING) - return GrepError::ILLEGAL_ACTION_WHEN_STOPPING; - disableTransfer(); - m_channel.setState(Channel::STOPPING); - return GrepError::NO_ERROR; - } - case GrepReq::STOP_METALOG: - case GrepReq::STOP_METASCAN: - case GrepReq::STOP_DATALOG: - case GrepReq::STOP_DATASCAN: - return GrepError::NOT_YET_IMPLEMENTED; - - case GrepReq::STOP_REQUESTOR: - disable(); - return GrepError::NO_ERROR; - - case GrepReq::STOP_TRANSFER: - disableTransfer(); - return GrepError::NO_ERROR; - - case GrepReq::STOP_APPLY: - disableApply(); - return GrepError::NO_ERROR; - - case GrepReq::STOP_DELETE: - disableDelete(); - return GrepError::NO_ERROR; - - default: - ndbout_c("RepCommandInterpreter: Illegal request received"); - return GrepError::NOT_YET_IMPLEMENTED; - } - return GrepError::NOT_YET_IMPLEMENTED; -} - -/**************************************************************************** - * - ****************************************************************************/ - -/* -GrepError::Code -RepState::slowStop() -{ - switch(m_channel.getState()) - { - case Channel::LOG: - m_channel.setState(Channel::LOG_SLOW_STOP); - return GrepError::NO_ERROR; - default: - return GrepError::REQUESTOR_ILLEGAL_STATE_FOR_SLOWSTOP; - } -} - -GrepError::Code -RepState::fastStop() -{ - switch(m_channel.getState()) - { - case Channel::LOG: - m_channel.setState(Channel::LOG_FAST_STOP); - return GrepError::NO_ERROR; - default: - return GrepError::REQUESTOR_ILLEGAL_STATE_FOR_FASTSTOP; - } -} -*/ - -/**************************************************************************** - * Print Status - ****************************************************************************/ - -static const char* -headerText = -"+-------------------------------------------------------------------------+\n" -"| MySQL Replication Server |\n" -"+-------------------------------------------------------------------------+\n" -; - -static const char* -channelHeaderText = -"+-------------------------------------------------------------------------+\n" -"| Applier Channel 1 Replication Status |\n" -"+-------------------------------------------------------------------------+\n" -; - -static const char* -line = -"+-------------------------------------------------------------------------+\n" -; - - -Properties * -RepState::getStatus() -{ - Properties * prop = new Properties(); - if(prop == NULL) - return NULL; - NdbMutex_Lock(m_mutex); - - prop->put("nodegroups", (int)m_channel.getNoOfNodeGroups()); -// prop->put("epoch_state", m_channel.getEpochState()); - NdbMutex_Unlock(m_mutex); - return prop; -} - - -Properties * RepState::query(QueryCounter counter, Uint32 replicationId) -{ - Properties * prop = new Properties(); - if(prop == NULL) - return NULL; - NdbMutex_Lock(m_mutex); - if(counter != ~(Uint32)0) - getEpochState((Channel::Position)counter, prop ); - prop->put("no_of_nodegroups", m_channel.getNoOfNodeGroups()); - prop->put("subid", m_channel.getNoOfNodeGroups()); - prop->put("subkey", m_channel.getSubKey()); - prop->put("connected_db", m_connected); - prop->put("connected_rep", m_repConnected); - prop->put("state_sub", (int)m_channel.getStateSub()); - prop->put("state", (int)m_channel.getState()); - - NdbMutex_Unlock(m_mutex); - return prop; - -} - -void -RepState::getEpochState(Channel::Position pos, Properties * p) -{ - char first_buf[20]; - char last_buf[20]; - int pos_first = 0, pos_last = 0; - Uint32 first = 0, last = 0; - for(Uint32 i = 0; i < m_channel.getNoOfNodeGroups() ; i++) - { - m_channel.getEpochState(pos, i, &first, &last); - pos_first += sprintf(first_buf+pos_first,"%d%s",first,","); - pos_last += sprintf(last_buf+pos_last,"%d%s",last,","); - } -/** - * remove trailing comma - */ - pos_first--; - pos_last--; - first_buf[pos_first]= '\0'; - last_buf[pos_last]= '\0'; -#if 0 - sprintf(first_buf+pos_first,"",""); - sprintf(last_buf + pos_last,"",""); -#endif - - p->put("first", first_buf); - p->put("last", last_buf); - -} - - -void -RepState::printStatus() -{ - /*************************************************************************** - * Global Status - ***************************************************************************/ - ndbout << headerText; - switch (m_connected) - { - case CONNECTED: - ndbout << "| Source: Connected "; break; - case DISCONNECTED: - ndbout << "| Source: Disconnected "; break; - case CONNECTABLE: - ndbout << "| Source: Disconnected "; break; - default: - ndbout << "| Source: Unknown "; break; - } - switch (m_repConnected) - { - case CONNECTED: - ndbout << "(Rep: Connected) "; break; - case DISCONNECTED: - ndbout << "(Rep: Disconnected) "; break; - case CONNECTABLE: - ndbout << "(Rep: Disconnected) "; break; - default: - ndbout << "(Rep: Unknown) "; break; - } - ndbout << " |" << endl; - ndbout << "| Autostart: " << (isAutoStartEnabled() ? "On " : "Off") - << " "; - ndbout_c(" Silence time: %10u |", m_connected_counter); - - /*************************************************************************** - * Channel Status - ***************************************************************************/ - ndbout << channelHeaderText; - switch(m_channel.getStateSub()) { - case Channel::NO_SUBSCRIPTION_EXISTS: - ndbout_c("| Subscription: Non-existing " - " |"); - break; - case Channel::CREATING_SUBSCRIPTION_ID: - ndbout_c("| Subscription: Non-existing (Id is being created)" - " |"); - break; - case Channel::SUBSCRIPTION_ID_CREATED: - ndbout_c("| Subscription: %-3d-%-6d in state: Not yet started " - " |", - m_channel.getSubId(), m_channel.getSubKey()); - break; - case Channel::STARTING_SUBSCRIPTION: - ndbout_c("| Subscription: %-3d-%-6d in state: Being started " - " |", - m_channel.getSubId(), m_channel.getSubKey()); - break; - case Channel::SUBSCRIPTION_STARTED: - ndbout_c("| Subscription: %-3d-%-6d in state: Started " - " |", - m_channel.getSubId(), m_channel.getSubKey()); - break; - default: - REPABORT("Illegal subscription state"); - } - ndbout << "| Stop epoch: "; - if (m_channel.getStopEpochId() == intervalMax) { - ndbout << "No stop defined "; - } else { - ndbout.print("%-10d ", - m_channel.getStopEpochId()); - } - ndbout << " |" << endl; - - ndbout << "| State: "; - switch(m_channel.getState()) - { - case Channel::CONSISTENT: - ndbout << "Local database is subscription consistent "; - break; - case Channel::METALOG_STARTING: - ndbout << "Starting (Phase 1: Metalog starting) "; - break; - case Channel::METALOG_STARTED: - ndbout << "Starting (Phase 2: Metalog started) "; - break; - case Channel::METASCAN_STARTING: - ndbout << "Starting (Phase 3: Metascan starting) "; - break; - case Channel::METASCAN_COMPLETED: - ndbout << "Starting (Phase 4: Metascan completed) "; - break; - case Channel::DATALOG_STARTING: - ndbout << "Starting (Phase 5: Datalog starting) "; - break; - case Channel::DATALOG_STARTED: - ndbout << "Starting (Phase 6: Datalog started) "; - break; - case Channel::DATASCAN_STARTING: - ndbout << "Starting (Phase 7: Datascan completed) "; - break; - case Channel::DATASCAN_COMPLETED: - ndbout << "Starting (Phase 8: Datascan completed) "; - break; - case Channel::LOG: - ndbout << "Logging "; - break; - case Channel::STOPPING: - ndbout << "Stopping (Stopped when all epochs applied) "; - break; - } - ndbout << " |" << endl; - -/* @todo - ndbout_c("| Syncable: Yes/Scan/No/Unknown (Not implemented)" - " |"); -*/ - ndbout << "| Requestor: " << (isEnabled() ? "On " : "Off") - << " (Transfer: " << (isTransferEnabled() ? "On, " : "Off, ") - << "Apply: " << (isApplyEnabled() ? "On, " : "Off, ") - << "Delete: " << (isDeleteEnabled() ? "On) " : "Off)") - << " |" << endl; - ndbout_c("| Tables being replicated using this channel: " - " |"); - m_channel.printTables(); - - /** - * Print node groups - */ - if (getNoOfNodeGroups() == 0) - { - ndbout_c("| No node groups are known. " - " |"); - } - else - { - m_channel.print(); - } - ndbout << line; -} diff --git a/ndb/src/old_files/rep/state/RepState.hpp b/ndb/src/old_files/rep/state/RepState.hpp deleted file mode 100644 index 06bbca19f7e..00000000000 --- a/ndb/src/old_files/rep/state/RepState.hpp +++ /dev/null @@ -1,276 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef REP_STATE_HPP -#define REP_STATE_HPP - -#include -#include -#include -#include -#include -#include - -#include "Channel.hpp" -#include "Interval.hpp" - -#define REQUESTOR_EXECUTES_NEEDED_FOR_UNKNOWN_CONNECTION 5 - -class NdbApiSignal; - - -/** - * @class RepState - * @brief The main information about the replication - */ -class RepState -{ -public: - RepState(); - ~RepState(); - void init(ExtSender * extSender) { m_extSender = extSender; } - - /*************************************************************************** - * Callback functions - * - * These are used when RepState wants to do something - ***************************************************************************/ - - typedef void (FuncRequestCreateSubscriptionId) - (void * cbObj, NdbApiSignal* signal); - - typedef void (FuncRequestCreateSubscription) - (void * cbObj, NdbApiSignal* signal, Uint32 subId, - Uint32 subKey , - Vector * selectedTables); - - typedef void (FuncRequestRemoveSubscription) - (void * cbObj, NdbApiSignal* signal, Uint32 subId, Uint32 subKey); - - typedef void (FuncRequestTransfer) - (void * cbObj, NdbApiSignal* signal, - Uint32 nodeGrp, Uint32 first, Uint32 last); - - typedef void (FuncRequestApply) - (void * cbObj, NdbApiSignal* signal, - Uint32 nodeGrp, Uint32 first, Uint32 last, Uint32 force); - - typedef void (FuncRequestDeleteSS) - (void * cbObj, NdbApiSignal* signal, - Uint32 nodeGrp, Uint32 first, Uint32 last); - - typedef void (FuncRequestDeletePS) - (void * cbObj, NdbApiSignal* signal, - Uint32 nodeGrp, Uint32 first, Uint32 last); - - typedef void (FuncRequestStartMetaLog) - (void * cbObj, NdbApiSignal * signal, Uint32 subId, Uint32 subKey); - - typedef void (FuncRequestStartDataLog) - (void * cbObj, NdbApiSignal * signal, Uint32 subId, Uint32 subKey); - - typedef void (FuncRequestStartMetaScan) - (void * cbObj, NdbApiSignal * signal, Uint32 subId, Uint32 subKey); - - typedef void (FuncRequestStartDataScan) - (void * cbObj, NdbApiSignal * signal, Uint32 subId, Uint32 subKey); - - typedef void (FuncRequestEpochInfo) - (void * cbObj, NdbApiSignal * signal, Uint32 nodeGrp); - - /*************************************************************************** - * - ***************************************************************************/ - void setSubscriptionRequests(FuncRequestCreateSubscriptionId f1, - FuncRequestCreateSubscription f2, - FuncRequestRemoveSubscription f3); - void setIntervalRequests(FuncRequestTransfer * f1, - FuncRequestApply * f2, - FuncRequestDeleteSS * f3, - FuncRequestDeletePS * f4); - void setStartRequests(FuncRequestStartMetaLog * f5, - FuncRequestStartDataLog * f6, - FuncRequestStartMetaScan * f7, - FuncRequestStartDataScan * f8, - FuncRequestEpochInfo * f9); - - /*************************************************************************** - * Enablings - ***************************************************************************/ - bool isEnabled() { return m_channel.m_requestorEnabled; } - bool isTransferEnabled() { return m_channel.m_transferEnabled; } - bool isApplyEnabled() { return m_channel.m_applyEnabled; } - bool isDeleteEnabled() { return m_channel.m_deleteEnabled; } - bool isAutoStartEnabled() { return m_channel.m_autoStartEnabled; } - - void enable() { m_channel.m_requestorEnabled = true; } - void enableTransfer() { m_channel.m_transferEnabled = true; } - void enableApply() { m_channel.m_applyEnabled = true; } - void enableDelete() { m_channel.m_deleteEnabled = true; } - void enableAutoStart() { m_channel.m_autoStartEnabled = true; } - - void disable() { m_channel.m_requestorEnabled = false; } - void disableTransfer() { m_channel.m_transferEnabled = false; } - void disableApply() { m_channel.m_applyEnabled = false;} - void disableDelete() { m_channel.m_deleteEnabled = false; } - void disableAutoStart() { m_channel.m_autoStartEnabled = false; } - - /*************************************************************************** - * Node groups - ***************************************************************************/ - void setNoOfNodeGroups(Uint32 n) { m_channel.setNoOfNodeGroups(n); } - Uint32 getNoOfNodeGroups() { return m_channel.getNoOfNodeGroups(); } - - /*************************************************************************** - * Event reporting to RepState - * - * These are used to update the state of the Requestor when something - * has happend. - ***************************************************************************/ - void request(GrepReq::Request request); - - //GrepError::Code createSubscription(Uint32 subId, Uint32 subKey); - GrepError::Code protectedExecute(); - GrepError::Code protectedRequest(GrepReq::Request request, Uint32 arg); - GrepError::Code protectedRequest(GrepReq::Request request, - Uint32 arg1, - Uint32 arg2); - GrepError::Code protectedAddTable(const char * fullTableName); - GrepError::Code protectedRemoveTable(const char * fullTableName); - GrepError::Code add(Channel::Position s, Uint32 nodeGrp, const Interval i); - GrepError::Code clear(Channel::Position s, Uint32 nodeGrp, const Interval i); - - void eventSubscriptionDeleted(Uint32 subId, Uint32 subKey); - - void eventMetaLogStarted(NdbApiSignal*, Uint32 subId, Uint32 subKey); - void eventDataLogStarted(NdbApiSignal*, Uint32 subId, Uint32 subKey); - void eventMetaScanCompleted(NdbApiSignal*, Uint32 subId, Uint32 subKey, - Interval epochs); - void eventDataScanCompleted(NdbApiSignal*, Uint32 subId, Uint32 subKey, - Interval epochs); - void eventMetaScanFailed(Uint32 subId, Uint32 subKey, GrepError::Code error); - void eventDataScanFailed(Uint32 subId, Uint32 subKey, GrepError::Code error); - - /** - * @fn sendInsertConf - * @param gci - the gci of the applied GCIBuffer. - * @param nodeGrp - the nodeGrp of the applied GCIBuffer. - */ - void eventInsertConf(Uint32 gci, Uint32 nodeGrp); - - /** - * @fn sendInsertRef - * @param gci - the gci of the applied GCIBuffer. - * @param nodeGrp - the nodeGrp of the applied GCIBuffer. - * @param tableId - the table of the applied GCIBuffer. - */ - void eventInsertRef(Uint32 gci, Uint32 nodeGrp, Uint32 tableId, - GrepError::Code err); - void eventCreateTableRef(Uint32 gci, - Uint32 tableId, - const char * tableName, - GrepError::Code err) ; - - void eventSubscriptionIdCreated(Uint32 subId, Uint32 subKey); - void eventSubscriptionIdCreateFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error); - - void eventSubscriptionCreated(Uint32 subId, Uint32 subKey); - void eventSubscriptionCreateFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error); - - void eventMetaLogStartFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error); - void eventDataLogStartFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error); - - void eventNodeConnected(Uint32 nodeId); - void eventNodeDisconnected(Uint32 nodeId); - void eventNodeConnectable(Uint32 nodeId); - - void printStatus(); - Properties * getStatus(); - Properties * query(QueryCounter counter, Uint32 replicationId); - Uint32 getSubId() { return m_channel.getSubId(); } - Uint32 getSubKey () { return m_channel.getSubKey(); } - - void setApplier(class AppNDB * app) { m_applier = app; } - void setGCIContainer(class GCIContainer * c) { m_gciContainer = c; } - - /* @todo should be private */ - Channel m_channel; - -private: - /*************************************************************************** - * PRIVATE ATTRIBUTES - ***************************************************************************/ - ExtSender * m_extSender; - AppNDB * m_applier; - GCIContainer * m_gciContainer; - - Uint32 m_subIdToRemove; - Uint32 m_subKeyToRemove; - - - enum Connected - { - UNKNOWN, ///< - CONNECTED, ///< Recently received info from (all needed) PS REP - DISCONNECTED, ///< Received disconnect info from (some needed) PS REP - CONNECTABLE ///< Received disconnect info from (some needed) PS REP - }; - Connected m_connected; - Connected m_repConnected; - Uint32 m_connected_counter; - - NdbMutex * m_mutex; - - /** @todo Should be channel-specific */ - Uint32 m_stopEpoch; - - /*************************************************************************** - * PRIVATE METHODS - ***************************************************************************/ - GrepError::Code execute(NdbApiSignal*); - GrepError::Code request(GrepReq::Request req, - Uint32 arg1, - Uint32 arg2, - NdbApiSignal*); - - FuncRequestCreateSubscriptionId * m_funcRequestCreateSubscriptionId; - FuncRequestCreateSubscription * m_funcRequestCreateSubscription; - FuncRequestRemoveSubscription * m_funcRequestRemoveSubscription; - - FuncRequestTransfer * m_funcRequestTransfer; - FuncRequestApply * m_funcRequestApply; - FuncRequestDeleteSS * m_funcRequestDeleteSS; - FuncRequestDeletePS * m_funcRequestDeletePS; - - FuncRequestStartMetaLog * m_funcRequestStartMetaLog; - FuncRequestStartDataLog * m_funcRequestStartDataLog; - FuncRequestStartMetaScan * m_funcRequestStartMetaScan; - FuncRequestStartDataScan * m_funcRequestStartDataScan; - FuncRequestEpochInfo * m_funcRequestEpochInfo; - - void requestTransfer(NdbApiSignal * signal); - void requestApply(NdbApiSignal * signal); - void requestDelete(NdbApiSignal * signal); - void requestEpochInfo(NdbApiSignal * signal); - void getEpochState(Channel::Position pos, Properties * p); - friend void testRepState(); -}; - -#endif diff --git a/ndb/src/old_files/rep/state/RepStateEvent.cpp b/ndb/src/old_files/rep/state/RepStateEvent.cpp deleted file mode 100644 index 9be304c8bfa..00000000000 --- a/ndb/src/old_files/rep/state/RepStateEvent.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "RepState.hpp" - -/**************************************************************************** - * Public Event Handlers : CREATE SUBSCRIPTION ID - ****************************************************************************/ - -void -RepState::eventSubscriptionIdCreated(Uint32 subId, Uint32 subKey) -{ - if (m_channel.getStateSub() == Channel::CREATING_SUBSCRIPTION_ID) - { - m_channel.setSubId(subId); - m_channel.setSubKey(subKey); - m_channel.setStateSub(Channel::SUBSCRIPTION_ID_CREATED); - } - else - { - REPABORT("Illegal state for create subscription id conf"); - } -} - -void -RepState::eventSubscriptionIdCreateFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error) -{ - ndbout_c("\nSubscription id creation failed"); - ndbout_c("Error %d: %s", error, GrepError::getErrorDesc(error)); - ndbout_c("Subscription Id: %d, Key: %d", subId, subKey); -} - -/**************************************************************************** - * Public Event Handlers : CREATE SUBSCRIPTION - ****************************************************************************/ - -void -RepState::eventSubscriptionCreated(Uint32 subId, Uint32 subKey) -{ - if (m_channel.getStateSub() == Channel::STARTING_SUBSCRIPTION) - { - m_channel.setStateSub(Channel::SUBSCRIPTION_STARTED); - } - else - { - REPABORT("Illegal state for create subscription conf"); - } -} - -void -RepState::eventSubscriptionCreateFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error) -{ - ndbout_c("\nSubscription creation failed"); - ndbout_c("Error %d: %s", error, GrepError::getErrorDesc(error)); - ndbout_c("Subscription Id: %d, Key: %d", subId, subKey); -} - - -/**************************************************************************** - * Public Event Handlers : META LOG - ****************************************************************************/ - -void -RepState::eventMetaLogStarted(NdbApiSignal* signal, - Uint32 subId, Uint32 subKey) -{ - if (m_channel.getState() != Channel::METALOG_STARTING) - { - RLOG(("WARNING! Metalog started in state %d, should be %d", - m_channel.getState(), Channel::METALOG_STARTING)); - } - - if (!isAutoStartEnabled()) - { - m_channel.setState(Channel::METALOG_STARTED); - } - else - { - m_channel.setState(Channel::METALOG_STARTED); - m_channel.setState(Channel::METASCAN_STARTING); - m_funcRequestStartMetaScan(m_extSender, signal, subId, subKey); - } -} - -void -RepState::eventMetaLogStartFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error) -{ - ndbout_c("\nMetalog start failed"); - ndbout_c("Error %d: %s", error, GrepError::getErrorDesc(error)); - ndbout_c("Subscription Id: %d, Key: %d", subId, subKey); -} - -/**************************************************************************** - * Public Event Handlers : META SCAN - ****************************************************************************/ - -void -RepState::eventMetaScanCompleted(NdbApiSignal* signal, - Uint32 subId, Uint32 subKey, Interval epochs) -{ - if (m_channel.getState() != Channel::METASCAN_STARTING) - { - RLOG(("WARNING! Metascan completed in state %d, should be %d", - m_channel.getState(), Channel::METASCAN_STARTING)); - } - RLOG(("Metascan completed. Subscription %d-%d, Epochs [%d-%d]", - subId, subKey, epochs.first(), epochs.last())); - - m_channel.setState(Channel::METASCAN_COMPLETED); - - if (isAutoStartEnabled()) - { - m_channel.setState(Channel::DATALOG_STARTING); - m_funcRequestStartDataLog(m_extSender, signal, subId, subKey); - } - m_channel.setMetaScanEpochs(epochs); -} - -/**************************************************************************** - * Public Event Handlers : DATA LOG - ****************************************************************************/ - -void -RepState::eventDataLogStarted(NdbApiSignal* signal, - Uint32 subId, Uint32 subKey) -{ - if (m_channel.getState() != Channel::DATALOG_STARTING) - { - RLOG(("WARNING! Datalog started in state %d, should be %d", - m_channel.getState(), Channel::DATALOG_STARTING)); - } - - m_channel.setState(Channel::DATALOG_STARTED); - - if (isAutoStartEnabled()) - { - m_channel.setState(Channel::DATASCAN_STARTING); - m_funcRequestStartDataScan(m_extSender, signal, subId, subKey); - } -} - -void -RepState::eventDataLogStartFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error) -{ - ndbout_c("\nDatalog start failed"); - ndbout_c("Error %d: %s", error, GrepError::getErrorDesc(error)); - ndbout_c("Subscription Id: %d, Key: %d", subId, subKey); -} - -/**************************************************************************** - * Public Event Handlers : DATA SCAN - ****************************************************************************/ - -void -RepState::eventDataScanCompleted(NdbApiSignal* signal, - Uint32 subId, Uint32 subKey, - Interval epochs) -{ - if (m_channel.getState() != Channel::DATASCAN_STARTING) - { - RLOG(("WARNING! Datascan completed in state %d, should be %d", - m_channel.getState(), Channel::DATASCAN_STARTING)); - } - RLOG(("Datascan completed. Subscription %d-%d, Epochs [%d-%d]", - subId, subKey, epochs.first(), epochs.last())); - - m_channel.setState(Channel::DATASCAN_COMPLETED); - m_channel.setDataScanEpochs(epochs); -} - -/**************************************************************************** - * Public Event Handlers : FAILURES - ****************************************************************************/ - -void -RepState::eventMetaScanFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error) -{ - ndbout_c("\nMetascan failed"); - ndbout_c("Error %d: %s", error, GrepError::getErrorDesc(error)); - ndbout_c("Subscription Id: %d, Key: %d", subId, subKey); -} - -void -RepState::eventDataScanFailed(Uint32 subId, Uint32 subKey, - GrepError::Code error) -{ - ndbout_c("\nDatascan failed"); - ndbout_c("Error %d: %s", error, GrepError::getErrorDesc(error)); - ndbout_c("Subscription Id: %d, Key: %d", subId, subKey); -} - -/**************************************************************************** - * Public Event Handlers : APPLY - ****************************************************************************/ - -void -RepState::eventInsertConf(Uint32 gci, Uint32 nodeGrp) -{ - Interval app(gci, gci); - add(Channel::App, nodeGrp, app); - clear(Channel::AppReq, nodeGrp, app); - -#ifdef DEBUG_GREP - ndbout_c("RepState: GCI Buffer %d:[%d] applied", nodeGrp, gci); -#endif -} - -void -RepState::eventInsertRef(Uint32 gci, Uint32 nodeGrp, Uint32 tableId, - GrepError::Code err) -{ - ndbout_c("\nTable %d, used in replication, did not exist"); - RLOG(("ERROR %d:%s. Apply failed (%d[%d] in table %d)", - err, GrepError::getErrorDesc(err), nodeGrp, gci, tableId)); -} - - -void -RepState::eventCreateTableRef(Uint32 gci, - Uint32 tableId, - const char * tableName, - GrepError::Code err) -{ - ndbout_c("\nFailed to create table %s with source site table id %d", - tableName, - tableId); - - RLOG(("ERROR %d:%s. Failed to create table %s with source site table id %d!", - err, GrepError::getErrorDesc(err), tableName, tableId)); -} - -/**************************************************************************** - * Public Event Handlers : Connected/Disconnected - ****************************************************************************/ - -void -RepState::eventNodeConnected(Uint32 nodeId) -{ - m_repConnected = CONNECTED; -} - -void -RepState::eventNodeDisconnected(Uint32 nodeId) -{ - m_repConnected = DISCONNECTED; -} - -void -RepState::eventNodeConnectable(Uint32 nodeId) -{ - m_repConnected = CONNECTABLE; -} - -/**************************************************************************** - * Public Event Handlers : Connected/Disconnected - ****************************************************************************/ - -void -RepState::eventSubscriptionDeleted(Uint32 subId, Uint32 subKey) -{ - m_gciContainer->reset(); - m_channel.setState(Channel::CONSISTENT); - m_channel.reset(); - m_subIdToRemove = 0; - m_subKeyToRemove = 0; -} diff --git a/ndb/src/old_files/rep/state/RepStateRequests.cpp b/ndb/src/old_files/rep/state/RepStateRequests.cpp deleted file mode 100644 index 02677e141f6..00000000000 --- a/ndb/src/old_files/rep/state/RepStateRequests.cpp +++ /dev/null @@ -1,294 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "RepState.hpp" - -#include -#include -#include - -#include -#include -#include - -#include -#include "Channel.hpp" - -/***************************************************************************** - * Helper functions - *****************************************************************************/ - -void -startSubscription(void * cbObj, NdbApiSignal* signal, - SubscriptionData::Part part, - Uint32 subId, Uint32 subKey) -{ - ExtSender * ext = (ExtSender *) cbObj; - - GrepSubStartReq * req = (GrepSubStartReq *)signal->getDataPtrSend(); - req->subscriptionId = subId; - req->subscriptionKey = subKey; - req->part = (Uint32) part; - signal->set(0, PSREPBLOCKNO, GSN_GREP_SUB_START_REQ, - GrepSubStartReq::SignalLength); - ext->sendSignal(signal); -} - -void -scanSubscription(void * cbObj, NdbApiSignal* signal, - SubscriptionData::Part part, - Uint32 subId, Uint32 subKey) -{ - ExtSender * ext = (ExtSender *) cbObj; - - GrepSubSyncReq * req = (GrepSubSyncReq *)signal->getDataPtrSend(); - req->subscriptionId = subId; - req->subscriptionKey = subKey; - req->part = part; - signal->set(0, PSREPBLOCKNO, GSN_GREP_SUB_SYNC_REQ, - GrepSubSyncReq::SignalLength); - ext->sendSignal(signal); -} - -/***************************************************************************** - * RepState registered functions - * - * These registered functions are executed by RepState when - * RepState needs to have stuff done. - *****************************************************************************/ - -void -requestCreateSubscriptionId(void * cbObj, NdbApiSignal* signal) -{ - ExtSender * ext = (ExtSender *) cbObj; - - CreateSubscriptionIdReq * req = - (CreateSubscriptionIdReq *)signal->getDataPtrSend(); - req->senderData = ext->getOwnRef(); - signal->set(0, PSREPBLOCKNO, GSN_GREP_CREATE_SUBID_REQ, - CreateSubscriptionIdReq::SignalLength); - ext->sendSignal(signal); - -#ifdef DEBUG_GREP_SUBSCRIPTION - ndbout_c("Sent request for creation of subscription id to PS"); -#endif -} - -void -requestCreateSubscription(void * cbObj, - NdbApiSignal* signal, - Uint32 subId, - Uint32 subKey, - Vector * selectedTables) -{ - ExtSender * ext = (ExtSender *) cbObj; - - GrepSubCreateReq * req = (GrepSubCreateReq *)signal->getDataPtrSend(); - req->senderRef = ext->getOwnRef(); - req->subscriptionId = subId; - req->subscriptionKey = subKey; - if(selectedTables!=0) { - UtilBuffer m_buffer; - UtilBufferWriter w(m_buffer); - LinearSectionPtr tablePtr[3]; - req->subscriptionType = SubCreateReq::SelectiveTableSnapshot; - - for(Uint32 i=0; i< selectedTables->size(); i++) { - w.add(SimpleProperties::StringValue, (*selectedTables)[i]->tableName); - } - - tablePtr[0].p = (Uint32*)m_buffer.get_data(); - tablePtr[0].sz = m_buffer.length() >> 2; - - signal->set(0, PSREPBLOCKNO, GSN_GREP_SUB_CREATE_REQ, - GrepSubCreateReq::SignalLength); - ext->sendFragmentedSignal(signal, tablePtr, 1); - } - else { - req->subscriptionType = SubCreateReq::DatabaseSnapshot; - signal->set(0, PSREPBLOCKNO, GSN_GREP_SUB_CREATE_REQ, - GrepSubCreateReq::SignalLength); - ext->sendFragmentedSignal(signal, 0, 0); - } - - - -#ifdef DEBUG_GREP_SUBSCRIPTION - ndbout_c("Requestor: Sent request for creation of subscription"); -#endif -} - -void -requestRemoveSubscription(void * cbObj, NdbApiSignal* signal, - Uint32 subId, Uint32 subKey) -{ - ExtSender * ext = (ExtSender *) cbObj; - - GrepSubRemoveReq * req = (GrepSubRemoveReq *)signal->getDataPtrSend(); - req->subscriptionId = subId; - req->subscriptionKey = subKey; - signal->set(0, PSREPBLOCKNO, GSN_GREP_SUB_REMOVE_REQ, - GrepSubRemoveReq::SignalLength); - ext->sendSignal(signal); -} - -void -requestTransfer(void * cbObj, NdbApiSignal * signal, - Uint32 nodeGrp, Uint32 first, Uint32 last) -{ - ExtSender * ext = (ExtSender *) cbObj; - - RepGetGciBufferReq * req = (RepGetGciBufferReq*)signal->getDataPtrSend(); - req->firstGCI = first; - req->lastGCI = last; - req->nodeGrp = nodeGrp; - req->senderRef = ext->getOwnRef(); - signal->set(0, PSREPBLOCKNO, GSN_REP_GET_GCIBUFFER_REQ, - RepGetGciBufferReq::SignalLength); - ext->sendSignal(signal); - -#ifdef DEBUG_GREP_TRANSFER - ndbout_c("Requestor: Requested PS GCI buffers %d:[%d-%d]", - nodeGrp, first, last); -#endif -} - -void -requestApply(void * applyObj, NdbApiSignal * signal, - Uint32 nodeGrp, Uint32 first, Uint32 last, Uint32 force) -{ - AppNDB * applier = (AppNDB *) applyObj; - - if (first != last) { - RLOG(("WARNING! Trying to apply range [%d-%d]. This is not implemeted", - first, last)); - } - /** - * Apply GCIBuffer even if it is empty. - */ - applier->applyBuffer(nodeGrp, first, force); - /** - * @todo Handle return value from the method above - */ -} - -void -requestDeleteSS(void * cbObj, NdbApiSignal * signal, - Uint32 nodeGrp, Uint32 firstGCI, Uint32 lastGCI) -{ - GCIContainer * container = (GCIContainer *) cbObj; - - RLOG(("Deleting SS:%d:[%d-%d]", nodeGrp, firstGCI, lastGCI)); - - if(firstGCI < 0 || lastGCI<=0 || nodeGrp < 0) { - REPABORT("Illegal interval or wrong node group"); - //return GrepError::REP_DELETE_NEGATIVE_EPOCH; - } - - /********************************************* - * All buffers : Modify to the available ones - *********************************************/ - if(firstGCI==0 && lastGCI==(Uint32)0xFFFF) { - container->getAvailableGCIBuffers(nodeGrp, &firstGCI, &lastGCI); - } - - if(firstGCI == 0) { - Uint32 f, l; - container->getAvailableGCIBuffers(nodeGrp, &f, &l); - RLOG(("Deleting SS:[%d-%d]", f, l)); - if(f > firstGCI) firstGCI = f; - } - - /** - * Delete buffers - */ - for(Uint32 i=firstGCI; i<=lastGCI; i++) { - if(!container->destroyGCIBuffer(i, nodeGrp)) { - RLOG(("WARNING! Delete non-existing epoch SS:%d:[%d]", nodeGrp, i)); - } - //RLOG(("RepStateRequests: Deleting buffer SS:%d:[%d]", nodeGrp, i)); - } -} - -void -requestDeletePS(void * cbObj, NdbApiSignal * signal, - Uint32 nodeGrp, Uint32 firstGCI, Uint32 lastGCI) -{ - ExtSender * ext = (ExtSender *) cbObj; - - RepClearPSGciBufferReq * psReq = - (RepClearPSGciBufferReq*)signal->getDataPtrSend(); - /** - * @todo Should have better senderData /Lars - */ - psReq->senderData = 4711; - psReq->senderRef = ext->getOwnRef(); - psReq->firstGCI = firstGCI; - psReq->lastGCI = lastGCI; - psReq->nodeGrp = nodeGrp; - signal->set(0, PSREPBLOCKNO, GSN_REP_CLEAR_PS_GCIBUFFER_REQ, - RepClearPSGciBufferReq::SignalLength); - ext->sendSignal(signal); - - RLOG(("Requesting deletion of PS:%d:[%d-%d]", nodeGrp, firstGCI, lastGCI)); -} - -/** - * Function that requests information from REP PS about stored GCI Buffers - */ -void -requestEpochInfo(void * cbObj, NdbApiSignal* signal, Uint32 nodeGrp) -{ - ExtSender * ext = (ExtSender *) cbObj; - - RepGetGciReq * req = (RepGetGciReq *) signal->getDataPtrSend(); - req->nodeGrp = nodeGrp; - signal->set(0, PSREPBLOCKNO, GSN_REP_GET_GCI_REQ, - RepGetGciReq::SignalLength); - ext->sendSignal(signal); -} - -void -requestStartMetaLog(void * cbObj, NdbApiSignal * signal, - Uint32 subId, Uint32 subKey) -{ - RLOG(("Metalog starting. Subscription %d-%d", subId, subKey)); - startSubscription(cbObj, signal, SubscriptionData::MetaData, subId, subKey); -} - -void -requestStartDataLog(void * cbObj, NdbApiSignal * signal, - Uint32 subId, Uint32 subKey) -{ - RLOG(("Datalog starting. Subscription %d-%d", subId, subKey)); - startSubscription(cbObj, signal, SubscriptionData::TableData, subId, subKey); -} - -void -requestStartMetaScan(void * cbObj, NdbApiSignal* signal, - Uint32 subId, Uint32 subKey) -{ - RLOG(("Metascan starting. Subscription %d-%d", subId, subKey)); - scanSubscription(cbObj, signal, SubscriptionData::MetaData, subId, subKey); -} - -void -requestStartDataScan(void * cbObj, NdbApiSignal* signal, - Uint32 subId, Uint32 subKey) -{ - RLOG(("Datascan starting. Subscription %d-%d", subId, subKey)); - scanSubscription(cbObj, signal, SubscriptionData::TableData, subId, subKey); -} diff --git a/ndb/src/old_files/rep/state/testInterval/Makefile b/ndb/src/old_files/rep/state/testInterval/Makefile deleted file mode 100644 index fbb0b48c280..00000000000 --- a/ndb/src/old_files/rep/state/testInterval/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -include .defs.mk - -TYPE := kernel ndbapitest - -BIN_TARGET := testInterval -BIN_TARGET_ARCHIVES := portlib general - -CCFLAGS_LOC += -I.. - -SOURCES = testInterval.cpp ../Interval.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/rep/state/testInterval/testInterval.cpp b/ndb/src/old_files/rep/state/testInterval/testInterval.cpp deleted file mode 100644 index 463e4adffb7..00000000000 --- a/ndb/src/old_files/rep/state/testInterval/testInterval.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "../Interval.hpp" - -#define TEST_REQUIRE(X); if (!(X)) { \ - ndbout_c("Test failed in line %d", __LINE__); testPassed = false; } - - -int -main () { - bool testPassed = true; - - Interval a, b, c; - - /** - * isEmpty - */ - TEST_REQUIRE(a.isEmpty()); - - a.set(3,1); - TEST_REQUIRE(a.isEmpty()); - - /** - * isEqual - */ - a.set(1,2); - TEST_REQUIRE(a.isEqual(1,2)); - - a.set(3,1); - TEST_REQUIRE(a.isEqual(1,0)); // The result should be normalized - - /** - * intervalAdd -- non-disjoint - */ - a.set(1,3); - b.set(3,10); - TEST_REQUIRE(intervalAdd(a, b, &c)); - TEST_REQUIRE(c.isEqual(1,10)); - - a.set(3,10); - b.set(1,3); - TEST_REQUIRE(intervalAdd(a, b, &c)); - TEST_REQUIRE(c.isEqual(1,10)); - - /** - * intervalAdd -- consequtive - */ - a.set(1,3); - b.set(4,10); - TEST_REQUIRE(intervalAdd(a, b, &c)); - TEST_REQUIRE(c.isEqual(1,10)); - - a.set(4,10); - b.set(1,3); - TEST_REQUIRE(intervalAdd(a, b, &c)); - TEST_REQUIRE(c.isEqual(1,10)); - - /** - * intervalAdd -- disjoint - */ - a.set(1,3); - b.set(5,10); - c.set(4711,4711); - TEST_REQUIRE(!intervalAdd(a, b, &c)); // This should not work - TEST_REQUIRE(c.isEqual(4711,4711)); - - a.set(5,10); - b.set(1,3); - c.set(4711,4711); - TEST_REQUIRE(!intervalAdd(a, b, &c)); // This should not work - TEST_REQUIRE(c.isEqual(4711,4711)); - - /** - * intervalLeftMinus -- non-disjoint - */ - a.set(1,3); - b.set(5,10); - intervalLeftMinus(a, b, &c); - TEST_REQUIRE(c.isEmpty()); - - a.set(5,10); - b.set(1,3); - intervalLeftMinus(a, b, &c); - TEST_REQUIRE(c.isEqual(5,10)); - - /** - * intervalLeftMinus -- consequtive - */ - a.set(1,3); - b.set(4,10); - intervalLeftMinus(a, b, &c); - TEST_REQUIRE(c.isEmpty()); - - a.set(4,10); - b.set(1,3); - intervalLeftMinus(a, b, &c); - TEST_REQUIRE(c.isEqual(4,10)); - - /** - * intervalLeftMinus -- disjoint - */ - a.set(1,3); - b.set(5,10); - intervalLeftMinus(a, b, &c); - TEST_REQUIRE(c.isEmpty()); - - a.set(5,10); - b.set(1,3); - intervalLeftMinus(a, b, &c); - TEST_REQUIRE(c.isEqual(5,10)); - - ndbout << "Test " << (testPassed ? "passed" : "failed") << "." << endl; -} diff --git a/ndb/src/old_files/rep/state/testRepState/Makefile b/ndb/src/old_files/rep/state/testRepState/Makefile deleted file mode 100644 index 33c6076eff3..00000000000 --- a/ndb/src/old_files/rep/state/testRepState/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -include .defs.mk - -TYPE := kernel - -BIN_TARGET := testRequestor -BIN_TARGET_ARCHIVES := portlib general - -CCFLAGS_LOC += -I.. - -SOURCES = testRequestor.cpp \ - ../Requestor.cpp \ - ../RepState.cpp \ - ../Interval.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/rep/state/testRepState/testRequestor.cpp b/ndb/src/old_files/rep/state/testRepState/testRequestor.cpp deleted file mode 100644 index 8989f7098b8..00000000000 --- a/ndb/src/old_files/rep/state/testRepState/testRequestor.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "testRequestor.hpp" - -#define TEST_REQUIRE(X); if (!(X)) { \ - ndbout_c("Test failed in line %d", __LINE__); testPassed = false; } - - -struct Result { - Uint32 nodeGrp; - Uint32 first; - Uint32 last; - Uint32 force; -}; -Result result; - -/** Callbacks ****************************************************************/ - -void -f_transfer(void *, Signal* signal, Uint32 nodeGrp, Uint32 first, Uint32 last) -{ - result.nodeGrp = nodeGrp; - result.first = first; - result.last = last; - result.force = 0; - ndbout_c("Transfer: %d:[%d-%d] ", nodeGrp, first, last); -} - -void -f_apply(void *, Signal* signal, Uint32 nodeGrp, - Uint32 first, Uint32 last, Uint32 force) -{ - result.nodeGrp = nodeGrp; - result.first = first; - result.last = last; - result.force = force; - ndbout_c("Apply: %d:[%d-%d] (Force:%d)", nodeGrp, first, last, force); -} - -void -f_deletePS(void *, Signal* signal, Uint32 nodeGrp, Uint32 first, Uint32 last) -{ - result.nodeGrp = nodeGrp; - result.first = first; - result.last = last; - result.force = 0; - ndbout_c("DeletePS: %d:[%d-%d] ", nodeGrp, first, last); -} - -void -f_deleteSS(void *, Signal* signal, Uint32 nodeGrp, Uint32 first, Uint32 last) -{ - result.nodeGrp = nodeGrp; - result.first = first; - result.last = last; - result.force = 0; - ndbout_c("DeleteSS: %d:[%d-%d] ", nodeGrp, first, last); -} - -void -requestStartMetaLog(void * cbObj, Signal * signal) -{ - ndbout_c("StartMetaLog:"); -} - -void -requestStartDataLog(void * cbObj, Signal * signal) -{ - ndbout_c("StartDataLog:"); -} - -void -requestStartMetaScan(void * cbObj, Signal* signal) -{ - ndbout_c("StartMetaScan:"); -} - -void -requestStartDataScan(void * cbObj, Signal* signal) -{ - ndbout_c("StartDataScan:"); -} - - -/** Compare ****************************************************************/ - -bool compare(Uint32 nodeGrp, Uint32 first, Uint32 last, Uint32 force) -{ - return (result.nodeGrp == nodeGrp && result.first == first && - result.last == last && result.force == force); -} - - -/** Main *******************************************************************/ - -void -testRequestor() -{ - Signal * signal; - bool testPassed = true; - - Requestor requestor; - requestor.setObject(0); - requestor.setIntervalRequests(&f_transfer, - &f_apply, - &f_deletePS, - &f_deleteSS); - requestor.setStartRequests(&requestStartMetaLog, - &requestStartDataLog, - &requestStartMetaScan, - &requestStartDataScan); - requestor.setNoOfNodeGroups(1); - requestor.enable(); - requestor.enableTransfer(); - requestor.enableDelete(); - requestor.enableApply(); - requestor.m_state = Requestor::LOG; - - requestor.printStatus(); - - /** - * First transfer - */ - Interval i(12,13); - requestor.add(RepState::PS, 0, i); - requestor.execute(signal); - TEST_REQUIRE(compare(0, 12, 13, 0)); - - requestor.printStatus(); - - /** - * State transtion test - */ - - /** - * First apply - */ - - /** - * Test end - */ - if (testPassed) { - ndbout << "Test passed!" << endl; - } else { - ndbout << "Test FAILED!" << endl; - } -} - -int -main () { - testRequestor(); -} diff --git a/ndb/src/old_files/rep/state/testRepState/testRequestor.hpp b/ndb/src/old_files/rep/state/testRepState/testRequestor.hpp deleted file mode 100644 index 726b289114d..00000000000 --- a/ndb/src/old_files/rep/state/testRepState/testRequestor.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef TEST_REQUESTOR_HPP -#define TEST_REQUESTOR_HPP - -#include "../Requestor.hpp" - -void testRequestor(); - -#endif diff --git a/ndb/src/old_files/rep/storage/GCIBuffer.cpp b/ndb/src/old_files/rep/storage/GCIBuffer.cpp deleted file mode 100644 index 013600b30a5..00000000000 --- a/ndb/src/old_files/rep/storage/GCIBuffer.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include "GCIBuffer.hpp" - -/***************************************************************************** - * Constructor / Destructor - *****************************************************************************/ - -GCIBuffer::GCIBuffer(Uint32 gci, Uint32 id) -{ - m_gci = gci; - m_id = id; - m_complete = false; - m_receivedBytes = 0; -} - -GCIBuffer::~GCIBuffer() -{ - /** - * Loop through all pages and delete them - */ - for(Uint32 i=0; iinsertLogRecord(tableId, operation, ptr)) { - /** - * GCIPage is full. - */ - GCIPage * newPage = new GCIPage(m_gci); - assert(newPage != NULL); - m_pageList.push_back(newPage); - bool res = newPage->insertLogRecord(tableId, operation, ptr); - - if(!res) { - ndbout << "GCIBuffer: gci : " << m_gci << endl; - assert(res); - } - } -} - -/** - * @todo: We must be able to distinguish between Scan meta - * data and log meta data. - * Currently only scan meta data is considered. - */ -void -GCIBuffer::insertMetaRecord(Uint32 tableId, class LinearSectionPtr ptr[3]) -{ - GCIPage * p; - if(m_pageList.size()==0) { - p = new GCIPage(m_gci); - assert(p != NULL); - m_pageList.push_back(p); - } - - p = m_pageList.back(); - - if (!p->insertMetaRecord(tableId, ptr)) { - /** - * Page is full. - */ - GCIPage * newPage = new GCIPage(m_gci); - assert(newPage != NULL); - m_pageList.push_back(newPage); - - bool res = newPage->insertMetaRecord(tableId, ptr); - assert(res); - } -} - -void -GCIBuffer::insertPage(Uint32 gci, char * dataPtr, Uint32 dataBLen) -{ - /** - * allocate a new GCIPage - */ - GCIPage * page = new GCIPage(gci); - assert(page != 0); - - /** - * copy data into page - */ - page->copyDataToPage(dataPtr, dataBLen); - - /** - * put page on pagelist. - */ - m_pageList.push_back(page); - - /** - * Update GCI Buffer received bytes - */ - m_receivedBytes += dataBLen; -} - - -/***************************************************************************** - * Iterator - *****************************************************************************/ - -GCIBuffer::iterator::iterator(const GCIBuffer* gciBuffer) -{ - m_gciBuffer = gciBuffer; - m_iterator=0; - -} - -GCIPage * -GCIBuffer::iterator::first() -{ - m_iterator = 0; - if(m_gciBuffer->m_pageList.size() == 0) return NULL; - return (m_gciBuffer->m_pageList)[m_iterator]; -} - - -GCIPage * -GCIBuffer::iterator::next() -{ - m_iterator++; - if(m_gciBuffer->m_pageList.size() == 0) return NULL; - - if((m_iteratorm_pageList.size())) - return (m_gciBuffer->m_pageList)[m_iterator]; - else - return NULL; -} - - -bool -GCIBuffer::iterator::exists() -{ - return (m_iterator < m_gciBuffer->m_pageList.size()); -} - - - diff --git a/ndb/src/old_files/rep/storage/GCIBuffer.hpp b/ndb/src/old_files/rep/storage/GCIBuffer.hpp deleted file mode 100644 index 8a8473d1d49..00000000000 --- a/ndb/src/old_files/rep/storage/GCIBuffer.hpp +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef GCI_BUFFER_HPP -#define GCI_BUFFER_HPP - -#include "GCIPage.hpp" -#include -#include - -#include - -/** - * @class GCIBuffer - * @brief A GCIBuffer contains pages containing log records for ONE gci. - * - * @todo Load and save to disk - */ - -class GCIBuffer -{ -public: - GCIBuffer(Uint32 gci, Uint32 id); - ~GCIBuffer(); - - /** - * @fn insertLogRecord - * @param tableId Table this will be LogRecord applies to. - * @param operation Operation this LogRecord represents - * @param ptr Ptr of type LinearSectionPtr that contains the data. - * @return A full page or 0, if the insert didn't generate a full page. - */ - void insertLogRecord(Uint32 tableId, Uint32 operation, - class LinearSectionPtr ptr[3]); - - void insertMetaRecord(Uint32 tableId, class LinearSectionPtr ptr[3]); - - /** - * @fn inserts a page, containing Records into a GCI Buffer. - * @param gci - the gci of the page. - * @param dataPtr - Pointer originating from Page::m_page. - * @param dataBLen - length of dataptr in bytes - * @note Page must NOT be deallocated after being inserted! - */ - void insertPage(Uint32 gci, char * dataPtr, Uint32 dataBLen); - - /** - * @fn isComplete - * @return True if this GCI Buffer is done (gci is completed). - */ - bool isComplete() { return m_complete; }; - void setComplete() { m_complete = true; }; - - /** - * @fn getReceivedBytes - * @returns the total number of bytes that this buffer has received. - */ - Uint32 getReceivedBytes() const { return m_receivedBytes;} ; - - /** - * Iterator for pages - */ - class iterator { - public: - iterator(const GCIBuffer* gciBuffer); - GCIPage * first(); ///< @return First page (or NULL if no page exists) - GCIPage * next(); ///< @return Next page (or NULL if no more page exists) - bool exists(); ///< @return true if another page exists (for next()) - private: - Uint32 m_iterator; - const GCIBuffer * m_gciBuffer; - }; - friend class GCIBuffer::iterator; - - /*************************************************************************** - * GCI Buffer meta information - ***************************************************************************/ - void setGCI(Uint32 gci) { m_gci = gci; }; - Uint32 getGCI() { return m_gci; }; - - void setId(Uint32 id) { m_id = id; }; - Uint32 getId() { return m_id; }; - - bool m_force; // if true, ignore "execute" errors when - // restoring buffer (PUBLIC) during phase - // starting. -private: - /*************************************************************************** - * Private Variables - ***************************************************************************/ - Uint32 m_gci; ///< GCI of this buffer - Uint32 m_id; ///< names GCIBuffer - bool m_complete; ///< GCI complete; buffer contains - ///< everything - Vector m_pageList; ///< Storage for data/log record pages. - Uint32 m_receivedBytes; ///< Received bytes in this buffer -}; - -#endif diff --git a/ndb/src/old_files/rep/storage/GCIContainer.cpp b/ndb/src/old_files/rep/storage/GCIContainer.cpp deleted file mode 100644 index c161db0769b..00000000000 --- a/ndb/src/old_files/rep/storage/GCIContainer.cpp +++ /dev/null @@ -1,272 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "GCIContainer.hpp" -#include -#include -#include - -#include - -//#define GCICONTAINER_DEBUG - -/***************************************************************************** - * Constructors / Destructors - *****************************************************************************/ - -GCIContainer::GCIContainer(Uint32 maxNoOfIds) -{ - m_maxNoOfIds = maxNoOfIds; - - gciRange = new GCIRange[maxNoOfIds * sizeof(GCIRange)]; - - for(Uint32 i = 0; i < maxNoOfIds; i++) { - gciRange[i].m_firstGCI = 1; // The empty interval = [1,0] - gciRange[i].m_lastGCI = 0; - } - theMutexPtr = NdbMutex_Create(); -} - -GCIContainer::~GCIContainer() -{ - for(Uint32 i=0; i < m_bufferList.size(); i++) { - delete m_bufferList[i]; - m_bufferList[i] = 0; - } - - m_bufferList=0; - delete [] gciRange; - NdbMutex_Destroy(theMutexPtr); -} - -/***************************************************************************** - * GCIBuffer Create / Destroy - *****************************************************************************/ - -GCIBuffer * -GCIContainer::createGCIBuffer(Uint32 gci, Uint32 id) -{ - GCIBuffer * buf = new GCIBuffer(gci, id); - if (buf == NULL) REPABORT("Could not allocate new buffer"); - - m_bufferList.push_back(buf, true); - -#ifdef GCICONTAINER_DEBUG - ndbout_c("GCIContainer: New buffer created (GCI: %d, Id: %d)", gci, id); -#endif - return buf; -} - -/** - * Delete all GCI buffers strictly less than "gci" - */ -void -GCIContainer::destroyGCIBuffersBeforeGCI(Uint32 gci, Uint32 id) -{ - for(Uint32 i = 0 ; i < m_bufferList.size(); i++) { - if(m_bufferList[i]->getGCI() < gci) { -#ifdef GCICONTAINER_DEBUG - ndbout_c("GCIContainer: Destroying buffer (GCI: %d, id: %d)", - m_bufferList[i]->getGCI(), id); -#endif - destroyGCIBuffer(i, id); - } - } -} - -/** - * Delete one GCI Buffer - */ -bool -GCIContainer::destroyGCIBuffer(Uint32 gci, Uint32 id) -{ - m_bufferList.lock(); - for(Uint32 i = 0 ; i < m_bufferList.size(); i++) { - if((m_bufferList[i]->getGCI() == gci) && - (m_bufferList[i]->getId() == id)) { - - /** - * Delete the GCI Buffer - */ - delete m_bufferList[i]; - m_bufferList[i] = 0; - - /** - * Remove from the list of buffers stored in GCIContainer - */ - m_bufferList.erase(i,false); - m_bufferList.unlock(); - - /** - * Set info - */ - NdbMutex_Lock(theMutexPtr); - if(gciRange[id].m_firstGCI != gci) - RLOG(("WARNING! Buffer %d deleted from [%d-%d]", - gci, gciRange[id].m_firstGCI, gciRange[id].m_lastGCI)); - - gciRange[id].m_firstGCI++; - - /** - * Normalize empty interval to [1,0] - */ - if (gciRange[id].m_firstGCI > gciRange[id].m_lastGCI){ - gciRange[id].m_firstGCI = 1; - gciRange[id].m_lastGCI = 0; - } - NdbMutex_Unlock(theMutexPtr); - return true; - } - } - m_bufferList.unlock(); - return false; -} - -/***************************************************************************** - * GCIBuffer interface - *****************************************************************************/ - -GCIBuffer * -GCIContainer::getGCIBuffer(Uint32 gci, Uint32 id) -{ - GCIBuffer * gciBuffer = 0; - - m_bufferList.lock(); - for(Uint32 i=0; i < m_bufferList.size(); i++) { - gciBuffer = m_bufferList[i]; - if((gciBuffer->getGCI() == gci) && (gciBuffer->getId() == id)) { - m_bufferList.unlock(); - return gciBuffer; - } - } - m_bufferList.unlock(); - return 0; -} - -void -GCIContainer::setCompleted(Uint32 gci, Uint32 id) -{ - GCIBuffer * gciBuffer = getGCIBuffer(gci, id); - if(gciBuffer == 0) gciBuffer = createGCIBuffer(gci, id); - - gciBuffer->setComplete(); - -#ifdef GCICONTAINER_DEBUG - ndbout_c("GCIContainer: Buffer completely stored in GCIContainer (GCI: %d)", - gci); -#endif - - NdbMutex_Lock(theMutexPtr); - - /** - * If this is the first GCI Buffer to be completed - * then both first and last must be updated. - * Subsequently, only the last value must be updated. - */ - if(gciRange[id].m_firstGCI == 1 && gciRange[id].m_lastGCI == 0) { - gciRange[id].m_firstGCI = gci; - gciRange[id].m_lastGCI = gci; - } else { - if (gci != gciRange[id].m_lastGCI + 1) { - RLOG(("WARNING! Non-consequtive buffer %u completed [%u-%u])", - gci, gciRange[id].m_firstGCI, gciRange[id].m_lastGCI)); - } - gciRange[id].m_lastGCI = gci; - } - NdbMutex_Unlock(theMutexPtr); -} - -void -GCIContainer::getAvailableGCIBuffers(Uint32 id, Uint32 * first, Uint32 * last) -{ - NdbMutex_Lock(theMutexPtr); - *first = gciRange[id].m_firstGCI; - *last = gciRange[id].m_lastGCI; - NdbMutex_Unlock(theMutexPtr); -} - -/***************************************************************************** - * Inserts - *****************************************************************************/ -void -GCIContainer::insertMetaRecord(Uint32 id, Uint32 tableId, - class LinearSectionPtr ptr[3], Uint32 gci) -{ - /********************************************************** - * 1. Find correct GCI Buffer (Doesn't exist? Create one) - **********************************************************/ - GCIBuffer * gciBuffer = getGCIBuffer(gci, id); - if(gciBuffer == 0) gciBuffer = createGCIBuffer(gci, id); - - /********************************** - * 2. Insert record into GCIBuffer - **********************************/ - gciBuffer->insertMetaRecord(tableId, ptr); -} - -void -GCIContainer::insertLogRecord(Uint32 id, Uint32 tableId, Uint32 operation, - class LinearSectionPtr ptr[3], Uint32 gci) -{ - /********************************************************* - * 1. Find correct GCI Buffer (doesn't exist? create one) - *********************************************************/ - GCIBuffer * gciBuffer = getGCIBuffer(gci, id); - if(gciBuffer == 0) gciBuffer = createGCIBuffer(gci, id); - /********************************** - * 2. Insert record into GCIBuffer - **********************************/ - gciBuffer->insertLogRecord(tableId, operation, ptr); -} - -void -GCIContainer::insertPage(Uint32 gci, Uint32 id, - char * dataPtr, Uint32 dataBLen) -{ - /********************************************************* - * 1. Find correct GCI Buffer (doesn't exist? create one) - *********************************************************/ - GCIBuffer * gciBuffer = getGCIBuffer(gci, id); - if(gciBuffer == 0) gciBuffer = createGCIBuffer(gci, id); - - /******************************** - * 2. Insert page into GCIBuffer - ********************************/ - gciBuffer->insertPage(gci, dataPtr, dataBLen); -} - -bool -GCIContainer::reset() -{ - /** - * Clear the intervals - */ - for(Uint32 i = 0; i < m_maxNoOfIds; i++) { - gciRange[i].m_firstGCI = 1; // The empty interval = [1,0] - gciRange[i].m_lastGCI = 0; - } - - /** - * Destroy ALL gci buffers for ALL ids - */ - for(Uint32 i=0; i < m_bufferList.size(); i++) { - delete m_bufferList[i]; - m_bufferList[i] = 0; - } - m_bufferList.clear(); - - return true; -} diff --git a/ndb/src/old_files/rep/storage/GCIContainer.hpp b/ndb/src/old_files/rep/storage/GCIContainer.hpp deleted file mode 100644 index 48cbc66bfbd..00000000000 --- a/ndb/src/old_files/rep/storage/GCIContainer.hpp +++ /dev/null @@ -1,121 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef GCI_CONTAINER_HPP -#define GCI_CONTAINER_HPP - -#include - -#include "LogRecord.hpp" -#include "GCIBuffer.hpp" - -#undef swap -#include -#include - -/** - * @class GCIContainer - * @brief Responsible for storing LogRecord:s in GCIBuffer:s - * - * Each GCIBuffer stored in the GCIContainer is named by a pair . - * (On PS REP the id is the nodeId, on SS REP the id is the node group). - */ -class GCIContainer { -public: - GCIContainer(Uint32 maxNoOfIds); - ~GCIContainer(); - - /*************************************************************************** - * GCIBuffer interface - ***************************************************************************/ - /** - * @return GCIBuffer if success, NULL otherwise - */ - GCIBuffer * createGCIBuffer(Uint32 gci, Uint32 id); - - /** - * Destroy all buffers with GCI strictly less than gci. - */ - void destroyGCIBuffersBeforeGCI(Uint32 gci, Uint32 id); - - /** - * Destroy all buffers with GCI gci. - * @return true if buffer was deleted, false if no buffer exists - */ - bool destroyGCIBuffer(Uint32 gci, Uint32 id); - - /** - * Fetch buffer - * @return GCIBuffer for gci, or NULL if no buffer found - */ - GCIBuffer * getGCIBuffer(Uint32 gci, Uint32 id); - - /** - * Set that buffer is completed, i.e. no more records are to be inserted - */ - void setCompleted(Uint32 gci, Uint32 id); - - - /** - * @fn insertPage - * @param gci GCI this page belongs to. - * @param id Id this page belongs to. - * @param dataPtr Pointer originating from Page::m_page - * @param dataBLen Length in bytes of data following dataptr. - */ - void insertPage(Uint32 gci, Uint32 id, char * dataPtr, Uint32 dataBLen); - - - /*************************************************************************** - * Record interface - ***************************************************************************/ - void insertLogRecord(Uint32 id, Uint32 tableId, Uint32 operation, - class LinearSectionPtr ptr[3], Uint32 gci); - - void insertMetaRecord(Uint32 id, Uint32 tableId, - class LinearSectionPtr ptr[3], Uint32 gci); - - /** - * Get available (complete) GCI Buffers that exists in the container. - * first == last means that there is one complete buffer - * @param id Id for which to as for available gci buffers. - * @param first First complete gci buffer - * @param last Last complete gci buffer - */ - void getAvailableGCIBuffers(Uint32 id, Uint32 * first, Uint32 * last); - - /** - * Resets the gcicontainer to its original state (initial state and empty) - * I.e., same state as when the object was first constructed. - * @return true if reset was ok - */ - bool reset(); - -private: - NdbMutex* theMutexPtr; - MutexVector m_bufferList; ///< All GCIBuffers stored - - typedef struct GCIRange { - Uint32 m_firstGCI; - Uint32 m_lastGCI; - }; - - Uint32 m_maxNoOfIds; - - GCIRange * gciRange; ///< Array of GCI ranges for each id -}; - -#endif diff --git a/ndb/src/old_files/rep/storage/GCIContainerPS.cpp b/ndb/src/old_files/rep/storage/GCIContainerPS.cpp deleted file mode 100644 index 5adb53f965c..00000000000 --- a/ndb/src/old_files/rep/storage/GCIContainerPS.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "GCIContainerPS.hpp" -#include -#include -#include - -GCIContainerPS::GCIContainerPS(Uint32 maxNoOfNodeGrps) -{ - m_container = new GCIContainer(maxNoOfNodeGrps); - if (!m_container) REPABORT("Could not allocate new GCIContainer"); -} - -GCIContainerPS::~GCIContainerPS() -{ - delete m_container; -} - -void -GCIContainerPS::setNodeGroupInfo(NodeGroupInfo * info) -{ - m_nodeGroupInfo=info; -}; - -void -GCIContainerPS::createGCIBuffer(Uint32 gci, Uint32 id) -{ - m_container->createGCIBuffer(gci, id); -} - -void -GCIContainerPS::getAvailableGCIBuffers(Uint32 id /*nodegrp */, - Uint32 * first, Uint32 * last) { - - Uint32 nodeId = m_nodeGroupInfo->getPrimaryNode(id); - if(!nodeId) { - *first = 1; - *last = 0; - return; - } - - /** - *@todo do smart stuff with this! - */ - m_container->getAvailableGCIBuffers(nodeId, first, last); - -} - -void -GCIContainerPS::destroyGCIBuffersBeforeGCI(Uint32 gci) -{ - //for each node in every nodeGrp do: - NodeGroupInfo::iterator * it; - for(Uint32 i=0; igetNoOfNodeGroups(); i++) { - it = new NodeGroupInfo::iterator(i, m_nodeGroupInfo); - for(NodeConnectInfo * nci=it->first(); it->exists();nci=it->next()) { - m_container->destroyGCIBuffersBeforeGCI(gci, nci->nodeId); - } - delete it; - } -} - -void -GCIContainerPS::insertLogRecord(Uint32 id, Uint32 tableId, Uint32 operation, - class LinearSectionPtr ptr[3], Uint32 gci) -{ - m_container->insertLogRecord(id, tableId, operation, ptr, gci); -} - -void -GCIContainerPS::insertMetaRecord(Uint32 id, Uint32 tableId, - class LinearSectionPtr ptr[3], Uint32 gci) -{ - m_container->insertMetaRecord(id, tableId, ptr, gci); -} - -void -GCIContainerPS::setCompleted(Uint32 gci, Uint32 id) -{ - m_container->setCompleted(gci, id); -} - -GCIBuffer * -GCIContainerPS::getGCIBuffer(Uint32 gci, Uint32 id) -{ - return m_container->getGCIBuffer(gci, id); -} - -/** - * @todo: fix return value - */ -bool -GCIContainerPS::destroyGCIBuffer(Uint32 gci, Uint32 id) -{ - //for each node in nodeGrp id do: - NodeGroupInfo::iterator * it; - it = new NodeGroupInfo::iterator(id, m_nodeGroupInfo); - for(NodeConnectInfo * nci=it->first(); it->exists();nci=it->next()) - { - if(!m_container->destroyGCIBuffer(gci, nci->nodeId)) - { - delete it; - return false; - } - } - delete it; - return true; -} - -bool -GCIContainerPS::reset() -{ - return m_container->reset(); -} diff --git a/ndb/src/old_files/rep/storage/GCIContainerPS.hpp b/ndb/src/old_files/rep/storage/GCIContainerPS.hpp deleted file mode 100644 index 7f5aaac4840..00000000000 --- a/ndb/src/old_files/rep/storage/GCIContainerPS.hpp +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef GCI_CONTAINER_PS_HPP -#define GCI_CONTAINER_PS_HPP - -#include -#include - -#include "NodeGroupInfo.hpp" -#include - -#include -#include - -/** - * @class GCIContainerPS - * @brief Interface to GCIContainer that takes node groups into account - */ -class GCIContainerPS -{ -public: - GCIContainerPS(Uint32 maxNoOfNodeGrps); - ~GCIContainerPS(); - - void setNodeGroupInfo(NodeGroupInfo * info); - NodeGroupInfo * getNodeGroupInfo() {return m_nodeGroupInfo;}; - - void createGCIBuffer(Uint32 gci, Uint32 id); - void getAvailableGCIBuffers(Uint32 id /*nodegrp */, - Uint32 * first, Uint32 * last); - - /*************************************************************************** - * Record interface - ***************************************************************************/ - void insertLogRecord(Uint32 grpId, Uint32 tableId, Uint32 operation, - class LinearSectionPtr ptr[3], Uint32 gci); - - void insertMetaRecord(Uint32 grpId, Uint32 tableId, - class LinearSectionPtr ptr[3], Uint32 gci); - - /** - * Destroy all buffers with GCI strictly less than gci. - */ - void destroyGCIBuffersBeforeGCI(Uint32 gci); - - /** - * Set that buffer is completed, i.e. no more records are to be inserted - */ - void setCompleted(Uint32 gci, Uint32 id); - - /** - * Fetch buffer - * @return GCIBuffer for gci, or NULL if no buffer found - */ - GCIBuffer * getGCIBuffer(Uint32 gci, Uint32 id); - - /** - * Destroy all buffers with GCI gci. - * @return true if buffer was deleted, false if no buffer exists - */ - bool destroyGCIBuffer(Uint32 gci, Uint32 id); - - - /** - * Resets the gcicontainer to its original state (initial state and empty) - * @return true if reset was ok - */ - bool reset(); - -private: - GCIContainer * m_container; - NodeGroupInfo * m_nodeGroupInfo; -}; - - -#endif diff --git a/ndb/src/old_files/rep/storage/GCIPage.cpp b/ndb/src/old_files/rep/storage/GCIPage.cpp deleted file mode 100644 index 05ecde2fee1..00000000000 --- a/ndb/src/old_files/rep/storage/GCIPage.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "GCIPage.hpp" -#include "assert.h" -#include - -GCIPage::GCIPage(Uint32 gci) -{ - m_first = NULL; - m_last = NULL; - m_gci = gci; - m_full = false; - m_currentPagePos=m_page; - m_usedBytes = 0; -} - -/***************************************************************************** - * Insert - *****************************************************************************/ - -/** - * Store a new log record on this page. - * @return True if success, false otherwise - */ -bool -GCIPage::insertLogRecord(Uint32 tableId, Uint32 operation, - class LinearSectionPtr ptr[3]) -{ - /** - * Calculate size of new logrecord in bytes - */ - assert(m_page!=NULL); - Uint32 size = 4*ptr[0].sz + 4*ptr[1].sz + sizeof(LogRecord); - - if(!((m_currentPagePos + size ) < (m_page + m_pageBSize))) { - m_full = true; - return false; // No free space. GCIBuffer must allocate a new page - } - LogRecord * lr = new(m_currentPagePos) LogRecord(); - if (lr==0) REPABORT("Could not allocate new log record"); - - lr->recordType = Record::LOG; - lr->recordLen = size; - lr->operation = operation; - lr->tableId = tableId; - lr->attributeHeaderWSize = ptr[0].sz; - lr->attributeDataWSize = ptr[1].sz; - - m_currentPagePos += sizeof(LogRecord); - - lr->attributeHeader = (Uint32*)m_currentPagePos; - memcpy(lr->attributeHeader, ptr[0].p, lr->attributeHeaderWSize * 4); - - m_currentPagePos += lr->attributeHeaderWSize * 4; - - lr->attributeData = (Uint32*)m_currentPagePos; - memcpy(lr->attributeData, ptr[1].p, lr->attributeDataWSize * 4); - - m_currentPagePos += lr->attributeDataWSize * 4; - - m_usedBytes+=size; - return true; -} - -/** - * Store a new log record on this page. - * @return True if sucessful, false otherwise. - */ -bool -GCIPage::insertMetaRecord(Uint32 tableId, class LinearSectionPtr ptr[3]) -{ - /** - * Calculate size of new logrecord in bytes - */ - Uint32 size = 4*ptr[0].sz + sizeof(MetaRecord); - - if(!((m_currentPagePos + size ) < (m_page + m_pageBSize))) { - m_full = true; - return false; // No free space. GCIBuffer must allocate a new page - } - MetaRecord * mr = new(m_currentPagePos) MetaRecord(); - if (mr==0) REPABORT("Could not allocate new meta record"); - - // mr->operation = operation; - mr->recordType = Record::META; - mr->recordLen = size; - - mr->tableId = tableId; - mr->dataLen = ptr[0].sz; - - - m_currentPagePos += sizeof(MetaRecord); - - mr->data = (Uint32*)m_currentPagePos; - memcpy(mr->data, ptr[0].p, mr->dataLen * 4); - - m_currentPagePos += mr->dataLen * 4; - - m_usedBytes+=size; - return true; -} - -/** - * copy function - */ -void -GCIPage::copyDataToPage(char * dataPtr, Uint32 dataBLen) -{ - assert (dataBLen < m_pageBSize); - memcpy(m_page, dataPtr, dataBLen); - m_currentPagePos=m_page + dataBLen; - m_usedBytes = dataBLen; - m_full = true; - m_first = (Record * )m_page; - dataPtr = 0; -} - -/***************************************************************************** - * Iterator - *****************************************************************************/ - -GCIPage::iterator::iterator(const GCIPage* page) -{ - m_gciPage = page; - m_data = m_gciPage->m_page; - m_currentRecord = (Record*)m_data; -} - -Record * -GCIPage::iterator::first() -{ - return m_currentRecord; -} - -Record * -GCIPage::iterator::next() -{ - m_currentRecord = (Record*) - ((char*)(m_currentRecord)+ m_currentRecord->recordLen); - if((char*)m_currentRecord < (char*)(m_data + m_gciPage->m_usedBytes)) - return m_currentRecord; - else { - return 0; - } -} - -bool -GCIPage::iterator::exists() -{ - return ((char*)m_currentRecord < (m_data + m_gciPage->m_usedBytes)); -} diff --git a/ndb/src/old_files/rep/storage/GCIPage.hpp b/ndb/src/old_files/rep/storage/GCIPage.hpp deleted file mode 100644 index 50c5ab0cfba..00000000000 --- a/ndb/src/old_files/rep/storage/GCIPage.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef GCI_PAGE_HPP -#define GCI_PAGE_HPP - -#include "LogRecord.hpp" -#include - -#include - -/** - * @class GCIPage - * @brief A GCIPage contains a number of LogRecords for a certain GCI. - */ -class GCIPage -{ -public: - GCIPage(Uint32 gci); - GCIPage(Uint32 gci, char * dataPtr, Uint32 szBytes); - - /** - * @fn insertLogRecord - * @param tableId the table this will be LogRecord applies to. - * @param operation the operation this LogRecord represents - * @param ptr A LinearSectionPtr p'tr that contains the data. - * @return PAGE_FULL if the page is full, otherwise "true" - */ - bool insertLogRecord(Uint32 tableId, Uint32 operation, - class LinearSectionPtr ptr[3]); - - /** - * @fn insertMetaRecord - */ - bool insertMetaRecord(Uint32 tableId, class LinearSectionPtr ptr[3]); - - /** - * @fn getFirstRecord - * @return First record (or NULL if no record is stored on page) - */ - Record * getFirstRecord() { return m_first; }; - - /** - * @fn getStorage - */ - Uint32 * getStoragePtr() const {return (Uint32*)m_page;} ; - Uint32 getStorageByteSize() const {return m_usedBytes;} ; - Uint32 getStorageWordSize() const {return m_usedBytes >> 2;}; - - /** - * @fn copyDataToPage - * @info copy dataPtr to Page - * @param dataPtr - data to copy - * @param dataBLen - size in bytes to copy. - */ - void copyDataToPage(char * dataPtr, Uint32 szBytes); - - /** - * Iterator for records (Not yet used! Maybe should not be used.) - */ - class iterator { - public: - iterator(const GCIPage* page); - Record * first(); ///< @return First record (or NULL if no page exists) - Record * next(); ///< @return Next record (or NULL if no more records) - bool exists(); ///< @return true if another record exists-for next() - private: - Record * m_currentRecord; - const char * m_data; - const GCIPage * m_gciPage; - }; - friend class GCIPage::iterator; - - /** - * @fn getGCI - * Get the GCI of all log records stored on this page. - */ - Uint32 getGCI() { return m_gci; }; - - /** - * @fn isFull - * @return true if page is full, i.e. is one attempt to add a record - * has failed, false otherwise. - */ - bool isFull() { return m_full; }; - -private: - Uint32 m_gci; ///< GCI for this page - - Record * m_first; ///< Pointer to first log record - Record * m_last; ///< Pointer to last log record - - bool m_full; - - static const Uint32 m_pageBSize = 8192; ///< Page size in bytes - char m_page[m_pageBSize]; ///< Storage for pages - char * m_currentPagePos; - Uint32 m_usedBytes; -}; - -#endif diff --git a/ndb/src/old_files/rep/storage/LogRecord.hpp b/ndb/src/old_files/rep/storage/LogRecord.hpp deleted file mode 100644 index a0bf3d52372..00000000000 --- a/ndb/src/old_files/rep/storage/LogRecord.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef LOG_RECORD_HPP -#define LOG_RECORD_HPP - -#include -#include - -/** - * @class Record - * @brief - */ -class Record { -public: - enum RecordType { META = 1, LOG = 2 }; - RecordType recordType; - Uint32 recordLen; ///< Size in bytes of entire log record, incl payload -}; - - -/** - * @class LogRecord - * @brief - */ -class LogRecord : public Record { -public: - ~LogRecord() { - NdbMem_Free(attributeHeader); - NdbMem_Free(attributeData); - } - -public: - Uint32 gci; //0 - Uint32 operation; //4 - Uint32 tableId; //8 - - Uint32 attributeHeaderWSize; //12 - Uint32 attributeDataWSize; //16 - Uint32 * attributeHeader; //20 - Uint32 * attributeData; //24 - - /** - * Next pointer - */ -}; - - -/** - * @class MetaRecord - * @brief - */ -class MetaRecord : public Record { -public: - ~MetaRecord() { - NdbMem_Free(data); - } - -public: - Uint32 gci; - Uint32 tableId; - Uint32 dataLen; //in words of the data (below) - Uint32 *data; -}; - - -#endif - diff --git a/ndb/src/old_files/rep/storage/Makefile b/ndb/src/old_files/rep/storage/Makefile deleted file mode 100644 index 89b3af455e8..00000000000 --- a/ndb/src/old_files/rep/storage/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -include .defs.mk - -TYPE := repserver - -ARCHIVE_TARGET := repstorage - -SOURCES = GCIContainer.cpp \ - GCIContainerPS.cpp \ - GCIBuffer.cpp \ - GCIPage.cpp \ - NodeGroupInfo.cpp \ - NodeGroup.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/rep/storage/NodeConnectInfo.hpp b/ndb/src/old_files/rep/storage/NodeConnectInfo.hpp deleted file mode 100644 index 403f92a5999..00000000000 --- a/ndb/src/old_files/rep/storage/NodeConnectInfo.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef NODE_CONNECTINFO_HPP -#define NODE_CONNECTINFO_HPP - -#include - -struct NodeConnectInfo { - NodeConnectInfo(Uint16 n, bool c): nodeId(n), connected(c) {}; - Uint32 nodeId; - bool connected; -}; - - -#endif diff --git a/ndb/src/old_files/rep/storage/NodeGroup.cpp b/ndb/src/old_files/rep/storage/NodeGroup.cpp deleted file mode 100644 index 33451efb104..00000000000 --- a/ndb/src/old_files/rep/storage/NodeGroup.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "NodeGroup.hpp" -#include - -//#define NODE_GROUP_DEBUG - -NodeGroup::NodeGroup(Uint32 nodeGrp) { - m_nodeGrp = nodeGrp; - m_primaryNode = 0; -} - -NodeGroup::~NodeGroup() { - for(Uint32 i=0; inodeId == nodeId) { - m_nodeConnectList[i]->connected = connected; - return; - } - - /** - * If node not already in node group, then add node - */ - m_nodeConnectList.push_back(new NodeConnectInfo(nodeId, connected)); - sort(); - -#ifdef NODE_GROUP_DEBUG - for(Uint32 i=0; i < m_nodeConnectList.size(); i++) - ndbout_c("NodeGroup: NodeId=%d", m_nodeConnectList[i]->nodeId); -#endif -} - -/** - * crappy sort - */ -void NodeGroup::sort() { - NodeConnectInfo * tmp; - if(m_nodeConnectList.size()<2) - return; - for(Uint32 i=0; i < m_nodeConnectList.size()-1; i++) { - for(Uint32 j=m_nodeConnectList.size()-1;j>i+1; j--) { - if(m_nodeConnectList[j]->nodeId < m_nodeConnectList[j-1]->nodeId) { - tmp=m_nodeConnectList[j]; - m_nodeConnectList[j]=m_nodeConnectList[j-1]; - m_nodeConnectList[j-1]=tmp; - } - } - } -} - -Uint32 -NodeGroup::getFirstConnectedNode() { - for(Uint32 i=0; iconnected) - return m_nodeConnectList[i]->nodeId; - } - return 0; -} - -Uint32 -NodeGroup::getNodeGrp() { - return m_nodeGrp; -} - -Vector * -NodeGroup::getNodeConnectList(){ - return &m_nodeConnectList; -} - -void -NodeGroup::setNodeConnectStatus(Uint32 nodeId, bool connected) { - for(Uint32 i=0; inodeId==nodeId) { - m_nodeConnectList[i]->connected=connected; - break; - } - } -} - -bool -NodeGroup::isConnected(Uint32 nodeId) { - for(Uint32 i=0; inodeId == nodeId) { - return m_nodeConnectList[i]->connected; - } - } - REPABORT1("Check for non-existing node to be connected", nodeId); -} - - -bool -NodeGroup::fullyConnected() { - for(Uint32 i=0; iconnected)) - return false; - } - return true; -} - -bool -NodeGroup::connectedNodeGrp() { - for(Uint32 i=0; iconnected) { - return true; - } - } - return false; -} - - -bool -NodeGroup::exists(Uint32 nodeId) { - for(Uint32 i=0;inodeId==nodeId) - return true; - } - return false; -} diff --git a/ndb/src/old_files/rep/storage/NodeGroup.hpp b/ndb/src/old_files/rep/storage/NodeGroup.hpp deleted file mode 100644 index 1f515e02a23..00000000000 --- a/ndb/src/old_files/rep/storage/NodeGroup.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef NODE_GROUP_HPP -#define NODE_GROUP_HPP - -#include "NodeConnectInfo.hpp" -#include -#include - -#include - -/** - * @class NodeGroup - * @brief Contains info about all nodes belonging to one node group - */ -class NodeGroup { -public: - NodeGroup(Uint32 nodeGrp); - ~NodeGroup(); - /** - * Add node to node group - * @param nodeId Node id of node to add - * @param connected Status of this node (true==connected) - */ - void addNode(Uint32 nodeId, bool connected); - - /** - * get first connected node in this node group - * @returns nodeId, 0 if there is no connected node... - */ - Uint32 getFirstConnectedNode(); - - /** - * get the primary node id - * @returns nodeId, the primary node id - */ - Uint32 getPrimaryNode() {return m_primaryNode;}; - - - /** - * sets a node in this nodegroup as the primary node - */ - void setPrimaryNode(Uint32 nodeId) {m_primaryNode=nodeId;}; - - - /** - * get the node group - * @returns the nodegroup number (m_nodeGrp) - */ - Uint32 getNodeGrp(); - - /** - * set the connection status for a particular node - * @param nodeId - the nodeId to set the connect status on - * @param connected - the status of this node (true==connected) - */ - void setNodeConnectStatus(Uint32 nodeId, bool connected); - - /** - * Get the connection status for a particular node - * @param nodeId - the nodeId to check the connect status on - * @returns true if node is connected, otherwise false - */ - bool isConnected(Uint32 nodeId); - - /** - * gives the status of this nodegroup. - * @returns true if atleast one node in the node group is connected - */ - bool connectedNodeGrp(); - - /** - * @returns true if ALL nodes are connected - */ - bool fullyConnected(); - - /** - * - * @returns true if node exists in nodegroup - */ - bool exists(Uint32 nodeId); - - Vector * getNodeConnectList(); - -private: - /** - * Sort list (bubble sort) - */ - void sort(); - Uint32 m_primaryNode; - Uint32 m_nodeGrp; - Vector m_nodeConnectList; -}; - -#endif diff --git a/ndb/src/old_files/rep/storage/NodeGroupInfo.cpp b/ndb/src/old_files/rep/storage/NodeGroupInfo.cpp deleted file mode 100644 index 8c250268997..00000000000 --- a/ndb/src/old_files/rep/storage/NodeGroupInfo.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "NodeGroupInfo.hpp" - -NodeGroupInfo::NodeGroupInfo() -{ -} - -NodeGroupInfo::~NodeGroupInfo() -{ - for(Uint32 i=0; isetPrimaryNode(nodeId); - } else { - /** - * could not find node group - */ - RLOG(("Node group not found")); - REPABORT("Node group not found"); - } -} - -Uint32 -NodeGroupInfo::getPrimaryNode(Uint32 nodeGrp) { - Uint32 pos; - /** - * Validation check to find out that the nodegroup really exists. - * The list is not sorted, so the index of the nodegroup is returned - * in pos. - */ - if(existsNodeGroup(nodeGrp, &pos)) { - return m_nodeGroupList[pos]->getPrimaryNode(); - } else { - /** - * could not find node group - */ - RLOG(("Node group not found")); - REPABORT("Node group not found"); - } -} - -void -NodeGroupInfo::addNodeToNodeGrp(Uint32 nodeId, bool connected, Uint32 nodeGrp) -{ - Uint32 pos; - if(existsNodeGroup(nodeGrp, &pos)) { - /** - * NG exists -> just add the node - */ - m_nodeGroupList[pos]->addNode(nodeId, connected); - - } else { - /** - * NG do not exist -> create a new nodeGrp and add the node - */ - m_nodeGroupList.push_back(new NodeGroup(nodeGrp)); - - /** - * paranoia - */ - if(existsNodeGroup(nodeGrp, &pos)) { - m_nodeGroupList[pos]->addNode(nodeId, connected); - } else { - REPABORT(""); - } - } -} - -Uint32 -NodeGroupInfo::findNodeGroup(Uint32 nodeId) -{ - /** - * Check for existance in each nodegroup - */ - for(Uint32 i=0; iexists(nodeId)) return i; - } - - REPABORT1("No node group known for node", nodeId); -} - -Uint32 -NodeGroupInfo::getFirstConnectedNode(Uint32 nodeGrp) -{ - Uint32 pos; - /** - * Validation check to find out that the nodegroup really exists. - * The list is not sorted, so the index of the nodegroup is returned - * in pos. - */ - if(existsNodeGroup(nodeGrp, &pos)) { - return m_nodeGroupList[pos]->getFirstConnectedNode(); - } else { - /** - * could not find node group - */ - REPABORT(""); - } -} - -bool -NodeGroupInfo::connectedNodeGrp(Uint32 nodeGrp) -{ - return m_nodeGroupList[nodeGrp]->connectedNodeGrp(); -} - -bool -NodeGroupInfo::isConnected(Uint32 nodeId) -{ - Uint32 nodeGrp = findNodeGroup(nodeId); - return m_nodeGroupList[nodeGrp]->isConnected(nodeId); - -} - -bool -NodeGroupInfo::fullyConnected() -{ - for(Uint32 i=0; ifullyConnected())) - return false; - } - return true; -} - - -void -NodeGroupInfo::setConnectStatus(Uint32 nodeId, bool connected) -{ - Uint32 nodeGrp = findNodeGroup(nodeId); - m_nodeGroupList[nodeGrp]->setNodeConnectStatus(nodeId,connected); -} - - -bool -NodeGroupInfo::existsNodeGroup(Uint32 nodeGrp, Uint32 * pos) -{ - for(Uint32 i=0; igetNodeGrp()==nodeGrp) { - *pos=i; - return true; - } - } - return false; -} - - -/***************************************************************************** - * Iterator - *****************************************************************************/ - -NodeGroupInfo::iterator::iterator(Uint32 nodeGrp, NodeGroupInfo * ngi) -{ - m_iterator = 0; - for(Uint32 i=0; i < ngi->m_nodeGroupList.size(); i++) { - if(ngi->m_nodeGroupList[i]->getNodeGrp()==nodeGrp) { - m_nodeList = ngi->m_nodeGroupList[i]->getNodeConnectList(); - return; - } - } - m_nodeList=0; -} - -bool -NodeGroupInfo::iterator::exists() -{ - if(m_nodeList==0) return 0; - return (m_iterator < m_nodeList->size()); -} - -NodeConnectInfo * -NodeGroupInfo::iterator::first() -{ - m_iterator=0; - if(m_nodeList==0) return 0; - if(m_nodeList->size() == 0) return 0; - return (*m_nodeList)[m_iterator]; -} - -NodeConnectInfo * -NodeGroupInfo::iterator::next() -{ - m_iterator++; - if(m_nodeList==0) return 0; - if(m_nodeList->size() == 0) return 0; - if(m_iteratorsize()) - return (*m_nodeList)[m_iterator]; - else - return 0; -} - diff --git a/ndb/src/old_files/rep/storage/NodeGroupInfo.hpp b/ndb/src/old_files/rep/storage/NodeGroupInfo.hpp deleted file mode 100644 index 3d0499d4425..00000000000 --- a/ndb/src/old_files/rep/storage/NodeGroupInfo.hpp +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef NODE_GROUPINFO_HPP -#define NODE_GROUPINFO_HPP - -#include -#include -#include -#include -//#include - -#include "NodeGroup.hpp" -#include - -/** - * @class NodeGroupInfo - * @brief Contains info about all node groups and their connectivity status - */ -class NodeGroupInfo { -public: - NodeGroupInfo(); - ~NodeGroupInfo(); - - /** - * Add a node to a nodegroup together with the status of the node - * @param nodeId - the nodeId to add - * @param connected - true/false - * @param nodeGrp - the nodegroup to add this node to - */ - void addNodeToNodeGrp(Uint32 nodeId, bool connected, Uint32 nodeGrp); - - /** - * Get the nodegroup that a node belongs to. - * @param nodeId - the nodeId to check wich nodegroup it belongs to - * @return the nodegroup - */ - Uint32 findNodeGroup(Uint32 nodeId); - - /** - * Get the first connected node in a node group - * @param nodegroup - the node group to get the node in. - * @return nodeId, 0 if there is no connected node in the nodegroup - */ - Uint32 getFirstConnectedNode(Uint32 nodeGrp); - - - /** - * sets a nodeId in a nodeGroup as the primary node. If the - * primary node fails, then a new node in the node group is chosen - * @param nodegroup - the node group to get the node in. - * @param nodeId, 0 if there is no connected node in the nodegroup - */ - void setPrimaryNode(Uint32 nodeGrp, Uint32 nodeId); - - /** - * gets the nodeId in the nodegroup of the primary node. - * @param nodegroup - the node group to get the node in. - * @return nodeId, 0 if there is no connected node in the nodegroup - */ - Uint32 getPrimaryNode(Uint32 nodeGrp); - - - /** - * Checks if at least one node in the nodegroup is connected. - * @param nodeGrp - the nodegrp to check - * @return true if >0 nodes are connected in the nodegroup - */ - bool connectedNodeGrp(Uint32 nodeGrp); - - /** - * Checks if a node is connected or not - * @param nodeId - the nodeId to check connectivity - * @return true if node is connected - */ - bool isConnected(Uint32 nodeId); - - /** - * Set if a node is connected or not - * @param nodeId - the nodeId to set the connect flag fory - * @param connected - true if connect false if disconnect - */ - void setConnectStatus(Uint32 nodeId, bool connected); - - /** - * Check if all nodes are connected in all nodegroups - * @return return true if ALL nodes are connected in ALL nodeGroups - */ - bool fullyConnected(); - - /** - * Get the number of nodegroups - * @return the number of nodegroups. - */ - Uint32 getNoOfNodeGroups() { return m_nodeGroupList.size();}; - - /** - * @class iterator - * The iterator class iterates over a nodegroup, returning nodeIds - * in that node group. - * - * @code - * NodeGroupInfo::iterator * it; - * for(Uint32 i=0;i < m_nodeGroupInfo->getNoOfNodeGroups();i++) { - * it = new NodeGroupInfo::iterator(i,m_nodeGroupInfo); - * for(NodeConnectInfo * nci=it->first(); it->exists();nci=it->next()) - * ndbout_c("Iterating: %d", nci->nodeId); - * - * } - * @end code - */ - class iterator { - public: - iterator(Uint32 nodeGrp, NodeGroupInfo * ngi); - NodeConnectInfo * first(); ///< @return nodeConnectInfo* if exists. - ///< (NULL if no more nodes exists) - NodeConnectInfo * next(); ///< @return nodeConnectInfo* if exists. - ///< (NULL if no more nodes exists) - bool exists(); ///< @return true if another nodeId exists (for next()) - private: - Uint32 m_iterator; - const Vector * m_nodeList; - }; - friend class NodeGroupInfo::iterator; - -private: - bool existsNodeGroup(Uint32 nodeGrp, Uint32 * pos); - - Vector m_nodeGroupList; -}; - -#endif diff --git a/ndb/src/old_files/rep/transfer/Makefile b/ndb/src/old_files/rep/transfer/Makefile deleted file mode 100644 index 0d8851e287a..00000000000 --- a/ndb/src/old_files/rep/transfer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapi repserver kernel - -ARCHIVE_TARGET := reptransfer - -SOURCES = TransPS.cpp \ - TransSS.cpp \ - TransSSSubscriptions.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/old_files/rep/transfer/TransPS.cpp b/ndb/src/old_files/rep/transfer/TransPS.cpp deleted file mode 100644 index 11fb0203cbc..00000000000 --- a/ndb/src/old_files/rep/transfer/TransPS.cpp +++ /dev/null @@ -1,553 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include "ConfigRetriever.hpp" -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include "TransPS.hpp" -#include - -/***************************************************************************** - * Constructor / Destructor / Init - *****************************************************************************/ -TransPS::TransPS(GCIContainerPS* gciContainer) -{ - m_repSender = new ExtSender(); - m_gciContainerPS = gciContainer; -} - -TransPS::~TransPS() -{ - delete m_repSender; -} - -void -TransPS::init(TransporterFacade * tf, const char * connectString) -{ - abort(); -#ifdef NOT_FUNCTIONAL - m_signalExecThread = NdbThread_Create(signalExecThread_C, - (void **)this, - 32768, - "TransPS_Service", - NDB_THREAD_PRIO_LOW); - - ConfigRetriever configRetriever; - // configRetriever.setConnectString(connectString); - Properties* config = configRetriever.getConfig("REP", REP_VERSION_ID); - if (config == 0) { - ndbout << "TransPS: Configuration error: "; - const char* erString = configRetriever.getErrorString(); - if (erString == 0) { - erString = "No error specified!"; - } - ndbout << erString << endl; - exit(-1); - } - - Properties * extConfig; - /** - * @todo Hardcoded primary system name - */ - if (!config->getCopy("EXTERNAL SYSTEM_External", &extConfig)) { - ndbout << "External System \"External\" not found in configuration. " - << "Check config.ini." << endl; - config->print(); - exit(-1); - } - - m_ownNodeId = configRetriever.getOwnNodeId(); - extConfig->put("LocalNodeId", m_ownNodeId); - extConfig->put("LocalNodeType", "REP"); - Uint32 noOfConnections; - extConfig->get("NoOfConnections", &noOfConnections); - /* if (noOfConnections != 1) { - ndbout << "TransPS: There are " << noOfConnections << " connections " - << "defined in configuration" - << endl - << " There should be exactly one!" << endl; - exit(-1); - } - */ - /****************************** - * Set node id of external REP - ******************************/ - const Properties * connection; - const char * extSystem; - Uint32 extRepNodeId, tmpOwnNodeId; - - for(Uint32 i=0; i < noOfConnections; i++) { - extConfig->get("Connection", i, &connection); - if(connection == 0) REPABORT("No connection found"); - - if(connection->get("System1", &extSystem)) { - connection->get("NodeId1", &extRepNodeId); - connection->get("NodeId2", &tmpOwnNodeId); - } else { - connection->get("System2", &extSystem); - connection->get("NodeId1", &tmpOwnNodeId); - connection->get("NodeId2", &extRepNodeId); - } - if(m_ownNodeId == tmpOwnNodeId) - break; - } - - if(extRepNodeId==0) REPABORT("External replication server not found"); - if(extSystem==0) REPABORT("External system not found"); - - m_ownBlockNo = tf->open(this, execSignal, execNodeStatus); - assert(m_ownBlockNo > 0); - - m_ownRef = numberToRef(m_ownBlockNo, m_ownNodeId); - assert(m_ownNodeId == tf->ownId()); - - ndbout_c("Phase 4 (TransPS): Connection %d to external REP node %d opened", - m_ownBlockNo, extRepNodeId); - - m_repSender->setNodeId(extRepNodeId); - m_repSender->setOwnRef(m_ownRef); - m_repSender->setTransporterFacade(tf); -#endif -} - -/***************************************************************************** - * Signal Queue Executor - *****************************************************************************/ - -class SigMatch -{ -public: - int gsn; - void (TransPS::* function)(NdbApiSignal *signal); - - SigMatch() { gsn = 0; function = NULL; }; - - SigMatch(int _gsn, void (TransPS::* _function)(NdbApiSignal *signal)) { - gsn = _gsn; - function = _function; - }; - - bool check(NdbApiSignal *signal) { - if(signal->readSignalNumber() == gsn) return true; - return false; - }; -}; - -extern "C" -void * -signalExecThread_C(void *r) -{ - TransPS *repps = (TransPS*)r; - - repps->signalExecThreadRun(); - - NdbThread_Exit(0); - /* NOTREACHED */ - return 0; -} - -void -TransPS::signalExecThreadRun() -{ - Vector sl; - - /** - * Signals executed here - */ - sl.push_back(SigMatch(GSN_REP_GET_GCI_REQ, - &TransPS::execREP_GET_GCI_REQ)); - sl.push_back(SigMatch(GSN_REP_GET_GCIBUFFER_REQ, - &TransPS::execREP_GET_GCIBUFFER_REQ)); - sl.push_back(SigMatch(GSN_REP_CLEAR_PS_GCIBUFFER_REQ, - &TransPS::execREP_CLEAR_PS_GCIBUFFER_REQ)); - - /** - * Signals to be forwarded to GREP::PSCoord - */ - sl.push_back(SigMatch(GSN_GREP_SUB_CREATE_REQ, &TransPS::sendSignalGrep)); - - /** - * Signals to be forwarded to GREP::PSCoord - */ - sl.push_back(SigMatch(GSN_GREP_CREATE_SUBID_REQ, &TransPS::sendSignalGrep)); - sl.push_back(SigMatch(GSN_GREP_SUB_START_REQ, &TransPS::sendSignalGrep)); - sl.push_back(SigMatch(GSN_GREP_SUB_SYNC_REQ, &TransPS::sendSignalGrep)); - sl.push_back(SigMatch(GSN_GREP_SUB_REMOVE_REQ, &TransPS::sendSignalGrep)); - - while(1) { - SigMatch *handler = NULL; - NdbApiSignal *signal = NULL; - if(m_signalRecvQueue.waitFor(sl, handler, signal, DEFAULT_TIMEOUT)) { -#if 0 - ndbout_c("TransPS: Removed signal from queue (GSN: %d, QSize: %d)", - signal->readSignalNumber(), m_signalRecvQueue.size()); -#endif - if(handler->function != 0) { - (this->*handler->function)(signal); - delete signal; - signal = 0; - } else { - REPABORT("Illegal handler for signal"); - } - } - } -} - -void -TransPS::sendSignalRep(NdbApiSignal * s) -{ - m_repSender->sendSignal(s); -} - -void -TransPS::sendSignalGrep(NdbApiSignal * s) -{ - m_grepSender->sendSignal(s); -} - -void -TransPS::sendFragmentedSignalRep(NdbApiSignal * s, - LinearSectionPtr ptr[3], - Uint32 sections) -{ - m_repSender->sendFragmentedSignal(s, ptr, sections); -} - -void -TransPS::sendFragmentedSignalGrep(NdbApiSignal * s, - LinearSectionPtr ptr[3], - Uint32 sections) -{ - m_grepSender->sendFragmentedSignal(s, ptr, sections); -} - - -void -TransPS::execNodeStatus(void* obj, Uint16 nodeId, bool alive, bool nfCompleted) -{ -// TransPS * thisObj = (TransPS*)obj; - - RLOG(("Node changed state (NodeId %d, Alive %d, nfCompleted %d)", - nodeId, alive, nfCompleted)); - - if(!alive && !nfCompleted) { } - - if(!alive && nfCompleted) { } -} - -void -TransPS::execSignal(void* executeObj, NdbApiSignal* signal, - class LinearSectionPtr ptr[3]){ - - TransPS * executor = (TransPS *) executeObj; - - const Uint32 gsn = signal->readSignalNumber(); - const Uint32 len = signal->getLength(); - - NdbApiSignal * s = new NdbApiSignal(executor->m_ownRef); - switch(gsn){ - case GSN_REP_GET_GCI_REQ: - case GSN_REP_GET_GCIBUFFER_REQ: - case GSN_REP_CLEAR_PS_GCIBUFFER_REQ: - s->set(0, SSREPBLOCKNO, gsn, len); - memcpy(s->getDataPtrSend(), signal->getDataPtr(), 4 * len); - executor->m_signalRecvQueue.receive(s); - break; - case GSN_GREP_SUB_CREATE_REQ: - { - if(signal->m_noOfSections > 0) { - memcpy(s->getDataPtrSend(), signal->getDataPtr(), 4 * len); - s->set(0, GREP, gsn, - len); - executor->sendFragmentedSignalGrep(s,ptr,1); - delete s; - } else { - s->set(0, GREP, gsn, len); - memcpy(s->getDataPtrSend(), signal->getDataPtr(), 4 * len); - executor->m_signalRecvQueue.receive(s); - } - } - break; - case GSN_GREP_SUB_START_REQ: - case GSN_GREP_SUB_SYNC_REQ: - case GSN_GREP_SUB_REMOVE_REQ: - case GSN_GREP_CREATE_SUBID_REQ: - s->set(0, GREP, gsn, len); - memcpy(s->getDataPtrSend(), signal->getDataPtr(), 4 * len); - executor->m_signalRecvQueue.receive(s); - break; - default: - REPABORT1("Illegal signal received in execSignal", gsn); - } -#if 0 - ndbout_c("TransPS: Inserted signal into queue (GSN: %d, Len: %d)", - signal->readSignalNumber(), len); -#endif -} - -/***************************************************************************** - * Signal Receivers - *****************************************************************************/ - -void -TransPS::execREP_GET_GCIBUFFER_REQ(NdbApiSignal* signal) -{ - RepGetGciBufferReq * req = (RepGetGciBufferReq*)signal->getDataPtr(); - Uint32 firstGCI = req->firstGCI; - Uint32 lastGCI = req->lastGCI; - Uint32 nodeGrp = req->nodeGrp; - - RLOG(("Received request for %d:[%d-%d]", nodeGrp, firstGCI, lastGCI)); - - NodeGroupInfo * tmp = m_gciContainerPS->getNodeGroupInfo(); - Uint32 nodeId = tmp->getPrimaryNode(nodeGrp); - /** - * If there is no connected node in the nodegroup -> abort. - * @todo: Handle error when a nodegroup is "dead" - */ - if(!nodeId) { - RLOG(("There are no connected nodes in node group %d", nodeGrp)); - sendREP_GET_GCIBUFFER_REF(signal, firstGCI, lastGCI, nodeGrp, - GrepError::REP_NO_CONNECTED_NODES); - return; - } - - transferPages(firstGCI, lastGCI, nodeId, nodeGrp, signal); - - /** - * Done tfxing pages, sending GCIBuffer conf. - */ - Uint32 first, last; - m_gciContainerPS->getAvailableGCIBuffers(nodeGrp, &first, &last); - - RepGetGciBufferConf * conf = (RepGetGciBufferConf*)req; - conf->senderRef = m_ownRef; - conf->firstPSGCI = first; // Buffers found on REP PS (piggy-back info) - conf->lastPSGCI = last; - conf->firstSSGCI = firstGCI; // Now been transferred to REP SS - conf->lastSSGCI = lastGCI; - conf->nodeGrp = nodeGrp; - signal->set(0, SSREPBLOCKNO, GSN_REP_GET_GCIBUFFER_CONF, - RepGetGciBufferConf::SignalLength); - sendSignalRep(signal); - - RLOG(("Sent %d:[%d-%d] (Stored PS:%d:[%d-%d])", - nodeGrp, firstGCI, lastGCI, nodeGrp, first, last)); -} - -void -TransPS::transferPages(Uint32 firstGCI, Uint32 lastGCI, - Uint32 nodeId, Uint32 nodeGrp, - NdbApiSignal * signal) -{ - /** - * Transfer pages in GCI Buffer to SS - * When buffer is sent, send accounting information. - */ - RepDataPage * pageData = (RepDataPage*)signal->getDataPtr(); - LinearSectionPtr ptr[1]; - GCIPage * page; - for(Uint32 i=firstGCI; i<=lastGCI; i++) { - Uint32 totalSizeSent = 0; - GCIBuffer * buffer = m_gciContainerPS->getGCIBuffer(i, nodeId); - - if(buffer != 0) { - GCIBuffer::iterator it(buffer); - /** - * Send all pages to SS - */ - for (page = it.first(); page != 0; page = it.next()) { - ptr[0].p = page->getStoragePtr(); - ptr[0].sz = page->getStorageWordSize(); - totalSizeSent += ptr[0].sz; - pageData->gci = i; - pageData->nodeGrp = nodeGrp; - signal->set(0, SSREPBLOCKNO, GSN_REP_DATA_PAGE, - RepDataPage::SignalLength); - sendFragmentedSignalRep(signal, ptr, 1); - } - - /** - * Send accounting information to SS - */ - RepGciBufferAccRep * rep = (RepGciBufferAccRep *)pageData; - rep->gci = i; - rep->nodeGrp = nodeGrp; - rep->totalSentBytes = (4 * totalSizeSent); //words to bytes - signal->set(0, SSREPBLOCKNO, GSN_REP_GCIBUFFER_ACC_REP, - RepGciBufferAccRep::SignalLength); - sendSignalRep(signal); - - RLOG(("Sending %d:[%d] (%d bytes) to external REP (nodeId %d)", - nodeGrp, i, 4*totalSizeSent, nodeId)); - } - } - page = 0; -} - -void -TransPS::execREP_GET_GCI_REQ(NdbApiSignal* signal) -{ - RepGetGciReq * req = (RepGetGciReq*)signal->getDataPtr(); - Uint32 nodeGrp = req->nodeGrp; - - Uint32 first, last; - m_gciContainerPS->getAvailableGCIBuffers(nodeGrp, &first, &last); - - RepGetGciConf * conf = (RepGetGciConf*) req; - conf->firstPSGCI = first; - conf->lastPSGCI = last; - conf->senderRef = m_ownRef; - conf->nodeGrp = nodeGrp; - signal->set(0, SSREPBLOCKNO, GSN_REP_GET_GCI_CONF, - RepGetGciConf::SignalLength); - sendSignalRep(signal); -} - -/** - * REP_CLEAR_PS_GCIBUFFER_REQ - * destroy the GCI buffer in the GCI Container - * and send a CONF to Grep::SSCoord - */ -void -TransPS::execREP_CLEAR_PS_GCIBUFFER_REQ(NdbApiSignal * signal) -{ - RepClearPSGciBufferReq * const req = - (RepClearPSGciBufferReq*)signal->getDataPtr(); - Uint32 firstGCI = req->firstGCI; - Uint32 lastGCI = req->lastGCI; - Uint32 nodeGrp = req->nodeGrp; - - assert(firstGCI >= 0 && lastGCI > 0); - if(firstGCI<0 && lastGCI <= 0) - { - RLOG(("WARNING! Illegal delete request ignored")); - sendREP_CLEAR_PS_GCIBUFFER_REF(signal, firstGCI, lastGCI, - 0, nodeGrp, - GrepError::REP_DELETE_NEGATIVE_EPOCH); - } - - if(firstGCI==0 && lastGCI==(Uint32)0xFFFF) { - m_gciContainerPS->getAvailableGCIBuffers(nodeGrp, &firstGCI, &lastGCI); - RLOG(("Deleting PS:[%d-%d]", firstGCI, lastGCI)); - } - - if(firstGCI == 0) { - Uint32 f, l; - m_gciContainerPS->getAvailableGCIBuffers(nodeGrp, &f, &l); - - RLOG(("Deleting PS:[%d-%d]", f, l)); - - if(f>firstGCI) - firstGCI = f; - } - - /** - * Delete buffer - * Abort if we try to destroy a buffer that does not exist - * Deleting buffer from every node in the nodegroup - */ - for(Uint32 i=firstGCI; i<=lastGCI; i++) { - if(!m_gciContainerPS->destroyGCIBuffer(i, nodeGrp)) { - sendREP_CLEAR_PS_GCIBUFFER_REF(signal, firstGCI, lastGCI, i, nodeGrp, - GrepError::REP_DELETE_NONEXISTING_EPOCH); - return; - } - - RLOG(("Deleted PS:%d:[%d]", nodeGrp, i)); - } - - /** - * Send reply to Grep::SSCoord - */ - RepClearPSGciBufferConf * conf = (RepClearPSGciBufferConf*)req; - conf->firstGCI = firstGCI; - conf->lastGCI = lastGCI; - conf->nodeGrp = nodeGrp; - signal->set(0, SSREPBLOCKNO, GSN_REP_CLEAR_PS_GCIBUFFER_CONF, - RepClearPSGciBufferConf::SignalLength); - sendSignalRep(signal); -} - -/***************************************************************************** - * Signal Senders - *****************************************************************************/ - -void -TransPS::sendREP_GET_GCI_REF(NdbApiSignal* signal, - Uint32 nodeGrp, - Uint32 firstPSGCI, Uint32 lastPSGCI, - GrepError::Code err) -{ - RepGetGciRef * ref = (RepGetGciRef *)signal->getDataPtrSend(); - ref->firstPSGCI = firstPSGCI; - ref->lastPSGCI = lastPSGCI; - ref->firstSSGCI = 0; - ref->lastSSGCI = 0; - ref->nodeGrp = nodeGrp; - ref->err = err; - signal->set(0, SSREPBLOCKNO, GSN_REP_GET_GCI_REF, - RepGetGciRef::SignalLength); - sendSignalRep(signal); -} - -void -TransPS::sendREP_CLEAR_PS_GCIBUFFER_REF(NdbApiSignal* signal, - Uint32 firstGCI, Uint32 lastGCI, - Uint32 currentGCI, - Uint32 nodeGrp, - GrepError::Code err) -{ - RepClearPSGciBufferRef * ref = - (RepClearPSGciBufferRef *)signal->getDataPtrSend(); - ref->firstGCI = firstGCI; - ref->lastGCI = lastGCI; - ref->currentGCI = currentGCI; - ref->nodeGrp = nodeGrp; - ref->err = err; - signal->set(0, SSREPBLOCKNO, GSN_REP_CLEAR_PS_GCIBUFFER_REF, - RepClearPSGciBufferRef::SignalLength); - sendSignalRep(signal); -} - -void -TransPS::sendREP_GET_GCIBUFFER_REF(NdbApiSignal* signal, - Uint32 firstGCI, Uint32 lastGCI, - Uint32 nodeGrp, - GrepError::Code err) -{ - RepGetGciBufferRef * ref = - (RepGetGciBufferRef *)signal->getDataPtrSend(); - ref->firstPSGCI = firstGCI; - ref->lastPSGCI = lastGCI; - ref->firstSSGCI = 0; - ref->lastSSGCI = 0; - ref->nodeGrp = nodeGrp; - ref->err = err; - signal->set(0, SSREPBLOCKNO, GSN_REP_GET_GCIBUFFER_REF, - RepGetGciBufferRef::SignalLength); - sendSignalRep(signal); -} diff --git a/ndb/src/old_files/rep/transfer/TransPS.hpp b/ndb/src/old_files/rep/transfer/TransPS.hpp deleted file mode 100644 index 0464b9e47c0..00000000000 --- a/ndb/src/old_files/rep/transfer/TransPS.hpp +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef TransPS_HPP -#define TransPS_HPP - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include - -#include -#include - -#include - -extern "C" { -static void * signalExecThread_C(void *); -} - -/** - * @class TransPS - * @brief Responsible for REP-REP interface in Primary System role - */ -class TransPS { -public: - /*************************************************************************** - * Constructor / Destructor - ***************************************************************************/ - TransPS(GCIContainerPS * gciContainer); - ~TransPS(); - - void init(TransporterFacade * tf, const char * connectString = NULL); - - /*************************************************************************** - * Public Methods - ***************************************************************************/ - ExtSender * getRepSender() { return m_repSender; }; - void setGrepSender(ExtSender * es) { m_grepSender = es; }; - -private: - /*************************************************************************** - * Private Methods - ***************************************************************************/ - /** - * SignalQueue executor thread - */ - - friend void * signalExecThread_C(void *); - - void signalExecThreadRun(); - - static void execSignal(void* signalSender, NdbApiSignal* signal, - class LinearSectionPtr ptr[3]); - - static void execNodeStatus(void* signalSender, NodeId, - bool alive, bool nfCompleted); - - void sendSignalRep(NdbApiSignal * s); - void sendSignalGrep(NdbApiSignal * s); - - void sendFragmentedSignalRep(NdbApiSignal * s, LinearSectionPtr ptr[3], - Uint32 sections ); - void sendFragmentedSignalGrep(NdbApiSignal * s, LinearSectionPtr ptr[3], - Uint32 sections ); - - /*************************************************************************** - * Signal executors - ***************************************************************************/ - void execREP_CLEAR_PS_GCIBUFFER_REQ(NdbApiSignal*); - void execREP_GET_GCI_REQ(NdbApiSignal*); - void execREP_GET_GCIBUFFER_REQ(NdbApiSignal*); - - /*************************************************************************** - * Ref signal senders - ***************************************************************************/ - void sendREP_GET_GCI_REF(NdbApiSignal* signal, Uint32 nodeGrp, - Uint32 firstPSGCI, Uint32 lastPSGCI, - GrepError::Code err); - - void sendREP_CLEAR_PS_GCIBUFFER_REF(NdbApiSignal* signal, - Uint32 firstGCI, Uint32 lastGCI, - Uint32 currentGCI, Uint32 nodeGrp, - GrepError::Code err); - - void sendREP_GET_GCIBUFFER_REF(NdbApiSignal* signal, - Uint32 firstGCI, Uint32 lastGCI, - Uint32 nodeGrp, - GrepError::Code err); - - /*************************************************************************** - * Other Methods - ***************************************************************************/ - void transferPages(Uint32 firstGCI, Uint32 lastGCI, Uint32 id, - Uint32 nodeGrp, NdbApiSignal* signal); - - /************* - * Variables - *************/ - Uint32 m_ownNodeId; ///< NodeId of this node - Uint32 m_ownBlockNo; ///< BlockNo of this "block" - BlockReference m_ownRef; ///< Reference to this - - BlockReference m_extRepRef; ///< Node ref of REP at SS - - ExtSender * m_grepSender; ///< Responsible send to GREP - ExtSender * m_repSender; ///< Responsible send to REP - - struct NdbThread * m_signalExecThread; - class SignalQueue m_signalRecvQueue; - - GCIContainerPS * m_gciContainerPS; ///< Ref to gci container. -}; - -#endif diff --git a/ndb/src/old_files/rep/transfer/TransSS.cpp b/ndb/src/old_files/rep/transfer/TransSS.cpp deleted file mode 100644 index 376c6375bc4..00000000000 --- a/ndb/src/old_files/rep/transfer/TransSS.cpp +++ /dev/null @@ -1,653 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include "ConfigRetriever.hpp" - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include "TransSS.hpp" - -//#define DEBUG_REP_GET_GCI_CONF - -/***************************************************************************** - * Constructor / Destructor / Init - *****************************************************************************/ -TransSS::TransSS(GCIContainer * gciContainer, RepState * repState) -{ - m_repSender = new ExtSender(); - if (!m_repSender) REPABORT("Could not allocate new ExtSender"); - m_gciContainer = gciContainer; - m_repState = repState; -} - -TransSS::~TransSS() -{ - delete m_repSender; -} - -void -TransSS::init(const char * connectString) -{ - abort(); -#ifdef NOT_FUNCTIONAL - m_signalExecThread = NdbThread_Create(signalExecThread_C, - (void **)this, - 32768, - "TransSS_Service", - NDB_THREAD_PRIO_LOW); - ConfigRetriever configRetriever; - configRetriever.setConnectString(connectString); - - Properties* config = configRetriever.getConfig("REP", REP_VERSION_ID); - if (config == 0) { - ndbout << "Configuration error: "; - const char* erString = configRetriever.getErrorString(); - if (erString == 0) { - erString = "No error specified!"; - } - ndbout << erString << endl; - exit(-1); - } - Properties * extConfig; - - /** - * @todo Hardcoded standby system name - */ - if (!config->getCopy("EXTERNAL SYSTEM_External", &extConfig)) { - ndbout << "External System \"External\" not found in configuration. " - << "Check config.ini." << endl; - config->print(); - exit(-1); - } - m_ownNodeId = configRetriever.getOwnNodeId(); - extConfig->put("LocalNodeId", m_ownNodeId); - extConfig->put("LocalNodeType", "REP"); - Uint32 noOfConnections; - extConfig->get("NoOfConnections", &noOfConnections); - /* if (noOfConnections != 1) { - ndbout << "TransSS: There are " << noOfConnections << " connections " - << "defined in configuration" - << endl - << " There should be exactly one!" << endl; - exit(-1); - }*/ - - /****************************** - * Set node id of external REP - ******************************/ - const Properties * connection; - const char * extSystem; - - Uint32 extRepNodeId, tmpOwnNodeId; - - for(Uint32 i=0; i < noOfConnections; i++) { - extConfig->get("Connection", i, &connection); - if(connection == 0) REPABORT("Connection not found"); - - if(connection->get("System1", &extSystem)) { - connection->get("NodeId1", &extRepNodeId); - connection->get("NodeId2", &tmpOwnNodeId); - } else { - connection->get("System2", &extSystem); - connection->get("NodeId1", &tmpOwnNodeId); - connection->get("NodeId2", &extRepNodeId); - } - if(m_ownNodeId == tmpOwnNodeId) - break; - } - - if(extRepNodeId==0) REPABORT("External replication server not found"); - if(extSystem==0) REPABORT("External system not found"); - - m_transporterFacade = new TransporterFacade(); - if (!m_transporterFacade->init(extConfig)) - { - ndbout << "TransSS: Failed to initialize transporter facade" << endl; - exit(-1); - } - - m_ownBlockNo = m_transporterFacade->open(this, execSignal, execNodeStatus); - assert(m_ownBlockNo > 0); - m_ownRef = numberToRef(m_ownBlockNo, m_ownNodeId); - assert(m_ownNodeId == m_transporterFacade->ownId()); - - ndbout_c("Phase 2 (TransSS): Connection %d to external REP node %d opened", - m_ownBlockNo, extRepNodeId); - - m_repSender->setNodeId(extRepNodeId); - m_repSender->setOwnRef(m_ownRef); - m_repSender->setTransporterFacade(m_transporterFacade); -#endif -} - -/***************************************************************************** - * Signal Queue Executor - *****************************************************************************/ - -class SigMatch -{ -public: - int gsn; - void (TransSS::* function)(NdbApiSignal *signal); - - SigMatch() { gsn = 0; function = NULL; }; - - SigMatch(int _gsn, void (TransSS::* _function)(NdbApiSignal *signal)) { - gsn = _gsn; - function = _function; - }; - - bool check(NdbApiSignal *signal) { - if(signal->readSignalNumber() == gsn) - return true; - return false; - }; -}; - -extern "C" -void * -signalExecThread_C(void *r) -{ - TransSS *transss = (TransSS*)r; - - transss->signalExecThreadRun(); - NdbThread_Exit(0); - /* NOTREACHED */ - return 0; -} - -void -TransSS::signalExecThreadRun() -{ - Vector sl; - /** - * Signals to be forwarded to TransPS - */ - sl.push_back(SigMatch(GSN_REP_GET_GCI_REQ, - &TransSS::sendSignalRep)); - sl.push_back(SigMatch(GSN_REP_GET_GCIBUFFER_REQ, - &TransSS::sendSignalRep)); - /** - * Signals to be executed - */ - sl.push_back(SigMatch(GSN_REP_GCIBUFFER_ACC_REP, - &TransSS::execREP_GCIBUFFER_ACC_REP)); - sl.push_back(SigMatch(GSN_REP_DISCONNECT_REP, - &TransSS::execREP_DISCONNECT_REP)); - sl.push_back(SigMatch(GSN_GREP_SUB_REMOVE_CONF, - &TransSS::execGREP_SUB_REMOVE_CONF)); - sl.push_back(SigMatch(GSN_REP_GET_GCIBUFFER_CONF, - &TransSS::execREP_GET_GCIBUFFER_CONF)); - - sl.push_back(SigMatch(GSN_REP_CLEAR_PS_GCIBUFFER_CONF, - &TransSS::execREP_CLEAR_PS_GCIBUFFER_CONF)); - sl.push_back(SigMatch(GSN_GREP_SUB_SYNC_CONF, - &TransSS::execGREP_SUB_SYNC_CONF)); - sl.push_back(SigMatch(GSN_GREP_SUB_SYNC_REF, - &TransSS::execGREP_SUB_SYNC_REF)); - sl.push_back(SigMatch(GSN_REP_GET_GCIBUFFER_REF, - &TransSS::execREP_GET_GCIBUFFER_REF)); - - /** - * Signals to be executed : Subscriptions - */ - sl.push_back(SigMatch(GSN_GREP_CREATE_SUBID_CONF, - &TransSS::execGREP_CREATE_SUBID_CONF)); - sl.push_back(SigMatch(GSN_GREP_CREATE_SUBID_REF, - &TransSS::execGREP_CREATE_SUBID_REF)); - sl.push_back(SigMatch(GSN_GREP_SUB_CREATE_CONF, - &TransSS::execGREP_SUB_CREATE_CONF)); - sl.push_back(SigMatch(GSN_GREP_SUB_CREATE_REF, - &TransSS::execGREP_SUB_CREATE_REF)); - sl.push_back(SigMatch(GSN_GREP_SUB_START_CONF, - &TransSS::execGREP_SUB_START_CONF)); - sl.push_back(SigMatch(GSN_GREP_SUB_START_REF, - &TransSS::execGREP_SUB_START_REF)); - - /** - * Signals to be executed and forwarded - */ - sl.push_back(SigMatch(GSN_REP_GET_GCI_CONF, - &TransSS::execREP_GET_GCI_CONF)); - - /** - * Signals to be forwarded - */ - sl.push_back(SigMatch(GSN_GREP_SUB_REMOVE_REF, - &TransSS::execGREP_SUB_REMOVE_REF)); - sl.push_back(SigMatch(GSN_REP_CLEAR_PS_GCIBUFFER_REF, - &TransSS::execREP_CLEAR_PS_GCIBUFFER_REF)); - sl.push_back(SigMatch(GSN_REP_GET_GCI_REF, - &TransSS::execREP_GET_GCI_REF)); - - while(1) { - SigMatch *handler = NULL; - NdbApiSignal *signal = NULL; - if(m_signalRecvQueue.waitFor(sl, handler, signal, DEFAULT_TIMEOUT)) - { -#if 0 - ndbout_c("TransSS: Removed signal from queue (GSN: %d, QSize: %d)", - signal->readSignalNumber(), m_signalRecvQueue.size()); -#endif - if(handler->function != 0) - { - (this->*handler->function)(signal); - delete signal; - signal = 0; - } else { - REPABORT("Illegal handler for signal"); - } - } - } -} - -void -TransSS::sendSignalRep(NdbApiSignal * s) -{ - m_repSender->sendSignal(s); -} - -void -TransSS::execNodeStatus(void* obj, Uint16 nodeId, - bool alive, bool nfCompleted) -{ - TransSS * thisObj = (TransSS*)obj; - - if (alive) { - thisObj->m_repState->eventNodeConnected(nodeId); - - } else if (!nfCompleted) { - thisObj->m_repState->eventNodeDisconnected(nodeId); - - } else if (nfCompleted) { - thisObj->m_repState->eventNodeConnectable(nodeId); - - } else { - REPABORT("Illegal state for execNodeStatus"); - } -} - -void -TransSS::execSignal(void* executorObj, NdbApiSignal* signal, - class LinearSectionPtr ptr[3]) -{ - TransSS * executor = (TransSS *) executorObj; - - const Uint32 gsn = signal->readSignalNumber(); - const Uint32 len = signal->getLength(); - - NdbApiSignal * s = new NdbApiSignal(executor->m_ownRef); - switch (gsn) { - case GSN_REP_GET_GCI_REQ: - case GSN_REP_GET_GCIBUFFER_REQ: - case GSN_REP_GET_GCIBUFFER_CONF: - case GSN_GREP_SUB_REMOVE_CONF: - case GSN_REP_DISCONNECT_REP: - case GSN_REP_GCIBUFFER_ACC_REP: - s->set(0, PSREPBLOCKNO, gsn, len); - memcpy(s->getDataPtrSend(), signal->getDataPtr(), 4 * len); - executor->m_signalRecvQueue.receive(s); - break; - case GSN_GREP_CREATE_SUBID_CONF: - case GSN_GREP_SUB_CREATE_CONF: - case GSN_GREP_SUB_START_CONF: - case GSN_GREP_SUB_SYNC_CONF: - case GSN_REP_GET_GCI_CONF: - case GSN_REP_CLEAR_PS_GCIBUFFER_CONF: - case GSN_GREP_CREATE_SUBID_REF: - case GSN_GREP_SUB_CREATE_REF: - case GSN_GREP_SUB_START_REF: - case GSN_GREP_SUB_SYNC_REF: - case GSN_GREP_SUB_REMOVE_REF: - case GSN_REP_GET_GCI_REF: - case GSN_REP_GET_GCIBUFFER_REF: - case GSN_REP_CLEAR_PS_GCIBUFFER_REF: - s->set(0, GREP, gsn, len); - memcpy(s->getDataPtrSend(), signal->getDataPtr(), 4 * len); - executor->m_signalRecvQueue.receive(s); - break; - case GSN_REP_DATA_PAGE: - executor->execREP_DATA_PAGE(signal, ptr); - delete s; s = 0; - break; - default: - REPABORT1("Illegal signal received in execSignal %d", gsn); - } - -#if 0 - ndbout_c("TransSS: Inserted signal into queue (GSN: %d, Len: %d)", - signal->readSignalNumber(), len); -#endif -} - -/***************************************************************************** - * Signal Executors - *****************************************************************************/ - -void -TransSS::execREP_DATA_PAGE(NdbApiSignal * signal, LinearSectionPtr ptr[3]) -{ - RepDataPage * const page = (RepDataPage*)signal->getDataPtr(); - m_gciContainer->insertPage(page->gci, page->nodeGrp, - (char*)(ptr[0].p), 4 * ptr[0].sz); -} - -/** - * Recd from TransPS - */ -void -TransSS::execREP_GCIBUFFER_ACC_REP(NdbApiSignal * signal) -{ - RepGciBufferAccRep * const rep = - (RepGciBufferAccRep * )signal->getDataPtr(); - - Uint32 gci = rep->gci; - Uint32 nodeGrp = rep->nodeGrp; - Uint32 totalSize = rep->totalSentBytes; - GCIBuffer * buffer = m_gciContainer->getGCIBuffer(gci, nodeGrp); - Uint32 getReceivedBytes = 0; - if (buffer != 0) - getReceivedBytes = buffer->getReceivedBytes(); - - RLOG(("TransSS: Received %d:[%d] (%d of %d bytes)", - nodeGrp, gci, getReceivedBytes, totalSize)); - - if(getReceivedBytes != totalSize) { - REPABORT("Did not receive correct number of bytes"); - } -} - -/** - * Received from primary system - */ -void -TransSS::execREP_GET_GCIBUFFER_CONF(NdbApiSignal * signal) -{ - RepGetGciBufferConf * conf = (RepGetGciBufferConf*)signal->getDataPtr(); - conf->senderRef = m_ownRef; - Uint32 first = conf->firstSSGCI; - Uint32 last = conf->lastSSGCI; - for(Uint32 i = first; i <= last; i++) { - m_gciContainer->setCompleted(i, conf->nodeGrp); - } - - /** - * Buffers @ PS - */ - Interval ps(conf->firstPSGCI, conf->lastPSGCI); - m_repState->add(Channel::PS, conf->nodeGrp, ps); - - /** - * Buffers @ SS - */ - Uint32 ssfirst, sslast; - m_gciContainer->getAvailableGCIBuffers(conf->nodeGrp, &ssfirst, &sslast); - Interval ss(ssfirst, sslast); - m_repState->clear(Channel::SS, conf->nodeGrp, universeInterval); - m_repState->add(Channel::SS, conf->nodeGrp, ss); - m_repState->clear(Channel::SSReq, conf->nodeGrp, ss); - - RLOG(("Transfered epochs (PS:%d[%d-%d], SS:%d[%d-%d])", - conf->nodeGrp, conf->firstPSGCI, conf->lastPSGCI, - conf->nodeGrp, conf->firstSSGCI, conf->lastSSGCI)); -} - -/** - * Received from primary system - */ -void -TransSS::execGREP_SUB_REMOVE_CONF(NdbApiSignal * signal) -{ - GrepSubRemoveConf * conf = (GrepSubRemoveConf* )signal->getDataPtr(); - Uint32 subId = conf->subscriptionId; - Uint32 subKey = conf->subscriptionKey; - - /** - * @todo Fix this sending - */ -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionInfo; - signal->theData[1] = GrepEvent::GrepSS_SubRemoveConf; - signal->theData[2] = subId; - signal->theData[3] = subKey; - sendSignal(CMVMI_REF,GSN_EVENT_REP,signal, 4, JBB); -#endif - - m_repState->eventSubscriptionDeleted(subId, subKey); - RLOG(("Subscription deleted (SubId: %d, SubKey: %d)", subId, subKey)); -} - -void -TransSS::execGREP_SUB_REMOVE_REF(NdbApiSignal * signal) -{ - GrepSubRemoveRef * ref = (GrepSubRemoveRef* )signal->getDataPtr(); - Uint32 subId = ref->subscriptionId; - Uint32 subKey = ref->subscriptionKey; - - /** @todo: Add repevent for this */ - RLOG(("TransSS: Warning: Grep sub remove ref (SubId: %d, SubKey: %d)", - subId, subKey)); -} - -/** - * Received from primary system - */ -void -TransSS::execREP_GET_GCI_CONF(NdbApiSignal * signal) -{ - RepGetGciConf * conf = (RepGetGciConf*)signal->getDataPtr(); - Uint32 nodeGrp = conf->nodeGrp; - Interval i(conf->firstPSGCI, conf->lastPSGCI); - m_repState->add(Channel::PS, nodeGrp, i); - - Uint32 first, last; - m_gciContainer->getAvailableGCIBuffers(nodeGrp, &first, &last); - Interval j(first, last); - m_repState->clear(Channel::SS, nodeGrp, universeInterval); - m_repState->add(Channel::SS, nodeGrp, j); - -#ifdef DEBUG_REP_GET_GCI_CONF - RLOG(("TransSS: Requestor info received " - "(PS: %d:[%d-%d], SS: %d:[%d-%d])", - conf->nodeGrp, conf->firstPSGCI, conf->lastPSGCI, - conf->nodeGrp, conf->firstSSGCI, conf->lastSSGCI)); -#endif -} - -void -TransSS::execREP_GET_GCI_REF(NdbApiSignal * signal) -{ - RepGetGciRef * ref = (RepGetGciRef*)signal->getDataPtr(); - Uint32 nodeGrp = ref->nodeGrp; - - RLOG(("WARNING! Requestor info request failed (Nodegrp: %d)", nodeGrp)); -} - -/** - * Recd from GrepPS - * This signal means that a DB node has disconnected. - * @todo Do we need to know that a DB node disconnected? - * - * A node has disconnected (REP or PS DB) - * @todo let the requestor respond to this event - * in a proper way. - */ -void -TransSS::execREP_DISCONNECT_REP(NdbApiSignal * signal) -{ - RepDisconnectRep * const rep = - (RepDisconnectRep*)signal->getDataPtr(); - - //Uint32 nodeId = rep->nodeId; - Uint32 nodeType = rep->nodeType; - - if((RepDisconnectRep::NodeType)nodeType == RepDisconnectRep::REP) - { - m_repState->disable(); - } -} - -/** - * The buffer is now deleted on REP PS. We can now clear it from PS. - */ -void -TransSS::execREP_CLEAR_PS_GCIBUFFER_CONF(NdbApiSignal * signal) -{ - RepClearPSGciBufferConf * const conf = - (RepClearPSGciBufferConf*)signal->getDataPtr(); - Uint32 firstGCI = conf->firstGCI; - Uint32 lastGCI = conf->lastGCI; - Uint32 nodeGrp = conf->nodeGrp; - Interval i(firstGCI, lastGCI); - m_repState->clear(Channel::PS, nodeGrp, i); - m_repState->clear(Channel::DelReq, nodeGrp, i); - - RLOG(("Deleted PS:%d:[%d-%d]", nodeGrp, firstGCI, lastGCI)); -} - -/** - * Something went wrong when deleting buffer on REP PS - */ -void -TransSS::execREP_CLEAR_PS_GCIBUFFER_REF(NdbApiSignal * signal) -{ - RepClearPSGciBufferRef * const ref = - (RepClearPSGciBufferRef*)signal->getDataPtr(); - Uint32 firstGCI = ref->firstGCI; - Uint32 lastGCI = ref->lastGCI; - Uint32 nodeGrp = ref->nodeGrp; - - RLOG(("WARNING! Could not delete PS:%d:[%d-%d]", nodeGrp, firstGCI, lastGCI)); -} - -/***************************************************************************** - * Signal Executors : SCAN - *****************************************************************************/ - -/** - * Scan has started on PS side... (says PS REP) - */ -void -TransSS::execGREP_SUB_SYNC_CONF(NdbApiSignal* signal) -{ - GrepSubSyncConf * const conf = (GrepSubSyncConf * ) signal->getDataPtr(); - Uint32 subId = conf->subscriptionId; - Uint32 subKey = conf->subscriptionKey; - Interval epochs(conf->firstGCI, conf->lastGCI); - SubscriptionData::Part part = (SubscriptionData::Part) conf->part; - - switch(part) { - case SubscriptionData::MetaData: - RLOG(("Metascan completed. Subcription %d-%d, Epochs [%d-%d]", - subId, subKey, epochs.first(), epochs.last())); - m_repState->eventMetaScanCompleted(signal, subId, subKey, epochs); -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionInfo; - signal->theData[1] = GrepEvent::GrepSS_SubSyncMetaConf; - signal->theData[2] = subId; - signal->theData[3] = subKey; - signal->theData[4] = gci; - sendSignal(CMVMI_REF,GSN_EVENT_REP,signal, 5, JBB); -#endif - break; - case SubscriptionData::TableData: - RLOG(("Datascan completed. Subcription %d-%d, Epochs [%d-%d]", - subId, subKey, epochs.first(), epochs.last())); - m_repState->eventDataScanCompleted(signal, subId, subKey, epochs); -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionInfo; - signal->theData[1] = GrepEvent::GrepSS_SubSyncDataConf; - signal->theData[2] = subId; - signal->theData[3] = subKey; - signal->theData[4] = gci; - sendSignal(CMVMI_REF,GSN_EVENT_REP,signal, 5, JBB); -#endif - break; - default: - REPABORT3("Wrong subscription part", part, subId, subKey); - } -} - -void -TransSS::execGREP_SUB_SYNC_REF(NdbApiSignal* signal) -{ - GrepSubSyncRef * const ref = (GrepSubSyncRef * ) signal->getDataPtr(); - Uint32 subId = ref->subscriptionId; - Uint32 subKey = ref->subscriptionKey; - SubscriptionData::Part part = (SubscriptionData::Part) ref->part; - GrepError::Code error = (GrepError::Code) ref->err; - - switch(part) { - case SubscriptionData::MetaData: - m_repState->eventMetaScanFailed(subId, subKey, error); -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionAlert; - signal->theData[1] = GrepEvent::GrepSS_SubSyncMetaRef; - signal->theData[2] = subId; - signal->theData[3] = subKey; - // signal->theData[4] = gci; - sendSignal(CMVMI_REF,GSN_EVENT_REP,signal, 5, JBB); -#endif - break; - case SubscriptionData::TableData: - m_repState->eventDataScanFailed(subId, subKey, error); -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionAlert; - signal->theData[1] = GrepEvent::GrepSS_SubSyncDataRef; - signal->theData[2] = subId; - signal->theData[3] = subKey; - //signal->theData[4] = m_lastScanGCI; - sendSignal(CMVMI_REF,GSN_EVENT_REP,signal, 5, JBB); -#endif - break; - default: - REPABORT3("Wrong subscription part", part, subId, subKey); - } -} - -/** - * Something went wrong says REP PS - */ -void -TransSS::execREP_GET_GCIBUFFER_REF(NdbApiSignal* signal) -{ - RepGetGciBufferRef * const ref = (RepGetGciBufferRef*)signal->getDataPtr(); - /* - Uint32 senderData = ref->senderData; - Uint32 senderRef = ref->senderRef; - Uint32 firstPSGCI = ref->firstPSGCI; - Uint32 lastPSGCI = ref->lastPSGCI; - Uint32 firstSSGCI = ref->firstSSGCI; - Uint32 lastSSGCI = ref->lastSSGCI; - Uint32 currentGCIBuffer = ref->currentGCIBuffer; - Uint32 nodeGrp = ref->nodeGrp; - */ - GrepError::Code err = ref->err; - - RLOG(("WARNING! Request to get buffer failed. Error %d:%s", - err, GrepError::getErrorDesc(err))); -} diff --git a/ndb/src/old_files/rep/transfer/TransSS.hpp b/ndb/src/old_files/rep/transfer/TransSS.hpp deleted file mode 100644 index 3340038c8d1..00000000000 --- a/ndb/src/old_files/rep/transfer/TransSS.hpp +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef TransSS_HPP -#define TransSS_HPP - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include - -#include - -extern "C" { -static void * signalExecThread_C(void *); -} - -/** - * @class TransSS - * @brief Responsible for REP-REP interface in Standby System role - */ -class TransSS { -public: - /*************************************************************************** - * Constructor / Destructor / Init - ***************************************************************************/ - TransSS(GCIContainer * gciContainer, RepState * repState); - ~TransSS(); - void init(const char * connectString = NULL); - - /*************************************************************************** - * Public Methods - ***************************************************************************/ - ExtSender * getRepSender() { return m_repSender; }; - TransporterFacade * getTransporterFacade() { return m_transporterFacade; }; - -private: - /*************************************************************************** - * Private Methods - ***************************************************************************/ - friend void * signalExecThread_C(void *); - void signalExecThreadRun(); ///< SignalQueue executor thread - - static void execSignal(void* executorObj, NdbApiSignal* signal, - class LinearSectionPtr ptr[3]); - static void execNodeStatus(void* executorObj, NodeId, bool alive, - bool nfCompleted); - - void sendSignalRep(NdbApiSignal * s); - - /*************************************************************************** - * Signal receivers - ***************************************************************************/ - void execREP_GET_GCI_REQ(NdbApiSignal*); - void execREP_GET_GCI_CONF(NdbApiSignal*); - void execREP_GET_GCI_REF(NdbApiSignal*); - - void execREP_GET_GCIBUFFER_REQ(NdbApiSignal*); - void execREP_GET_GCIBUFFER_CONF(NdbApiSignal*); - void execREP_GET_GCIBUFFER_REF(NdbApiSignal*); - - void execGREP_SUB_REMOVE_CONF(NdbApiSignal *); - void execGREP_SUB_REMOVE_REF(NdbApiSignal *); - - void execREP_INSERT_GCIBUFFER_REQ(NdbApiSignal*); - void execREP_INSERT_GCIBUFFER_CONF(NdbApiSignal*); - void execREP_INSERT_GCIBUFFER_REF(NdbApiSignal*); - - void execREP_DATA_PAGE(NdbApiSignal* signal, LinearSectionPtr ptr[3]); - - void execREP_GCIBUFFER_ACC_REP(NdbApiSignal*); - void execREP_DISCONNECT_REP(NdbApiSignal*); - - - void execREP_CLEAR_PS_GCIBUFFER_CONF(NdbApiSignal*); - void execREP_CLEAR_PS_GCIBUFFER_REF(NdbApiSignal*); - - void execGREP_SUB_SYNC_CONF(NdbApiSignal*); - void execGREP_SUB_SYNC_REF(NdbApiSignal*); - - /*************************************************************************** - * Signal receivers : Subscriptions - ***************************************************************************/ - void execGREP_CREATE_SUBID_CONF(NdbApiSignal*); - void execGREP_CREATE_SUBID_REF(NdbApiSignal*); - void execGREP_SUB_CREATE_CONF(NdbApiSignal*); - void execGREP_SUB_CREATE_REF(NdbApiSignal*); - void execGREP_SUB_START_CONF(NdbApiSignal*); - void execGREP_SUB_START_REF(NdbApiSignal*); - - /*************************************************************************** - * Ref signal senders - ***************************************************************************/ - - void sendREP_GET_GCI_REF(NdbApiSignal* signal, Uint32 nodeGrp, - Uint32 firstSSGCI, Uint32 lastSSGCI, - GrepError::Code err); - - void sendREP_GET_GCIBUFFER_REF(NdbApiSignal* signal, - Uint32 firstGCI, Uint32 lastGCI, - Uint32 nodeGrp, GrepError::Code err); - - /*************************************************************************** - * Private Variables - ***************************************************************************/ - RepState * m_repState; - - struct NdbThread * m_signalExecThread; ///< Signal Queue executor - class SignalQueue m_signalRecvQueue; - - ExtSender * m_repSender; ///< Obj responsible send to REP - - Uint32 m_ownNodeId; ///< NodeId of this node - Uint32 m_ownBlockNo; ///< BlockNo of this "block" - BlockReference m_ownRef; ///< Reference to this - - GCIContainer * m_gciContainer; ///< Ref to gci container. - - TransporterFacade * m_transporterFacade; -}; - -#endif diff --git a/ndb/src/old_files/rep/transfer/TransSSSubscriptions.cpp b/ndb/src/old_files/rep/transfer/TransSSSubscriptions.cpp deleted file mode 100644 index 582ba8040a6..00000000000 --- a/ndb/src/old_files/rep/transfer/TransSSSubscriptions.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include "TransSS.hpp" - -#include -#include - -/***************************************************************************** - * CREATE SUBSCRIPTION ID - *****************************************************************************/ - -void -TransSS::execGREP_CREATE_SUBID_CONF(NdbApiSignal* signal) -{ - CreateSubscriptionIdConf const * conf = - (CreateSubscriptionIdConf *)signal->getDataPtr(); - Uint32 subId = conf->subscriptionId; - Uint32 subKey = conf->subscriptionKey; - - /** @todo Fix this */ -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionInfo; - signal->theData[1] = GrepEvent::GrepSS_CreateSubIdConf; - signal->theData[2] = subId; - signal->theData[3] = subKey; - sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 4 ,JBB); -#endif - m_repState->eventSubscriptionIdCreated(subId, subKey); -} - -void -TransSS::execGREP_CREATE_SUBID_REF(NdbApiSignal* signal) -{ - CreateSubscriptionIdRef const * ref = - (CreateSubscriptionIdRef *)signal->getDataPtr(); - Uint32 subId = ref->subscriptionId; - Uint32 subKey = ref->subscriptionKey; - GrepError::Code err = (GrepError::Code) ref->err; - -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionAlert; - signal->theData[1] = GrepEvent::GrepSS_CreateSubIdRef; - signal->theData[2] = subId; - signal->theData[3] = subKey; - signal->theData[4] = err; - sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 5 ,JBB); -#endif - m_repState->eventSubscriptionIdCreateFailed(subId, subKey, err); -} - -/***************************************************************************** - * CREATE SUBSCRIPTION - *****************************************************************************/ - -void -TransSS::execGREP_SUB_CREATE_CONF(NdbApiSignal* signal) -{ - GrepSubCreateConf * const conf = (GrepSubCreateConf *)signal->getDataPtr(); - Uint32 noOfNodeGroups = conf->noOfNodeGroups; - Uint32 subId = conf->subscriptionId; - Uint32 subKey = conf->subscriptionKey; - - m_repState->setNoOfNodeGroups(noOfNodeGroups); - -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionInfo; - signal->theData[1] = GrepEvent::GrepSS_SubCreateConf; - signal->theData[2] = subId; - signal->theData[3] = subKey; - signal->theData[4] = noOfNodeGroups; - sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 5, JBB); -#endif - - m_repState->eventSubscriptionCreated(subId, subKey); -} - -void -TransSS::execGREP_SUB_CREATE_REF(NdbApiSignal* signal) -{ - GrepSubCreateRef * const ref = (GrepSubCreateRef *)signal->getDataPtr(); - Uint32 subId = ref->subscriptionId; - Uint32 subKey = ref->subscriptionKey; - GrepError::Code err = (GrepError::Code)ref->err; -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionAlert; - signal->theData[1] = GrepEvent::GrepSS_SubCreateRef; - signal->theData[2] = subId; - signal->theData[3] = subKey; - sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 4, JBB); -#endif - - m_repState->eventSubscriptionCreateFailed(subId, subKey, err); -} - -/***************************************************************************** - * START SUBSCRIPTION - *****************************************************************************/ - -void -TransSS::execGREP_SUB_START_CONF(NdbApiSignal* signal) -{ - GrepSubStartConf * const conf = (GrepSubStartConf *)signal->getDataPtr(); - Uint32 subId = conf->subscriptionId; - Uint32 subKey = conf->subscriptionKey; - SubscriptionData::Part part = (SubscriptionData::Part) conf->part; - - switch(part) { - case SubscriptionData::MetaData: - RLOG(("Metalog started. Subscription %d-%d", subId, subKey)); - m_repState->eventMetaLogStarted(signal, subId, subKey); -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionInfo; - signal->theData[1] = GrepEvent::GrepSS_SubStartMetaConf; - signal->theData[2] = m_requestor.getSubId(); - signal->theData[3] = m_requestor.getSubKey(); - sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 4, JBB); -#endif - break; - case SubscriptionData::TableData: - RLOG(("Datalog started. Subscription %d-%d", subId, subKey)); - m_repState->eventDataLogStarted(signal, subId, subKey); -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionInfo; - signal->theData[1] = GrepEvent::GrepSS_SubStartDataConf; - signal->theData[2] = m_requestor.getSubId(); - signal->theData[3] = m_requestor.getSubKey(); - sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 4, JBB); -#endif - break; - default: - REPABORT("Illegal type of subscription"); - } -} - -void -TransSS::execGREP_SUB_START_REF(NdbApiSignal* signal) -{ - GrepSubStartRef * const ref = (GrepSubStartRef *)signal->getDataPtr(); - Uint32 subId = ref->subscriptionId; - Uint32 subKey = ref->subscriptionKey; - GrepError::Code err = (GrepError::Code)ref->err; - SubscriptionData::Part part = (SubscriptionData::Part) ref->part; - - switch(part) { - case SubscriptionData::MetaData: - m_repState->eventMetaLogStartFailed(subId, subKey, err); -#if 1 - ndbout_c("Requestor: Subscription FAILED to start on Meta Data"); - ndbout_c("Error code : %d. Error message: %s", - err, GrepError::getErrorDesc(err)); -#endif -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionAlert; - signal->theData[1] = GrepEvent::GrepSS_SubStartMetaRef; - signal->theData[2] = subId; //@todo. manage subscriptions. - signal->theData[3] = subKey; //@todo. manage subscriptions. - sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 4, JBB); -#endif - break; - case SubscriptionData::TableData: - m_repState->eventDataLogStartFailed(subId, subKey, err); -#if 0 - signal->theData[0] = EventReport::GrepSubscriptionAlert; - signal->theData[1] = GrepEvent::GrepSS_SubStartDataRef; - signal->theData[2] = subId; //@todo. manage subscriptions. - signal->theData[3] = subKey; //@todo. manage subscriptions. - sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 4, JBB); -#endif -#if 1 - ndbout_c("Requestor: Subscription FAILED to start on Table Data"); -#endif - ndbout_c("Error code : %d. Error message: %s", - err, GrepError::getErrorDesc(err)); - - break; - default: - REPABORT("Illegal type of subscription"); - } -} diff --git a/ndb/test/ndbapi/old_dirs/acid/Makefile b/ndb/test/ndbapi/old_dirs/acid/Makefile deleted file mode 100644 index 33dc49fcdea..00000000000 --- a/ndb/test/ndbapi/old_dirs/acid/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := acid - -# Source files of non-templated classes (.C files) -SOURCES = acid.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/acid2/Makefile b/ndb/test/ndbapi/old_dirs/acid2/Makefile deleted file mode 100644 index 69c9d409b9e..00000000000 --- a/ndb/test/ndbapi/old_dirs/acid2/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := acid2 - -# Source files of non-templated classes (.C files) -SOURCES = acid2.cpp TraceNdbApi.cpp VerifyNdbApi.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp b/ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp deleted file mode 100644 index 16acd639f18..00000000000 --- a/ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp +++ /dev/null @@ -1,131 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#ifndef TraceNdbApi_hpp -#define TraceNdbApi_hpp - - -class CTraceNdbSchemaOp : public NdbSchemaOp -{ -public: - int createTable(const char* aTableName); - int createAttribute(const char* aAttrName, KeyType aTupleyKey); -}; - - - -class CTraceNdbSchemaCon : public NdbSchemaCon -{ -public: - CTraceNdbSchemaOp* getNdbSchemaOp(); - int execute(); -}; - - - -class CTraceNdbRecAttr : public NdbRecAttr -{ -public: - Uint32 u_32_value(); -}; - - -class CTraceNdbOperation : public NdbOperation -{ -public: - int insertTuple(); - int updateTuple(); - int interpretedUpdateTuple(); - int readTuple(); - int readTupleExclusive(); - int deleteTuple(); - int equal(const char* anAttrName, Uint32 aValue); - int setValue(const char* anAttrName, Uint32 aValue); - int incValue(const char* anAttrName, Uint32 aValue); - CTraceNdbRecAttr* getValue(const char* anAttrName); - -}; - - -class CTraceNdbIndexOperation : public NdbIndexOperation -{ -public: - int insertTuple(); - int updateTuple(); - int interpretedUpdateTuple(); - int readTuple(); - int readTupleExclusive(); - int deleteTuple(); - int equal(const char* anAttrName, Uint32 aValue); - int setValue(const char* anAttrName, Uint32 aValue); - int incValue(const char* anAttrName, Uint32 aValue); - CTraceNdbRecAttr* getValue(const char* anAttrName); -}; - - - -class CTraceNdbConnection : public NdbConnection -{ -public: - CTraceNdbOperation* getNdbOperation(const char* aTableName); - CTraceNdbIndexOperation* getNdbIndexOperation(const char* anIndexName, const char* aTableName); - - int execute(ExecType aTypeOfExec); - - int execute_ok(ExecType aTypeOfExec) - { - return execute(aTypeOfExec); - }; - - const NdbError & getNdbError(void) const; -}; - - - -class CTraceNdbDictionary : public NdbDictionary -{ -public: - class CTraceTable : public Table - { - }; - - class CTraceIndex : public Index - { - }; - - class CTraceColumn : public Column - { - }; - - int createTable(const CTraceTable &); - int createIndex(const CTraceIndex &); -}; - - - -class CTraceNdb : public Ndb -{ -public: - CTraceNdb(const char* aDataBase); - CTraceNdbSchemaCon* startSchemaTransaction(); - void closeSchemaTransaction(CTraceNdbSchemaCon* aSchemaCon); - CTraceNdbConnection* startTransaction(); - void closeTransaction(CTraceNdbConnection* aConnection); -}; - - - -#endif // TraceNdbApi_hpp diff --git a/ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp b/ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp deleted file mode 100644 index f9d5dff698d..00000000000 --- a/ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp +++ /dev/null @@ -1,465 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#ifndef VerifyNdbApi_hpp -#define VerifyNdbApi_hpp - - -class CVerifyNdbSchemaOp : public NdbSchemaOp -{ -public: - int createTable(const char* aTableName) - { - int i = NdbSchemaOp::createTable(aTableName); - VerifyInt(i, "createTable"); - return i; - }; - - int createAttribute(const char* aAttrName, KeyType aTupleyKey) - { - int i = NdbSchemaOp::createAttribute(aAttrName, aTupleyKey); - VerifyInt(i, "createAttribute"); - return i; - }; - -private: - void VerifyInt(const int i, const char* szMethod) - { - if(i) - { - VerifyIntError(i, szMethod); - } - } - - void VerifyIntError(const int i, const char* szMethod); -}; - - - -class CVerifyNdbSchemaCon : public NdbSchemaCon -{ -public: - CVerifyNdbSchemaOp* getNdbSchemaOp() - { - NdbSchemaOp* p = NdbSchemaCon::getNdbSchemaOp(); - VerifyPtr(p, "getNdbSchemaOp"); - return (CVerifyNdbSchemaOp*)p; - }; - - int execute() - { - int i = NdbSchemaCon::execute(); - VerifyInt(i, "execute"); - return i; - }; - -private: - void VerifyInt(const int i, const char* szMethod) - { - if(i) - { - VerifyIntError(i, szMethod); - } - } - - void VerifyPtr(void* p, const char* szMethod) - { - if(!p) - { - VerifyPtrError(p, szMethod); - } - } - - void VerifyIntError(const int i, const char* szMethod); - void VerifyPtrError(void* p, const char* szMethod); -}; - - - -class CVerifyNdbRecAttr : public NdbRecAttr -{ -public: - Uint32 u_32_value() - { - Uint32 n = NdbRecAttr::u_32_value(); - VerifyValue("u_32_value"); - return n; - }; - -private: - void VerifyValue(const char* szMethod) - { - int iNull = NdbRecAttr::isNULL(); - if(iNull) - { - VerifyValueError(iNull, szMethod); - } - }; - - void VerifyValueError(const int iNull, const char* szMethod); -}; - - -class CVerifyNdbOperation : public NdbOperation -{ -public: - int insertTuple() - { - int i = NdbOperation::insertTuple(); - VerifyInt(i, "insertTuple"); - return i; - }; - - int updateTuple() - { - int i = NdbOperation::updateTuple(); - VerifyInt(i, "updateTuple"); - return i; - }; - - int interpretedUpdateTuple() - { - int i = NdbOperation::interpretedUpdateTuple(); - VerifyInt(i, "interpretedUpdateTuple"); - return i; - } - - int readTuple() - { - int i = NdbOperation::readTuple(); - VerifyInt(i, "readTuple"); - return i; - } - - int readTupleExclusive() - { - int i = NdbOperation::readTupleExclusive(); - VerifyInt(i, "readTupleExclusive"); - return i; - } - - int deleteTuple() - { - int i = NdbOperation::deleteTuple(); - VerifyInt(i, "deleteTuple"); - return i; - } - - int equal(const char* anAttrName, Uint32 aValue) - { - int i = NdbOperation::equal(anAttrName, aValue); - VerifyInt(i, "equal"); - return i; - } - - int setValue(const char* anAttrName, Uint32 aValue) - { - int i = NdbOperation::setValue(anAttrName, aValue); - VerifyInt(i, "setValue"); - return i; - } - - int incValue(const char* anAttrName, Uint32 aValue) - { - int i = NdbOperation::incValue(anAttrName, aValue); - VerifyInt(i, "incValue"); - return i; - } - - CVerifyNdbRecAttr* getValue(const char* anAttrName) - { - NdbRecAttr* p = NdbOperation::getValue(anAttrName); - VerifyPtr(p, "getValue"); - return (CVerifyNdbRecAttr*)p; - } - - -private: - void VerifyInt(const int i, const char* szMethod) - { - if(i) - { - VerifyIntError(i, szMethod); - } - } - - void VerifyPtr(void* p, const char* szMethod) - { - if(!p) - { - VerifyPtrError(p, szMethod); - } - } - - void VerifyIntError(const int i, const char* szMethod); - void VerifyPtrError(void* p, const char* szMethod); -}; - - -class CVerifyNdbIndexOperation : public NdbIndexOperation -{ -public: - int insertTuple() - { - int i = NdbIndexOperation::insertTuple(); - VerifyInt(i, "insertTuple"); - return i; - }; - - int updateTuple() - { - int i = NdbIndexOperation::updateTuple(); - VerifyInt(i, "updateTuple"); - return i; - }; - - int interpretedUpdateTuple() - { - int i = NdbIndexOperation::interpretedUpdateTuple(); - VerifyInt(i, "interpretedUpdateTuple"); - return i; - } - - int readTuple() - { - int i = NdbIndexOperation::readTuple(); - VerifyInt(i, "readTuple"); - return i; - } - - int readTupleExclusive() - { - int i = NdbIndexOperation::readTupleExclusive(); - VerifyInt(i, "readTupleExclusive"); - return i; - } - - int deleteTuple() - { - int i = NdbIndexOperation::deleteTuple(); - VerifyInt(i, "deleteTuple"); - return i; - } - - int equal(const char* anAttrName, Uint32 aValue) - { - int i = NdbIndexOperation::equal(anAttrName, aValue); - VerifyInt(i, "equal"); - return i; - } - - int setValue(const char* anAttrName, Uint32 aValue) - { - int i = NdbIndexOperation::setValue(anAttrName, aValue); - VerifyInt(i, "setValue"); - return i; - } - - int incValue(const char* anAttrName, Uint32 aValue) - { - int i = NdbIndexOperation::incValue(anAttrName, aValue); - VerifyInt(i, "incValue"); - return i; - } - - CVerifyNdbRecAttr* getValue(const char* anAttrName) - { - NdbRecAttr* p = NdbIndexOperation::getValue(anAttrName); - VerifyPtr(p, "getValue"); - return (CVerifyNdbRecAttr*)p; - } - - -private: - void VerifyInt(const int i, const char* szMethod) - { - if(i) - { - VerifyIntError(i, szMethod); - } - } - - void VerifyPtr(void* p, const char* szMethod) - { - if(!p) - { - VerifyPtrError(p, szMethod); - } - } - - void VerifyIntError(const int i, const char* szMethod); - void VerifyPtrError(void* p, const char* szMethod); -}; - - -class CVerifyNdbConnection : public NdbConnection -{ -public: - CVerifyNdbOperation* getNdbOperation(const char* aTableName) - { - NdbOperation* p = NdbConnection::getNdbOperation(aTableName); - VerifyPtr(p, "getNdbOperation"); - return (CVerifyNdbOperation*)p; - } - - CVerifyNdbIndexOperation* getNdbIndexOperation(const char* anIndexName, const char* aTableName) - { - NdbIndexOperation* p = NdbConnection::getNdbIndexOperation(anIndexName, aTableName); - VerifyPtr(p, "getNdbIndexOperation"); - return (CVerifyNdbIndexOperation*)p; - } - - int execute(ExecType aTypeOfExec) - { - int i = NdbConnection::execute(aTypeOfExec); - VerifyInt(i, "execute"); - return i; - } - - int execute_ok(ExecType aTypeOfExec) - { - int iExec = NdbConnection::execute(aTypeOfExec); - NdbError err = NdbConnection::getNdbError(); - int iCode = err.code; - if(iExec - && ((aTypeOfExec==NoCommit && iCode!=0) - || (aTypeOfExec==Commit && iCode!=626 && iCode!=630))) - { - VerifyInt(iExec, "execute"); - } - return iExec; - } - - -private: - void VerifyInt(const int i, const char* szMethod) - { - if(i) - { - VerifyIntError(i, szMethod); - } - } - - void VerifyPtr(void* p, const char* szMethod) - { - if(!p) - { - VerifyPtrError(p, szMethod); - } - } - - void VerifyIntError(const int i, const char* szMethod); - void VerifyPtrError(void* p, const char* szMethod); -}; - - -//class CVerifyTable : public NdbDictionary::Table -//{ -//public: -//}; - - -class CVerifyNdbDictionary : public NdbDictionary -{ -public: - class CVerifyTable : public Table - { - public: - private: - }; - - class CVerifyIndex : public Index - { - public: - private: - }; - - class CVerifyColumn : public Column - { - public: - private: - }; - - int createTable(const CVerifyTable &); - int createIndex(const CVerifyIndex &); - - -private: -}; - - -class CVerifyNdb : public Ndb -{ -public: - CVerifyNdb(const char* aDataBase) - : Ndb(aDataBase) - { - VerifyVoid("Ndb"); - }; - - CVerifyNdbSchemaCon* startSchemaTransaction() - { - NdbSchemaCon* p = Ndb::startSchemaTransaction(); - VerifyPtr(p, "startSchemaTransaction"); - return (CVerifyNdbSchemaCon*)p; - }; - - void closeSchemaTransaction(CVerifyNdbSchemaCon* aSchemaCon) - { - Ndb::closeSchemaTransaction(aSchemaCon); - VerifyVoid("closeSchemaTransaction"); - }; - - CVerifyNdbConnection* startTransaction() - { - NdbConnection* p = Ndb::startTransaction(); - VerifyPtr(p, "startTransaction"); - return (CVerifyNdbConnection*)p; - }; - - void closeTransaction(CVerifyNdbConnection* aConnection) - { - Ndb::closeTransaction(aConnection); - VerifyVoid("closeTransaction"); - }; - - -private: - void VerifyPtr(void* p, const char* szMethod) - { - if(!p) - { - VerifyPtrError(p, szMethod); - } - } - - void VerifyVoid(const char* szMethod) - { - NdbError err = Ndb::getNdbError(); - int iCode = err.code; - if(iCode) - { - VerifyVoidError(iCode, szMethod); - } - } - - void VerifyPtrError(void* p, const char* szMethod); - void VerifyVoidError(const int iCode, const char* szMethod); -}; - - - -#endif // VerifyNdbApi_hpp diff --git a/ndb/test/ndbapi/old_dirs/basicAsynch/Makefile b/ndb/test/ndbapi/old_dirs/basicAsynch/Makefile deleted file mode 100755 index 802c5e5a2bd..00000000000 --- a/ndb/test/ndbapi/old_dirs/basicAsynch/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := testBasicAsynch - -SOURCES := testBasicAsynch.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/bulk_copy/Makefile b/ndb/test/ndbapi/old_dirs/bulk_copy/Makefile deleted file mode 100644 index 22c05b138b7..00000000000 --- a/ndb/test/ndbapi/old_dirs/bulk_copy/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := bulk_copy - -SOURCES := bulk_copy.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/create_all_tabs/Makefile b/ndb/test/ndbapi/old_dirs/create_all_tabs/Makefile deleted file mode 100644 index 58309807682..00000000000 --- a/ndb/test/ndbapi/old_dirs/create_all_tabs/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := create_all_tabs - -# Source files of non-templated classes (.C files) -SOURCES = create_all_tabs.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/create_tab/Makefile b/ndb/test/ndbapi/old_dirs/create_tab/Makefile deleted file mode 100644 index c2ea0b52b15..00000000000 --- a/ndb/test/ndbapi/old_dirs/create_tab/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := create_tab - -# Source files of non-templated classes (.C files) -SOURCES = create_tab.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/drop_all_tabs/Makefile b/ndb/test/ndbapi/old_dirs/drop_all_tabs/Makefile deleted file mode 100644 index 96db0781417..00000000000 --- a/ndb/test/ndbapi/old_dirs/drop_all_tabs/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := drop_all_tabs - -# Source files of non-templated classes (.C files) -SOURCES = drop_all_tabs.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/flexAsynch/Makefile b/ndb/test/ndbapi/old_dirs/flexAsynch/Makefile deleted file mode 100644 index 2c77c8e21df..00000000000 --- a/ndb/test/ndbapi/old_dirs/flexAsynch/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := flexAsynch - -# Source files of non-templated classes (.C files) -SOURCES = flexAsynch.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/flexBench/Makefile.am b/ndb/test/ndbapi/old_dirs/flexBench/Makefile.am deleted file mode 100644 index d4de4b92b60..00000000000 --- a/ndb/test/ndbapi/old_dirs/flexBench/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ - -bin_PROGRAMS = flexBench - -flexBench_SOURCES = flexBench.cpp - -include $(top_srcdir)/ndb/config/common.mk.am -include $(top_srcdir)/ndb/config/type_ndbapitest.mk.am - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/ndb/test/ndbapi/old_dirs/flexBench/ndbplot.pl b/ndb/test/ndbapi/old_dirs/flexBench/ndbplot.pl deleted file mode 100755 index b16f6d5897d..00000000000 --- a/ndb/test/ndbapi/old_dirs/flexBench/ndbplot.pl +++ /dev/null @@ -1,305 +0,0 @@ -#! /usr/bin/perl - -use strict; -use Getopt::Long; -use Symbol; -use Socket; - -my $progname = $0; -$progname =~ s!^.*/|\.pl$!!g; -my $defaultport = 27127; -my $defaulttotal = 120; -my $defaultsample = 5; -my $defaultrange = 5000; - -sub printhelp { - print < \$helpflag, - 'debug' => \$debug, - 'port=i' => \$serverport, - 'total=i' => \$totaltime, - 'sample=i' => \$sampletime, - 'range=i' => \$range, - 'nopct' => \$nopct, - 'z=s' => \@zopts, -) or die "try: $progname -h\n"; -$helpflag && printhelp(); - -# calculate number of data points -my $samplecnt; -$samplecnt = int($totaltime / $sampletime) + 1; -$totaltime = ($samplecnt - 1) * $sampletime; -warn "total time = $totaltime sec, sample time = $sampletime sec\n"; - -# open gnuplot -my $plotfile; -sub openplot { - $plotfile = gensym(); - if (! open($plotfile, "| gnuplot @zopts")) { - die "open plot: $!\n"; - } - my $sav = select($plotfile); - $| = 1; - select($sav); - print $plotfile "clear\n"; -} - -# samples -my @sample; # samples 0..$samplecnt in time order -my $sampleready = 0; # samples 1..$samplecnt are ready (true/false) - -@sample = map({ start => 0 }, 0..$samplecnt); - -sub adddata { - my($node, $type, $value) = @_; - my $now = time; - my $s = $sample[0]; - if ($now - $s->{start} >= $sampletime) { - unshift(@sample, { - start => $now, - total => 0, - }); - $s = $sample[0]; - pop(@sample); # delete oldest - $sampleready = 1; - } - # if no type then this is just a time tick - if ($type) { - $s->{$type} += $value; - $s->{total} += $value; - } -} - -# data file name -my $datadir; -if ($ENV{NDB_BASE}) { - $datadir = "$ENV{NDB_BASE}/var/plot"; -} else { - $datadir = "/var/tmp"; -} -(-d $datadir || mkdir($datadir, 0777)) - or die "mkdir $datadir failed: $!\n"; -my $datafile = "$datadir/plot$$.dat"; -warn "writing plot data to $datafile\n"; - -# refresh the plot -sub plotsample { - my $fh = gensym(); - if (! open($fh, ">$datafile")) { - die "$datafile: $!\n"; - } - # sample 0 is never ready - my $currops = ""; - my $currpct = {}; - for (my $i = @sample; $i >= 1; $i--) { - my $s = $sample[$i]; - if (! $s->{start}) { # initial empty sample - next; - } - printf $fh "%d", -($i - 1) * $sampletime; - printf $fh " %.0f", 1.01 * $s->{"total"} / $sampletime; - for my $k (qw(insert update select delete)) { - printf $fh " %.0f", $s->{$k} / $sampletime; - } - printf $fh "\n"; - if ($i == 1) { - $currops = sprintf("%.0f", $s->{"total"} / $sampletime); - if (! $nopct && $currops > 0) { - $currpct->{"total"} = sprintf("%5s", ""); - for my $k (qw(insert update select delete)) { - $currpct->{$k} = sprintf(" %3.0f%%", - 100.0 * $s->{$k} / $s->{"total"}); - } - } - } - } - close($fh); - print $plotfile <{insert}" \\ - with lines lt 2, \\ - '$datafile' \\ - using 1:4 \\ - title "update$currpct->{update}" \\ - with lines lt 3, \\ - '$datafile' \\ - using 1:5 \\ - title "select$currpct->{select}" \\ - with lines lt 4, \\ - '$datafile' \\ - using 1:6 \\ - title "delete$currpct->{delete}" \\ - with lines lt 5, \\ - '$datafile' \\ - using 1:2 \\ - title "total$currpct->{total}" \\ - with lines lt 1 lw 2 -END -} - -# set up server socket -my $sock = gensym(); -if (! socket($sock, PF_INET, SOCK_STREAM, getprotobyname("tcp"))) { - die "socket: $!\n"; -} -if (! setsockopt($sock, SOL_SOCKET, SO_REUSEADDR, pack("l*", 1))) { - die "setsockopt: $!\n"; -} -if (! bind($sock, pack_sockaddr_in($serverport, INADDR_ANY))) { - die "bind: $!\n"; -} -if (! listen($sock, SOMAXCONN)) { - die "listen: $!\n"; -} - -# bit vectors for select on server socket and clients -my $readin = ''; -vec($readin, fileno($sock), 1) = 1; - -# clients -my @client = (); -my $clientid = 0; -sub addclient { - my($conn) = @_; - my $c = { - conn => $conn, - data => "", - name => "client " . ++$clientid, - }; - push(@client, $c); - vec($readin, fileno($c->{conn}), 1) = 1; - if (1 || $debug) { - warn "added $c->{name}\n"; - } -} -sub deleteclient { - my($c) = @_; - @client = grep($_ ne $c, @client); - vec($readin, fileno($c->{conn}), 1) = 0; - shutdown($c->{conn}, 2); - if (1 || $debug) { - warn "deleted $c->{name}\n"; - } -} -sub readclient { - my($c) = @_; - my $data; - my $n; - eval { - local $SIG{ALRM} = sub { die "timeout\n" }; - alarm(5); - $n = sysread($c->{conn}, $data, 512); - alarm(0); - }; - if ($@) { - chomp($@); - warn "$c->{name}: read: $@\n"; - return undef; - } - if (!defined($n)) { - warn "$c->{name}: read: $!\n"; - return undef; - } - $c->{data} .= $data; - if ($debug) { - warn "$c->{name}: read @{[ length($data) ]} bytes\n"; - } - return $n; -} -sub processclient { - my($c) = @_; - my $i; - while (($i = index($c->{data}, "\n")) >= 0) { - my $line = substr($c->{data}, 0, $i); - $c->{data} = substr($c->{data}, $i+1); - my($node, $type, $value) = split(' ', $line); - if ($node !~ /^\d+$/) { - warn "$c->{name}: $line: bad node id\n"; - next; - } - if ($type !~ /^(insert|update|read|delete|verify|verifydelete)$/) { - warn "$c->{name}: $line: bad type\n"; - next; - } - if ($value !~ /^\d+$/) { - warn "$c->{name}: $line: bad value\n"; - next; - } - if ($type eq "read") { - $type = "select"; - } - adddata($node, $type, $value); - } -} - -# main loop -openplot(); -while (1) { - my $readout = ''; - my $ret = select($readout = $readin, undef, undef, 1.0); - if (vec($readout, fileno($sock), 1)) { - my $conn = gensym(); - if (! accept($conn, $sock)) { - warn "accept failed: $!\n"; - } else { - addclient($conn); - } - } - for my $c (@client) { - if (vec($readout, fileno($c->{conn}), 1)) { - my $n = readclient($c); - if (! defined($n)) { - deleteclient($c); - } else { - processclient($c); - if ($n == 0) { # end of file - deleteclient($c); - } - } - } - } - adddata(); # keep clock ticking - if ($sampleready) { - if ($debug) { - warn "sample ready\n"; - } - plotsample(); - $sampleready = 0; - } -} -# vim: set sw=4: diff --git a/ndb/test/ndbapi/old_dirs/flexHammer/Makefile b/ndb/test/ndbapi/old_dirs/flexHammer/Makefile deleted file mode 100644 index c8e436fb7f5..00000000000 --- a/ndb/test/ndbapi/old_dirs/flexHammer/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := flexHammer - -SOURCES := flexHammer.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/flexHammer/README b/ndb/test/ndbapi/old_dirs/flexHammer/README deleted file mode 100644 index 556582aab96..00000000000 --- a/ndb/test/ndbapi/old_dirs/flexHammer/README +++ /dev/null @@ -1,67 +0,0 @@ - -Executing flexHammer-tests automatically -======================================== - - -It is possible to execute almost al the flexHammer-tests -automatically. The procedure contains three steps: -- increase the number of tabels (flexHammer -c number) -- increase the number of threads (flexHammer -t number) -- increase the number of records (flexHammer -r number) -- increase the number of tabels and threads alternately - -Each of these steps are performed by the scripts test1.sh, -test2.sh, test3.sh and test4.sh. Each test will start Ndb, -execute the test and close Ndb again in order to execute -each test in a 'clean' Ndb-environment. So make sure that -there is no Ndb running when you start the test. - - -1. Setup - -To perform the tests automatically, the following issues -have to be taken care of: - -- be sure that you have a directory bin in your home-directory. - In this directory, you need to have a link 'runndb' to the - ndb executable. You can do this by executing a shell-command like: - ln -s ndb/Emulator/Main/ndb runndb - The script is not yet so far that it performs checks, so if - you forget about this, things will get messy. -- In this directory you need a Ndb.cfg for a server-configuration. - - -2. Command - -I assume you have Ndb and the API compiled or you use the -'released' version. Compile flexHammer as usual with 'make'. -Now you can start the tests by typing 'make test'. The -execution of the test will take a while. - - -3. Results - -The scripts will write their results in the file report.txt. -The scripts will start with a short summary on the test. Then -it will add 1 line documenting each run of flexHammer that is -ececuted. Finally, it will print highest 'score'. The file -report.txt is probably good enough to check in directly as -testprotocol in ndb/test/docs/testprotocols. - - -4. Log files. - -To make it possible to investigate errors, the output from -the flexScan-run where the error occurred is stored in -test1.log, test2.log, test3.log or test4.log respectively. -They are overwritten each time you start 'make test'. - - -HINT - -The number of iterations in each test-script is not directly -limited by the number of attributes or the size of the -attributes but by the number of tables that you are allowed -to create. Probably this will be the error that occurs if -you execute the test. You migh adjust the begin-values and -the step-size in the individual scripts if you want. diff --git a/ndb/test/ndbapi/old_dirs/flexScan/Makefile b/ndb/test/ndbapi/old_dirs/flexScan/Makefile deleted file mode 100644 index 78f9d481063..00000000000 --- a/ndb/test/ndbapi/old_dirs/flexScan/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := flexScan - -SOURCES := flexScan.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/flexScan/README b/ndb/test/ndbapi/old_dirs/flexScan/README deleted file mode 100644 index cddbdea5336..00000000000 --- a/ndb/test/ndbapi/old_dirs/flexScan/README +++ /dev/null @@ -1,66 +0,0 @@ - -Executing flexScan-tests automatically -====================================== - - -It is possible to execute almost al the flexBench-tests -automatically. The procedure contains three steps: -- increase the number of attributes (flexScan -a number) -- increase the size of attributes (flexScan -s number) -- increase the number of threads (flexScan -t number) - -Each of these steps are performed by the scripts test1.sh -test2.sh and test3.sh. Each test will start Ndb, execute -the test and close Ndb again in order to execute each test -in a 'clean' Ndb-environment. So make sure that there is -no Ndb running when you start the test. - - -1. Setup - -To perform the tests automatically, the following issues -have to be taken care of: - -- be sure that you have a directory bin in your home-directory. - In this directory, you need to have a link 'runndb' to the - ndb executable. You can do this by executing a shell-command like: - ln -s ndb/Emulator/Main/ndb runndb - The script is not yet so far that it performs checks, so if - you forget about this, things will get messy. -- In this directory you need a Ndb.cfg for a server-configuration. - - -2. Command - -I assume you have Ndb and the API compiled or you use the -'released' version. Compile flexScan as usual with 'make'. -Now you can start the tests by typing 'make test'. The -execution of the test will take a while. - - -3. Results - -The scripts will write their results in the file report.txt. -The scripts will start with a short summary on the test. Then -it will add 1 line documenting each run of flexScan that is -ececuted. Finally, it will print highest 'score'. The file -report.txt is probably good enough to check in directly as -testprotocol in ndb/test/docs/testprotocols. - - -4. Log files. - -To make it possible to investigate errors, the output from -the flexScan-run where the error occurred is stored in -test1.log, test2.log or test3.log respectively. They are -overwritten each time you start 'make test'. - - -HINT - -The number of iterations in each test-script is not directly -limited by the number of attributes or the size of the -attributes but by the number of tables that you are allowed -to create. Probably this will be the error that occurs if -you execute the test. You migh adjust the begin-values and -the step-size in the individual scripts if you want. diff --git a/ndb/test/ndbapi/old_dirs/flexTT/Makefile b/ndb/test/ndbapi/old_dirs/flexTT/Makefile deleted file mode 100644 index a63bd803d95..00000000000 --- a/ndb/test/ndbapi/old_dirs/flexTT/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := flexTT - -# Source files of non-templated classes (.C files) -SOURCES = flexTT.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/flexTimedAsynch/Makefile b/ndb/test/ndbapi/old_dirs/flexTimedAsynch/Makefile deleted file mode 100644 index e9995dbd16f..00000000000 --- a/ndb/test/ndbapi/old_dirs/flexTimedAsynch/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := flexTimedAsynch - -# Source files of non-templated classes (.C files) -SOURCES = flexTimedAsynch.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/flex_bench_mysql/Makefile b/ndb/test/ndbapi/old_dirs/flex_bench_mysql/Makefile deleted file mode 100644 index d2608526cae..00000000000 --- a/ndb/test/ndbapi/old_dirs/flex_bench_mysql/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := flex_bench_mysql - -# Source files of non-templated classes (.C files) -SOURCES = flex_bench_mysql.cpp - -CCFLAGS_LOC += -I$(call fixpath,$(NDB_TOP)/../include) -BIN_TARGET_LIBS_DIRS += $(NDB_TOP)/../libmysql_r/.libs -BIN_TARGET_LIBS += z mysqlclient_r - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/indexTest/Makefile b/ndb/test/ndbapi/old_dirs/indexTest/Makefile deleted file mode 100644 index d842e487ee5..00000000000 --- a/ndb/test/ndbapi/old_dirs/indexTest/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := index - -SOURCES := index.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/indexTest2/Makefile b/ndb/test/ndbapi/old_dirs/indexTest2/Makefile deleted file mode 100644 index ad78fd51986..00000000000 --- a/ndb/test/ndbapi/old_dirs/indexTest2/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := index2 - -SOURCES := index2.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/interpreterInTup/Makefile b/ndb/test/ndbapi/old_dirs/interpreterInTup/Makefile deleted file mode 100644 index 074adbf674a..00000000000 --- a/ndb/test/ndbapi/old_dirs/interpreterInTup/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - - -BIN_TARGET := interpreterInTup - -SOURCES := interpreterInTup.cc - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/Makefile deleted file mode 100644 index af472b1589f..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -include .defs.mk - -DIRS := src async-src script - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/Makefile deleted file mode 100644 index 744d6171139..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -include .defs.mk - -DIRS = \ - user \ - generator - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/generator/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/generator/Makefile deleted file mode 100644 index c1f84a3ef70..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/generator/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -SOURCES = mainAsyncGenerator.cpp asyncGenerator.cpp - -CCFLAGS_LOC := -I../include -I../../include - -BIN_TARGET := DbAsyncGenerator -BIN_TARGET_ARCHIVES := lmc_AsyncUser - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h deleted file mode 100644 index 3e1a3e6704a..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef DBGENERATOR_H -#define DBGENERATOR_H - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ - -#include "testData.h" -#include "userInterface.h" - -/*************************************************************** -* M A C R O S * -***************************************************************/ - -/***************************************************************/ -/* C O N S T A N T S */ -/***************************************************************/ - -/*************************************************************** -* D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* P U B L I C F U N C T I O N S * -***************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -extern void asyncGenerator(ThreadData *d, int parallellism, - int millisSendPoll, - int minEventSendPoll, - int forceSendPoll); - -#ifdef __cplusplus -} -#endif - -/*************************************************************** -* E X T E R N A L D A T A * -***************************************************************/ - - - -#endif /* DBGENERATOR_H */ - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h deleted file mode 100644 index 0327656de73..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef TESTDATA_H -#define TESTDATA_H - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ -#include -#include -#include -#include -#include "testDefinitions.h" - -/*************************************************************** -* M A C R O S * -***************************************************************/ - -/***************************************************************/ -/* C O N S T A N T S */ -/***************************************************************/ - -#define NUM_TRANSACTION_TYPES 5 -#define SESSION_LIST_LENGTH 1000 - -/*************************************************************** -* D A T A S T R U C T U R E S * -***************************************************************/ - -typedef struct { - SubscriberNumber subscriberNumber; - ServerId serverId; -} SessionElement; - -typedef struct { - SessionElement list[SESSION_LIST_LENGTH]; - unsigned int readIndex; - unsigned int writeIndex; - unsigned int numberInList; -} SessionList; - -typedef struct { - unsigned int count; - unsigned int branchExecuted; - unsigned int rollbackExecuted; - - /** - * Latency measures - */ - NDB_TICKS startTime; - NDBT_Stats latency; - unsigned int latencyCounter; - - inline void startLatency(){ - if((latencyCounter & 127) == 127) - startTime = NdbTick_CurrentMillisecond(); - } - - inline void stopLatency(){ - if((latencyCounter & 127) == 127){ - const NDB_TICKS tmp = NdbTick_CurrentMillisecond() - startTime; - latency.addObservation(tmp); - } - latencyCounter++; - } -} TransactionDefinition; - -typedef struct { - RandomSequence transactionSequence; - RandomSequence rollbackSequenceT4; - RandomSequence rollbackSequenceT5; - - TransactionDefinition transactions[NUM_TRANSACTION_TYPES]; - - unsigned int totalTransactions; - - double outerLoopTime; - double outerTps; - - SessionList activeSessions; - -} GeneratorStatistics; - -typedef enum{ - Runnable, - Running -} RunState ; - -typedef struct { - SubscriberNumber number; - SubscriberSuffix suffix; - SubscriberName name; - Location location; - ChangedBy changed_by; - ChangedTime changed_time; - ServerId server_id; - ServerBit server_bit; - SessionDetails session_details; - - GroupId group_id; - ActiveSessions sessions; - Permission permission; - - unsigned int do_rollback; - - unsigned int branchExecuted; - unsigned int sessionElement; -} TransactionData ; - -typedef struct { - struct NdbThread* pThread; - - unsigned long randomSeed; - unsigned long changedTime; - - unsigned int warmUpSeconds; - unsigned int testSeconds; - unsigned int coolDownSeconds; - - GeneratorStatistics generator; - - /** - * For async execution - */ - RunState runState; - double startTime; - TransactionData transactionData; - struct Ndb * pNDB; -} ThreadData; - -/*************************************************************** - * P U B L I C F U N C T I O N S * - ***************************************************************/ - -/*************************************************************** - * E X T E R N A L D A T A * - ***************************************************************/ - - - -#endif /* TESTDATA_H */ - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h deleted file mode 100644 index 61769904964..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef DBINTERFACE_H -#define DBINTERFACE_H - -/***************************************************************/ -/* I N C L U D E D F I L E S */ -/***************************************************************/ - -#include "testDefinitions.h" -#include "testData.h" - -/*************************************************************** -* M A C R O S * -***************************************************************/ - -/***************************************************************/ -/* C O N S T A N T S */ -/***************************************************************/ - -/*-----------------------*/ -/* Default Database Name */ -/*-----------------------*/ -#define DEFAULTDB "TestDbClient" - -/*************************************************************** -* D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* P U B L I C F U N C T I O N S * -***************************************************************/ - -typedef struct Ndb Ndb; - -#ifdef __cplusplus -extern "C" { -#endif - extern void showTime(); - extern double userGetTime(void); - extern Ndb *asyncDbConnect(int parallellism); - extern void asyncDbDisconnect(Ndb* pNDB); - - extern void start_T1(Ndb * uh, ThreadData * data, int async); - extern void start_T2(Ndb * uh, ThreadData * data, int async); - extern void start_T3(Ndb * uh, ThreadData * data, int async); - extern void start_T4(Ndb * uh, ThreadData * data, int async); - extern void start_T5(Ndb * uh, ThreadData * data, int async); - - extern void complete_T1(ThreadData * data); - extern void complete_T2(ThreadData * data); - extern void complete_T3(ThreadData * data); - extern void complete_T4(ThreadData * data); - extern void complete_T5(ThreadData * data); - -#ifdef __cplusplus -} -#endif - -/*************************************************************** -* E X T E R N A L D A T A * -***************************************************************/ - -#endif /* DBINTERFACE_H */ - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/Makefile deleted file mode 100644 index c0b532a8359..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -ARCHIVE_TARGET := lmc_AsyncUser - -SOURCES := userInterface.C ndb_async2.C - -CCFLAGS_LOC = -I../include -I../../include - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h deleted file mode 100644 index d50183d1749..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef MACROS_H -#define MACROS_H - -#include -#include - -#define ERROR(x) {ndbout_c((x));} -#define ERROR1(x,y) {ndbout_c((x), (y));} -#define ERROR2(x,y,z) {ndbout_c((x), (y), (z));} -#define ERROR3(x,y,z,u) {ndbout_c((x), (y), (z), (u));} -#define ERROR4(x,y,z,u,w) {ndbout_c((x), (y), (z), (u), (w));} - -#define INIT_RANDOM(x) srand48((x)) -#define UI_RANDOM(x) ((unsigned int)(lrand48()%(x))) - -#define ASSERT(cond, message) \ - { if(!(cond)) { ERROR(message); exit(-1); }} - -#ifdef DEBUG_ON -#define DEBUG(x) {ndbout_c((x));} -#define DEBUG1(x,y) {ndbout_c((x), (y));} -#define DEBUG2(x,y,z) {ndbout_c((x), (y), (z));} -#define DEBUG3(x,y,z,u) {ndbout_c((x), (y), (z), (u));} -#define DEBUG4(x,y,z,u,w) {ndbout_c((x), (y), (z), (u), (w));} -#define DEBUG5(x,y,z,u,w, v) {ndbout_c((x), (y), (z), (u), (w), (v));} -#else -#define DEBUG(x) -#define DEBUG1(x,y) -#define DEBUG2(x,y,z) -#define DEBUG3(x,y,z,u) -#define DEBUG4(x,y,z,u,w) -#define DEBUG5(x,y,z,u,w, v) -#endif - -#endif diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp deleted file mode 100644 index cb5cd062ae4..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef NDB_ERROR_H -#define NDB_ERROR_H - -#include -#include -#include "userInterface.h" -#include - -inline -void -CHECK_ALLOWED_ERROR(const char * str, - const ThreadData * td, - const struct NdbError & error){ - - char buf[100]; - snprintf(buf, sizeof(buf), "subscriber = %.*s ", - SUBSCRIBER_NUMBER_LENGTH, - td->transactionData.number); - ndbout << str << " " << error << endl - << buf; - showTime(); - - switch(error.classification) { - case NdbError::TimeoutExpired: - case NdbError::OverloadError: - case NdbError::TemporaryResourceError: - case NdbError::NodeRecoveryError: - break; - default: - if(error.status != NdbError::TemporaryError) - exit(-1); - } -} - -inline -void -CHECK_NULL(void * null, - const char * str, - const ThreadData * td, - const struct NdbError & err){ - if(null == 0){ - CHECK_ALLOWED_ERROR(str, td, err); - exit(-1); - } -} - -#endif diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/bin/.empty b/ndb/test/ndbapi/old_dirs/lmc-bench/bin/.empty deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp b/ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp deleted file mode 100644 index ff7be1f8956..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef NDB_SCHEMA_H -#define NDB_SCHEMA_H - -#include "testDefinitions.h" - -#define SUBSCRIBER_TABLE "SUBSCRIBER" -#define SUBSCRIBER_NUMBER "NUMBER" -#define SUBSCRIBER_LOCATION "LOCATION" -#define SUBSCRIBER_NAME "NAME" -#define SUBSCRIBER_GROUP "GROUP_ID" -#define SUBSCRIBER_SESSIONS "SESSIONS" -#define SUBSCRIBER_CHANGED_BY "CHANGED_BY" -#define SUBSCRIBER_CHANGED_TIME "CHANGED_TIME" - -#define SERVER_TABLE "SERVER" -#define SERVER_ID "SERVER_ID" -#define SERVER_SUBSCRIBER_SUFFIX "SUFFIX" -#define SERVER_NAME "NAME" -#define SERVER_READS "NO_OF_READ" -#define SERVER_INSERTS "NO_OF_INSERT" -#define SERVER_DELETES "NO_OF_DELETE" - -#define GROUP_TABLE "GROUP" -#define GROUP_ID "GROUP_ID" -#define GROUP_NAME "GROUP_NAME" -#define GROUP_ALLOW_READ "ALLOW_READ" -#define GROUP_ALLOW_INSERT "ALLOW_INSERT" -#define GROUP_ALLOW_DELETE "ALLOW_DELETE" - -#define SESSION_TABLE "SESSION" -#define SESSION_SERVER "SERVER_ID" -#define SESSION_SUBSCRIBER "NUMBER" -#define SESSION_DATA "DATA" - -/** Numbers */ - -#define IND_SUBSCRIBER_NUMBER (unsigned)0 -#define IND_SUBSCRIBER_NAME (unsigned)1 -#define IND_SUBSCRIBER_GROUP (unsigned)2 -#define IND_SUBSCRIBER_LOCATION (unsigned)3 -#define IND_SUBSCRIBER_SESSIONS (unsigned)4 -#define IND_SUBSCRIBER_CHANGED_BY (unsigned)5 -#define IND_SUBSCRIBER_CHANGED_TIME (unsigned)6 - -#define IND_SERVER_SUBSCRIBER_SUFFIX (unsigned)0 -#define IND_SERVER_ID (unsigned)1 -#define IND_SERVER_NAME (unsigned)2 -#define IND_SERVER_READS (unsigned)3 -#define IND_SERVER_INSERTS (unsigned)4 -#define IND_SERVER_DELETES (unsigned)5 - -#define IND_GROUP_ID (unsigned)0 -#define IND_GROUP_NAME (unsigned)1 -#define IND_GROUP_ALLOW_READ (unsigned)2 -#define IND_GROUP_ALLOW_INSERT (unsigned)3 -#define IND_GROUP_ALLOW_DELETE (unsigned)4 - -#define IND_SESSION_SUBSCRIBER (unsigned)0 -#define IND_SESSION_SERVER (unsigned)1 -#define IND_SESSION_DATA (unsigned)2 - -#endif diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h b/ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h deleted file mode 100644 index e2705b55a34..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef TESTDEFINITIONS_H -#define TESTDEFINITIONS_H - -/***************************************************************/ -/* I N C L U D E D F I L E S */ -/***************************************************************/ - -#include - -/***************************************************************/ -/* C O N S T A N T S */ -/***************************************************************/ - -#define OP_PER_TRANS 200 -#define NO_OF_SUBSCRIBERS 500000 -#define NO_OF_GROUPS 100 -#define NO_OF_SERVERS 20 - -#define SUBSCRIBER_NUMBER_LENGTH 12 -#define SUBSCRIBER_NUMBER_SUFFIX_LENGTH 2 - -#define SUBSCRIBER_NAME_LENGTH 32 -#define CHANGED_BY_LENGTH 32 -#define CHANGED_TIME_LENGTH 32 -#define SESSION_DETAILS_LENGTH 2000 -#define SERVER_NAME_LENGTH 32 -#define GROUP_NAME_LENGTH 32 - -/*************************************************************** -* D A T A S T R U C T U R E S * -***************************************************************/ - -#define PADDING 4 - -typedef char SubscriberNumber[SUBSCRIBER_NUMBER_LENGTH]; -typedef char SubscriberSuffix[SUBSCRIBER_NUMBER_SUFFIX_LENGTH + 2]; -typedef char SubscriberName[SUBSCRIBER_NAME_LENGTH]; -typedef char ServerName[SERVER_NAME_LENGTH]; -typedef char GroupName[GROUP_NAME_LENGTH]; -typedef char ChangedBy[CHANGED_BY_LENGTH]; -typedef char ChangedTime[CHANGED_TIME_LENGTH]; -typedef char SessionDetails[SESSION_DETAILS_LENGTH]; -typedef Uint32 ServerId; -typedef Uint32 ServerBit; -typedef Uint32 GroupId; -typedef Uint32 Location; -typedef Uint32 Permission; - -typedef Uint32 Counter; -typedef Uint32 ActiveSessions; -typedef unsigned int BranchExecuted; -typedef unsigned int DoRollback; - -/*************************************************************** -* P U B L I C F U N C T I O N S * -***************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef __cplusplus -} -#endif - -/*************************************************************** -* E X T E R N A L D A T A * -***************************************************************/ - - - -#endif /* TESTDEFINITIONS_H */ - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/lib/.empty b/ndb/test/ndbapi/old_dirs/lmc-bench/lib/.empty deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/script/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/script/Makefile deleted file mode 100644 index 240b5957573..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/script/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -include .defs.mk - -SOURCES.sh := async-lmc-bench.sh async-lmc-bench-l.sh async-lmc-bench-p10.sh async-lmc-bench-l-p10.sh - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l-p10.sh b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l-p10.sh deleted file mode 100755 index 1ce3969f9fb..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l-p10.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -DbCreate -l -ret=$? -if [ $ret -ne 0 ] -then - echo "DbCreate failed" - exit $ret -fi - -DbAsyncGenerator -time 300 -p 10 $* -ret=$? -exit $ret - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l.sh b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l.sh deleted file mode 100755 index a5de71395c4..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -DbCreate -l -ret=$? -if [ $ret -ne 0 ] -then - echo "DbCreate failed" - exit $ret -fi - -DbAsyncGenerator -time 300 $* -ret=$? -exit $ret - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-p10.sh b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-p10.sh deleted file mode 100755 index 92c853cdd86..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-p10.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -DbCreate -ret=$? -if [ $ret -ne 0 ] -then - echo "DbCreate failed" - exit $ret -fi - -DbAsyncGenerator -time 300 -p 10 $* -ret=$? -exit $ret - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench.sh b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench.sh deleted file mode 100755 index da8e9d9bf42..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -DbCreate -ret=$? -if [ $ret -ne 0 ] -then - echo "DbCreate failed" - exit $ret -fi - -DbAsyncGenerator -time 300 $* -ret=$? -exit $ret - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/src/Makefile deleted file mode 100644 index ae7fac9c49b..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -include .defs.mk - -DIRS = \ - user \ - populator \ - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/README b/ndb/test/ndbapi/old_dirs/lmc-bench/src/README deleted file mode 100644 index e81c8ba0051..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/README +++ /dev/null @@ -1,8 +0,0 @@ - -Note that you have to use gnumake to build - -On ndbs05: -use 'gmake' instead of 'make' - -On hfXXX: -do 'module add make' diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/Makefile deleted file mode 100644 index 143d9ba655e..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -SOURCES = mainGenerator.c dbGenerator.c - -CCFLAGS_LOC := -I../include -I../../include - -OBJECTS = \ - mainGenerator.o\ - dbGenerator.o - -BIN_TARGET := DbGenerator -BIN_TARGET_ARCHIVES := lmc_User - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c deleted file mode 100644 index a0df1e7c1d2..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c +++ /dev/null @@ -1,542 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ - -#include -#include "dbGenerator.h" - -/*************************************************************** -* L O C A L C O N S T A N T S * -***************************************************************/ - -/*************************************************************** -* L O C A L D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* L O C A L F U N C T I O N S * -***************************************************************/ - -static void getRandomSubscriberNumber(SubscriberNumber number); -static void getRandomServerId(ServerId *serverId); -static void getRandomChangedBy(ChangedBy changedBy); -static void getRandomChangedTime(ChangedTime changedTime); - -static void clearTransaction(TransactionDefinition *trans); -static void initGeneratorStatistics(GeneratorStatistics *gen); - -static void doOneTransaction(UserHandle *uh, GeneratorStatistics *gen); -static void doTransaction_T1(UserHandle *uh, GeneratorStatistics *gen); -static void doTransaction_T2(UserHandle *uh, GeneratorStatistics *gen); -static void doTransaction_T3(UserHandle *uh, GeneratorStatistics *gen); -static void doTransaction_T4(UserHandle *uh, GeneratorStatistics *gen); -static void doTransaction_T5(UserHandle *uh, GeneratorStatistics *gen); - -/*************************************************************** -* L O C A L D A T A * -***************************************************************/ - -static SequenceValues transactionDefinition[] = { - {25, 1}, - {25, 2}, - {20, 3}, - {15, 4}, - {15, 5}, - {0, 0} -}; - -static SequenceValues rollbackDefinition[] = { - {98, 0}, - {2 , 1}, - {0, 0} -}; - -static int maxsize = 0; - -/*************************************************************** -* P U B L I C D A T A * -***************************************************************/ - -/*************************************************************** -**************************************************************** -* L O C A L F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -static void getRandomSubscriberNumber(SubscriberNumber number) -{ - uint32 tmp; - char sbuf[SUBSCRIBER_NUMBER_LENGTH + 1]; - tmp = myRandom48(NO_OF_SUBSCRIBERS); - sprintf(sbuf, "%.*d", SUBSCRIBER_NUMBER_LENGTH, tmp); - memcpy(number, sbuf, SUBSCRIBER_NUMBER_LENGTH); -} - -static void getRandomServerId(ServerId *serverId) -{ - *serverId = myRandom48(NO_OF_SERVERS); -} - -static void getRandomChangedBy(ChangedBy changedBy) -{ - memset(changedBy, myRandom48(26)+'A', CHANGED_BY_LENGTH); - changedBy[CHANGED_BY_LENGTH] = 0; -} - -static void getRandomChangedTime(ChangedTime changedTime) -{ - memset(changedTime, myRandom48(26)+'A', CHANGED_TIME_LENGTH); - changedTime[CHANGED_TIME_LENGTH] = 0; -} - -static void clearTransaction(TransactionDefinition *trans) -{ - trans->benchTime = 0.0; - trans->count = 0; - trans->branchExecuted = 0; - trans->rollbackExecuted = 0; -} - -static int listFull(SessionList *list) -{ - return(list->numberInList == SESSION_LIST_LENGTH); -} - -static int listEmpty(SessionList *list) -{ - return(list->numberInList == 0); -} - -static void insertSession(SessionList *list, - SubscriberNumber number, - ServerId serverId) -{ - SessionElement *e; - if( listFull(list) ) return; - - e = &list->list[list->writeIndex]; - - strcpy(e->subscriberNumber, number); - e->serverId = serverId; - - list->writeIndex = (list->writeIndex + 1) % SESSION_LIST_LENGTH; - list->numberInList++; - -if( list->numberInList > maxsize ) -maxsize = list->numberInList; -} - -static SessionElement *getNextSession(SessionList *list) -{ - if( listEmpty(list) ) return(0); - - return(&list->list[list->readIndex]); -} - -static void deleteSession(SessionList *list) -{ - if( listEmpty(list) ) return; - - list->readIndex = (list->readIndex + 1) % SESSION_LIST_LENGTH; - list->numberInList--; -} - -static void initGeneratorStatistics(GeneratorStatistics *gen) -{ - int i; - - if( initSequence(&gen->transactionSequence, - transactionDefinition) != 0 ) { - printf("could not set the transaction types\n"); - exit(0); - } - - if( initSequence(&gen->rollbackSequenceT4, - rollbackDefinition) != 0 ) { - printf("could not set the rollback sequence\n"); - exit(0); - } - - if( initSequence(&gen->rollbackSequenceT5, - rollbackDefinition) != 0 ) { - printf("could not set the rollback sequence\n"); - exit(0); - } - - for(i = 0; i < NUM_TRANSACTION_TYPES; i++ ) - clearTransaction(&gen->transactions[i]); - - gen->totalTransactions = 0; - - gen->activeSessions.numberInList = 0; - gen->activeSessions.readIndex = 0; - gen->activeSessions.writeIndex = 0; -} - - -static void doOneTransaction(UserHandle *uh, GeneratorStatistics *gen) -{ - unsigned int transactionType; - - transactionType = getNextRandom(&gen->transactionSequence); - - switch(transactionType) { - case 1: - doTransaction_T1(uh, gen); - break; - case 2: - doTransaction_T2(uh, gen); - break; - case 3: - doTransaction_T3(uh, gen); - break; - case 4: - doTransaction_T4(uh, gen); - break; - case 5: - doTransaction_T5(uh, gen); - break; - default: - printf("Unknown transaction type: %d\n", transactionType); - } - - gen->totalTransactions++; -} - -static void doTransaction_T1(UserHandle *uh, GeneratorStatistics *gen) -{ - SubscriberNumber number; - Location new_location; - ChangedBy changed_by; - ChangedTime changed_time; - - double start_time; - double end_time; - double transaction_time; - - unsigned int tid = 0; - - /*----------------*/ - /* Init arguments */ - /*----------------*/ - getRandomSubscriberNumber(number); - getRandomChangedBy(changed_by); - getRandomChangedTime(changed_time); - new_location = changed_by[0]; - - /*-----------------*/ - /* Run transaction */ - /*-----------------*/ - start_time = userGetTimeSync(); - userTransaction_T1(uh, - number, - new_location, - changed_by, - changed_time); - end_time = userGetTimeSync(); - - /*-------------------*/ - /* Update Statistics */ - /*-------------------*/ - transaction_time = end_time - start_time; - gen->transactions[tid].benchTime += transaction_time; - gen->transactions[tid].count++; -} - -static void doTransaction_T2(UserHandle *uh, GeneratorStatistics *gen) -{ - SubscriberNumber number; - Location new_location; - ChangedBy changed_by; - ChangedTime changed_time; - SubscriberName subscriberName; - - double start_time; - double end_time; - double transaction_time; - - unsigned int tid = 1; - - /*----------------*/ - /* Init arguments */ - /*----------------*/ - getRandomSubscriberNumber(number); - - /*-----------------*/ - /* Run transaction */ - /*-----------------*/ - start_time = userGetTimeSync(); - userTransaction_T2(uh, - number, - &new_location, - changed_by, - changed_time, - subscriberName); - end_time = userGetTimeSync(); - - /*-------------------*/ - /* Update Statistics */ - /*-------------------*/ - transaction_time = end_time - start_time; - gen->transactions[tid].benchTime += transaction_time; - gen->transactions[tid].count++; -} - -static void doTransaction_T3(UserHandle *uh, GeneratorStatistics *gen) -{ - SubscriberNumber number; - ServerId serverId; - ServerBit serverBit; - SessionDetails sessionDetails; - unsigned int branchExecuted; - SessionElement *se; - - double start_time; - double end_time; - double transaction_time; - - unsigned int tid = 2; - - /*----------------*/ - /* Init arguments */ - /*----------------*/ - se = getNextSession(&gen->activeSessions); - if( se ) { - strcpy(number, se->subscriberNumber); - serverId = se->serverId; - } - else { - getRandomSubscriberNumber(number); - getRandomServerId(&serverId); - } - - serverBit = 1 << serverId; - - /*-----------------*/ - /* Run transaction */ - /*-----------------*/ - start_time = userGetTimeSync(); - userTransaction_T3(uh, - number, - serverId, - serverBit, - sessionDetails, - &branchExecuted); - end_time = userGetTimeSync(); - - /*-------------------*/ - /* Update Statistics */ - /*-------------------*/ - transaction_time = end_time - start_time; - gen->transactions[tid].benchTime += transaction_time; - gen->transactions[tid].count++; - - if(branchExecuted) - gen->transactions[tid].branchExecuted++; -} - -static void doTransaction_T4(UserHandle *uh, GeneratorStatistics *gen) -{ - SubscriberNumber number; - ServerId serverId; - ServerBit serverBit; - SessionDetails sessionDetails; - unsigned int branchExecuted; - unsigned int rollback; - - double start_time; - double end_time; - double transaction_time; - - unsigned int tid = 3; - - /*----------------*/ - /* Init arguments */ - /*----------------*/ - getRandomSubscriberNumber(number); - getRandomServerId(&serverId); - - serverBit = 1 << serverId; - rollback = getNextRandom(&gen->rollbackSequenceT4); - - memset(sessionDetails, myRandom48(26)+'A', SESSION_DETAILS_LENGTH); - sessionDetails[SESSION_DETAILS_LENGTH] = 0; - - /*-----------------*/ - /* Run transaction */ - /*-----------------*/ - start_time = userGetTimeSync(); - userTransaction_T4(uh, - number, - serverId, - serverBit, - sessionDetails, - rollback, - &branchExecuted); - end_time = userGetTimeSync(); - - /*-------------------*/ - /* Update Statistics */ - /*-------------------*/ - transaction_time = end_time - start_time; - gen->transactions[tid].benchTime += transaction_time; - gen->transactions[tid].count++; - - if(branchExecuted) - gen->transactions[tid].branchExecuted++; - if(rollback) - gen->transactions[tid].rollbackExecuted++; - - if( branchExecuted && !rollback ) { - insertSession(&gen->activeSessions, number, serverId); - } -} - -static void doTransaction_T5(UserHandle *uh, GeneratorStatistics *gen) -{ - SubscriberNumber number; - ServerId serverId; - ServerBit serverBit; - unsigned int branchExecuted; - unsigned int rollback; - SessionElement *se; - - double start_time; - double end_time; - double transaction_time; - - unsigned int tid = 4; - - /*----------------*/ - /* Init arguments */ - /*----------------*/ - se = getNextSession(&gen->activeSessions); - if( se ) { - strcpy(number, se->subscriberNumber); - serverId = se->serverId; - } - else { - getRandomSubscriberNumber(number); - getRandomServerId(&serverId); - } - - serverBit = 1 << serverId; - rollback = getNextRandom(&gen->rollbackSequenceT5); - - /*-----------------*/ - /* Run transaction */ - /*-----------------*/ - start_time = userGetTimeSync(); - userTransaction_T5(uh, - number, - serverId, - serverBit, - rollback, - &branchExecuted); - end_time = userGetTimeSync(); - - /*-------------------*/ - /* Update Statistics */ - /*-------------------*/ - transaction_time = end_time - start_time; - gen->transactions[tid].benchTime += transaction_time; - gen->transactions[tid].count++; - - if(branchExecuted) - gen->transactions[tid].branchExecuted++; - if(rollback) - gen->transactions[tid].rollbackExecuted++; - - if( se && !rollback) { - deleteSession(&gen->activeSessions); - } -} - -/*************************************************************** -**************************************************************** -* P U B L I C F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - - -void dbGenerator(UserHandle *uh, ThreadData *data) -{ - GeneratorStatistics rg_warmUp; - GeneratorStatistics rg_coolDown; - GeneratorStatistics *st; - double periodStop; - double benchTimeStart; - double benchTimeEnd; - int i; - - myRandom48Init(data->randomSeed); - - initGeneratorStatistics(&rg_warmUp); - initGeneratorStatistics(&data->generator); - initGeneratorStatistics(&rg_coolDown); - - /*----------------*/ - /* warm up period */ - /*----------------*/ - periodStop = userGetTimeSync() + (double)data->warmUpSeconds; - while(userGetTimeSync() < periodStop){ - doOneTransaction(uh, &rg_warmUp); - } - - /*-------------------------*/ - /* normal benchmark period */ - /*-------------------------*/ - benchTimeStart = userGetTimeSync(); - - if( data->numTransactions > 0 ) { - for(i = 0; i < data->numTransactions; i++) - doOneTransaction(uh, &data->generator); - } - else { - periodStop = benchTimeStart + (double)data->testSeconds; - while(userGetTimeSync() < periodStop) - doOneTransaction(uh, &data->generator); - } - - benchTimeEnd = userGetTimeSync(); - - /*------------------*/ - /* cool down period */ - /*------------------*/ - periodStop = benchTimeEnd + data->coolDownSeconds; - while(userGetTimeSync() < periodStop){ - doOneTransaction(uh, &rg_coolDown); - } - - /*---------------------------------------------------------*/ - /* add the times for all transaction for inner loop timing */ - /*---------------------------------------------------------*/ - st = &data->generator; - st->innerLoopTime = 0.0; - for(i = 0 ; i < NUM_TRANSACTION_TYPES; i++) { - st->innerLoopTime += st->transactions[i].benchTime; - st->transactions[i].tps = getTps(st->transactions[i].count, - st->transactions[i].benchTime); - } - - st->outerLoopTime = benchTimeEnd - benchTimeStart; - st->outerTps = getTps(st->totalTransactions, st->outerLoopTime); - st->innerTps = getTps(st->totalTransactions, st->innerLoopTime); - - /* printf("maxsize = %d\n",maxsize); */ -} diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h deleted file mode 100644 index 206b13c3f00..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef DBGENERATOR_H -#define DBGENERATOR_H - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ - -#include "testData.h" -#include "userInterface.h" - -/*************************************************************** -* M A C R O S * -***************************************************************/ - -/***************************************************************/ -/* C O N S T A N T S */ -/***************************************************************/ - -/*************************************************************** -* D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* P U B L I C F U N C T I O N S * -***************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -extern void dbGenerator(UserHandle *uh, ThreadData *data); - - -#ifdef __cplusplus -} -#endif - -/*************************************************************** -* E X T E R N A L D A T A * -***************************************************************/ - - - -#endif /* DBGENERATOR_H */ - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c deleted file mode 100644 index cb47207a0f2..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c +++ /dev/null @@ -1,322 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include - -#include -#include -#include -#include - -#include "userInterface.h" -#include "dbGenerator.h" - - -static int numProcesses; -static int numTransactions; -static int numSeconds; -static int numWarmSeconds; -static char *testDbName; - -static ThreadData data[100]; - -typedef struct { - pthread_t threadId; - int waitSeconds; - int toExit; -}CheckpointData; - -static void usage(char *prog) -{ - char *progname; - - /*--------------------------------------------*/ - /* Get the name of the program (without path) */ - /*--------------------------------------------*/ - progname = strrchr(prog, '/'); - - if (progname == 0) - progname = prog; - else - ++progname; - - fprintf(stderr, - "Usage: %s [-db ] [-proc ] [-transactions ] [-time ]\n" - " -db Specifies the database name\n" - " default = '%s'\n" - " -proc Specifies that is the number of\n" - " concurrent processes. The default is 1.\n" - " -transactions Specifies that transactions will be\n" - " performed. The default is to do a specific time interval\n" - " -time Specifies that the test will run for sec.\n" - " The default is 10 sec\n" - " -warm Specifies the warm-up/cooldown period of sec.\n" - " The default is 10 sec\n", - progname, DEFAULTDB); - exit(1); -} - -static void parse_args(int argc,char **argv) -{ - int i; - - testDbName = DEFAULTDB; - numProcesses = 1; - numTransactions = 0; - numSeconds = 10; - numWarmSeconds = 10; - - i = 1; - while (i < argc){ - if (strcmp("-db",argv[i]) == 0) { - if (i + 1 >= argc) { - usage(argv[0]); - exit(1); - } - testDbName = argv[i + 1]; - i += 2; - } - else if (strcmp("-proc",argv[i]) == 0) { - if (i + 1 >= argc) { - usage(argv[0]); - exit(1); - } - if (sscanf(argv[i+1], "%d", &numProcesses) == -1 || - numProcesses <= 0 || numProcesses > 99) { - fprintf(stderr, "-proc flag requires a positive integer argument [1..99]\n"); - usage(argv[0]); - exit(1); - } - i += 2; - } - else if (strcmp("-transactions",argv[i]) == 0) { - if (i + 1 >= argc) { - usage(argv[0]); - exit(1); - } - if (sscanf(argv[i+1], "%d", &numTransactions) == -1 || - numTransactions < 0) { - fprintf(stderr, "-transactions flag requires a positive integer argument\n"); - usage(argv[0]); - exit(1); - } - i += 2; - } - else if (strcmp("-time",argv[i]) == 0) { - if (i + 1 >= argc) { - usage(argv[0]); - exit(1); - } - if (sscanf(argv[i+1], "%d", &numSeconds) == -1 || - numSeconds < 0) { - fprintf(stderr, "-time flag requires a positive integer argument\n"); - usage(argv[0]); - exit(1); - } - i += 2; - } - else if (strcmp("-warm",argv[i]) == 0) { - if (i + 1 >= argc) { - usage(argv[0]); - exit(1); - } - if (sscanf(argv[i+1], "%d", &numWarmSeconds) == -1 || - numWarmSeconds < 0) { - fprintf(stderr, "-warm flag requires a positive integer argument\n"); - usage(argv[0]); - exit(1); - } - i += 2; - } - else - usage(argv[0]); - } -} - -static void print_transaction(const char *header, - unsigned long totalCount, - TransactionDefinition *trans, - unsigned int printBranch, - unsigned int printRollback) -{ - double f; - - printf(" %s: %d (%.2f%%) Time: %.4f sec TPS = %.0f\n", - header, - trans->count, - (double)trans->count / (double)totalCount * 100.0, - trans->benchTime, - trans->tps); - - if( printBranch ){ - if( trans->count == 0 ) - f = 0.0; - else - f = (double)trans->branchExecuted / (double)trans->count * 100.0; - printf(" Branches Executed: %d (%.2f%%)\n", trans->branchExecuted, f); - } - - if( printRollback ){ - if( trans->count == 0 ) - f = 0.0; - else - f = (double)trans->rollbackExecuted / (double)trans->count * 100.0; - printf(" Rollback Executed: %d (%.2f%%)\n", trans->rollbackExecuted, f); - } -} - -void print_stats_sync(const char *title, - unsigned int length, - unsigned int transactionFlag, - GeneratorStatistics *gen, - int numProc) -{ - int i; - char buf[10]; - char name[100]; - - name[0] = 0; - NdbHost_GetHostName(name); - - printf("\n------ %s ------\n",title); - printf("Length : %d %s\n", - length, - transactionFlag ? "Transactions" : "sec"); - printf("Processor : %s\n", name); - printf("Number of Proc: %d\n",numProc); - printf("\n"); - - if( gen->totalTransactions == 0 ) { - printf(" No Transactions for this test\n"); - } - else { - for(i = 0; i < 5; i++) { - sprintf(buf, "T%d",i+1); - print_transaction(buf, - gen->totalTransactions, - &gen->transactions[i], - i >= 2, - i >= 3 ); - } - - printf("\n"); - printf(" Overall Statistics:\n"); - printf(" Transactions: %d\n", gen->totalTransactions); - printf(" Inner : %.0f TPS\n",gen->innerTps); - printf(" Outer : %.0f TPS\n",gen->outerTps); - printf("\n"); - } -} - -static void *threadRoutine(void *arg) -{ - UserHandle *uh; - ThreadData *data = (ThreadData *)arg; - - uh = userDbConnect(0, testDbName); - NdbSleep_MilliSleep(data->threadId); - dbGenerator(uh,data); - userDbDisconnect(uh); - - pthread_exit(0); - return(0); -} - -NDB_COMMAND(DbGenerator, "DbGenerator", "DbGenerator", "DbGenerator", 16384) -{ - int i; - int j; - GeneratorStatistics stats; - GeneratorStatistics *p; - CheckpointData cd; - - parse_args(argc,argv); - - printf("\nStarting Test with %d process(es) for %d %s\n", - numProcesses, - numTransactions ? numTransactions : numSeconds, - numTransactions ? "Transactions" : "sec"); - printf(" WarmUp/coolDown = %d sec\n", numWarmSeconds); - - /* - cd.waitSeconds = 300; - cd.toExit = 0; - pthread_create(&cd.threadId, 0, checkpointRoutine, &cd); - */ - - for(i = 0; i < numProcesses; i++) { - data[i].warmUpSeconds = numWarmSeconds; - data[i].testSeconds = numSeconds; - data[i].coolDownSeconds = numWarmSeconds; - data[i].numTransactions = numTransactions; - data[i].randomSeed = time(0)+i; - j = pthread_create(&data[i].threadId, 0, threadRoutine, &data[i]); - if(j != 0){ - perror("Failed to create thread"); - } - } - - /*--------------------------------*/ - /* Wait for all processes to exit */ - /*--------------------------------*/ - for(i = 0; i < numProcesses; i++) - pthread_join(data[i].threadId, 0); - - printf("All threads have finished\n"); - - cd.toExit = 1; - - /*-------------------------------------------*/ - /* Clear all structures for total statistics */ - /*-------------------------------------------*/ - stats.totalTransactions = 0; - stats.outerTps = 0.0; - stats.innerTps = 0.0; - - for(i = 0; i < NUM_TRANSACTION_TYPES; i++ ) { - stats.transactions[i].benchTime = 0.0; - stats.transactions[i].count = 0; - stats.transactions[i].tps = 0.0; - stats.transactions[i].branchExecuted = 0; - stats.transactions[i].rollbackExecuted = 0; - } - - /*--------------------------------*/ - /* Add the values for all Threads */ - /*--------------------------------*/ - for(i = 0; i < numProcesses; i++) { - p = &data[i].generator; - - stats.totalTransactions += p->totalTransactions; - stats.outerTps += p->outerTps; - stats.innerTps += p->innerTps; - - for(j = 0; j < NUM_TRANSACTION_TYPES; j++ ) { - stats.transactions[j].benchTime += p->transactions[j].benchTime; - stats.transactions[j].count += p->transactions[j].count; - stats.transactions[j].tps += p->transactions[j].tps; - stats.transactions[j].branchExecuted += p->transactions[j].branchExecuted; - stats.transactions[j].rollbackExecuted += p->transactions[j].rollbackExecuted; - } - } - - print_stats_sync("Test Results", - numTransactions ? numTransactions : numSeconds, - numTransactions ? 1 : 0, - &stats, - numProcesses); - - return(0); -} diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h deleted file mode 100644 index 494b111ea7f..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef TESTDATA_H -#define TESTDATA_H - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ - -#include "testDefinitions.h" -#include - -/*************************************************************** -* M A C R O S * -***************************************************************/ - -/***************************************************************/ -/* C O N S T A N T S */ -/***************************************************************/ - -#define NUM_TRANSACTION_TYPES 5 -#define SESSION_LIST_LENGTH 1000 - -/*************************************************************** -* D A T A S T R U C T U R E S * -***************************************************************/ - -typedef struct { - SubscriberNumber subscriberNumber; - ServerId serverId; -} SessionElement; - -typedef struct { - SessionElement list[SESSION_LIST_LENGTH]; - unsigned int readIndex; - unsigned int writeIndex; - unsigned int numberInList; -} SessionList; - -typedef struct { - double benchTime; - unsigned int count; - double tps; - unsigned int branchExecuted; - unsigned int rollbackExecuted; -}TransactionDefinition; - -typedef struct { - RandomSequence transactionSequence; - RandomSequence rollbackSequenceT4; - RandomSequence rollbackSequenceT5; - - TransactionDefinition transactions[NUM_TRANSACTION_TYPES]; - - unsigned int totalTransactions; - - double innerLoopTime; - double innerTps; - - double outerLoopTime; - double outerTps; - - SessionList activeSessions; -} GeneratorStatistics; - -typedef struct { - unsigned long threadId; - unsigned long randomSeed; - - unsigned int warmUpSeconds; - unsigned int testSeconds; - unsigned int coolDownSeconds; - unsigned int numTransactions; - - GeneratorStatistics generator; -}ThreadData; - -/*************************************************************** -* P U B L I C F U N C T I O N S * -***************************************************************/ - -/*************************************************************** -* E X T E R N A L D A T A * -***************************************************************/ - - - -#endif /* TESTDATA_H */ - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h deleted file mode 100644 index ed1146f3a0c..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef DBINTERFACE_H -#define DBINTERFACE_H - -/***************************************************************/ -/* I N C L U D E D F I L E S */ -/***************************************************************/ - -#include "testDefinitions.h" - -/*************************************************************** -* M A C R O S * -***************************************************************/ - -/***************************************************************/ -/* C O N S T A N T S */ -/***************************************************************/ - -/*-----------------------*/ -/* Default Database Name */ -/*-----------------------*/ -#define DEFAULTDB "TestDbClient" - -/*************************************************************** -* D A T A S T R U C T U R E S * -***************************************************************/ - -typedef struct { - struct Ndb * pNDB; - struct NdbConnection * pCurrTrans; -} UserHandle; - -/*************************************************************** -* P U B L I C F U N C T I O N S * -***************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -extern double userGetTimeSync(void); - -extern void userCheckpoint(UserHandle *uh); - -extern UserHandle *userDbConnect(uint32 createDb, char *dbName); -extern void userDbDisconnect(UserHandle *uh); - -extern int userDbInsertServer(UserHandle *uh, - ServerId serverId, - SubscriberSuffix suffix, - ServerName name); - -extern int userDbInsertSubscriber(UserHandle *uh, - SubscriberNumber number, - uint32 groupId, - SubscriberName name); - -extern int userDbInsertGroup(UserHandle *uh, - GroupId groupId, - GroupName name, - Permission allowRead, - Permission allowInsert, - Permission allowDelete); - -extern int userDbCommit(UserHandle *uh); -extern int userDbRollback(UserHandle *uh); - -extern void userTransaction_T1(UserHandle *uh, - SubscriberNumber number, - Location new_location, - ChangedBy changed_by, - ChangedTime changed_time); - -extern void userTransaction_T2(UserHandle *uh, - SubscriberNumber number, - Location *new_location, - ChangedBy changed_by, - ChangedTime changed_time, - SubscriberName subscriberName); - -extern void userTransaction_T3(UserHandle *uh, - SubscriberNumber number, - ServerId server_id, - ServerBit server_bit, - SessionDetails session_details, - unsigned int *branch_executed); - -extern void userTransaction_T4(UserHandle *uh, - SubscriberNumber number, - ServerId server_id, - ServerBit server_bit, - SessionDetails session_details, - unsigned int do_rollback, - unsigned int *branch_executed); - -extern void userTransaction_T5(UserHandle *uh, - SubscriberNumber number, - ServerId server_id, - ServerBit server_bit, - unsigned int do_rollback, - unsigned int *branch_executed); - - -#ifdef __cplusplus -} -#endif - -/*************************************************************** -* E X T E R N A L D A T A * -***************************************************************/ - -#endif /* DBINTERFACE_H */ - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.linux b/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.linux deleted file mode 100644 index a933669cfe7..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.linux +++ /dev/null @@ -1,6 +0,0 @@ -PROJECT_TOP = /home/lmcritr/ecurlmc/users/lmcritr/dbBenchmark - -CFLAGS = -Wall -Wstrict-prototypes -O2 -I/opt/TimesTen4.1/32/include/ -I../include -LDFLAGS = -L/opt/TimesTen4.1/32/lib -Wl,-rpath,/opt/TimesTen4.1/32/lib -LIBS = -ltten -ldl -LIBSCS = -lttclient -ldl diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.sparc b/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.sparc deleted file mode 100644 index 57ab8bf982f..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.sparc +++ /dev/null @@ -1,15 +0,0 @@ - -include $(UAS_TOP)/Defs.mk - -LINK.CC = CC -CC := /opt/as/forte6/SUNWspro/bin/cc -export CC - -NDB_LIB = -L$(UAS_TOP)/API -lNDB_API \ - -L$(UAS_OSPACE_LOC)/lib -lospace \ - -lrt - -CFLAGS = -xO3 -I../include -mt -LDFLAGS = $(NDB_LIB) -lpthread -LIBS = -LIBSCS = diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/Makefile deleted file mode 100644 index 2107c948843..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := DbCreate -BIN_TARGET_ARCHIVES := lmc_User - -CCFLAGS_LOC:= -I../include -I../../include - -SOURCES := \ - mainPopulate.c\ - dbPopulate.c - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c deleted file mode 100644 index 89c312ab636..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c +++ /dev/null @@ -1,243 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ - -#include - -#include "userInterface.h" - -#include "dbPopulate.h" -#include -#include - -/*************************************************************** -* L O C A L C O N S T A N T S * -***************************************************************/ - -/*************************************************************** -* L O C A L D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* L O C A L F U N C T I O N S * -***************************************************************/ - -static void getRandomSubscriberData(int subscriberNo, - SubscriberNumber number, - SubscriberName name); - -static void populate(char *title, - int count, - void (*func)(UserHandle*,int), - UserHandle *uh); - -static void populateServers(UserHandle *uh, int count); -static void populateSubscribers(UserHandle *uh, int count); -static void populateGroups(UserHandle *uh, int count); - -/*************************************************************** -* L O C A L D A T A * -***************************************************************/ - -static SequenceValues permissionsDefinition[] = { - {90, 1}, - {10, 0}, - {0, 0} -}; - -/*************************************************************** -* P U B L I C D A T A * -***************************************************************/ - - -/*************************************************************** -**************************************************************** -* L O C A L F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -static void getRandomSubscriberData(int subscriberNo, - SubscriberNumber number, - SubscriberName name) -{ - char sbuf[SUBSCRIBER_NUMBER_LENGTH + 1]; - sprintf(sbuf, "%.*d", SUBSCRIBER_NUMBER_LENGTH, subscriberNo); - memcpy(number, sbuf, SUBSCRIBER_NUMBER_LENGTH); - - memset(name, myRandom48(26)+'A', SUBSCRIBER_NAME_LENGTH); -} - -static void populate(char *title, - int count, - void (*func)(UserHandle*, int), - UserHandle *uh) -{ - ndbout_c("Populating %d '%s' ... ",count, title); - /* fflush(stdout); */ - func(uh,count); - ndbout_c("done"); -} - -static void populateServers(UserHandle *uh, int count) -{ - int i, j; - int len; - char tmp[80]; - int suffix_length = 1; - ServerName serverName; - SubscriberSuffix suffix; - - int commitCount = 0; - - for(i = 0; i < SUBSCRIBER_NUMBER_SUFFIX_LENGTH; i++) - suffix_length *= 10; - - for(i = 0; i < count; i++) { - sprintf(tmp, "-Server %d-", i); - - len = strlen(tmp); - for(j = 0; j < SERVER_NAME_LENGTH; j++){ - serverName[j] = tmp[j % len]; - } - /* serverName[j] = 0; not null-terminated */ - - for(j = 0; j < suffix_length; j++){ - char sbuf[SUBSCRIBER_NUMBER_SUFFIX_LENGTH + 1]; - sprintf(sbuf, "%.*d", SUBSCRIBER_NUMBER_SUFFIX_LENGTH, j); - memcpy(suffix, sbuf, SUBSCRIBER_NUMBER_SUFFIX_LENGTH); - userDbInsertServer(uh, i, suffix, serverName); - commitCount ++; - if((commitCount % OP_PER_TRANS) == 0) - userDbCommit(uh); - } - } - if((commitCount % OP_PER_TRANS) != 0) - userDbCommit(uh); -} - -static void populateSubscribers(UserHandle *uh, int count) -{ - SubscriberNumber number; - SubscriberName name; - int i, j, k; - int res; - - SequenceValues values[NO_OF_GROUPS+1]; - RandomSequence seq; - - for(i = 0; i < NO_OF_GROUPS; i++) { - values[i].length = 1; - values[i].value = i; - } - - values[i].length = 0; - values[i].value = 0; - - if( initSequence(&seq, values) != 0 ) { - ndbout_c("could not set the sequence of random groups"); - exit(0); - } - -#define RETRIES 25 - - for(i = 0; i < count; i+= OP_PER_TRANS) { - for(j = 0; j - -#include "userInterface.h" -#include "dbPopulate.h" -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -int useTableLogging; -int useIndexTables; -#ifdef __cplusplus -} -#endif - - -static -void usage(const char *prog) -{ - - ndbout_c( - "Usage: %s [-l]\n" - " -l Use logging and checkpointing on tables\n", - " -i Use index tables\n", - prog); - - exit(1); -} - -NDB_COMMAND(DbCreate, "DbCreate", "DbCreate", "DbCreate", 16384) -{ - int i; - UserHandle *uh; - - useTableLogging = useIndexTables = 0; - - for(i = 1; i - -#include "userInterface.h" -#include "userHandle.h" - -/*************************************************************** -* L O C A L C O N S T A N T S * -***************************************************************/ - -/*************************************************************** -* L O C A L D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* L O C A L F U N C T I O N S * -***************************************************************/ - - -/*************************************************************** -* L O C A L D A T A * -***************************************************************/ - -/*----------------*/ -/* Transaction T1 */ -/*----------------*/ -static char *update_subscriber_stmnt = "update subscriber set \ -location = ?,changedBy = ?, changedTime = ? where subscriberNumber = ?"; - -/*----------------*/ -/* Transaction T2 */ -/*----------------*/ -static char *read_subscriber_stmnt = "select subscriberName,location,\ -changedBy,changedTime from subscriber where subscriberNumber = ? for update"; - -/*----------------*/ -/* Transaction T3 */ -/*----------------*/ -static char *read_subscriber_session_stmnt = "select activeSessions,groupId,\ -changedBy,changedTime from subscriber where subscriberNumber = ? for update"; - -static char *read_group_allowRead_stmnt = "select allowRead from userGroup \ -where groupId = ?"; -static char *read_group_allowInsert_stmnt = "select allowInsert from userGroup \ -where groupId = ?"; -static char *read_group_allowDelete_stmnt = "select allowDelete from userGroup \ -where groupId = ?"; - -static char *read_session_details_stmnt = "select sessionData from userSession \ -where subscriberNumber = ? and serverId = ? for update"; - -static char *update_noOfRead_stmnt = "update server \ -set noOfRead = noOfRead + 1 where serverId = ? and subscriberSuffix = ?"; -static char *update_noOfInsert_stmnt = "update server \ -set noOfInsert = noOfInsert + 1 where serverId = ? and subscriberSuffix = ?"; -static char *update_noOfDelete_stmnt = "update server \ -set noOfDelete = noOfDelete + 1 where serverId = ? and subscriberSuffix = ?"; - -static char *insert_session_stmnt = "insert into userSession values (?,?,?)"; - -static char *delete_session_stmnt = "delete from userSession \ -where subscriberNumber = ? and serverId = ?"; - -static char *update_subscriber_session_stmnt = "update subscriber set \ -activeSessions = ? where subscriberNumber = ?"; - -/*************************************************************** -* P U B L I C D A T A * -***************************************************************/ - - -/*************************************************************** -**************************************************************** -* L O C A L F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -extern void handle_error(SQLHDBC hdbc, - SQLHENV henv, - SQLHSTMT hstmt, - SQLRETURN rc, - char *filename, - int lineno); - -/*************************************************************** -**************************************************************** -* P U B L I C F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -int localDbPrepare(UserHandle *uh) -{ - SQLRETURN rc; - - if(!uh) return(-1); - - /*-----------------------------*/ - /* Update Subscriber Statement */ - /*-----------------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->updateSubscriber.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate insert group statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->updateSubscriber.stmt,(SQLCHAR *) update_subscriber_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { -/* -handle_error(uh->hdbc, uh->henv, uh->updateSubscriber.stmt, rc, __FILE__, __LINE__); -*/ - printf("Unable to prepare update subscriber statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateSubscriber.stmt, - 1,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->updateSubscriber.values.location,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare update subscriber statement param 1\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateSubscriber.stmt, - 2,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - CHANGED_BY_LENGTH+1,0, - uh->updateSubscriber.values.changedBy,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare update subscriber statement param 2\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateSubscriber.stmt, - 3,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - CHANGED_TIME_LENGTH+1,0, - uh->updateSubscriber.values.changedTime,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare update subscriber statement param 3\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateSubscriber.stmt, - 4,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_LENGTH+1,0, - uh->updateSubscriber.values.number,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare update subscriber statement param 3\n"); - return(-1); - } - - /*---------------------------*/ - /* Read Subscriber Statement */ - /*---------------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->readSubscriber.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate read subscriber statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->readSubscriber.stmt,(SQLCHAR *) read_subscriber_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read subscriber statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->readSubscriber.stmt, - 1,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_LENGTH+1,0, - uh->readSubscriber.values.number,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read subscriber statement param 1\n"); - return(-1); - } - - rc = SQLBindCol(uh->readSubscriber.stmt, 1, - SQL_C_CHAR, - uh->readSubscriber.values.name, SUBSCRIBER_NAME_LENGTH+1, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 1 to read subscriber statement\n"); - return(-1); - } - - rc = SQLBindCol(uh->readSubscriber.stmt, 2, - SQL_C_DEFAULT, - &uh->readSubscriber.values.location, 1, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 2 to read subscriber statement\n"); - return(-1); - } - - rc = SQLBindCol(uh->readSubscriber.stmt, 3, - SQL_C_CHAR, - uh->readSubscriber.values.changedBy, CHANGED_BY_LENGTH+1, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 3 to read subscriber statement\n"); - return(-1); - } - - rc = SQLBindCol(uh->readSubscriber.stmt, 4, - SQL_C_CHAR, - uh->readSubscriber.values.changedTime, CHANGED_TIME_LENGTH+1, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 4 to read subscriber statement\n"); - return(-1); - } - - /*------------------------------------*/ - /* Read Subscriber Sessions Statement */ - /*------------------------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->readSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate read subscriber session statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->readSubscriberSession.stmt,(SQLCHAR *) read_subscriber_session_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read subscriber sessions statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->readSubscriberSession.stmt, - 1,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_LENGTH+1,0, - uh->readSubscriberSession.values.number,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read subscriber statement param 1\n"); - return(-1); - } - - rc = SQLBindCol(uh->readSubscriberSession.stmt, 1, - SQL_C_DEFAULT, - &uh->readSubscriberSession.values.activeSessions, 0, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 1 to read subscriber sessions statement\n"); - return(-1); - } - - rc = SQLBindCol(uh->readSubscriberSession.stmt, 2, - SQL_C_DEFAULT, - &uh->readSubscriberSession.values.groupId, 0, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 2 to read subscriber sessions statement\n"); - return(-1); - } - - rc = SQLBindCol(uh->readSubscriberSession.stmt, 3, - SQL_C_CHAR, - uh->readSubscriberSession.values.changedBy, CHANGED_BY_LENGTH+1, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 3 to read subscriber sessions statement\n"); - return(-1); - } - - rc = SQLBindCol(uh->readSubscriberSession.stmt, 4, - SQL_C_CHAR, - uh->readSubscriberSession.values.changedTime, CHANGED_TIME_LENGTH+1, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 4 to read subscriber sessions statement\n"); - return(-1); - } - - /*--------------------------------*/ - /* Read Group AllowRead Statement */ - /*--------------------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->readGroupAllowRead.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate read subscriber session statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->readGroupAllowRead.stmt,(SQLCHAR *) read_group_allowRead_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read group allow read statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->readGroupAllowRead.stmt, - 1,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->readGroupAllowRead.values.groupId,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read allow read statement param 1\n"); - return(-1); - } - - rc = SQLBindCol(uh->readGroupAllowRead.stmt, 1, - SQL_C_DEFAULT, - &uh->readGroupAllowRead.values.allowRead, 0, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 1 to read group allow read statement\n"); - return(-1); - } - - /*----------------------------------*/ - /* Read Group AllowInsert Statement */ - /*----------------------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->readGroupAllowInsert.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate read subscriber session statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->readGroupAllowInsert.stmt,(SQLCHAR *) read_group_allowInsert_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read group allow read statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->readGroupAllowInsert.stmt, - 1,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->readGroupAllowInsert.values.groupId,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read allow read statement param 1\n"); - return(-1); - } - - rc = SQLBindCol(uh->readGroupAllowInsert.stmt, 1, - SQL_C_DEFAULT, - &uh->readGroupAllowInsert.values.allowInsert, 0, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 1 to read group allow read statement\n"); - return(-1); - } - - /*----------------------------------*/ - /* Read Group AllowDelete Statement */ - /*----------------------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->readGroupAllowDelete.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate read subscriber session statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->readGroupAllowDelete.stmt,(SQLCHAR *) read_group_allowDelete_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read group allow read statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->readGroupAllowDelete.stmt, - 1,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->readGroupAllowDelete.values.groupId,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read allow read statement param 1\n"); - return(-1); - } - - rc = SQLBindCol(uh->readGroupAllowDelete.stmt, 1, - SQL_C_DEFAULT, - &uh->readGroupAllowDelete.values.allowDelete, 0, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 1 to read group allow read statement\n"); - return(-1); - } - - /*----------------------*/ - /* read session details */ - /*----------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->readSessionDetails.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate read session details statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->readSessionDetails.stmt,(SQLCHAR *) read_session_details_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read session details statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->readSessionDetails.stmt, - 1,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_LENGTH+1,0, - uh->readSessionDetails.values.number,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read sessions param 1\n"); - return(-1); - } - - rc = SQLBindParameter(uh->readSessionDetails.stmt, - 2,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->readSessionDetails.values.serverId,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read sessions param 2\n"); - return(-1); - } - - rc = SQLBindCol(uh->readSessionDetails.stmt, 1, - SQL_C_CHAR, - uh->readSessionDetails.values.details, SESSION_DETAILS_LENGTH+1, - NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to bind column 1 to read group allow read statement\n"); - return(-1); - } - - /*-------------------*/ - /* Update no of Read */ - /*-------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->updateServerNoOfRead.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate update noOfRead statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->updateServerNoOfRead.stmt,(SQLCHAR *) update_noOfRead_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare update noOfRead statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateServerNoOfRead.stmt, - 1,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->updateServerNoOfRead.values.serverId,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read noOfRead param 1\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateServerNoOfRead.stmt, - 2,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_SUFFIX_LENGTH+1,0, - uh->updateServerNoOfRead.values.suffix,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read noOfRead param 2\n"); - return(-1); - } - - /*----------------*/ - /* Insert Session */ - /*----------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->insertSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate update noOfRead statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->insertSession.stmt,(SQLCHAR *) insert_session_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare insert session statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->insertSession.stmt, - 1,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_LENGTH+1,0, - uh->insertSession.values.number,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read sessions param 1\n"); - return(-1); - } - - rc = SQLBindParameter(uh->insertSession.stmt, - 2,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->insertSession.values.serverId,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read noOfRead param 2\n"); - return(-1); - } - - rc = SQLBindParameter(uh->insertSession.stmt, - 3,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SESSION_DETAILS_LENGTH+1,0, - uh->insertSession.values.details,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read sessions param 1\n"); - return(-1); - } - - /*----------------------------*/ - /* Update subscriber sessions */ - /*----------------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->updateSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate update noOfRead statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->updateSubscriberSession.stmt,(SQLCHAR *) update_subscriber_session_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare update subscriber session statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateSubscriberSession.stmt, - 1,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->updateSubscriberSession.values.activeSessions,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read noOfRead param 2\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateSubscriberSession.stmt, - 2,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_LENGTH+1,0, - uh->updateSubscriberSession.values.number,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read sessions param 1\n"); - return(-1); - } - - /*---------------------*/ - /* Update no of Insert */ - /*---------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->updateServerNoOfInsert.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate update noOfRead statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->updateServerNoOfInsert.stmt,(SQLCHAR *) update_noOfInsert_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare update noOfRead statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateServerNoOfInsert.stmt, - 1,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->updateServerNoOfInsert.values.serverId,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read noOfRead param 1\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateServerNoOfInsert.stmt, - 2,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_SUFFIX_LENGTH+1,0, - uh->updateServerNoOfInsert.values.suffix,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read noOfRead param 2\n"); - return(-1); - } - - /*----------------*/ - /* Delete Session */ - /*----------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->deleteSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate update noOfRead statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->deleteSession.stmt,(SQLCHAR *) delete_session_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare insert session statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->deleteSession.stmt, - 1,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_LENGTH+1,0, - uh->deleteSession.values.number,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read sessions param 1\n"); - return(-1); - } - - rc = SQLBindParameter(uh->deleteSession.stmt, - 2,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->deleteSession.values.serverId,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read noOfRead param 2\n"); - return(-1); - } - - /*---------------------*/ - /* Update no of Delete */ - /*---------------------*/ - rc = SQLAllocStmt(uh->hdbc, &uh->updateServerNoOfDelete.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate update noOfRead statement\n"); - return(-1); - } - - rc = SQLPrepare(uh->updateServerNoOfDelete.stmt,(SQLCHAR *) update_noOfDelete_stmnt, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare update noOfRead statement\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateServerNoOfDelete.stmt, - 1,SQL_PARAM_INPUT,SQL_C_DEFAULT,SQL_INTEGER, - 0,0, - &uh->updateServerNoOfDelete.values.serverId,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read noOfRead param 1\n"); - return(-1); - } - - rc = SQLBindParameter(uh->updateServerNoOfDelete.stmt, - 2,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_CHAR, - SUBSCRIBER_NUMBER_SUFFIX_LENGTH+1,0, - uh->updateServerNoOfInsert.values.suffix,0,NULL); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to prepare read noOfRead param 2\n"); - return(-1); - } - - /*-------------------------------*/ - /* Commit all prepare statements */ - /*-------------------------------*/ - rc = SQLTransact(uh->henv, uh->hdbc, SQL_COMMIT); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to commit all prepare insert statement\n"); - return(-1); - } - - return(0); -} diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h deleted file mode 100644 index c4a9c38f2a3..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef MACROS_H -#define MACROS_H - -#include -#include - -#define ERROR(x) {ndbout_c((x)); } -#define ERROR1(x,y) {ndbout_c((x), (y)); } -#define ERROR2(x,y,z) {ndbout_c((x), (y), (z)); } -#define ERROR3(x,y,z,u) {ndbout_c((x), (y), (z), (u)); } -#define ERROR4(x,y,z,u,w) {ndbout_c((x), (y), (z), (u), (w)); } - -#define INIT_RANDOM(x) srand48((x)) -#define UI_RANDOM(x) ((unsigned int)(lrand48()%(x))) - -#define ASSERT(cond, message) \ - { if(!(cond)) { ERROR(message); exit(-1); }} - -#ifdef DEBUG_ON -#define DEBUG(x) {ndbout_c((x)); } -#define DEBUG1(x,y) {ndbout_c((x), (y)); } -#define DEBUG2(x,y,z) {ndbout_c((x), (y), (z)); } -#define DEBUG3(x,y,z,u) {ndbout_c((x), (y), (z), (u)); } -#define DEBUG4(x,y,z,u,w) {ndbout_c((x), (y), (z), (u), (w)); } -#define DEBUG5(x,y,z,u,w, v) {ndbout_c((x), (y), (z), (u), (w), (v)); } -#else -#define DEBUG(x) -#define DEBUG1(x,y) -#define DEBUG2(x,y,z) -#define DEBUG3(x,y,z,u) -#define DEBUG4(x,y,z,u,w) -#define DEBUG5(x,y,z,u,w, v) -#endif - -#endif diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp deleted file mode 100644 index a86966d128e..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef NDB_ERROR_H -#define NDB_ERROR_H - -#include - -#define error_handler(x,y, z) { \ - ndbout << x << " " << y << endl; \ - exit(-1); } - -#define CHECK_NULL(x,y, z) if(x == 0) \ - error_handler(y,(z->getNdbError()), 0) -#define CHECK_MINUS_ONE(x, y, z) if(x == -1) \ - error_handler(y,(z->getNdbError()), 0) - -#endif diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/Makefile deleted file mode 100644 index 9b1247d44af..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include ../makevars.$(ARCH) - -LIBRARY = ../../lib/libUser.so - -OBJECTS = \ - $(LIBRARY)(localDbPrepare.o)\ - $(LIBRARY)(userInterface.o)\ - $(LIBRARY)(userTransaction.o) - -$(LIBRARY): $(OBJECTS) diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h deleted file mode 100644 index 61baca41501..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h +++ /dev/null @@ -1,189 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef USERHANDLE_H -#define USERHANDLE_H - -/***************************************************************/ -/* I N C L U D E D F I L E S */ -/***************************************************************/ - -#include "sql.h" -#include "sqlext.h" -#include "sqltypes.h" - -#include "testDefinitions.h" - -/*************************************************************** -* M A C R O S * -***************************************************************/ - -/***************************************************************/ -/* C O N S T A N T S */ -/***************************************************************/ - -/*************************************************************** -* D A T A S T R U C T U R E S * -***************************************************************/ - -struct userHandle{ - SQLHENV henv; - SQLHDBC hdbc; - SQLHSTMT stmt; - - /*----------------*/ - /* Transaction T1 */ - /*----------------*/ - struct { - SQLHSTMT stmt; - struct { - SubscriberNumber number; - Location location; - ChangedBy changedBy; - ChangedTime changedTime; - }values; - }updateSubscriber; - - /*----------------*/ - /* Transaction T2 */ - /*----------------*/ - struct { - SQLHSTMT stmt; - struct { - SubscriberNumber number; - SubscriberName name; - Location location; - ChangedBy changedBy; - ChangedTime changedTime; - }values; - }readSubscriber; - - /*----------------*/ - /* Transaction T3 */ - /*----------------*/ - struct { - SQLHSTMT stmt; - struct { - GroupId groupId; - Permission allowRead; - }values; - }readGroupAllowRead; - - struct { - SQLHSTMT stmt; - struct { - SubscriberNumber number; - ServerId serverId; - SessionDetails details; - }values; - }readSessionDetails; - - struct { - SQLHSTMT stmt; - struct { - ServerId serverId; - SubscriberSuffix suffix; - }values; - }updateServerNoOfRead; - - /*----------------*/ - /* Transaction T4 */ - /*----------------*/ - struct { - SQLHSTMT stmt; - struct { - GroupId groupId; - Permission allowInsert; - }values; - }readGroupAllowInsert; - - struct { - SQLHSTMT stmt; - struct { - SubscriberNumber number; - ServerId serverId; - SessionDetails details; - }values; - }insertSession; - - struct { - SQLHSTMT stmt; - struct { - ServerId serverId; - SubscriberSuffix suffix; - }values; - }updateServerNoOfInsert; - - /*----------------*/ - /* Transaction T5 */ - /*----------------*/ - struct { - SQLHSTMT stmt; - struct { - GroupId groupId; - Permission allowDelete; - }values; - }readGroupAllowDelete; - - struct { - SQLHSTMT stmt; - struct { - SubscriberNumber number; - ServerId serverId; - }values; - }deleteSession; - - struct { - SQLHSTMT stmt; - struct { - ServerId serverId; - SubscriberSuffix suffix; - }values; - }updateServerNoOfDelete; - - /*--------------------------*/ - /* Transaction T3 + T4 + T5 */ - /*--------------------------*/ - struct { - SQLHSTMT stmt; - struct { - SubscriberNumber number; - uint32 activeSessions; - GroupId groupId; - ChangedBy changedBy; - ChangedTime changedTime; - }values; - }readSubscriberSession; - - struct { - SQLHSTMT stmt; - struct { - SubscriberNumber number; - uint32 activeSessions; - }values; - }updateSubscriberSession; -}; - -/*************************************************************** -* P U B L I C F U N C T I O N S * -***************************************************************/ - -/*************************************************************** -* E X T E R N A L D A T A * -***************************************************************/ - - -#endif /* USERHANDLE_H */ - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c deleted file mode 100644 index 03a9465b32c..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c +++ /dev/null @@ -1,452 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ - -#include - -#include "userInterface.h" -#include "userHandle.h" - -/*************************************************************** -* L O C A L C O N S T A N T S * -***************************************************************/ - -/*************************************************************** -* L O C A L D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* L O C A L F U N C T I O N S * -***************************************************************/ - -extern int localDbPrepare(UserHandle *uh); - -static int dbCreate(UserHandle *uh); - -/*************************************************************** -* L O C A L D A T A * -***************************************************************/ - -static char *create_subscriber_table = -"CREATE TABLE subscriber(\ -subscriberNumber CHAR(12) NOT NULL primary key,\ -subscriberName CHAR(32) NOT NULL,\ -groupId INT NOT NULL,\ -location INT NOT NULL,\ -activeSessions INT NOT NULL,\ -changedBy CHAR(32) NOT NULL,\ -changedTime CHAR(32) NOT NULL)"; - -static char *create_group_table = -"CREATE TABLE userGroup(\ -groupId INT NOT NULL primary key,\ -groupName CHAR(32) NOT NULL,\ -allowRead INT NOT NULL,\ -allowInsert INT NOT NULL,\ -allowDelete INT NOT NULL)"; - -static char *create_server_table = "CREATE TABLE server(\ -serverId INT NOT NULL,\ -subscriberSuffix CHAR(2) NOT NULL,\ -serverName CHAR(32) NOT NULL,\ -noOfRead INT NOT NULL,\ -noOfInsert INT NOT NULL,\ -noOfDelete INT NOT NULL,\ -PRIMARY KEY(serverId,subscriberSuffix))"; - -static char *create_session_table = -"CREATE TABLE userSession(\ -subscriberNumber CHAR(12) NOT NULL,\ -serverId INT NOT NULL,\ -sessionData CHAR(2000) NOT NULL,\ -PRIMARY KEY(subscriberNumber,serverId))"; - -/*************************************************************** -* P U B L I C D A T A * -***************************************************************/ - - -/*************************************************************** -**************************************************************** -* L O C A L F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -/*************************************************************** -**************************************************************** -* P U B L I C F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -/*-----------------------------------*/ -/* Time related Functions */ -/* */ -/* Returns a double value in seconds */ -/*-----------------------------------*/ -double userGetTime(void) -{ - static int initialized = 0; - static struct timeval initTime; - double timeValue; - - if( !initialized ) { - initialized = 1; - gettimeofday(&initTime, 0); - timeValue = 0.0; - } - else { - struct timeval tv; - double s; - double us; - - gettimeofday(&tv, 0); - s = (double)tv.tv_sec - (double)initTime.tv_sec; - us = (double)tv.tv_usec - (double)initTime.tv_usec; - - timeValue = s + (us / 1000000.0); - } - - return(timeValue); -} - - -void handle_error(SQLHDBC hdbc, - SQLHENV henv, - SQLHSTMT hstmt, - SQLRETURN rc, - char *filename, - int lineno) -{ -#define MSG_LNG 512 - - int isError = 0; - SQLRETURN ret = SQL_SUCCESS; - SQLCHAR szSqlState[MSG_LNG]; /* SQL state string */ - SQLCHAR szErrorMsg[MSG_LNG]; /* Error msg text buffer pointer */ - SQLINTEGER pfNativeError; /* Native error code */ - SQLSMALLINT pcbErrorMsg; /* Error msg text Available bytes */ - - if ( rc == SQL_SUCCESS || rc == SQL_NO_DATA_FOUND ) - return; - else if ( rc == SQL_INVALID_HANDLE ) { - printf("ERROR in %s, line %d: invalid handle\n", - filename, lineno); - isError = 1; - } - else if ( rc == SQL_SUCCESS_WITH_INFO ) { - printf("WARNING in %s, line %d\n", - filename, lineno); - isError = 0; - } - else if ( rc == SQL_ERROR ) { - printf("ERROR in %s, line %d\n", - filename, lineno); - isError = 1; - } - - fflush(stdout); - - while ( ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO ) { - ret = SQLError(henv, hdbc, hstmt, szSqlState, &pfNativeError, szErrorMsg, - MSG_LNG, &pcbErrorMsg); - - switch (ret) { - case SQL_SUCCESS: - case SQL_SUCCESS_WITH_INFO: - printf("%s\n*** ODBC Error/Warning = %s, " - "Additional Error/Warning = %d\n", - szErrorMsg, szSqlState, pfNativeError); - - if(ret == SQL_SUCCESS_WITH_INFO) - printf("(Note: error message was truncated.\n"); - break; - - case SQL_INVALID_HANDLE: - printf("Call to SQLError failed with return code of " - "SQL_INVALID_HANDLE.\n"); - break; - - case SQL_ERROR: - printf("Call to SQLError failed with return code of SQL_ERROR.\n"); - break; - - case SQL_NO_DATA_FOUND: - break; - - default: - printf("Call to SQLError failed with return code of %d.\n", ret); - } - } - - if ( isError ) - exit(1); -} - -static int dbCreate(UserHandle *uh) -{ - SQLRETURN rc; - SQLHSTMT creatstmt; - - if(!uh) return(-1); - - rc = SQLAllocStmt(uh->hdbc, &creatstmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate create statement\n"); - return(-1); - } - - rc = SQLExecDirect(creatstmt,(SQLCHAR *)create_subscriber_table, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to create subscriber table\n"); - return(-1); - } - - rc = SQLExecDirect(creatstmt,(SQLCHAR *)create_group_table, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to create group table\n"); - return(-1); - } - - rc = SQLExecDirect(creatstmt,(SQLCHAR *)create_server_table, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to create server table\n"); - return(-1); - } - - rc = SQLExecDirect(creatstmt,(SQLCHAR *)create_session_table, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to create session table\n"); - return(-1); - } - - rc = SQLTransact(uh->henv, uh->hdbc, SQL_COMMIT); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to commit all create table\n"); - return(-1); - } - - rc = SQLFreeStmt(creatstmt, SQL_DROP); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to free create statement\n"); - return(-1); - } - - return(0); -} - -UserHandle *userDbConnect(uint32 createDb, char *dbName) -{ - char connStrIn[512]; /* ODBC Connection String */ - char connStrOut[2048]; - SQLRETURN rc; - UserHandle *uh; - - /*--------------------------*/ - /* Build the Connect string */ - /*--------------------------*/ - sprintf(connStrIn, - "AutoCreate=%d;OverWrite=%d;DSN=%s", - createDb ? 1 : 0, - createDb ? 1 : 0, - dbName); - - uh = calloc(1, sizeof(UserHandle)); - if( !uh ) { - printf("Unable to allocate memory for Handle\n"); - return(0); - } - - /*---------------------------------*/ - /* Allocate the Environment Handle */ - /*---------------------------------*/ - rc = SQLAllocEnv(&uh->henv); - - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate Environment Handle\n"); - return(0); - } - - /*--------------------------------*/ - /* Allocate the DB Connect Handle */ - /*--------------------------------*/ - rc = SQLAllocConnect(uh->henv, &uh->hdbc); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate a connection handle\n"); - return(0); - } - - /*-------------------------*/ - /* Connect to the Database */ - /*-------------------------*/ - rc = SQLDriverConnect(uh->hdbc, NULL, - (SQLCHAR *)connStrIn, SQL_NTS, - (SQLCHAR *)connStrOut, sizeof (connStrOut), - NULL, SQL_DRIVER_NOPROMPT); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { -handle_error(uh->hdbc, uh->henv, NULL, rc, __FILE__, __LINE__); - printf("Unable to connect to database server\n"); - return(0); - } - - rc = SQLSetConnectOption(uh->hdbc, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to set connection option\n"); - return(0); - } - - rc = SQLAllocStmt(uh->hdbc, &uh->stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to allocate immediate statement\n"); - return(0); - } - - if( createDb ) - dbCreate(uh); - - if( localDbPrepare(uh) < 0 ) - return(0); - - return(uh); -} - -void userDbDisconnect(UserHandle *uh) -{ - SQLRETURN rc; - - if(!uh) return; - - rc = SQLDisconnect(uh->hdbc); - - SQLFreeConnect(uh->hdbc); - SQLFreeEnv(uh->henv); - free(uh); -} - -int userDbInsertServer(UserHandle *uh, - ServerId serverId, - SubscriberSuffix suffix, - ServerName name) -{ - SQLRETURN rc; - char buf[1000]; - - if(!uh) return(-1); - - sprintf(buf, "insert into server values (%d,'%.*s','%s',0,0,0)", - serverId, - SUBSCRIBER_NUMBER_SUFFIX_LENGTH, suffix, - name); - - rc = SQLExecDirect(uh->stmt, (unsigned char *)buf, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to execute insert server\n"); - return(-1); - } - - return( userDbCommit(uh) ); -} - -int userDbInsertSubscriber(UserHandle *uh, - SubscriberNumber number, - uint32 groupId, - SubscriberName name) -{ - SQLRETURN rc; - char buf[1000]; - - if(!uh) return(-1); - - sprintf(buf, "insert into subscriber values ('%s','%s',%d,0,0,'','')", - number, - name, - groupId); - - rc = SQLExecDirect(uh->stmt, (unsigned char*)buf, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to execute insert subscriber\n"); - return(-1); - } - - return( userDbCommit(uh) ); -} - -int userDbInsertGroup(UserHandle *uh, - GroupId groupId, - GroupName name, - Permission allowRead, - Permission allowInsert, - Permission allowDelete) -{ - SQLRETURN rc; - char buf[1000]; - - if(!uh) return(-1); - - sprintf(buf, "insert into usergroup values (%d,'%s',%d,%d,%d)", - groupId, - name, - allowRead, - allowInsert, - allowDelete); - - rc = SQLExecDirect(uh->stmt, (unsigned char*)buf, SQL_NTS); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to execute insert group\n"); - return(-1); - } - - return( userDbCommit(uh) ); -} - -int userDbCommit(UserHandle *uh) -{ - SQLRETURN rc; - if(!uh) return(-1); - - rc = SQLTransact(uh->henv, uh->hdbc, SQL_COMMIT); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { -handle_error(uh->hdbc, uh->henv, 0, rc, __FILE__, __LINE__); - printf("Unable to commit Transaction\n"); - return(-1); - } - - return(0); -} - -int userDbRollback(UserHandle *uh) -{ - SQLRETURN rc; - if(!uh) return(-1); - - rc = SQLTransact(uh->henv, uh->hdbc, SQL_ROLLBACK); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("Unable to rollback Transaction\n"); - return(-1); - } - - return(0); -} - -void userCheckpoint(UserHandle *uh) -{ - SQLRETURN rc; - if(!uh) return; - - rc = SQLExecDirect(uh->stmt, (SQLCHAR *)"call ttCheckpointFuzzy", SQL_NTS); - userDbCommit(uh); -} diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c deleted file mode 100644 index bdc60912482..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c +++ /dev/null @@ -1,472 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ - -#include -#include - -#include "sql.h" -#include "sqlext.h" - - -#include "userInterface.h" -#include "userHandle.h" - -/*************************************************************** -* L O C A L C O N S T A N T S * -***************************************************************/ - -/*************************************************************** -* L O C A L D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* L O C A L F U N C T I O N S * -***************************************************************/ - -static int readSubscriberSessions(UserHandle *uh, - SubscriberNumber number, - char *transactionType); - -/*************************************************************** -* L O C A L D A T A * -***************************************************************/ - -extern void handle_error(SQLHDBC hdbc, - SQLHENV henv, - SQLHSTMT hstmt, - SQLRETURN rc, - char *filename, - int lineno); - -/*************************************************************** -* P U B L I C D A T A * -***************************************************************/ - - -/*************************************************************** -**************************************************************** -* L O C A L F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -static int readSubscriberSessions(UserHandle *uh, - SubscriberNumber number, - char *transactionType) -{ - SQLRETURN rc; - - /*-----------------------------------------------------*/ - /* SELECT activeSessions,groupId,changedBy,changedTime */ - /* FROM SUBSCRIBER */ - /* WHERE subscriberNumber=x; */ - /*-----------------------------------------------------*/ - strcpy(uh->readSubscriberSession.values.number,number); - - rc = SQLExecute(uh->readSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("%s %s\n", - transactionType, - "Unable to execute read subscriber session"); - return(-1); - } - - rc = SQLFetch(uh->readSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("%s %s\n", - transactionType, - "Unable to fetch read subscriber session"); - return(-1); - } - - return(0); -} - -/*************************************************************** -**************************************************************** -* P U B L I C F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -void userTransaction_T1(UserHandle *uh, - SubscriberNumber number, - Location new_location, - ChangedBy changed_by, - ChangedTime changed_time) -{ - SQLRETURN rc; - - if(!uh) return; - - /*---------------------------------------------*/ - /* Update the subscriber information */ - /* */ - /* UPDATE SUBSCRIBER */ - /* SET location=x, changedBy=x, changedTime=x */ - /* WHERE subscriberNumber=x; */ - /*---------------------------------------------*/ - strcpy(uh->updateSubscriber.values.number, number); - uh->updateSubscriber.values.location = new_location; - strcpy(uh->updateSubscriber.values.changedBy, changed_by); - strcpy(uh->updateSubscriber.values.changedTime, changed_time); - - rc = SQLExecute(uh->updateSubscriber.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T1 Unable to execute update subscriber\n"); - return; - } - - userDbCommit(uh); -} - -void userTransaction_T2(UserHandle *uh, - SubscriberNumber number, - Location *new_location, - ChangedBy changed_by, - ChangedTime changed_time, - SubscriberName subscriberName) -{ - SQLRETURN rc; - - if(!uh) return; - - /*------------------------------------------------------*/ - /* Read the information from the subscriber table */ - /* */ - /* SELECT location,subscriberName,changedBy,changedTime */ - /* FROM SUBSCRIBER */ - /* WHERE subscriberNumber=x; */ - /*------------------------------------------------------*/ - strcpy(uh->readSubscriber.values.number,number); - - rc = SQLExecute(uh->readSubscriber.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T2 Unable to execute read subscriber\n"); - return; - } - - rc = SQLFetch(uh->readSubscriber.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T2 Unable to fetch read subscriber\n"); - return; - } - - userDbCommit(uh); - - strcpy(subscriberName, uh->readSubscriber.values.name); - *new_location = uh->readSubscriber.values.location; - strcpy(changed_by, uh->readSubscriber.values.changedBy); - strcpy(changed_time, uh->readSubscriber.values.changedTime); -} - -void userTransaction_T3(UserHandle *uh, - SubscriberNumber number, - ServerId server_id, - ServerBit server_bit, - SessionDetails session_details, - unsigned int *branch_executed) -{ - SQLRETURN rc; - - if(!uh) return; - - *branch_executed = 0; - - /*--------------------------------------*/ - /* Read active sessions from subscriber */ - /*--------------------------------------*/ - if( readSubscriberSessions(uh, number, "T3") < 0 ) - return; - - /*-----------------------------------------------*/ - /* Read the 'read' Permissions for the userGroup */ - /* */ - /* SELECT allowRead */ - /* FROM USERGROUP */ - /* WHERE groupId=x */ - /*-----------------------------------------------*/ - uh->readGroupAllowRead.values.groupId = uh->readSubscriberSession.values.groupId; - - rc = SQLExecute(uh->readGroupAllowRead.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to execute read group allow read\n"); - return; - } - - rc = SQLFetch(uh->readGroupAllowRead.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to fetch read group allow read\n"); - return; - } - - if( uh->readGroupAllowRead.values.allowRead & server_bit && - uh->readSubscriberSession.values.activeSessions & server_bit ) { - - /*----------------------------------------------------*/ - /* Read the sessionDetails from the userSession table */ - /* */ - /* SELECT sessionData */ - /* FROM userSession */ - /* WHERE subscriberNumber=x, serverId=x */ - /*----------------------------------------------------*/ - strcpy(uh->readSessionDetails.values.number,number); - uh->readSessionDetails.values.serverId = server_id; - - rc = SQLExecute(uh->readSessionDetails.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to execute read session details\n"); - return; - } - - rc = SQLFetch(uh->readSessionDetails.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to fetch read session details\n"); - return; - } - - strcpy(session_details, uh->readSessionDetails.values.details); - - /*----------------------------------------*/ - /* Increment noOfRead field in the server */ - /* */ - /* UPDATE server */ - /* SET noOfRead=noOfRead+1 */ - /* WHERE serverId=x,subscriberSuffix=x */ - /*----------------------------------------*/ - uh->updateServerNoOfRead.values.serverId = server_id; - strcpy(uh->updateServerNoOfRead.values.suffix, - &number[SUBSCRIBER_NUMBER_LENGTH-SUBSCRIBER_NUMBER_SUFFIX_LENGTH]); - - rc = SQLExecute(uh->updateServerNoOfRead.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to execute read no of read\n"); - return; - } - - *branch_executed = 1; - } - - userDbCommit(uh); -} - -void userTransaction_T4(UserHandle *uh, - SubscriberNumber number, - ServerId server_id, - ServerBit server_bit, - SessionDetails session_details, - unsigned int do_rollback, - unsigned int *branch_executed) -{ - SQLRETURN rc; - - if(!uh) return; - - *branch_executed = 0; - - /*--------------------------------------*/ - /* Read active sessions from subscriber */ - /*--------------------------------------*/ - if( readSubscriberSessions(uh, number, "T4") < 0 ) - return; - - /*-------------------------------------------------*/ - /* Read the 'insert' Permissions for the userGroup */ - /* */ - /* SELECT allowInsert */ - /* FROM USERGROUP */ - /* WHERE groupId=x */ - /*-------------------------------------------------*/ - uh->readGroupAllowInsert.values.groupId = uh->readSubscriberSession.values.groupId; - - rc = SQLExecute(uh->readGroupAllowInsert.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T4 Unable to execute read group allow insert\n"); - return; - } - - rc = SQLFetch(uh->readGroupAllowInsert.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T4 Unable to fetch read group allow insert\n"); - return; - } - - if( uh->readGroupAllowInsert.values.allowInsert & server_bit && - !(uh->readSubscriberSession.values.activeSessions & server_bit) ) { - - /*---------------------------------------------*/ - /* Insert the session to the userSession table */ - /* */ - /* INSERT INTO userSession */ - /* VALUES (x,x,x) */ - /*---------------------------------------------*/ - strcpy(uh->insertSession.values.number, number); - uh->insertSession.values.serverId = server_id; - strcpy(uh->insertSession.values.details, session_details); - - rc = SQLExecute(uh->insertSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { -handle_error(uh->hdbc, uh->henv, uh->insertSession.stmt, rc, __FILE__, __LINE__); - printf("T4 Unable to execute insert session \n"); - return; - } - - /*----------------------------------------*/ - /* Update subscriber activeSessions field */ - /* */ - /* UPDATE subscriber */ - /* SET activeSessions=x */ - /* WHERE subscriberNumber=x */ - /*----------------------------------------*/ - strcpy(uh->updateSubscriberSession.values.number, number); - uh->updateSubscriberSession.values.activeSessions = - uh->readSubscriberSession.values.activeSessions | server_bit; - - rc = SQLExecute(uh->updateSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T4 Unable to execute update session \n"); - return; - } - - /*------------------------------------------*/ - /* Increment noOfInsert field in the server */ - /* */ - /* UPDATE server */ - /* SET noOfInsert=noOfInsert+1 */ - /* WHERE serverId=x,subscriberSuffix=x */ - /*------------------------------------------*/ - uh->updateServerNoOfInsert.values.serverId = server_id; - strcpy(uh->updateServerNoOfInsert.values.suffix, - &number[SUBSCRIBER_NUMBER_LENGTH-SUBSCRIBER_NUMBER_SUFFIX_LENGTH]); - - rc = SQLExecute(uh->updateServerNoOfInsert.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T4 Unable to execute update no of read\n"); - return; - } - - *branch_executed = 1; - } - - if(do_rollback) - userDbRollback(uh); - else - userDbCommit(uh); -} - -void userTransaction_T5(UserHandle *uh, - SubscriberNumber number, - ServerId server_id, - ServerBit server_bit, - unsigned int do_rollback, - unsigned int *branch_executed) -{ - SQLRETURN rc; - - if(!uh) return; - - *branch_executed = 0; - - /*--------------------------------------*/ - /* Read active sessions from subscriber */ - /*--------------------------------------*/ - if( readSubscriberSessions(uh, number, "T5") < 0 ) - return; - - /*-------------------------------------------------*/ - /* Read the 'delete' Permissions for the userGroup */ - /* */ - /* SELECT allowDelete */ - /* FROM USERGROUP */ - /* WHERE groupId=x */ - /*-------------------------------------------------*/ - uh->readGroupAllowDelete.values.groupId = uh->readSubscriberSession.values.groupId; - - rc = SQLExecute(uh->readGroupAllowDelete.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to execute read group allow delete\n"); - return; - } - - rc = SQLFetch(uh->readGroupAllowDelete.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to fetch read group allow delete\n"); - return; - } - - if( uh->readGroupAllowDelete.values.allowDelete & server_bit && - uh->readSubscriberSession.values.activeSessions & server_bit ) { - - /*-----------------------------------------------*/ - /* Delete the session from the userSession table */ - /* */ - /* DELETE FROM userSession */ - /* WHERE subscriberNumber=x,serverId=x */ - /*-----------------------------------------------*/ - strcpy(uh->deleteSession.values.number,number); - uh->deleteSession.values.serverId = server_id; - - rc = SQLExecute(uh->deleteSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to execute delete session\n"); - return; - } - - /*----------------------------------------*/ - /* Update subscriber activeSessions field */ - /* */ - /* UPDATE subscriber */ - /* SET activeSessions=x */ - /* WHERE subscriberNumber=x */ - /*----------------------------------------*/ - strcpy(uh->updateSubscriberSession.values.number, number); - uh->updateSubscriberSession.values.activeSessions = - uh->readSubscriberSession.values.activeSessions & ~server_bit; - - rc = SQLExecute(uh->updateSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to execute update subscriber session \n"); - return; - } - - /*------------------------------------------*/ - /* Increment noOfDelete field in the server */ - /* */ - /* UPDATE server */ - /* SET noOfDelete=noOfDelete+1 */ - /* WHERE serverId=x,subscriberSuffix=x */ - /*------------------------------------------*/ - uh->updateServerNoOfDelete.values.serverId = server_id; - strcpy(uh->updateServerNoOfDelete.values.suffix, - &number[SUBSCRIBER_NUMBER_LENGTH-SUBSCRIBER_NUMBER_SUFFIX_LENGTH]); - - rc = SQLExecute(uh->updateServerNoOfDelete.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to execute update no of delete\n"); - return; - } - - *branch_executed = 1; - } - - if(do_rollback) - userDbRollback(uh); - else - userDbCommit(uh); -} - - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h deleted file mode 100644 index 9b6ac1ef161..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef USERHANDLE_H -#define USERHANDLE_H - -/***************************************************************/ -/* I N C L U D E D F I L E S */ -/***************************************************************/ - -#include -#include "testDefinitions.h" - -/*************************************************************** -* M A C R O S * -***************************************************************/ - -/***************************************************************/ -/* C O N S T A N T S */ -/***************************************************************/ - -/*************************************************************** -* D A T A S T R U C T U R E S * -***************************************************************/ - -typedef Ndb userHandle; - -/*************************************************************** -* P U B L I C F U N C T I O N S * -***************************************************************/ - -/*************************************************************** -* E X T E R N A L D A T A * -***************************************************************/ - - -#endif /* USERHANDLE_H */ - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp deleted file mode 100644 index f20316ec52a..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp +++ /dev/null @@ -1,738 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ - -#include -#ifndef NDB_WIN32 -#include -#endif - -#include "ndb_error.hpp" -#include "userHandle.h" -#include "userInterface.h" -#include -#include -#include -#include -#include "ndb_schema.hpp" -#include -#include - -/*************************************************************** -* L O C A L C O N S T A N T S * -***************************************************************/ - -/*************************************************************** -* L O C A L D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* L O C A L F U N C T I O N S * -***************************************************************/ - -extern int localDbPrepare(UserHandle *uh); - -static int dbCreate(UserHandle *uh); - -/*************************************************************** -* L O C A L D A T A * -***************************************************************/ - -/*************************************************************** -* P U B L I C D A T A * -***************************************************************/ - - -/*************************************************************** -**************************************************************** -* L O C A L F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -/*************************************************************** -**************************************************************** -* P U B L I C F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -/*-----------------------------------*/ -/* Time related Functions */ -/* */ -/* Returns a double value in seconds */ -/*-----------------------------------*/ -double userGetTimeSync(void) -{ - static int initialized = 0; - static NDB_TICKS initSecs = 0; - static Uint32 initMicros = 0; - double timeValue = 0; - - if ( !initialized ) { - initialized = 1; - NdbTick_CurrentMicrosecond(&initSecs, &initMicros); - timeValue = 0.0; - } else { - NDB_TICKS secs = 0; - Uint32 micros = 0; - - NdbTick_CurrentMicrosecond(&secs, µs); - - double s = (double)secs - (double)initSecs; - double us = (double)secs - (double)initMicros; - - timeValue = s + (us / 1000000.0); - } - - return timeValue; -} - -// 0 - OK -// 1 - Retry transaction -// 2 - Permanent -int -userDbCommit(UserHandle *uh){ - if(uh->pCurrTrans != 0){ - int check = uh->pCurrTrans->execute( Commit ); - NdbError err = uh->pCurrTrans->getNdbError(); - uh->pNDB->closeTransaction(uh->pCurrTrans); - uh->pCurrTrans = 0; - - if(err.status != NdbError::Success) - ndbout << err << endl; - - if(err.status == NdbError::TemporaryError && - err.classification == NdbError::OverloadError){ - NdbSleep_SecSleep(3); - } - - return err.status; - } - return 2; -} - -/** - * TRUE - Normal table - * FALSE - Table w.o. checkpoing and logging - */ - -#ifdef __cplusplus -extern "C" { -#endif -extern int useTableLogging; -extern int useIndexTables; -#ifdef __cplusplus -} -#endif - - -int -create_table_server(Ndb * pNdb){ - int check; - NdbSchemaCon * MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); - if( MySchemaTransaction == NULL ) - error_handler("startSchemaTransaction", pNdb->getNdbError(), 0); - - NdbSchemaOp * MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); - if( MySchemaOp == NULL ) - error_handler("getNdbSchemaOp", MySchemaTransaction->getNdbError(), 0); - - // Create table - check = MySchemaOp->createTable( SERVER_TABLE, - 8, // Table size - TupleKey, // Key Type - 1 // Nr of Pages - ,DistributionGroup, - 6, - 78, - 80, - 1, - useTableLogging - ); - if( check == -1 ) - error_handler("createTable", MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute - ( SERVER_SUBSCRIBER_SUFFIX, - TupleKey, - sizeof(char) << 3, - SUBSCRIBER_NUMBER_SUFFIX_LENGTH, - String, - MMBased, - NotNullAttribute, - NormalStorageAttribute, - 0, - 1, - 16); - if( check == -1 ) - error_handler("createAttribute (subscriber suffix)", - MySchemaTransaction->getNdbError(), 0); - - // Create first column, primary key - check = MySchemaOp->createAttribute( SERVER_ID, - TupleKey, - sizeof(ServerId) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (serverid)", - MySchemaTransaction->getNdbError(), 0); - - - check = MySchemaOp->createAttribute( SERVER_NAME, - NoKey, - sizeof(char) << 3, - SERVER_NAME_LENGTH, - String, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (server name)", - MySchemaTransaction->getNdbError(), 0); - - - check = MySchemaOp->createAttribute( SERVER_READS, - NoKey, - sizeof(Counter) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (server reads)", - MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute( SERVER_INSERTS, - NoKey, - sizeof(Counter) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (server inserts)", - MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute( SERVER_DELETES, - NoKey, - sizeof(Counter) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (server deletes)", - MySchemaTransaction->getNdbError(), 0); - - if( MySchemaTransaction->execute() == -1 ) { - error_handler("schemaTransaction->execute()", - MySchemaTransaction->getNdbError(), 0); - } - NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); - return 0; -} - -int -create_table_group(Ndb * pNdb){ - int check; - - NdbSchemaCon * MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); - if( MySchemaTransaction == NULL ) - error_handler("startSchemaTransaction", pNdb->getNdbError(), 0); - - NdbSchemaOp * MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); - if( MySchemaOp == NULL ) - error_handler("getNdbSchemaOp", MySchemaTransaction->getNdbError(), 0); - - // Create table - check = MySchemaOp->createTable( GROUP_TABLE, - 8, // Table size - TupleKey, // Key Type - 1 // Nr of Pages - ,All, - 6, - 78, - 80, - 1, - useTableLogging - ); - - if( check == -1 ) - error_handler("createTable", MySchemaTransaction->getNdbError(), 0); - - // Create first column, primary key - check = MySchemaOp->createAttribute( GROUP_ID, - TupleKey, - sizeof(GroupId) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (group id)", - MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute( GROUP_NAME, - NoKey, - sizeof(char) << 3, - GROUP_NAME_LENGTH, - String, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (group name)", - MySchemaTransaction->getNdbError(), 0); - - - check = MySchemaOp->createAttribute( GROUP_ALLOW_READ, - NoKey, - sizeof(Permission) << 3, - 1, - String, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (group read)", - MySchemaTransaction->getNdbError(), 0); - - - check = MySchemaOp->createAttribute( GROUP_ALLOW_INSERT, - NoKey, - sizeof(Permission) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (group insert)", - MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute( GROUP_ALLOW_DELETE, - NoKey, - sizeof(Permission) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (group delete)", - MySchemaTransaction->getNdbError(), 0); - - if( MySchemaTransaction->execute() == -1 ) { - error_handler("schemaTransaction->execute()", - MySchemaTransaction->getNdbError(), 0); - } - NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); - return 0; -} - -int -create_table_subscriber(Ndb * pNdb){ - int check; - NdbSchemaCon * MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); - if( MySchemaTransaction == NULL ) - error_handler("startSchemaTransaction", pNdb->getNdbError(), 0); - - NdbSchemaOp * MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); - if( MySchemaOp == NULL ) - error_handler("getNdbSchemaOp", MySchemaTransaction->getNdbError(), 0); - - // Create table - check = MySchemaOp->createTable( SUBSCRIBER_TABLE, - 8, // Table size - TupleKey, // Key Type - 1 // Nr of Pages - ,DistributionGroup, - 6, - 78, - 80, - 1, - useTableLogging - ); - if( check == -1 ) - error_handler("createTable", MySchemaTransaction->getNdbError(), 0); - - // Create first column, primary key - check = MySchemaOp->createAttribute - ( SUBSCRIBER_NUMBER, - TupleKey, - sizeof(char) << 3, - SUBSCRIBER_NUMBER_LENGTH, - String, - MMBased, - NotNullAttribute, - (useIndexTables ? IndexStorageAttribute : NormalStorageAttribute), - 0, - 1, - 16); - if( check == -1 ) - error_handler("createAttribute (subscriber number)", - MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute( SUBSCRIBER_NAME, - NoKey, - sizeof(char) << 3, - SUBSCRIBER_NAME_LENGTH, - String, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (subscriber name)", - MySchemaTransaction->getNdbError(), 0); - - - check = MySchemaOp->createAttribute( SUBSCRIBER_GROUP, - NoKey, - sizeof(GroupId) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (subscriber_group)", - MySchemaTransaction->getNdbError(), 0); - - - check = MySchemaOp->createAttribute( SUBSCRIBER_LOCATION, - NoKey, - sizeof(Location) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (server reads)", - MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute( SUBSCRIBER_SESSIONS, - NoKey, - sizeof(ActiveSessions) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (subscriber_sessions)", - MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute( SUBSCRIBER_CHANGED_BY, - NoKey, - sizeof(char) << 3, - CHANGED_BY_LENGTH, - String, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (subscriber_changed_by)", - MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute( SUBSCRIBER_CHANGED_TIME, - NoKey, - sizeof(char) << 3, - CHANGED_TIME_LENGTH, - String, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (subscriber_changed_time)", - MySchemaTransaction->getNdbError(), 0); - - if( MySchemaTransaction->execute() == -1 ) { - error_handler("schemaTransaction->execute()", - MySchemaTransaction->getNdbError(), 0); - } - NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); - return 0; -} - -int -create_table_session(Ndb * pNdb){ - int check; - NdbSchemaCon * MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); - if( MySchemaTransaction == NULL ) - error_handler("startSchemaTransaction", pNdb->getNdbError(), 0); - - NdbSchemaOp * MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); - if( MySchemaOp == NULL ) - error_handler("getNdbSchemaOp", - MySchemaTransaction->getNdbError(), 0); - - // Create table - check = MySchemaOp->createTable( SESSION_TABLE, - 8, // Table size - TupleKey, // Key Type - 1 // Nr of Pages - ,DistributionGroup, - 6, - 78, - 80, - 1, - useTableLogging - ); - if( check == -1 ) - error_handler("createTable", MySchemaTransaction->getNdbError(), 0); - - check = MySchemaOp->createAttribute( SESSION_SUBSCRIBER, - TupleKey, - sizeof(char) << 3, - SUBSCRIBER_NUMBER_LENGTH, - String, - MMBased, - NotNullAttribute, - NormalStorageAttribute, - 0, - 1, - 16); - if( check == -1 ) - error_handler("createAttribute (session_subscriber)", - MySchemaTransaction->getNdbError(), 0); - - // Create first column, primary key - check = MySchemaOp->createAttribute( SESSION_SERVER, - TupleKey, - sizeof(ServerId) << 3, - 1, - UnSigned, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (session_server)", - MySchemaTransaction->getNdbError(), 0); - - - check = MySchemaOp->createAttribute( SESSION_DATA, - NoKey, - sizeof(char) << 3, - SESSION_DETAILS_LENGTH, - String, - MMBased, - NotNullAttribute ); - if( check == -1 ) - error_handler("createAttribute (session_data)", - MySchemaTransaction->getNdbError(), 0); - - if( MySchemaTransaction->execute() == -1 ) { - error_handler("schemaTransaction->execute()", - MySchemaTransaction->getNdbError(), 0); - } - NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); - return 0; -} - -void -create_table(const char * name, int (* function)(Ndb * pNdb), Ndb* pNdb){ - printf("creating table %s...", name); - if(pNdb->getDictionary()->getTable(name) != 0){ - printf(" it already exists\n"); - return; - } else { - printf("\n"); - } - function(pNdb); - printf("creating table %s... done\n", name); -} - -static int dbCreate(Ndb * pNdb) -{ - create_table(SUBSCRIBER_TABLE, create_table_subscriber, pNdb); - create_table(GROUP_TABLE , create_table_group, pNdb); - create_table(SESSION_TABLE , create_table_session, pNdb); - create_table(SERVER_TABLE , create_table_server, pNdb); - return 0; -} - -#ifndef NDB_WIN32 -#include -#endif - -static NdbMutex* startupMutex = NdbMutex_Create(); - -UserHandle* -userDbConnect(uint32 createDb, char *dbName) -{ - NdbMutex_Lock(startupMutex); - - Ndb * pNdb = new Ndb(""); - - //printf("Initializing...\n"); - pNdb->init(); - - //printf("Waiting..."); - while(pNdb->waitUntilReady() != 0){ - //printf("..."); - } - // printf("done\n"); - - if( createDb ) - dbCreate(pNdb); - - - UserHandle * uh = new UserHandle; - uh->pNDB = pNdb; - uh->pCurrTrans = 0; - - NdbMutex_Unlock(startupMutex); - - return uh; -} - -void userDbDisconnect(UserHandle *uh) -{ - delete uh; -} - -int userDbInsertServer(UserHandle *uh, - ServerId serverId, - SubscriberSuffix suffix, - ServerName name) -{ - int check; - - uint32 noOfRead = 0; - uint32 noOfInsert = 0; - uint32 noOfDelete = 0; - - NdbConnection * MyTransaction = 0; - if(uh->pCurrTrans != 0){ - MyTransaction = uh->pCurrTrans; - } else { - uh->pCurrTrans = MyTransaction = uh->pNDB->startTransaction(); - } - if (MyTransaction == NULL) - error_handler("startTranscation", uh->pNDB->getNdbError(), 0); - - NdbOperation *MyOperation = MyTransaction->getNdbOperation(SERVER_TABLE); - CHECK_NULL(MyOperation, "getNdbOperation", MyTransaction); - - check = MyOperation->insertTuple(); - CHECK_MINUS_ONE(check, "insert tuple", MyTransaction); - - check = MyOperation->equal(SERVER_ID, (char*)&serverId); - CHECK_MINUS_ONE(check, "setValue id", MyTransaction); - - check = MyOperation->setValue(SERVER_SUBSCRIBER_SUFFIX, suffix); - CHECK_MINUS_ONE(check, "setValue suffix", MyTransaction); - - check = MyOperation->setValue(SERVER_NAME, name); - CHECK_MINUS_ONE(check, "setValue name", MyTransaction); - - check = MyOperation->setValue(SERVER_READS, (char*)&noOfRead); - CHECK_MINUS_ONE(check, "setValue reads", MyTransaction); - - check = MyOperation->setValue(SERVER_INSERTS, (char*)&noOfInsert); - CHECK_MINUS_ONE(check, "setValue inserts", MyTransaction); - - check = MyOperation->setValue(SERVER_DELETES, (char*)&noOfDelete); - CHECK_MINUS_ONE(check, "setValue deletes", MyTransaction); - - return 0; -} - -int userDbInsertSubscriber(UserHandle *uh, - SubscriberNumber number, - uint32 groupId, - SubscriberName name) -{ - int check; - uint32 activeSessions = 0; - Location l = 0; - ChangedBy changedBy; snprintf(changedBy, sizeof(changedBy), "ChangedBy"); - ChangedTime changedTime; snprintf(changedTime, sizeof(changedTime), "ChangedTime"); - - NdbConnection * MyTransaction = 0; - if(uh->pCurrTrans != 0){ - MyTransaction = uh->pCurrTrans; - } else { - uh->pCurrTrans = MyTransaction = uh->pNDB->startTransaction(); - } - if (MyTransaction == NULL) - error_handler("startTranscation", uh->pNDB->getNdbError(), 0); - - NdbOperation *MyOperation = MyTransaction->getNdbOperation(SUBSCRIBER_TABLE); - CHECK_NULL(MyOperation, "getNdbOperation", MyTransaction); - - check = MyOperation->insertTuple(); - CHECK_MINUS_ONE(check, "insertTuple", MyTransaction); - - check = MyOperation->equal(SUBSCRIBER_NUMBER, number); - CHECK_MINUS_ONE(check, "equal", MyTransaction); - - check = MyOperation->setValue(SUBSCRIBER_NAME, name); - CHECK_MINUS_ONE(check, "setValue name", MyTransaction); - - check = MyOperation->setValue(SUBSCRIBER_GROUP, (char*)&groupId); - CHECK_MINUS_ONE(check, "setValue group", MyTransaction); - - check = MyOperation->setValue(SUBSCRIBER_LOCATION, (char*)&l); - CHECK_MINUS_ONE(check, "setValue location", MyTransaction); - - check = MyOperation->setValue(SUBSCRIBER_SESSIONS, (char*)&activeSessions); - CHECK_MINUS_ONE(check, "setValue sessions", MyTransaction); - - check = MyOperation->setValue(SUBSCRIBER_CHANGED_BY, changedBy); - CHECK_MINUS_ONE(check, "setValue changedBy", MyTransaction); - - check = MyOperation->setValue(SUBSCRIBER_CHANGED_TIME, changedTime); - CHECK_MINUS_ONE(check, "setValue changedTime", MyTransaction); - - return 0; -} - -int userDbInsertGroup(UserHandle *uh, - GroupId groupId, - GroupName name, - Permission allowRead, - Permission allowInsert, - Permission allowDelete) -{ - int check; - - NdbConnection * MyTransaction = 0; - if(uh->pCurrTrans != 0){ - MyTransaction = uh->pCurrTrans; - } else { - uh->pCurrTrans = MyTransaction = uh->pNDB->startTransaction(); - } - if (MyTransaction == NULL) - error_handler("startTranscation", uh->pNDB->getNdbError(), 0); - - NdbOperation *MyOperation = MyTransaction->getNdbOperation(GROUP_TABLE); - CHECK_NULL(MyOperation, "getNdbOperation", MyTransaction); - - check = MyOperation->insertTuple(); - CHECK_MINUS_ONE(check, "insertTuple", MyTransaction); - - check = MyOperation->equal(GROUP_ID, (char*)&groupId); - CHECK_MINUS_ONE(check, "equal", MyTransaction); - - check = MyOperation->setValue(GROUP_NAME, name); - CHECK_MINUS_ONE(check, "setValue name", MyTransaction); - - check = MyOperation->setValue(GROUP_ALLOW_READ, (char*)&allowRead); - CHECK_MINUS_ONE(check, "setValue allowRead", MyTransaction); - - check = MyOperation->setValue(GROUP_ALLOW_INSERT, (char*)&allowInsert); - CHECK_MINUS_ONE(check, "setValue allowInsert", MyTransaction); - - check = MyOperation->setValue(GROUP_ALLOW_DELETE, (char*)&allowDelete); - CHECK_MINUS_ONE(check, "setValue allowDelete", MyTransaction); - - return 0; -} - diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c deleted file mode 100644 index bdc60912482..00000000000 --- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c +++ /dev/null @@ -1,472 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/*************************************************************** -* I N C L U D E D F I L E S * -***************************************************************/ - -#include -#include - -#include "sql.h" -#include "sqlext.h" - - -#include "userInterface.h" -#include "userHandle.h" - -/*************************************************************** -* L O C A L C O N S T A N T S * -***************************************************************/ - -/*************************************************************** -* L O C A L D A T A S T R U C T U R E S * -***************************************************************/ - -/*************************************************************** -* L O C A L F U N C T I O N S * -***************************************************************/ - -static int readSubscriberSessions(UserHandle *uh, - SubscriberNumber number, - char *transactionType); - -/*************************************************************** -* L O C A L D A T A * -***************************************************************/ - -extern void handle_error(SQLHDBC hdbc, - SQLHENV henv, - SQLHSTMT hstmt, - SQLRETURN rc, - char *filename, - int lineno); - -/*************************************************************** -* P U B L I C D A T A * -***************************************************************/ - - -/*************************************************************** -**************************************************************** -* L O C A L F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -static int readSubscriberSessions(UserHandle *uh, - SubscriberNumber number, - char *transactionType) -{ - SQLRETURN rc; - - /*-----------------------------------------------------*/ - /* SELECT activeSessions,groupId,changedBy,changedTime */ - /* FROM SUBSCRIBER */ - /* WHERE subscriberNumber=x; */ - /*-----------------------------------------------------*/ - strcpy(uh->readSubscriberSession.values.number,number); - - rc = SQLExecute(uh->readSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("%s %s\n", - transactionType, - "Unable to execute read subscriber session"); - return(-1); - } - - rc = SQLFetch(uh->readSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("%s %s\n", - transactionType, - "Unable to fetch read subscriber session"); - return(-1); - } - - return(0); -} - -/*************************************************************** -**************************************************************** -* P U B L I C F U N C T I O N S C O D E S E C T I O N * -**************************************************************** -***************************************************************/ - -void userTransaction_T1(UserHandle *uh, - SubscriberNumber number, - Location new_location, - ChangedBy changed_by, - ChangedTime changed_time) -{ - SQLRETURN rc; - - if(!uh) return; - - /*---------------------------------------------*/ - /* Update the subscriber information */ - /* */ - /* UPDATE SUBSCRIBER */ - /* SET location=x, changedBy=x, changedTime=x */ - /* WHERE subscriberNumber=x; */ - /*---------------------------------------------*/ - strcpy(uh->updateSubscriber.values.number, number); - uh->updateSubscriber.values.location = new_location; - strcpy(uh->updateSubscriber.values.changedBy, changed_by); - strcpy(uh->updateSubscriber.values.changedTime, changed_time); - - rc = SQLExecute(uh->updateSubscriber.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T1 Unable to execute update subscriber\n"); - return; - } - - userDbCommit(uh); -} - -void userTransaction_T2(UserHandle *uh, - SubscriberNumber number, - Location *new_location, - ChangedBy changed_by, - ChangedTime changed_time, - SubscriberName subscriberName) -{ - SQLRETURN rc; - - if(!uh) return; - - /*------------------------------------------------------*/ - /* Read the information from the subscriber table */ - /* */ - /* SELECT location,subscriberName,changedBy,changedTime */ - /* FROM SUBSCRIBER */ - /* WHERE subscriberNumber=x; */ - /*------------------------------------------------------*/ - strcpy(uh->readSubscriber.values.number,number); - - rc = SQLExecute(uh->readSubscriber.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T2 Unable to execute read subscriber\n"); - return; - } - - rc = SQLFetch(uh->readSubscriber.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T2 Unable to fetch read subscriber\n"); - return; - } - - userDbCommit(uh); - - strcpy(subscriberName, uh->readSubscriber.values.name); - *new_location = uh->readSubscriber.values.location; - strcpy(changed_by, uh->readSubscriber.values.changedBy); - strcpy(changed_time, uh->readSubscriber.values.changedTime); -} - -void userTransaction_T3(UserHandle *uh, - SubscriberNumber number, - ServerId server_id, - ServerBit server_bit, - SessionDetails session_details, - unsigned int *branch_executed) -{ - SQLRETURN rc; - - if(!uh) return; - - *branch_executed = 0; - - /*--------------------------------------*/ - /* Read active sessions from subscriber */ - /*--------------------------------------*/ - if( readSubscriberSessions(uh, number, "T3") < 0 ) - return; - - /*-----------------------------------------------*/ - /* Read the 'read' Permissions for the userGroup */ - /* */ - /* SELECT allowRead */ - /* FROM USERGROUP */ - /* WHERE groupId=x */ - /*-----------------------------------------------*/ - uh->readGroupAllowRead.values.groupId = uh->readSubscriberSession.values.groupId; - - rc = SQLExecute(uh->readGroupAllowRead.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to execute read group allow read\n"); - return; - } - - rc = SQLFetch(uh->readGroupAllowRead.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to fetch read group allow read\n"); - return; - } - - if( uh->readGroupAllowRead.values.allowRead & server_bit && - uh->readSubscriberSession.values.activeSessions & server_bit ) { - - /*----------------------------------------------------*/ - /* Read the sessionDetails from the userSession table */ - /* */ - /* SELECT sessionData */ - /* FROM userSession */ - /* WHERE subscriberNumber=x, serverId=x */ - /*----------------------------------------------------*/ - strcpy(uh->readSessionDetails.values.number,number); - uh->readSessionDetails.values.serverId = server_id; - - rc = SQLExecute(uh->readSessionDetails.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to execute read session details\n"); - return; - } - - rc = SQLFetch(uh->readSessionDetails.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to fetch read session details\n"); - return; - } - - strcpy(session_details, uh->readSessionDetails.values.details); - - /*----------------------------------------*/ - /* Increment noOfRead field in the server */ - /* */ - /* UPDATE server */ - /* SET noOfRead=noOfRead+1 */ - /* WHERE serverId=x,subscriberSuffix=x */ - /*----------------------------------------*/ - uh->updateServerNoOfRead.values.serverId = server_id; - strcpy(uh->updateServerNoOfRead.values.suffix, - &number[SUBSCRIBER_NUMBER_LENGTH-SUBSCRIBER_NUMBER_SUFFIX_LENGTH]); - - rc = SQLExecute(uh->updateServerNoOfRead.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T3 Unable to execute read no of read\n"); - return; - } - - *branch_executed = 1; - } - - userDbCommit(uh); -} - -void userTransaction_T4(UserHandle *uh, - SubscriberNumber number, - ServerId server_id, - ServerBit server_bit, - SessionDetails session_details, - unsigned int do_rollback, - unsigned int *branch_executed) -{ - SQLRETURN rc; - - if(!uh) return; - - *branch_executed = 0; - - /*--------------------------------------*/ - /* Read active sessions from subscriber */ - /*--------------------------------------*/ - if( readSubscriberSessions(uh, number, "T4") < 0 ) - return; - - /*-------------------------------------------------*/ - /* Read the 'insert' Permissions for the userGroup */ - /* */ - /* SELECT allowInsert */ - /* FROM USERGROUP */ - /* WHERE groupId=x */ - /*-------------------------------------------------*/ - uh->readGroupAllowInsert.values.groupId = uh->readSubscriberSession.values.groupId; - - rc = SQLExecute(uh->readGroupAllowInsert.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T4 Unable to execute read group allow insert\n"); - return; - } - - rc = SQLFetch(uh->readGroupAllowInsert.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T4 Unable to fetch read group allow insert\n"); - return; - } - - if( uh->readGroupAllowInsert.values.allowInsert & server_bit && - !(uh->readSubscriberSession.values.activeSessions & server_bit) ) { - - /*---------------------------------------------*/ - /* Insert the session to the userSession table */ - /* */ - /* INSERT INTO userSession */ - /* VALUES (x,x,x) */ - /*---------------------------------------------*/ - strcpy(uh->insertSession.values.number, number); - uh->insertSession.values.serverId = server_id; - strcpy(uh->insertSession.values.details, session_details); - - rc = SQLExecute(uh->insertSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { -handle_error(uh->hdbc, uh->henv, uh->insertSession.stmt, rc, __FILE__, __LINE__); - printf("T4 Unable to execute insert session \n"); - return; - } - - /*----------------------------------------*/ - /* Update subscriber activeSessions field */ - /* */ - /* UPDATE subscriber */ - /* SET activeSessions=x */ - /* WHERE subscriberNumber=x */ - /*----------------------------------------*/ - strcpy(uh->updateSubscriberSession.values.number, number); - uh->updateSubscriberSession.values.activeSessions = - uh->readSubscriberSession.values.activeSessions | server_bit; - - rc = SQLExecute(uh->updateSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T4 Unable to execute update session \n"); - return; - } - - /*------------------------------------------*/ - /* Increment noOfInsert field in the server */ - /* */ - /* UPDATE server */ - /* SET noOfInsert=noOfInsert+1 */ - /* WHERE serverId=x,subscriberSuffix=x */ - /*------------------------------------------*/ - uh->updateServerNoOfInsert.values.serverId = server_id; - strcpy(uh->updateServerNoOfInsert.values.suffix, - &number[SUBSCRIBER_NUMBER_LENGTH-SUBSCRIBER_NUMBER_SUFFIX_LENGTH]); - - rc = SQLExecute(uh->updateServerNoOfInsert.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T4 Unable to execute update no of read\n"); - return; - } - - *branch_executed = 1; - } - - if(do_rollback) - userDbRollback(uh); - else - userDbCommit(uh); -} - -void userTransaction_T5(UserHandle *uh, - SubscriberNumber number, - ServerId server_id, - ServerBit server_bit, - unsigned int do_rollback, - unsigned int *branch_executed) -{ - SQLRETURN rc; - - if(!uh) return; - - *branch_executed = 0; - - /*--------------------------------------*/ - /* Read active sessions from subscriber */ - /*--------------------------------------*/ - if( readSubscriberSessions(uh, number, "T5") < 0 ) - return; - - /*-------------------------------------------------*/ - /* Read the 'delete' Permissions for the userGroup */ - /* */ - /* SELECT allowDelete */ - /* FROM USERGROUP */ - /* WHERE groupId=x */ - /*-------------------------------------------------*/ - uh->readGroupAllowDelete.values.groupId = uh->readSubscriberSession.values.groupId; - - rc = SQLExecute(uh->readGroupAllowDelete.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to execute read group allow delete\n"); - return; - } - - rc = SQLFetch(uh->readGroupAllowDelete.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to fetch read group allow delete\n"); - return; - } - - if( uh->readGroupAllowDelete.values.allowDelete & server_bit && - uh->readSubscriberSession.values.activeSessions & server_bit ) { - - /*-----------------------------------------------*/ - /* Delete the session from the userSession table */ - /* */ - /* DELETE FROM userSession */ - /* WHERE subscriberNumber=x,serverId=x */ - /*-----------------------------------------------*/ - strcpy(uh->deleteSession.values.number,number); - uh->deleteSession.values.serverId = server_id; - - rc = SQLExecute(uh->deleteSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to execute delete session\n"); - return; - } - - /*----------------------------------------*/ - /* Update subscriber activeSessions field */ - /* */ - /* UPDATE subscriber */ - /* SET activeSessions=x */ - /* WHERE subscriberNumber=x */ - /*----------------------------------------*/ - strcpy(uh->updateSubscriberSession.values.number, number); - uh->updateSubscriberSession.values.activeSessions = - uh->readSubscriberSession.values.activeSessions & ~server_bit; - - rc = SQLExecute(uh->updateSubscriberSession.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to execute update subscriber session \n"); - return; - } - - /*------------------------------------------*/ - /* Increment noOfDelete field in the server */ - /* */ - /* UPDATE server */ - /* SET noOfDelete=noOfDelete+1 */ - /* WHERE serverId=x,subscriberSuffix=x */ - /*------------------------------------------*/ - uh->updateServerNoOfDelete.values.serverId = server_id; - strcpy(uh->updateServerNoOfDelete.values.suffix, - &number[SUBSCRIBER_NUMBER_LENGTH-SUBSCRIBER_NUMBER_SUFFIX_LENGTH]); - - rc = SQLExecute(uh->updateServerNoOfDelete.stmt); - if( rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - printf("T5 Unable to execute update no of delete\n"); - return; - } - - *branch_executed = 1; - } - - if(do_rollback) - userDbRollback(uh); - else - userDbCommit(uh); -} - - diff --git a/ndb/test/ndbapi/old_dirs/restarter/Makefile b/ndb/test/ndbapi/old_dirs/restarter/Makefile deleted file mode 100644 index 041fbfd82ba..00000000000 --- a/ndb/test/ndbapi/old_dirs/restarter/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := restarter - -# Source files of non-templated classes (.C files) -SOURCES = restarter.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/restarter2/Makefile b/ndb/test/ndbapi/old_dirs/restarter2/Makefile deleted file mode 100644 index ba33a2e21dc..00000000000 --- a/ndb/test/ndbapi/old_dirs/restarter2/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := restarter2 - -# Source files of non-templated classes (.C files) -SOURCES = restarter2.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/restarts/Makefile b/ndb/test/ndbapi/old_dirs/restarts/Makefile deleted file mode 100644 index 9f14b81fae5..00000000000 --- a/ndb/test/ndbapi/old_dirs/restarts/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := restarts - -# Source files of non-templated classes (.C files) -SOURCES = restarts.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/ronja/Makefile b/ndb/test/ndbapi/old_dirs/ronja/Makefile deleted file mode 100644 index a11a27c5fd7..00000000000 --- a/ndb/test/ndbapi/old_dirs/ronja/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -include .defs.mk - -DIRS = initronja \ - benchronja - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/ronja/benchronja/Makefile b/ndb/test/ndbapi/old_dirs/ronja/benchronja/Makefile deleted file mode 100644 index f0521c3ba77..00000000000 --- a/ndb/test/ndbapi/old_dirs/ronja/benchronja/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - - -BIN_TARGET := benchronja - -SOURCES := benchronja.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/ronja/initronja/Makefile b/ndb/test/ndbapi/old_dirs/ronja/initronja/Makefile deleted file mode 100644 index dd66dd813d1..00000000000 --- a/ndb/test/ndbapi/old_dirs/ronja/initronja/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := initronja - -SOURCES := initronja.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/telco/Makefile b/ndb/test/ndbapi/old_dirs/telco/Makefile deleted file mode 100644 index 8f82c714119..00000000000 --- a/ndb/test/ndbapi/old_dirs/telco/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := telco - -# Source files of non-templated classes (.C files) -SOURCES = msa.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/telco/readme b/ndb/test/ndbapi/old_dirs/telco/readme deleted file mode 100644 index 627b4256eef..00000000000 --- a/ndb/test/ndbapi/old_dirs/telco/readme +++ /dev/null @@ -1,9 +0,0 @@ - -adoInsertRecs.cpp - the original evaluation program - -InsertRecs.cpp - replaced ado with ndb api, still windows only - -msa.cpp - removed windows and exceptions, portable - - - diff --git a/ndb/test/ndbapi/old_dirs/testBackup/Makefile b/ndb/test/ndbapi/old_dirs/testBackup/Makefile deleted file mode 100644 index abf47dcfb2d..00000000000 --- a/ndb/test/ndbapi/old_dirs/testBackup/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testBackup -SOURCES = testBackup.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testBasic/Makefile b/ndb/test/ndbapi/old_dirs/testBasic/Makefile deleted file mode 100644 index 755b19939cb..00000000000 --- a/ndb/test/ndbapi/old_dirs/testBasic/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := testBasic - -SOURCES := testBasic.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testBlobs/Makefile b/ndb/test/ndbapi/old_dirs/testBlobs/Makefile deleted file mode 100644 index cc5bb629c17..00000000000 --- a/ndb/test/ndbapi/old_dirs/testBlobs/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testBlobs - -SOURCES = testBlobs.cpp - -include $(NDB_TOP)/Epilogue.mk - -CCFLAGS_LOC += -I$(NDB_TOP)/include/kernel diff --git a/ndb/test/ndbapi/old_dirs/testDataBuffers/Makefile b/ndb/test/ndbapi/old_dirs/testDataBuffers/Makefile deleted file mode 100644 index 181fbc829d4..00000000000 --- a/ndb/test/ndbapi/old_dirs/testDataBuffers/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testDataBuffers - -SOURCES = testDataBuffers.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testDict/Makefile b/ndb/test/ndbapi/old_dirs/testDict/Makefile deleted file mode 100644 index 75d493c3424..00000000000 --- a/ndb/test/ndbapi/old_dirs/testDict/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testDict - -SOURCES = testDict.cpp - -CFLAGS_testDict.cpp := -I$(call fixpath,$(NDB_TOP)/include/kernel) - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testGrep/Makefile b/ndb/test/ndbapi/old_dirs/testGrep/Makefile deleted file mode 100644 index 6bad3d56a00..00000000000 --- a/ndb/test/ndbapi/old_dirs/testGrep/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest -DIRS = verify -BIN_TARGET = testGrep -SOURCES = testGrep.cpp - -include $(NDB_TOP)/Epilogue.mk - diff --git a/ndb/test/ndbapi/old_dirs/testGrep/verify/Makefile b/ndb/test/ndbapi/old_dirs/testGrep/verify/Makefile deleted file mode 100644 index 256e3c98f36..00000000000 --- a/ndb/test/ndbapi/old_dirs/testGrep/verify/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testGrepVerify -SOURCES = testGrepVerify.cpp - -CFLAGS_testGrepVerify.cpp += -I$(call fixpath,$(NDB_TOP)/include/kernel) -I$(call fixpath,$(NDB_TOP)/include/mgmcommon) - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testIndex/Makefile b/ndb/test/ndbapi/old_dirs/testIndex/Makefile deleted file mode 100644 index e5cd4542c9c..00000000000 --- a/ndb/test/ndbapi/old_dirs/testIndex/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testIndex - -SOURCES = testIndex.cpp - -CFLAGS_testIndex.cpp := -I$(call fixpath,$(NDB_TOP)/include/kernel) - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testInterpreter/Makefile b/ndb/test/ndbapi/old_dirs/testInterpreter/Makefile deleted file mode 100644 index e84287a1b16..00000000000 --- a/ndb/test/ndbapi/old_dirs/testInterpreter/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testInterpreter - -SOURCES = testInterpreter.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testMgm/Makefile b/ndb/test/ndbapi/old_dirs/testMgm/Makefile deleted file mode 100644 index be50d3dae7e..00000000000 --- a/ndb/test/ndbapi/old_dirs/testMgm/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testMgm - -SOURCES = testMgm.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testNdbApi/Makefile b/ndb/test/ndbapi/old_dirs/testNdbApi/Makefile deleted file mode 100644 index 3bb3cba427e..00000000000 --- a/ndb/test/ndbapi/old_dirs/testNdbApi/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testNdbApi - -SOURCES = testNdbApi.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testNodeRestart/Makefile b/ndb/test/ndbapi/old_dirs/testNodeRestart/Makefile deleted file mode 100644 index 8c13ab3beb4..00000000000 --- a/ndb/test/ndbapi/old_dirs/testNodeRestart/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testNodeRestart - -SOURCES = testNodeRestart.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testOIBasic/Makefile b/ndb/test/ndbapi/old_dirs/testOIBasic/Makefile deleted file mode 100644 index 1bbbcf1d17e..00000000000 --- a/ndb/test/ndbapi/old_dirs/testOIBasic/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testOIBasic - -SOURCES = testOIBasic.cpp - -ifeq ($(NDB_COMPILER),GCC) -CCFLAGS_WARNINGS += -Wno-unused -Wformat -endif - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testOIBasic/times.txt b/ndb/test/ndbapi/old_dirs/testOIBasic/times.txt deleted file mode 100644 index 641e9ddb4bf..00000000000 --- a/ndb/test/ndbapi/old_dirs/testOIBasic/times.txt +++ /dev/null @@ -1,8 +0,0 @@ -one db-node -testOIBasic -case t -table 1 -index 1 -fragtype small -threads 10 -rows 5000 -subloop 1 ------------------------------------------------------------- -040331 -build index - 5769 ms per 50000 ( 115 ms per 1000 ) -update - 5962 ms per 50000 ( 119 ms per 1000 ) -update indexed - 14851 ms per 50000 ( 297 ms per 1000 ) -overhead - 149 pct diff --git a/ndb/test/ndbapi/old_dirs/testOperations/Makefile b/ndb/test/ndbapi/old_dirs/testOperations/Makefile deleted file mode 100644 index 25546ade639..00000000000 --- a/ndb/test/ndbapi/old_dirs/testOperations/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := testOperations - -SOURCES := testOperations.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testOrderedIndex/Makefile b/ndb/test/ndbapi/old_dirs/testOrderedIndex/Makefile deleted file mode 100644 index d8899a37895..00000000000 --- a/ndb/test/ndbapi/old_dirs/testOrderedIndex/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testOrderedIndex - -SOURCES = testOrderedIndex.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testRestartGci/Makefile b/ndb/test/ndbapi/old_dirs/testRestartGci/Makefile deleted file mode 100644 index 24f449b747d..00000000000 --- a/ndb/test/ndbapi/old_dirs/testRestartGci/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := testRestartGci - -SOURCES := testRestartGci.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testScan/Makefile b/ndb/test/ndbapi/old_dirs/testScan/Makefile deleted file mode 100644 index fe48f5bc926..00000000000 --- a/ndb/test/ndbapi/old_dirs/testScan/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testScan - -SOURCES = testScan.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testScanInterpreter/Makefile b/ndb/test/ndbapi/old_dirs/testScanInterpreter/Makefile deleted file mode 100644 index c7d96494148..00000000000 --- a/ndb/test/ndbapi/old_dirs/testScanInterpreter/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testScanInterpreter - -SOURCES = testScanInterpreter.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testSystemRestart/Makefile b/ndb/test/ndbapi/old_dirs/testSystemRestart/Makefile deleted file mode 100644 index 7a306eb313d..00000000000 --- a/ndb/test/ndbapi/old_dirs/testSystemRestart/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testSystemRestart - -SOURCES = testSystemRestart.cpp - -CFLAGS_testSystemRestart.cpp := -I$(call fixpath,$(NDB_TOP)/include/kernel) - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testTimeout/Makefile b/ndb/test/ndbapi/old_dirs/testTimeout/Makefile deleted file mode 100644 index 01a9df9887f..00000000000 --- a/ndb/test/ndbapi/old_dirs/testTimeout/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE = ndbapitest - -BIN_TARGET = testTimeout - -SOURCES = testTimeout.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/testTransactions/Makefile b/ndb/test/ndbapi/old_dirs/testTransactions/Makefile deleted file mode 100644 index 0279a526923..00000000000 --- a/ndb/test/ndbapi/old_dirs/testTransactions/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := testTransactions - -SOURCES := testTransactions.cpp -CFLAGS_testTransactions.cpp := -I$(call fixpath,$(NDB_TOP)/include/kernel) - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/test_event/Makefile b/ndb/test/ndbapi/old_dirs/test_event/Makefile deleted file mode 100644 index 6299fa47845..00000000000 --- a/ndb/test/ndbapi/old_dirs/test_event/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := test_event - -SOURCES := test_event.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/vw_test/Makefile b/ndb/test/ndbapi/old_dirs/vw_test/Makefile deleted file mode 100644 index 144873dcc69..00000000000 --- a/ndb/test/ndbapi/old_dirs/vw_test/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include .defs.mk - -TYPE := ndbapitest - -BIN_TARGET := vw_test -BIN_TARGET_LIBS := orafunctr decode cirk inifunc -BIN_TARGET_LIBS_DIRS := /home/ndb/junk/vw/ndb/lib - -SOURCES := cdrserver.C - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/old_dirs/vw_test/bcd.h b/ndb/test/ndbapi/old_dirs/vw_test/bcd.h deleted file mode 100644 index 9e42355d30f..00000000000 --- a/ndb/test/ndbapi/old_dirs/vw_test/bcd.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include - -struct bcdtab { - char tab[3]; -}; - -int dec2hex(int dec,int last); -int bcd_code (char *bcd_in,char *bcd_out); -int bcd_decode (int bcd_len,char *bcd_in,char *bcd_out); -int bcd_decode2 (int bcd_len,char *bcd_in,char *bcd_out); diff --git a/ndb/test/ndbapi/old_dirs/vw_test/script/client_start b/ndb/test/ndbapi/old_dirs/vw_test/script/client_start deleted file mode 100644 index 2965be6fbb5..00000000000 --- a/ndb/test/ndbapi/old_dirs/vw_test/script/client_start +++ /dev/null @@ -1,10 +0,0 @@ -# Argument to the client program is: -# 1. ip-adress to the server -# 2. location to the raw cdr-file -# 3. nanoseconds (0-1000) between writing the buffer to the port -# 4. how many writes to the buffer before the sleep command should accur -# Argument 3 and 4 controlls the flow of the raw cdr-file to the cdrserver - -cd $VCDRPATH/bin -# ./client stat181.xxx.com /ext06/data/indata_fraud1/port2file.data.-2089540139 1000 0 & -./client xxx.xxx.xxx.xxx.xxx /export2/home/ndb/vw/data/port2file_data_-2089540139 0 100000 & diff --git a/ndb/test/ndbapi/old_dirs/vw_test/utv.h b/ndb/test/ndbapi/old_dirs/vw_test/utv.h deleted file mode 100644 index 7dfbf29b467..00000000000 --- a/ndb/test/ndbapi/old_dirs/vw_test/utv.h +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include -#include -#include - -#define TESTLEV - -#define ASubscriberNumber_SIZE 16 -#define BSubscriberNumber_SIZE 29 -#define TRUE 1 -#define FALSE 0 -#define WRITE_LIMIT 100000 -#define EVER ;; -#define CONNINFO "/" -#define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) - -#define BIT_1 0x1 -#define BIT_2 0x2 -#define BIT_3 0x4 -#define BIT_4 0x8 -#define BIT_5 0x10 -#define BIT_6 0x20 -#define BIT_7 0x40 -#define BIT_8 0x80 - -/*------------------------------------------------------*/ -/* record defines structure over an alarm thresholds */ -/* CallAttemptState Beskriver status på samtal */ -/* 0 - Subscriber is calling */ -/* 1 - Called part answer call */ -/* 2 - Release of call */ -/* 3-255 reserved for furter use */ -/* USED_FILEDS Indicates active fields within call */ -/* bit 1 - START_TIME */ -/* 2 - TimeForStartOfCharge */ -/* 3 - TimeForStopOfCharge */ -/* 4 - ReroutingIndicator */ -/* 5 - RINParameter */ -/* 6 - ACategory */ -/* 7 - EndOfSelectionInformation */ -/* 8 - UserToUserIndicatior */ -/* 9 - UserToUserInformation */ -/* 10 - CauseCode */ -/* 11 - ASubscriberNumber */ -/* 12 - BSubscriberNumber */ -/* 13 - RedirectingNumber */ -/* 14 - OriginalCalledNumber */ -/* 15 - LocationCode */ -/* 16 - OriginatingPointCode */ -/* 17 - DestinationPointCode */ -/* 18 - CircuitIdentificationCode */ -/* 19 - NetworkIndicator */ -/*------------------------------------------------------*/ - -struct cdr_record -{ - unsigned int USED_FIELDS; - unsigned long ClientId; - unsigned int CallIdentificationNumber; - unsigned int START_TIME; - unsigned int OurSTART_TIME; - unsigned int TimeForStartOfCharge; - unsigned int TimeForStopOfCharge; - time_t OurTimeForStartOfCharge; - time_t OurTimeForStopOfCharge; - unsigned short DestinationPointCode; - unsigned short CircuitIdentificationCode; - unsigned short OriginatingPointCode; - unsigned short ReroutingIndicator; - unsigned short RINParameter; - char NetworkIndicator; - char CallAttemptState; - char ACategory; - char EndOfSelectionInformation; - char UserToUserInformation; - char UserToUserIndicatior; - char CauseCode; - char ASubscriberNumber[ASubscriberNumber_SIZE]; - char ASubscriberNumberLength; - char TonASubscriberNumber; - char BSubscriberNumber[BSubscriberNumber_SIZE]; - char BSubscriberNumberLength; - char TonBSubscriberNumber; - char RedirectingNumber[16]; - char TonRedirectingNumber; - char OriginalCalledNumber[16]; - char TonOriginalCalledNumber; - char LocationCode[16]; - char TonLocationCode; -}; - -/*------------------------------------------------------*/ -/* Define switches for each tag */ -/*------------------------------------------------------*/ - -#define B_START_TIME 0x1 -#define B_TimeForStartOfCharge 0x2 -#define B_TimeForStopOfCharge 0x4 -#define B_ReroutingIndicator 0x8 -#define B_RINParameter 0x10 -#define B_ACategory 0x20 -#define B_EndOfSelectionInformation 0x40 -#define B_UserToUserIndicatior 0x80 -#define B_UserToUserInformation 0x100 -#define B_CauseCode 0x200 -#define B_ASubscriberNumber 0x400 -#define B_BSubscriberNumber 0x800 -#define B_RedirectingNumber 0x1000 -#define B_OriginalCalledNumber 0x2000 -#define B_LocationCode 0x4000 -#define B_OriginatingPointCode 0x8000 -#define B_DestinationPointCode 0x10000 -#define B_CircuitIdentificationCode 0x20000 - -#define B_NetworkIndicator 0x40000 -#define B_TonASubscriberNumber 0x80000 -#define B_TonBSubscriberNumber 0x100000 -#define B_TonRedirectingNumber 0x200000 -#define B_TonOriginalCalledNumber 0x4000000 -#define B_TonLocationCode 0x8000000 - -#define K_START_TIME 0xFF01 -#define K_TimeForStartOfCharge 0xFF02 -#define K_TimeForStopOfCharge 0xFF03 -#define K_ReroutingIndicator 0x13 -#define K_RINParameter 0xFC -#define K_ACategory 0x09 -#define K_EndOfSelectionInformation 0x11 -#define K_UserToUserIndicatior 0x2A -#define K_UserToUserInformation 0x20 -#define K_CauseCode 0x12 -#define K_ASubscriberNumber 0x0A -#define K_BSubscriberNumber 0x04 -#define K_RedirectingNumber 0x0B -#define K_OriginalCalledNumber 0x28 -#define K_LocationCode 0x3F -#define K_OriginatingPointCode 0xFD -#define K_DestinationPointCode 0xFE -#define K_CircuitIdentificationCode 0xFF - -#define K_NetworkIndicator 0xF0 -#define K_TonASubscriberNumber 0xF1 -#define K_TonBSubscriberNumber 0xF2 -#define K_TonRedirectingNumber 0xF3 -#define K_TonOriginalCalledNumber 0xF4 -#define K_TonLocationCode 0xF5 diff --git a/ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h b/ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h deleted file mode 100644 index 156cd4d3c3d..00000000000 --- a/ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/********************************************************/ -/* Common functions */ -/* unix_ps checks if a process is running with a */ -/* name and pid rc 0=not running */ -/* 1=Running */ -/* logname create a log filename */ -/* Parm */ -/* 1 lvl1 name */ -/* 2 lvl2 name */ -/* 3 lvl3 name */ -/* m2log Skriv log rader som moder */ -/* Parm */ -/* 1 pointer to filehandler */ -/* 2 Log text max 600 tecken */ -/* c2log Skriv log rader som barn */ -/* Parm */ -/* 1 pointer to filehandler */ -/* 2 Log text max 600 tecken */ -/* n2log Skriv log rader utan relation */ -/* Parm */ -/* 1 pointer to filehandler */ -/* 2 Log text max 600 tecken */ -/********************************************************/ - -int n2log(FILE *fi,char *text); -int m2log(FILE *fi,char *text); -int c2log(FILE *fi,char *text); -int checkchangelog(FILE* fp,char *filename); -void logname(char *filename, char *lvl1, char *lvl2, char *lvl3); -void logname_unique_day(char *filename, char *lvl1, char *lvl2, char *lvl3); -int unix_ps(char *proc_name,char *pid); -/* -int unix_ps2(char *proc_name,char *pid); -*/ -int unix_ps3(char *proc_name); -int replacetoken(const char* instring,char token,char replace); -int CompAsciiNum(char *, char *); -int CompareIt(char *,char *); -int CompCdrNum(const void *,const void *,void *); diff --git a/ndb/test/ndbapi/slow_select.cpp b/ndb/test/ndbapi/slow_select.cpp index 8d615fa5771..21e3ce7400c 100644 --- a/ndb/test/ndbapi/slow_select.cpp +++ b/ndb/test/ndbapi/slow_select.cpp @@ -1,3 +1,17 @@ +/* Copyright (C) 2004, 2005 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include diff --git a/ndb/test/ndbapi/testBitfield.cpp b/ndb/test/ndbapi/testBitfield.cpp index 40a7a9d4557..ee22634586b 100644 --- a/ndb/test/ndbapi/testBitfield.cpp +++ b/ndb/test/ndbapi/testBitfield.cpp @@ -1,3 +1,17 @@ +/* Copyright (C) 2004, 2008 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include diff --git a/ndb/test/ndbapi/testLcp.cpp b/ndb/test/ndbapi/testLcp.cpp index 8bfc7ccf9b9..a3e38e975eb 100644 --- a/ndb/test/ndbapi/testLcp.cpp +++ b/ndb/test/ndbapi/testLcp.cpp @@ -1,3 +1,17 @@ +/* Copyright (C) 2004, 2005 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include diff --git a/ndb/test/ndbnet/test.run b/ndb/test/ndbnet/test.run index 30042488c92..195a657aeb5 100644 --- a/ndb/test/ndbnet/test.run +++ b/ndb/test/ndbnet/test.run @@ -1,3 +1,18 @@ +# Copyright (C) 2004 MySQL AB # +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA system("printenv|sort"); diff --git a/ndb/test/ndbnet/testError.run b/ndb/test/ndbnet/testError.run index 3cce489a3da..6ace2cbbd20 100644 --- a/ndb/test/ndbnet/testError.run +++ b/ndb/test/ndbnet/testError.run @@ -1,3 +1,20 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # # file : test/ndbnet/testError.run # usage: perl testError.run diff --git a/ndb/test/ndbnet/testMNF.run b/ndb/test/ndbnet/testMNF.run index df226cd3359..2903313f306 100644 --- a/ndb/test/ndbnet/testMNF.run +++ b/ndb/test/ndbnet/testMNF.run @@ -1,3 +1,20 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # # file : test/ndbnet/testError.run # usage: perl testError.run diff --git a/ndb/test/ndbnet/testNR.run b/ndb/test/ndbnet/testNR.run index 01a3d76266d..5019f597b42 100644 --- a/ndb/test/ndbnet/testNR.run +++ b/ndb/test/ndbnet/testNR.run @@ -1,4 +1,19 @@ +# Copyright (C) 2004 MySQL AB # +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA use strict; use NDB::Run; diff --git a/ndb/test/ndbnet/testNR1.run b/ndb/test/ndbnet/testNR1.run index 8819a92c8ca..a02b487b663 100644 --- a/ndb/test/ndbnet/testNR1.run +++ b/ndb/test/ndbnet/testNR1.run @@ -1,3 +1,20 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # Node recovery killing 1 node out of 4 at the time and waiting for recover use strict; diff --git a/ndb/test/ndbnet/testNR4.run b/ndb/test/ndbnet/testNR4.run index f7a5eef3494..378d2743145 100644 --- a/ndb/test/ndbnet/testNR4.run +++ b/ndb/test/ndbnet/testNR4.run @@ -1,3 +1,20 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # Node recovery killing 1 node out of 4 at the time and waiting for recover use strict; diff --git a/ndb/test/ndbnet/testSRhang.run b/ndb/test/ndbnet/testSRhang.run index 8cb65a75ded..570ed897eef 100644 --- a/ndb/test/ndbnet/testSRhang.run +++ b/ndb/test/ndbnet/testSRhang.run @@ -1,4 +1,19 @@ +# Copyright (C) 2004 MySQL AB # +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA use strict; use NDB::Run; diff --git a/ndb/test/ndbnet/testTR295.run b/ndb/test/ndbnet/testTR295.run index ce4250b60ae..df26000cbda 100644 --- a/ndb/test/ndbnet/testTR295.run +++ b/ndb/test/ndbnet/testTR295.run @@ -1,3 +1,20 @@ +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # testing TR295, kill non-master when recovering in phase 4 use strict; diff --git a/ndb/test/run-test/16node-tests.txt b/ndb/test/run-test/16node-tests.txt index 11ade56c28c..21dd67c9b4b 100644 --- a/ndb/test/run-test/16node-tests.txt +++ b/ndb/test/run-test/16node-tests.txt @@ -1,3 +1,18 @@ +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + # BASIC FUNCTIONALITY max-time: 500 cmd: testBasic diff --git a/ndb/test/run-test/atrt-analyze-result.sh b/ndb/test/run-test/atrt-analyze-result.sh index 0fa46e918ef..9a482faee86 100755 --- a/ndb/test/run-test/atrt-analyze-result.sh +++ b/ndb/test/run-test/atrt-analyze-result.sh @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + f=`find result -name 'log.out' | xargs grep "NDBT_ProgramExit: " | grep -c "Failed"` o=`find result -name 'log.out' | xargs grep "NDBT_ProgramExit: " | grep -c "OK"` diff --git a/ndb/test/run-test/atrt-clear-result.sh b/ndb/test/run-test/atrt-clear-result.sh index 57d3d43d247..7eeb54daef3 100755 --- a/ndb/test/run-test/atrt-clear-result.sh +++ b/ndb/test/run-test/atrt-clear-result.sh @@ -1,4 +1,21 @@ #!/bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + set -e rm -rf result diff --git a/ndb/test/run-test/atrt-gather-result.sh b/ndb/test/run-test/atrt-gather-result.sh index 93d4ae428d0..48704651813 100755 --- a/ndb/test/run-test/atrt-gather-result.sh +++ b/ndb/test/run-test/atrt-gather-result.sh @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + set -e mkdir -p result diff --git a/ndb/test/run-test/atrt-mysql-test-run b/ndb/test/run-test/atrt-mysql-test-run index 2ebc11b0070..55afc45bef9 100755 --- a/ndb/test/run-test/atrt-mysql-test-run +++ b/ndb/test/run-test/atrt-mysql-test-run @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + set -x p=`pwd` cd $MYSQL_BASE_DIR/mysql-test diff --git a/ndb/test/run-test/atrt-setup.sh b/ndb/test/run-test/atrt-setup.sh index aff5d4119dc..786b1d812de 100755 --- a/ndb/test/run-test/atrt-setup.sh +++ b/ndb/test/run-test/atrt-setup.sh @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + set -e ssh $1 mkdir -p $3 diff --git a/ndb/test/run-test/atrt-testBackup b/ndb/test/run-test/atrt-testBackup index 3ed7641a42e..2ed6f70b7aa 100755 --- a/ndb/test/run-test/atrt-testBackup +++ b/ndb/test/run-test/atrt-testBackup @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + PATH=$PATH:$MYSQL_BASE_DIR/bin export PATH diff --git a/ndb/test/run-test/basic.txt b/ndb/test/run-test/basic.txt index ec9e21359e5..69555b8c587 100644 --- a/ndb/test/run-test/basic.txt +++ b/ndb/test/run-test/basic.txt @@ -1,3 +1,18 @@ +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + # BASIC FUNCTIONALITY max-time: 500 cmd: testBasic diff --git a/ndb/test/run-test/conf-daily-devel-ndbmaster.txt b/ndb/test/run-test/conf-daily-devel-ndbmaster.txt index 51c171a6357..ccd11fb6056 100644 --- a/ndb/test/run-test/conf-daily-devel-ndbmaster.txt +++ b/ndb/test/run-test/conf-daily-devel-ndbmaster.txt @@ -1,3 +1,18 @@ +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + baseport: 16000 basedir: /space/autotest mgm: CHOOSE_host1 diff --git a/ndb/test/run-test/conf-daily-sql-ndbmaster.txt b/ndb/test/run-test/conf-daily-sql-ndbmaster.txt index 0d6a99f8d48..6777eb98cfe 100644 --- a/ndb/test/run-test/conf-daily-sql-ndbmaster.txt +++ b/ndb/test/run-test/conf-daily-sql-ndbmaster.txt @@ -1,3 +1,18 @@ +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + baseport: 16000 basedir: /space/autotest mgm: CHOOSE_host1 diff --git a/ndb/test/run-test/conf-dl145a.txt b/ndb/test/run-test/conf-dl145a.txt index d0a240f09d1..ed10fe6bb4d 100644 --- a/ndb/test/run-test/conf-dl145a.txt +++ b/ndb/test/run-test/conf-dl145a.txt @@ -1,3 +1,18 @@ +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + baseport: 14000 basedir: /home/ndbdev/autotest/run mgm: CHOOSE_host1 diff --git a/ndb/test/run-test/conf-ndbmaster.txt b/ndb/test/run-test/conf-ndbmaster.txt index 89b41850ec0..cca9aa5ae7c 100644 --- a/ndb/test/run-test/conf-ndbmaster.txt +++ b/ndb/test/run-test/conf-ndbmaster.txt @@ -1,3 +1,18 @@ +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + baseport: 14000 basedir: /space/autotest mgm: CHOOSE_host1 diff --git a/ndb/test/run-test/conf-shark.txt b/ndb/test/run-test/conf-shark.txt index d66d0280d8a..3a216575ea4 100644 --- a/ndb/test/run-test/conf-shark.txt +++ b/ndb/test/run-test/conf-shark.txt @@ -1,3 +1,18 @@ +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + baseport: 14000 basedir: /space/autotest mgm: CHOOSE_host1 diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt index a27b94193e5..59d916f6f86 100644 --- a/ndb/test/run-test/daily-basic-tests.txt +++ b/ndb/test/run-test/daily-basic-tests.txt @@ -1,3 +1,18 @@ +# Copyright (C) 2004-2008 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + max-time: 3600 cmd: atrt-mysql-test-run args: --force diff --git a/ndb/test/run-test/daily-devel-tests.txt b/ndb/test/run-test/daily-devel-tests.txt index 20f54e031e5..c5667fd7518 100644 --- a/ndb/test/run-test/daily-devel-tests.txt +++ b/ndb/test/run-test/daily-devel-tests.txt @@ -1,3 +1,18 @@ +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + # # INDEX # diff --git a/ndb/test/run-test/make-config.sh b/ndb/test/run-test/make-config.sh index e82acb8a7dd..94070389764 100755 --- a/ndb/test/run-test/make-config.sh +++ b/ndb/test/run-test/make-config.sh @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + baseport="" basedir="" proc_no=1 diff --git a/ndb/test/run-test/make-html-reports.sh b/ndb/test/run-test/make-html-reports.sh index 67395ceba47..dc6d1225dbe 100755 --- a/ndb/test/run-test/make-html-reports.sh +++ b/ndb/test/run-test/make-html-reports.sh @@ -1,5 +1,22 @@ #!/bin/sh +# Copyright (C) 2004, 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + src_dir=$1 run=$2 date=$3 diff --git a/ndb/test/run-test/make-index.sh b/ndb/test/run-test/make-index.sh index 944f0df790b..f13ac098567 100755 --- a/ndb/test/run-test/make-index.sh +++ b/ndb/test/run-test/make-index.sh @@ -1,4 +1,22 @@ #!/bin/sh + +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # NAME # make-index.sh # diff --git a/ndb/test/run-test/ndb-autotest.sh b/ndb/test/run-test/ndb-autotest.sh index 544897a2aa2..d82c3e52b1f 100755 --- a/ndb/test/run-test/ndb-autotest.sh +++ b/ndb/test/run-test/ndb-autotest.sh @@ -1,4 +1,22 @@ #!/bin/sh + +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + ############################################################# # This script created by Jonas does the following # # Cleans up clones and pevious builds, pulls new clones, # diff --git a/ndb/test/sql/test_create_drop.pl b/ndb/test/sql/test_create_drop.pl index 7f62898b3d1..eb9d5e31dc8 100644 --- a/ndb/test/sql/test_create_drop.pl +++ b/ndb/test/sql/test_create_drop.pl @@ -1,3 +1,20 @@ +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + use strict; use IO::Socket; use DBI; diff --git a/ndb/test/sql/test_range_bounds.pl b/ndb/test/sql/test_range_bounds.pl index abe1ea28298..964847044de 100644 --- a/ndb/test/sql/test_range_bounds.pl +++ b/ndb/test/sql/test_range_bounds.pl @@ -1,3 +1,20 @@ +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # # test range scan bounds # give option --all to test all cases diff --git a/ndb/tools/clean-links.sh b/ndb/tools/clean-links.sh index 01820f30616..84052a619d0 100755 --- a/ndb/tools/clean-links.sh +++ b/ndb/tools/clean-links.sh @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # 1 - Dir # 2 - Link dst diff --git a/ndb/tools/make-errors.pl b/ndb/tools/make-errors.pl index 65819209a89..ac9c7d1d58a 100644 --- a/ndb/tools/make-errors.pl +++ b/ndb/tools/make-errors.pl @@ -1,5 +1,20 @@ #! /usr/local/bin/perl +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + use strict; use Getopt::Long; use XML::Parser; diff --git a/ndb/tools/make-links.sh b/ndb/tools/make-links.sh index e0c4f55986e..6008406ad6a 100755 --- a/ndb/tools/make-links.sh +++ b/ndb/tools/make-links.sh @@ -1,5 +1,20 @@ #! /bin/sh +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # 1 - Link top src # 2 - Link dst diff --git a/ndb/tools/ndb_error_reporter b/ndb/tools/ndb_error_reporter index 2b5aadb6171..e82f8d05810 100755 --- a/ndb/tools/ndb_error_reporter +++ b/ndb/tools/ndb_error_reporter @@ -1,5 +1,20 @@ #!/usr/bin/perl -w +# Copyright (C) 2005 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + use strict; if(@ARGV < 1) diff --git a/ndb/tools/ndb_size.pl b/ndb/tools/ndb_size.pl index 3d1ea3f4231..2d7ab4379b0 100644 --- a/ndb/tools/ndb_size.pl +++ b/ndb/tools/ndb_size.pl @@ -1,17 +1,23 @@ #!/usr/bin/perl -w -use strict; - -use DBI; -use POSIX; -use HTML::Template; +# Copyright (C) 2005, 2006 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # MySQL Cluster size estimator # ---------------------------- # -# (C)2005 MySQL AB -# -# # The purpose of this tool is to work out storage requirements # from an existing MySQL database. # @@ -21,8 +27,6 @@ use HTML::Template; # We currently estimate sizes for: 4.1, 5.0 and 5.1 to various amounts # of accurracy. # -# There is no warranty. -# # BUGS # ---- # - enum/set is 0 byte storage! Woah - efficient! @@ -32,6 +36,12 @@ use HTML::Template; # - computes the storage requirements of views (and probably MERGE) # - ignores character sets. +use strict; + +use DBI; +use POSIX; +use HTML::Template; + my $template = HTML::Template->new(filename => 'ndb_size.tmpl', die_on_bad_params => 0) or die "Could not open ndb_size.tmpl."; diff --git a/ndb/tools/ndb_size.tmpl b/ndb/tools/ndb_size.tmpl index 1e19ea132ba..2867216e7f4 100644 --- a/ndb/tools/ndb_size.tmpl +++ b/ndb/tools/ndb_size.tmpl @@ -1,4 +1,21 @@ + + diff --git a/ndb/tools/rgrep b/ndb/tools/rgrep index 212b068639d..b1ed4fb6f5e 100755 --- a/ndb/tools/rgrep +++ b/ndb/tools/rgrep @@ -1,5 +1,20 @@ #!/vobs/wds/swt/bin/perl +# Copyright (C) 2004 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + die "Usage: rgrep [-iredblLn] regexp filepat ...\n rgrep -h for help\n" if $#ARGV < $[; diff --git a/os2/BldLevel.RES b/os2/BldLevel.RES deleted file mode 100644 index 302d9fc875e44865339845829d6bab220741c810..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127 zcmXZUu?oU46h`6O(YN^Fu3FREy4)#-PNJ03$+2LCfFvc7p-*2c`t9eeJ6a0@y@|;3 zZ5jG2&Tfx;P9E);eAK#>x;z=S%oQ`F!6gTXF#-{7M8)819_K0f5LKt38*6{Ne~)KO P=!T=<0GIvi0awun<`^H` diff --git a/os2/BldLevel.cmd b/os2/BldLevel.cmd deleted file mode 100644 index d98d8c9dfb9..00000000000 --- a/os2/BldLevel.cmd +++ /dev/null @@ -1,10 +0,0 @@ -@echo off - -REM I'm using resources for BLDLEVEL info, because VA4 linker has the bad -REM feature of using versionstring content for padding files. - -REM To set fixpak level: -P"fixpak level" -SET MYSQL_VERSION=3.23.50 -SET MYSQL_BUILD=B1 - -BldLevelInf -V%MYSQL_VERSION% -N"MySQL AB, Yuri Dario" -D"MySQL %MYSQL_VERSION% for OS/2 - Build %MYSQL_BUILD%" -Len BldLevel.rc diff --git a/os2/BldLevel.rc b/os2/BldLevel.rc deleted file mode 100644 index ac028379892..00000000000 --- a/os2/BldLevel.rc +++ /dev/null @@ -1 +0,0 @@ -RCDATA 1 { "@#MySQL AB, Yuri Dario:3.23.50#@##1## 24 Jun 2002 22:42:20 paperino::en::::@@MySQL 3.23.50 for OS/2 - Build B1" } diff --git a/os2/BldLevelInf.cmd b/os2/BldLevelInf.cmd deleted file mode 100644 index 40a85f3782a..00000000000 --- a/os2/BldLevelInf.cmd +++ /dev/null @@ -1,570 +0,0 @@ -/* $Id: BldLevelInf.cmd,v 1.5 2001/01/26 21:33:13 phaller Exp $ - * - * Adds a Description string to the given .def-file. - * Fills in default values; like build time and host. - * - */ - -if RxFuncQuery('SysLoadFuncs') = 1 then -do - call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'; - call SysLoadFuncs; -end - - -/* - * Set default parameter values. - */ -sDefFileIn = ''; -sDefFileOut = ''; -sASDFeatureId = ''; -sCountryCode = ''; -sDateTime = left(' 'date()' 'time(), 26); -sDescription = 'Odin32'; -sFixPakVer = ''; -sHostname = strip(substr(VALUE('HOSTNAME',,'OS2ENVIRONMENT'), 1, 11)); -sLanguageCode = ''; -sMiniVer = ''; -sVendor = 'Project Odin'; -sVersion = '0.5'; - - -/* - * Parse parameters. - */ -parse arg sArgs -if (sArgs = '') then -do - call syntax; - exit(1); -end - -do while (sArgs <> '') - sArgs = strip(sArgs); - if (substr(sArgs, 1, 1) = '-' | substr(sArgs, 1, 1) = '/') then - do /* - * Option. - */ - ch = translate(substr(sArgs, 2, 1)); - if (pos(ch, 'ACDHLMNPRTV') < 1) then - do - say 'invalid option:' substr(sArgs, 1, 2); - call syntax; - exit(2); - end - - /* get value and advance sArgs to next or to end. */ - if (substr(sArgs, 3, 1) = '"') then - do - iNext = pos('"', sArgs, 4); - fQuote = 1; - end - else - do - iNext = pos(' ', sArgs, 3); - if (iNext <= 0) then - iNext = length(sArgs); - fQuote = 0; - end - - if (iNext > 3 | ch = 'R') then - do - sValue = substr(sArgs, 3 + fQuote, iNext - 3 - fQuote); - sArgs = strip(substr(sArgs, iNext+1)); - /*say 'iNext:' iNext 'sValue:' sValue 'sArgs:' sArgs; */ - - /* check if we're gonna search for something in an file. */ - if (sValue <> '' & pos('#define=', sValue) > 0) then - sValue = LookupDefine(sValue); - end - else - do - say 'syntax error near' substr(sArgs, 1, 2)'.'; - call syntax; - exit(3); - end - - - /* set value */ - select - when (ch = 'A') then /* ASD Feature Id */ - sASDFeatureId = sValue; - - when (ch = 'C') then /* Country code */ - sCountryCode = sValue; - - when (ch = 'D') then /* Description */ - sDescription = sValue; - - when (ch = 'H') then /* Hostname */ - sHostname = sValue; - - when (ch = 'L') then /* Language code */ - sLanguageCode = sValue; - - when (ch = 'M') then /* MiniVer */ - sMiniVer = sValue; - - when (ch = 'N') then /* Vendor */ - sVendor = sValue; - - when (ch = 'R') then /* Vendor */ - sDescription = ReadDescription(sValue, sDefFile); - - when (ch = 'P') then /* Fixpak version */ - sFixPakVer = sValue; - - when (ch = 'T') then /* Date Time */ - sDateTime = sValue; - - when (ch = 'V') then /* Version */ - sVersion = sValue; - - /* Otherwise it's an illegal option */ - otherwise - say 'invalid option:' substr(sArgs, 1, 2); - call syntax; - exit(2); - end /* select */ - end - else - do /* - * Defition file... - */ - if (sDefFileOut <> '') then - do - say 'Syntax error: Can''t specify more than two defintion files!'; - exit(4); - end - if (sDefFileIn = '') then - parse value sArgs with sDefFileIn' 'sArgs - else - parse value sArgs with sDefFileOut' 'sArgs - sArgs = strip(sArgs); - end -end - - -/* check that a defintion file was specified. */ -if (sDefFileIn = '') then -do - say 'Syntax error: Will have to specify a .def-file to update.'; - call syntax; - exit(5); -end - - -/* - * Trim strings to correct lengths. - */ -sVendor = strip(substr(sVendor, 1, 31)); -if (substr(sDateTime, 1, 1) <> ' ') then - sDateTime = ' ' || sDateTime; -sDateTime = left(sDateTime, 26); -sHostname = strip(substr(sHostname, 1, 11)); -sMiniVer = strip(substr(sMiniVer, 1, 11)); -sDescription = strip(substr(sDescription, 1, 80)); -sCountryCode = strip(substr(sCountryCode, 1, 4)); -sLanguageCode = strip(substr(sLanguageCode, 1, 4)); -sASDFeatureId = strip(substr(sASDFeatureId, 1, 11)); -sFixPakVer = strip(substr(sFixPakVer, 1, 11)); - - -/* - * Signature - */ -sEnhSign = '##1##' - -/* - * Build description string. - */ -sDescription = '@#'sVendor':'sVersion'#@'sEnhSign||, - sDateTime||sHostname||, - ':'sASDFeatureId':'sLanguageCode':'sCountryCode':'sMiniVer||, - '::'sFixPakVer'@@'sDescription; - -/* - * Update .def-file. - */ -call SysFileDelete(sDefFileIn); -rc = lineout( sDefFileIn, 'RCDATA 1 { "' || sDescription || '" }'); - -/*rc = UpdateDefFile(sDefFileIn, sDefFileOut, sDescription);*/ -exit(rc); - - -/** - * Display script syntax. - */ -syntax: procedure - say 'Syntax: MakeDesc.cmd [options] [options]' - say ' Defitionfile which will have an DESCRIPTION appended.' - say 'Options:' - say ' -A ASD Feature Id.' - say ' -C Country code.' - say ' -D Description.' - say ' -R[deffile] Read description from .def file.' - say ' -H Hostname.' - say ' -L Language code.' - say ' -M MiniVer.' - say ' -N Vendor.' - say ' -P Fixpak version.' - say ' -T Date Time.' - say ' -V Version.' - say ' could be a double qoute qouted string or a single word.' - say ' You could also reference #defines in C/C++ include files.' - say ' The string should then have this form:' - say ' "#define=,"' - say ''; - - return; - - -/** - * Search for a #define in an C/C++ header or source file. - * - * @returns String containing the defined value - * found for the define in the header file. - * Quits on fatal errors. - * @param A string on the form: "#define=DEFINETOFIND,includefile.h" - * @remark Write only code... - let's hope it works. - */ -LookupDefine: procedure - parse arg '#'sDefine'='sMacro','sIncludeFile - - /* - * Validate parameters. - */ - sMacro = strip(sMacro); - sIncludeFile = strip(sIncludeFile); - if (sMacro = '') then - do - say 'syntax error: #define=,.'; - say ' was empty.'; - exit(-20); - end - if (sIncludeFile = '') then - do - say 'syntax error: #define=,.'; - say ' was empty.'; - exit(-20); - end - - - sIllegal = translate(translate(sMacro),, - '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!',, - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_'); - - if (strip(translate(sIllegal, ' ', '!')) <> '') then - do - say 'syntax error: #define=,.'; - say ' contains illegal charater(s).' - say ' 'sMacro; - say ' 'translate(sIllegal, ' ', '!'); - exit(-20); - end - - /* - * Open include file. - */ - sRc = stream(sIncludeFile, 'c', 'open read'); - if (pos('READY', sRc) <> 1) then - do /* search INCLUDE variable */ - sFile = SysSearchPath('INCLUDE', sIncludeFile); - if (sFile = '') then - do - say 'Can''t find include file 'sIncludeFile'.'; - exit(-20); - end - sIncludeFile = sFile; - - sRc = stream(sIncludeFile, 'c', 'open read'); - if (pos('READY', sRc) <> 1) then - do - say 'Failed to open include file' sIncludeFile'.'; - exit(-20); - end - end - - /* - * Search the file line by line. - * We'll check for lines starting with a hash (#) char. - * Then check that the word after the hash is 'define'. - * Then match the next word with the macro name. - * Then then get the next rest of the line to comment or continuation char. - * (continuation is not supported) - * Finally strip quotes. - */ - sValue = ''; - do while (lines(sIncludeFile) > 0) - sLine = strip(linein(sIncludeFile)); - if (sLine = '') then - iterate; - if (substr(sLine, 1, 1) <> '#') then - iterate; - sLine = substr(sLine, 2); - if (word(sLine, 1) <> 'define') then - iterate; - sLine = strip(substr(sLine, wordpos(sLine, 1) + length('define')+1)); - if ( substr(sLine, 1, length(sMacro)) <> sMacro, - | substr(sLine, length(sMacro)+1, 1) <> ' ') then - iterate; - sLine = strip(substr(sLine, length(sMacro) + 1)); - if (sLine = '') then - do - say 'error: #define' sMacro' is empty.'; - call stream sIncludeFile, 'c', 'close'; - exit(-20); - end - - chQuote = substr(sLine, 1, 1); - if (chQuote = '"' | chQuote = "'") then - do /* quoted string */ - iLastQuote = 0; - do forever - iLast = pos(chQuote, sLine, 2); - if (iLast <= 0) then - leave; - if (substr(sLine, iLast, 1) = '\') then - iterate; - iLastQuote = iLast; - leave; - end - - if (iLastQuote <= 0) then - do - say 'C/C++ syntax error in 'sIncludefile': didn''t find end quote.'; - call stream sIncludeFile, 'c', 'close'; - exit(-20); - end - - call stream sIncludeFile, 'c', 'close'; - sValue = substr(sLine, 2, iLastQuote - 2); - say 'Found 'sMacro'='sValue; - return sValue; - end - else - do - iCommentCPP = pos('//',sLine); - iCommentC = pos('/*',sLine); - if (iCommentC > 0 & iCommentCPP > 0 & iCommentC > iCommentCPP) then - iComment = iCommentCPP; - else if (iCommentC > 0 & iCommentCPP > 0 & iCommentC < iCommentCPP) then - iComment = iCommentC; - else if (iCommentCPP > 0) then - iComment = iCommentCPP; - else if (iCommentC > 0) then - iComment = iCommentC; - else - iComment = 0; - - if (iComment > 0) then - sValue = strip(substr(sLine, 1, iComment-1)); - else - sValue = strip(sLine); - - if (sValue <> '') then - do - if (substr(sValue, length(sValue)) = '\') then - do - say 'Found continuation char: Multiline definitions are not supported!\n'; - call stream sIncludeFile, 'c', 'close'; - exit(-20); - end - end - - if (sValue = '') then - say 'warning: The #define has no value.'; - - call stream sIncludeFile, 'c', 'close'; - say 'Found 'sMacro'='sValue; - return sValue; - end - end - - call stream sIncludeFile, 'c', 'close'; - say 'error: didn''t find #define' sMacro'.'; - exit(-20); - - - -/** - * Reads the description line for a .def-file. - * @returns The Description string, with quotes removed. - * Empty string is acceptable. - * On error we'll terminate the script. - * @param sDefFile Filaname of .def-file to read the description from. - * @param sDefFile2 Used if sDefFile is empty. - * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) - */ -ReadDescription: procedure; - parse arg sDefFile, sDefFile2 - - /* - * Validate parameters. - */ - if (sDefFile = '') then - sDefFile = sDefFile2; - if (sDefFile = '') then - do - say 'error: no definition file to get description from.' - exit(-1); - end - - /* - * Open file - */ - rc = stream(sDefFile, 'c', 'open read'); - if (pos('READY', rc) <> 1) then - do - say 'error: failed to open deffile file.'; - exit(-1); - end - - - /* - * Search for the 'DESCRIPTION' line. - */ - do while (lines(sDefFile) > 0) - sLine = strip(linein(sDefFile)); - if (sLine = '') then - iterate; - if (translate(word(sLine, 1)) <> 'DESCRIPTION') then - iterate; - sLine = strip(substr(sLine, wordpos(sLine, 1) + length('DESCRIPTION')+1)); - - ch = substr(sLine, 1, 1); - if (ch <> "'" & ch <> '"') then - do - say 'syntax error: description line in' sDefFile 'is misformed.'; - call stream sDefFile, 'c', 'close'; - exit(-10); - end - - iEnd = pos(ch, sLine, 2); - if (iEnd <= 0) then - do - say 'syntax error: description line in' sDefFile 'is misformed.'; - call stream sDefFile, 'c', 'close'; - exit(-10); - end - - call stream sDefFile, 'c', 'close'; - sValue = substr(sLine, 2, iEnd - 2); - say 'Found Description:' sValue; - return sValue; - end - - call stream sDefFile, 'c', 'close'; - say 'info: Didn''t find description line in' sDefFile'.'; - return ''; - - -/** - * This is a function which reads sDefFileIn into and - * internal array and changes the DESCRIPTION text if found. - * If DESCRIPTION isn't found, it is added at the end. - * The array is written to sDefFileOut. - * @returns 0 on succes. - * Errorcode on error. - * @param sDefFileIn Input .def-file. - * @param sDefFileOut Output .def-file. Overwritten. - * @param sDescription New description string. - * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) - */ -UpdateDefFile: procedure; - parse arg sDefFileIn, sDefFileOut, sDescription - - /* - * Validate parameters. - */ - if (sDefFileOut = '') then - sDefFileOut = sDefFileIn; - - /* - * Open file input file. - */ - rc = stream(sDefFileIn, 'c', 'open read'); - if (pos('READY', rc) <> 1) then - do - say 'error: failed to open' sDefFileIn 'file.'; - return 110; - end - - - /* - * Search for the 'BLDLEVEL' line. - */ - i = 0; - fDescription = 0; - do while (lines(sDefFileIn) > 0) - /* - * Read line. - */ - i = i + 1; - asFile.i = linein(sDefFileIn); - - /* - * Look for BLDLEVEL; - */ - if (asFile.i = '') then - iterate; - if (translate(word(strip(asFile.i), 1)) <> 'BLDLEVEL') then - iterate; - if (fDescription) then - do - say 'warning: multiple descriptions lines. Line' i 'removed'; - i = i - 1; - iterate; - end - - /* - * Found description - replace with new description. - */ - asFile.i = "BldLevel = '"||sDescription||"'"; - fDescription = 1; - end - - /* - * Add description is none was found. - */ - if (\fDescription) then - do - i = i + 1; - asFile.i = "BldLevel = '"||sDescription||"'"; - end - asFile.0 = i; - - - /* - * Close input file and open output file. - */ - call stream sDefFileIn, 'c', 'close'; - call SysFileDelete(sDefFileOut); - rc = stream(sDefFileOut, 'c', 'open write'); - if (pos('READY', rc) <> 1) then - do - say 'error: failed to open outputfile' sDefFileOut 'file.'; - return 110; - end - - /* - * Make firstline and write all the lines to the output file. - */ - /*call lineout sDefFileOut, '; Updated by makedesc.cmd', 1;*/ - do i = 1 to asFile.0 - rc = lineout(sDefFileOut, asFile.i); - if (rc > 0) then - do - say 'error: failed to write line' i 'to' sDefFileOut'.' - call stream sDefFileOut, 'c', 'close'; - return 5; - end - end - - /* - * Close output file and return succesfully. - */ - call stream sDefFileOut, 'c', 'close'; - return 0; - diff --git a/os2/ChangeLog.os2 b/os2/ChangeLog.os2 deleted file mode 100644 index 18356b840ed..00000000000 --- a/os2/ChangeLog.os2 +++ /dev/null @@ -1,56 +0,0 @@ - - -2005/01/01 - - removed references to ISAM and MERGE - -2002/05/02 - - now libinit is automatically called on client dll startup - -2002/01/27 - - fixed console output for get_password - -2002/01/20 - - back-ported fix for fulltext indexes (wrong report by myisamchk) - -2001/11/21 - - MySQL 3.32.42 build 3 released. - -2001/11/19 - - got GNU Readline to compile with VAC++, now console has a working - history. - -2001/11/10 - - fixed file locking on non-JFS disks; DosSetFileLocksL does not - support ranges > 2GB on non-JFS disks. - -2001/09/16 - - fixed creation directory of temporary files - - enabled cached list file for deleting temp open files - -2001/09/10 - - Build source 3.23.42, released - -2001/09/08 - - fixed file api - -2001/06/12 - - fixed support for > 2GB file size, needs also DosOpenL - - mixed 64bit/32bit file size support, dinamic loading of - 64bit API. - -2001/06/03 - - added support for > 2GB file size - -2001/06/02 - - fixed file locking code - -2001/05/29 - - 3.23.38 build - -2001/05/20 - - rint fix - - isam O_RDONLY table handled fix - -2001/05/19 - - new TLS code, fixed parser crashes and many other problems. - - fixed pthread_cond_timedwait, now handle manager expires diff --git a/os2/Makefile.am b/os2/Makefile.am deleted file mode 100644 index b1bc832a8a8..00000000000 --- a/os2/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2002 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -## Process this file with automake to create Makefile.in - -EXTRA_DIST = BldLevel.RES BldLevel.cmd BldLevel.rc \ - BldLevelInf.cmd ChangeLog.os2 MySQL-Client.icc \ - MySQL-Opt.icc MySQL-Source.icc MySQL-Sql.icc \ - MySQL-Sql.irs MySQL-Util.icc MySQL-Util.irs \ - ReadMe.txt build-all.cmd mysql-inf.wis \ - mysql.wis mysqlalt.wis rint.cmd rint.obj rint.s -SUBDIRS = include - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/os2/MySQL-Client.icc b/os2/MySQL-Client.icc deleted file mode 100644 index bc614c1c723..00000000000 --- a/os2/MySQL-Client.icc +++ /dev/null @@ -1,122 +0,0 @@ -// disable code inlining when building static libs -InlineCode = "no" - -// include common options -include "MySQL-Opt.icc" -include "MySQL-Source.icc" - -option ProjectOptions = MySQLOptions -{ - - option file(genobject, "..\\OBJ\\ZLIB\\") - { - target "..\\bin\\mysql.dll" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - // target source files - source zlib - if debug_build { - source type('cpp') dbug - } - source type('cpp') my_sys - source type('cpp') my_sys_cli - source type('cpp') strings - source type('cpp') mysqlclientlib - source type('cpp') '..\libmysql\dll.c' - source BldLevelInfo - } - } - - option file(genobject, "..\\OBJ\\READLINE\\") - { - target "..\\bin\\mysql.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - // target source files - source type('cpp') "..\\client\\mysql.cc" - source BldLevelInfo - option define("HAVE_STRING_H", ), define("HAVE_CONFIG_H", ) - { - source GnuReadline - } - } - } - - target "..\\bin\\mysqladmin.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - // target source files - source type('cpp') "..\\client\\mysqladmin.c" - source BldLevelInfo - } - - target "..\\bin\\mysqldump.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - // target source files - source type('cpp') "..\\client\\mysqldump.c" - source BldLevelInfo - } - - target "..\\bin\\mysqlshow.exe" - { - // target source files - source type('cpp') "..\\client\\mysqlshow.c" - source BldLevelInfo - } - - target "..\\bin\\mysqlimport.exe" - { - // target source files - source type('cpp') "..\\client\\mysqlimport.c" - source BldLevelInfo - } - - target "..\\bin\\mysqltest.exe" - { - source type('cpp') "..\\client\\mysqltest.c" - source BldLevelInfo - } - - target "..\\bin\\mysqlbinlog.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - // target source files - source type('cpp') "..\\client\\mysqlbinlog.cc" - source BldLevelInfo - } - - target "..\\bin\\mysqlcheck.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - - // target source files - source type('cpp') "..\\client\\mysqlcheck.c" - source BldLevelInfo - } - -} diff --git a/os2/MySQL-Opt.icc b/os2/MySQL-Opt.icc deleted file mode 100644 index 56e89057862..00000000000 --- a/os2/MySQL-Opt.icc +++ /dev/null @@ -1,59 +0,0 @@ -// set to 1 to enable debug code -debug_build = 0 - -// set to zlib relative directory name -zlib_dir = '../../zlib-1.1.4' - -// common options -option BaseOptions = link(defaultlibsname, "tcpip32.lib") - , link(libsearchpath, "..\\lib\\") - , link(libsearchpath, "..\\bin\\") - , link(pmtype, vio) - , link(padding, no) - , link(linkwithmultithreadlib, "yes") - , link(linkwithsharedlib, "no") - , link(stack, 131072, 131072) - , gen(initauto, "yes") - , define("__MT__", ) - , define("HAVE_BSD_SIGNALS", ) - , define("INCL_DOS", ) - , define("INCL_DOSERRORS", ) - , define("INCL_LONGLONG", ) - , define("OS2", ) - , define("USE_TLS", ) - , lang(signedchars, yes) - , incl(searchpath, "..") - , incl(searchpath, "include") - , incl(searchpath, "..\\include") - , incl(searchpath, "..\\my_sys") - , incl(searchpath, "..\\regex") - , incl(searchpath, "..\\sql") - , incl(searchpath, zlib_dir) - , incl(searchpath, "..\\..\\ufc") - , incl(searchpath, "..\\os2") - -option ReleaseOptions = link(debug, "no") - , define("DBUG_OFF", ) - , gen(arch, "pentium") - , opt(tune, "pentium2") - , opt(level, "0") - , opt(stackchaining, no) - , opt(size, yes) - , opt(autoinline, InlineCode) - , opt(inline, InlineCode) - , opt(schedule, no) - -option DebugOptions = link(debug, "yes") - , gen(debug, "yes") - , define("DBUG_ON", ) - - -if debug_build { - -option MySQLOptions = BaseOptions, DebugOptions - -} else { - -option MySQLOptions = BaseOptions, ReleaseOptions - -} diff --git a/os2/MySQL-Source.icc b/os2/MySQL-Source.icc deleted file mode 100644 index 285811d0eae..00000000000 --- a/os2/MySQL-Source.icc +++ /dev/null @@ -1,324 +0,0 @@ -group client_global_pch = - 'os2.h', - 'assert.h', 'direct.h', 'errno.h', 'nerrno.h', - 'limits.h', 'io.h', 'math.h', - 'stdio.h', 'stdlib.h', 'stddef.h', - 'sys/stat.h', 'sys/types.h', 'sys/time.h', - 'types.h', 'string.h', 'stdarg.h', - - 'my_base.h', 'config-os2.h', 'my_dir.h', - 'global.h', 'thr_alarm.h', 'm_string.h', - 'mysql.h', 'zconf.h', 'zlib.h', 'mysys_err.h', - 'm_ctype.h', 'mysqld_error.h', - 'my_list.h', 'my_sys.h', 'my_net.h', - 'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h', - '.\regex\my_regex.h' - -group server_global_pch = - 'os2.h', - 'string.h', 'assert.h', 'share.h', 'stdarg.h', 'stdio.h', - 'stdlib.h', 'stddef.h', 'math.h', 'io.h', 'limits.h', - 'process.h', 'errno.h', 'nerrno.h', 'sys/types.h', - 'sys/time.h', 'sys/stat.h', 'sys/param.h', 'sys/ioccom.h', - 'sys/filio.h', 'sys/sockio.h', 'sys/ioctlos2.h','sys/ioctl.h', 'types.h', - 'sys/utime.h', 'sys/select.h', 'sys/un.h', - 'netinet/in_systm.h', 'netinet/tcp.h', - - 'global.h', 'my_base.h', 'config-os2.h', - 'my_dir.h', 'my_sys.h', 'mysql.h', - 'my_bitmap.h', 'violite.h', 'mysql_priv.h', - 'm_string.h', 'm_ctype.h', - 'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h', - 'sql_string.h', 'item.h', 'unireg.h', - 'field.h', 'sql_lex.h', 'sql_list.h', 'sql_repl.h', - 'my_md5.h', 'sql_acl.h', 'slave.h', - 'ha_myisam.h', 'procedure.h', 'sql_select.h', - 'errmsg.h', 't_ctype.h', 'direct.h', - 'mysys_err.h', 'zconf.h', 'zlib.h', - 'my_tree.h', '..\mysys\my_static.h', 'netdb.h', - 'thr_alarm.h', 'heap.h', '..\myisam\fulltext.h', - '..\myisam\ftdefs.h', 'myisammrg.h', - '.\regex\my_regex.h' - -group server_pch = - 'ha_heap.h', 'ha_myisammrg.h', 'opt_ft.h', - 'hash_filo.h', 'mini_client.h', 'sql_repl.h', - 'sql_analyse.h', 'item_create.h', '..\mysys\mysys_priv.h' - -group mysqlclientlib = - "..\\client\\readline.cc", - "..\\client\\sql_string.cc", - "..\\client\\completion_hash.cc", - "..\\libmysql\\libmysql.c", - "..\\libmysql\\errmsg.c", - "..\\libmysql\\get_password.c", - "..\\libmysql\\net.c", - "..\\libmysql\\password.c", - "..\\libmysql\\violite.c" - -group zlib = - zlib_dir "/compress.c", - zlib_dir "/crc32.c", - zlib_dir "/deflate.c", - zlib_dir "/gzio.c", - zlib_dir "/infblock.c", - zlib_dir "/infcodes.c", - zlib_dir "/inffast.c", - zlib_dir "/inflate.c", - zlib_dir "/inftrees.c", - zlib_dir "/infutil.c", - zlib_dir "/trees.c", - zlib_dir "/uncompr.c", - zlib_dir "/zutil.c", - zlib_dir "/adler32.c" - -group ufc = - "..\\..\\ufc\\crypt.c", - "..\\..\\ufc\\crypt_util.c", - "..\\..\\ufc\\crypt-entry.c" - -group sql = - "..\\sql\\convert.cc", - "..\\sql\\derror.cc", - "..\\sql\\field.cc", - "..\\sql\\field_conv.cc", - "..\\sql\\filesort.cc", - "..\\sql\\ha_heap.cc", - "..\\sql\\ha_myisam.cc", - "..\\sql\\ha_myisammrg.cc", - "..\\sql\\handler.cc", - "..\\sql\\hash_filo.cc", - "..\\sql\\hostname.cc", - "..\\sql\\init.cc", - "..\\sql\\item.cc", - "..\\sql\\item_buff.cc", - "..\\sql\\item_cmpfunc.cc", - "..\\sql\\item_create.cc", - "..\\sql\\item_func.cc", - "..\\sql\\item_strfunc.cc", - "..\\sql\\item_sum.cc", - "..\\sql\\item_timefunc.cc", - "..\\sql\\item_uniq.cc", - "..\\sql\\key.cc", - "..\\sql\\lock.cc", - "..\\sql\\log.cc", - "..\\sql\\log_event.cc", - "..\\sql\\md5.c", - "..\\sql\\mf_iocache.cc", - "..\\sql\\mini_client.cc", - "..\\sql\\mini_client_errors.c", - "..\\sql\\mysqld.cc", - "..\\sql\\net_pkg.cc", - "..\\sql\\net_serv.cc", - "..\\sql\\opt_ft.cc", - "..\\sql\\opt_range.cc", - "..\\sql\\OPT_SUM.cc", - "..\\sql\\password.c", - "..\\sql\\procedure.cc", - "..\\sql\\records.cc", - "..\\sql\\slave.cc", - "..\\sql\\sql_acl.cc", - "..\\sql\\sql_analyse.cc", - "..\\sql\\sql_base.cc", - "..\\sql\\sql_cache.cc", - "..\\sql\\sql_class.cc", - "..\\sql\\sql_crypt.cc", - "..\\sql\\sql_db.cc", - "..\\sql\\sql_do.cc", - "..\\sql\\sql_delete.cc", - "..\\sql\\sql_insert.cc", - "..\\sql\\sql_lex.cc", - "..\\sql\\sql_list.cc", - "..\\sql\\sql_load.cc", - "..\\sql\\sql_manager.cc", - "..\\sql\\sql_map.cc", - "..\\sql\\sql_parse.cc", - "..\\sql\\sql_rename.cc", - "..\\sql\\sql_repl.cc", - "..\\sql\\sql_select.cc", - "..\\sql\\sql_show.cc", - "..\\sql\\sql_string.cc", - "..\\sql\\sql_table.cc", - "..\\sql\\sql_test.cc", - "..\\sql\\sql_update.cc", - "..\\sql\\sql_udf.cc", - "..\\sql\\sql_yacc.c", - "..\\sql\\table.cc", - "..\\sql\\thr_malloc.cc", - "..\\sql\\time.cc", - "..\\sql\\unireg.cc", - "..\\sql\\violite.c" - -group strings = - "..\\strings\\bchange.c", - "..\\strings\\bmove.c", - "..\\strings\\bmove_upp.c", - "..\\strings\\ctype-big5.c", - "..\\strings\\ctype-czech.c", - "..\\strings\\ctype-euc_kr.c", - "..\\strings\\ctype-gb2312.c", - "..\\strings\\ctype-gbk.c", - "..\\strings\\ctype-sjis.c", - "..\\strings\\ctype-tis620.c", - "..\\strings\\ctype-ujis.c", - "..\\strings\\ctype.c", - "..\\strings\\int2str.c", - "..\\strings\\is_prefix.c", - "..\\strings\\llstr.c", - "..\\strings\\longlong2str.c", - "..\\strings\\str2int.c", - "..\\strings\\strappend.c", - "..\\strings\\strcend.c", - "..\\strings\\strcont.c", - "..\\strings\\strend.c", - "..\\strings\\strfill.c", - "..\\strings\\strinstr.c", - "..\\strings\\strmake.c", - "..\\strings\\strmov.c", - "..\\strings\\strnlen.c", - "..\\strings\\strnmov.c", - "..\\strings\\strtoull.c", - "..\\strings\\strxmov.c", - "..\\strings\\strxnmov.c" - -/* -*/ - - group heap = "..\\heap\\hp_block.c", "..\\heap\\hp_clear.c", - "..\\heap\\hp_close.c", "..\\heap\\hp_create.c", "..\\heap\\hp_delete.c", - "..\\heap\\hp_extra.c", "..\\heap\\hp_hash.c", - "..\\heap\\hp_info.c", "..\\heap\\hp_open.c", - "..\\heap\\hp_panic.c", "..\\heap\\hp_rename.c", - "..\\heap\\hp_rfirst.c", "..\\heap\\hp_rkey.c", - "..\\heap\\hp_rlast.c", "..\\heap\\hp_rnext.c", - "..\\heap\\hp_rprev.c", "..\\heap\\hp_rrnd.c", - "..\\heap\\hp_rsame.c", "..\\heap\\hp_scan.c", - "..\\heap\\hp_static.c", "..\\heap\\hp_update.c", - "..\\heap\\hp_write.c", "..\\heap\\_check.c", "..\\heap\\_rectest.c" - - - group myisammrg = "..\\myisammrg\\myrg_close.c", - "..\\myisammrg\\myrg_create.c", "..\\myisammrg\\myrg_delete.c", - "..\\myisammrg\\myrg_extra.c", "..\\myisammrg\\myrg_info.c", - "..\\myisammrg\\myrg_locking.c", - "..\\myisammrg\\myrg_open.c", "..\\myisammrg\\myrg_panic.c", - "..\\myisammrg\\myrg_queue.c", - "..\\myisammrg\\myrg_rfirst.c", "..\\myisammrg\\myrg_rkey.c", - "..\\myisammrg\\myrg_rlast.c", "..\\myisammrg\\myrg_rnext.c", - "..\\myisammrg\\myrg_rprev.c", "..\\myisammrg\\myrg_rrnd.c", - "..\\myisammrg\\myrg_rsame.c", - "..\\myisammrg\\myrg_static.c", - "..\\myisammrg\\myrg_update.c" - - group my_sys = "..\\mysys\\array.c", "..\\mysys\\charset.c", - "..\\mysys\\checksum.c", "..\\mysys\\default.c", "..\\mysys\\errors.c", - "..\\mysys\\getopt.c", "..\\mysys\\getopt1.c", - "..\\mysys\\getvar.c", "..\\mysys\\hash.c", "..\\mysys\\list.c", - "..\\mysys\\mf_brkhant.c", "..\\mysys\\mf_cache.c", - "..\\mysys\\mf_casecnv.c", "..\\mysys\\mf_dirname.c", - "..\\mysys\\mf_fn_ext.c", "..\\mysys\\mf_format.c", - "..\\mysys\\mf_getdate.c", - "..\\mysys\\mf_iocache2.c", "..\\mysys\\mf_keycache.c", - "..\\mysys\\mf_loadpath.c", "..\\mysys\\mf_pack.c", - "..\\mysys\\mf_pack2.c", "..\\mysys\\mf_path.c", - "..\\mysys\\mf_qsort2.c", - //"..\\mysys\\mf_qsort.c", - "..\\mysys\\mf_radix.c", "..\\mysys\\mf_same.c", - "..\\mysys\\mf_sort.c", "..\\mysys\\mf_soundex.c", - "..\\mysys\\mf_stripp.c", "..\\mysys\\mf_tempfile.c", - "..\\mysys\\mf_unixpath.c", "..\\mysys\\mf_wcomp.c", - "..\\mysys\\mf_wfile.c", "..\\mysys\\mulalloc.c", - "..\\mysys\\my_alarm.c", "..\\mysys\\my_alloc.c", - "..\\mysys\\my_append.c", "..\\mysys\\my_bitmap.c", - "..\\mysys\\my_chsize.c", "..\\mysys\\my_clock.c", - "..\\mysys\\my_compress.c", "..\\mysys\\my_copy.c", - "..\\mysys\\my_create.c", "..\\mysys\\my_delete.c", - "..\\mysys\\my_div.c", "..\\mysys\\my_error.c", - "..\\mysys\\my_fopen.c", "..\\mysys\\my_fstream.c", - "..\\mysys\\my_getwd.c", "..\\mysys\\my_init.c", - "..\\mysys\\my_lib.c", "..\\mysys\\my_lock.c", - "..\\mysys\\my_lockmem.c", "..\\mysys\\my_lread.c", - "..\\mysys\\my_lwrite.c", "..\\mysys\\my_malloc.c", - "..\\mysys\\my_messnc.c", "..\\mysys\\my_mkdir.c", - "..\\mysys\\my_net.c", "..\\mysys\\my_once.c", - "..\\mysys\\my_open.c", - "..\\mysys\\my_os2cond.c", - "..\\mysys\\my_os2dlfcn.c", - "..\\mysys\\my_os2dirsrch.c", - "..\\mysys\\my_os2mutex.c", "..\\mysys\\my_os2thread.c", - "..\\mysys\\my_os2tls.c", - "..\\mysys\\my_os2file64.c", - "..\\mysys\\my_pread.c", "..\\mysys\\my_pthread.c", - "..\\mysys\\my_quick.c", "..\\mysys\\my_read.c", - "..\\mysys\\my_realloc.c", "..\\mysys\\my_redel.c", - "..\\mysys\\my_rename.c", "..\\mysys\\my_seek.c", - "..\\mysys\\my_static.c", "..\\mysys\\my_tempnam.c", - "..\\mysys\\my_thr_init.c", "..\\mysys\\my_vsnprintf.c", - "..\\mysys\\my_write.c", "..\\mysys\\ptr_cmp.c", - "..\\mysys\\queues.c", "..\\mysys\\raid.cc", - //"..\\mysys\\safemalloc.c", - "..\\mysys\\string.c", - "..\\mysys\\thr_alarm.c", - "..\\mysys\\thr_mutex.c", "..\\mysys\\thr_rwlock.c", - "..\\mysys\\tree.c", "..\\mysys\\typelib.c" - - group my_sys_cli = "..\\mysys\\mf_iocache.c" - group my_sys_sql = "..\\mysys\\thr_lock.c" - - group myisam = "..\\myisam\\ft_parser.c", - "..\\myisam\\ft_search.c", "..\\myisam\\ft_static.c", - "..\\myisam\\ft_stopwords.c", "..\\myisam\\ft_update.c", - "..\\myisam\\mi_cache.c", "..\\myisam\\mi_changed.c", - //"..\\myisam\\mi_check.c", - "..\\myisam\\mi_checksum.c", - "..\\myisam\\mi_close.c", "..\\myisam\\mi_create.c", - "..\\myisam\\mi_dbug.c", "..\\myisam\\mi_delete.c", - "..\\myisam\\mi_delete_all.c", "..\\myisam\\mi_delete_table.c", - "..\\myisam\\mi_dynrec.c", "..\\myisam\\mi_extra.c", - //"..\\myisam\\mi_error.c", - "..\\myisam\\mi_info.c", "..\\myisam\\mi_key.c", - "..\\myisam\\mi_locking.c", "..\\myisam\\mi_log.c", - "..\\myisam\\mi_open.c", "..\\myisam\\mi_packrec.c", - "..\\myisam\\mi_page.c", "..\\myisam\\mi_panic.c", - "..\\myisam\\mi_range.c", "..\\myisam\\mi_rename.c", - "..\\myisam\\mi_rfirst.c", "..\\myisam\\mi_rkey.c", - "..\\myisam\\mi_rlast.c", "..\\myisam\\mi_rnext.c", - "..\\myisam\\mi_rnext_same.c", "..\\myisam\\mi_rprev.c", - "..\\myisam\\mi_rrnd.c", "..\\myisam\\mi_rsame.c", - "..\\myisam\\mi_rsamepos.c", "..\\myisam\\mi_scan.c", - "..\\myisam\\mi_search.c", "..\\myisam\\mi_static.c", - "..\\myisam\\mi_statrec.c", "..\\myisam\\mi_unique.c", - "..\\myisam\\mi_update.c", "..\\myisam\\mi_write.c" - //"..\\myisam\\sort.c" - - group dbug = "..\\dbug\\dbug.c", "..\\dbug\\factorial.c", "..\\dbug\\sanity.c" - - group regex = "..\\regex\\regcomp.c", "..\\regex\\regerror.c", - "..\\regex\\regexec.c", "..\\regex\\regfree.c", "..\\regex\\reginit.c" - - group BldLevelInfo = 'os2\BldLevel.rc' - - group GnuReadline = - "..\\readline\\bind.c", - "..\\readline\\callback.c", - "..\\readline\\complete.c", - "..\\readline\\display.c", - "..\\readline\\funmap.c", - "..\\readline\\histexpand.c", "..\\readline\\histfile.c", - "..\\readline\\history.c", "..\\readline\\histsearch.c", - "..\\readline\\input.c", "..\\readline\\isearch.c", - "..\\readline\\keymaps.c", - "..\\readline\\kill.c", - "..\\readline\\macro.c", - "..\\readline\\nls.c", "..\\readline\\parens.c", - "..\\readline\\readline.c", - "..\\readline\\rltty.c", - "..\\readline\\search.c", - "..\\readline\\shell.c", - "..\\readline\\signals.c", - "..\\readline\\terminal.c", - "..\\readline\\tilde.c", - "..\\readline\\undo.c", - "..\\readline\\util.c", - "..\\readline\\vi_mode.c", - "..\\readline\\xmalloc.c" diff --git a/os2/MySQL-Sql.icc b/os2/MySQL-Sql.icc deleted file mode 100644 index 7c8c61fe7de..00000000000 --- a/os2/MySQL-Sql.icc +++ /dev/null @@ -1,44 +0,0 @@ -// disable code inlining when building static libs -InlineCode = "no" - -// include common options -include "MySQL-Opt.icc" -include "MySQL-Source.icc" - -run before sources('..\sql\sql_yacc.yy') targets('..\sql\sql_yacc.c') - 'bison -y -d -o ..\sql\sql_yacc.c ..\sql\sql_yacc.yy' - -option ProjectOptions = MySQLOptions - , define( "MYSQL_SERVER", "") -{ - - option file(genobject, "..\\OBJ\\ZLIB\\") - { - target "..\\bin\\mysqld.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') server_global_pch - } - source type('cpp') server_pch - - // target source files - source "rint.obj" - source zlib, ufc, regex, 'strings\bmove_upp.c' - if debug_build { - source type('cpp') dbug - } - source type('cpp') heap - source type('cpp') myisam - source type('cpp') myisammrg - source type('cpp') my_sys - source type('cpp') my_sys_sql - source type('cpp') strings - source type('cpp') sql, - "..\\myisam\\mi_check.c", - "..\\myisam\\sort.c" - source BldLevelInfo - } - } -} diff --git a/os2/MySQL-Sql.irs b/os2/MySQL-Sql.irs deleted file mode 100644 index b651a678c91..00000000000 --- a/os2/MySQL-Sql.irs +++ /dev/null @@ -1,7 +0,0 @@ -31 Run Specifications: Version 1.1 -40 E:\rd\MySQL\vacpp-3.23.50\bin\mysqld.exe -1 -0 -0 -5 Local -0 diff --git a/os2/MySQL-Util.icc b/os2/MySQL-Util.icc deleted file mode 100644 index 8eaee41b6a2..00000000000 --- a/os2/MySQL-Util.icc +++ /dev/null @@ -1,171 +0,0 @@ -// disable code inlining when building static libs -InlineCode = "no" - -// include common options -include "MySQL-Opt.icc" -include "MySQL-Source.icc" - -option ProjectOptions = MySQLOptions - , link(defaultlibsname, "mysql.lib") -{ - - option file(genobject, "..\\OBJ\\ZLIB\\") - ,link(exportAll) - { - target "..\\bin\\mysqlu.dll" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - // target source files - source zlib, ufc, regex, 'strings\bmove_upp.c' - if debug_build { - source type('cpp') dbug - } - source type('cpp') heap - source type('cpp') myisam - source type('cpp') myisammrg - source type('cpp') my_sys - source type('cpp') my_sys_cli - source type('cpp') my_sys_sql - source type('cpp') strings - source type('cpp') '..\libmysql\dll.c' - source BldLevelInfo - } - } - - - target "..\\bin\\myisamchk.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - // target source files - source type('cpp') "..\\myisam\\myisamchk.c", - "..\\myisam\\mi_check.c", - "..\\myisam\\sort.c" - source BldLevelInfo - } - - target "..\\bin\\myisamlog.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - // target source files - source type('cpp') "..\\myisam\\myisamlog.c" - source BldLevelInfo - } - - target "..\\bin\\myisampack.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - // target source files - source type('cpp') "..\\myisam\\myisampack.c" - source BldLevelInfo - } - - target "..\\bin\\test\\comp_err.exe" - { - // target source files - source type('cpp') "..\\extra\\comp_err.c" - } - - target "..\\bin\\gen_lex_hash.exe" - { - // target source files - source type('cpp') "..\\sql\\gen_lex_hash.cc" - } - - target "..\\bin\\test\\mi_test1.exe" - { - // target source files - source type('cpp') "..\\myisam\\mi_test1.c" - } - target "..\\bin\\test\\mi_test2.exe" - { - // target source files - source type('cpp') "..\\myisam\\mi_test2.c" - } - target "..\\bin\\test\\ft_eval.exe" - { - // target source files - source type('cpp') "..\\myisam\\ft_eval.c" - } - target "..\\bin\\test\\ft_test1.exe" - { - // target source files - source type('cpp') "..\\myisam\\ft_test1.c" - } -/* - target "..\\bin\\test\\testhash.exe" - { - // target source files - source type('cpp') "..\\mysys\\testhash.c" - } -*/ - target "..\\bin\\test\\test_charset.exe" - { - // target source files - source type('cpp') "..\\mysys\\test_charset.c" - } - - target "..\\bin\\test\\hp_test1.exe" - { - // target source files - source type('cpp') "..\\heap\\hp_test1.c" - } - target "..\\bin\\test\\hp_test2.exe" - { - // target source files - source type('cpp') "..\\heap\\hp_test2.c" - } - -/* - option define( "MAIN", "") - { - target "..\\bin\\test\\thr_lock.exe" - { - // target source files - source type('cpp') "..\\mysys\\thr_lock.c" - } - } -*/ - - target "..\\bin\\test\\insert_test.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - source type('cpp') "..\\client\\insert_test.c" - } - target "..\\bin\\test\\select_test.exe" - { - source type('cpp') "..\\client\\select_test.c" - } - target "..\\bin\\test\\thread_test.exe" - { - // optimized precompiled headers - option macros('global', 'yes') - { - source type('cpp') client_global_pch - } - source type('cpp') "..\\client\\thread_test.c" - } - -} - -run after sources('..\bin\gen_lex_hash.exe') targets('..\sql\lex_hash.h') - 'cd ..\bin & ..\bin\gen_lex_hash.exe > ..\sql\lex_hash.h' diff --git a/os2/MySQL-Util.irs b/os2/MySQL-Util.irs deleted file mode 100644 index 183aa13ba27..00000000000 --- a/os2/MySQL-Util.irs +++ /dev/null @@ -1,3271 +0,0 @@ -31 Run Specifications: Version 1.1 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamchk.exe -1 -0 -0 -5 Local -0 -43 E:\rd\MySQL\vacpp-3.23.50\bin\myisamlog.exe -1 -0 -0 -5 Local -0 -44 E:\rd\MySQL\vacpp-3.23.50\bin\myisampack.exe -1 -0 -0 -5 Local -0 -47 E:\rd\MySQL\vacpp-3.23.50\bin\test\comp_err.exe -1 -0 -0 -5 Local -0 -46 E:\rd\MySQL\vacpp-3.23.50\bin\gen_lex_hash.exe -1 -0 -0 -5 Local -0 -47 E:\rd\MySQL\vacpp-3.23.50\bin\test\is_test1.exe -1 -0 -0 -5 Local -0 -47 E:\rd\MySQL\vacpp-3.23.50\bin\test\is_test2.exe -1 -0 -0 -5 Local -0 -47 E:\rd\MySQL\vacpp-3.23.50\bin\test\mi_test1.exe -1 -0 -0 -5 Local -0 -47 E:\rd\MySQL\vacpp-3.23.50\bin\test\mi_test2.exe -1 -0 -0 -5 Local -0 -46 E:\rd\MySQL\vacpp-3.23.50\bin\test\ft_eval.exe -1 -0 -0 -5 Local -0 -47 E:\rd\MySQL\vacpp-3.23.50\bin\test\ft_test1.exe -1 -0 -0 -5 Local -0 -51 E:\rd\MySQL\vacpp-3.23.50\bin\test\test_charset.exe -1 -0 -0 -5 Local -0 -47 E:\rd\MySQL\vacpp-3.23.50\bin\test\hp_test1.exe -1 -0 -0 -5 Local -0 -47 E:\rd\MySQL\vacpp-3.23.50\bin\test\hp_test2.exe -1 -0 -0 -5 Local -0 -50 E:\rd\MySQL\vacpp-3.23.50\bin\test\insert_test.exe -1 -0 -0 -5 Local -0 -50 E:\rd\MySQL\vacpp-3.23.50\bin\test\select_test.exe -1 -0 -0 -5 Local -0 -50 E:\rd\MySQL\vacpp-3.23.50\bin\test\thread_test.exe -1 -0 -0 -5 Local -0 diff --git a/os2/ReadMe.txt b/os2/ReadMe.txt deleted file mode 100644 index 7dadf4a391d..00000000000 --- a/os2/ReadMe.txt +++ /dev/null @@ -1,205 +0,0 @@ -==================================================== - -Contents --------- -Welcome to the latest port of MySQL for OS/2 and eComStation. - -Modules included in this build: - - protocol data compression - - perl BDB/BDI support (not in this package) - - Library and header files for C/CPP developers included - -This package has been built using IBM VAC++ 4.0 - -The MySQL server is distributed under the GPL license. Please refer to -the file COPYING for the license information. - -The MySQL client library is distributed under the LGPL license. -Please refer to the file COPYING for the license information. - -Most of the MySQL clients are distributed under the GPL license, but -some files may be in the public domain. - -The latest information about MySQL can be found at: http://www.mysql.com - -To get the latest information about this port please subscribe to our -newsgroup/mailinglist mysql2 at groups.yahoo.com. - -To see what MySQL can do, take a look at the features section in the -manual. For future plans see the TODO appendix in the manual. - -New features/bug fixes history is in the news appendix in the manual. - -For the currently known bugs/misfeatures (known errors) see the bugs -appendix in the manual. The OS/2 section contains notes that are -specific to the MySQL OS/2 and eComStation version. - -Please note that MySQL is a constantly moving target. New builds for -Linux are made available every week. This port may therefore be a few -minor versions after the latest Linux/Win32 builds but its generally -more stable than the "latest and greates" port. - -MySQL is brought to you by: MySQL AB - -This port is brought to you by: - -Yuri Dario , development, porting -Timo Maier , documentation, testing -John M Alfredsson , documentation, testing - - -Installation ------------- -Prerequisite: - -- OS/2 Warp 3 with FP ?? or later, - OS/2 Warp 4 with FP ?? or later, - OS/2 Warp Server for e-Business, - eComStation 1.0 (prev 1/2 OK) -- TCPIP 4.x installed (requires 32-bit tcpip stack) -- WarpIN installer 0.9.16 (ftp://ftp.os2.org/xworkplace/warpin-0-9-16.exe) - -Note: probably some fixpak level is required on both Warp3&Warp4 to - support >2GB file sizes. - -Save the installation archives into a temporary folder and double click -on the main package; otherwise you can drop the mysql package in your -WarpIN object or type - - WARPIN MYSQL-3-23-??-B1.WPI - -from the command line. -The configuration file for MySQL is named my.cnf and it is placed into -your %ETC% directory. Usually it located into the boot driver under - - x:\MPTN\ETC - -If the installation detect an existing configuration file, it will not be -overwritten, keeping you settings; see x:\...\mysql\data\my.cnf.sample -for new settings. This file is not deleted by uninstall process. -Startup options for MySQL daemon could be added there. - -As default, client connections uses data compression: if you don't like it, -remove the following from your %ETC%\my.cnf - - [client] - compress - -The server switches automatically compression mode on client request. - -This release comes with DLL client library MYSQL.DLL: it is installed by -default into mysql\bin together with client applications. Copy it to your -x:\OS2\DLL or another directory in your LIBPATH to run command line -utilities from every place. - -See documentation for manuals installation. - - -New features ------------- -With build 4, the sql daemon supports a new option - - --preload-client-dll - -that enables preloading of mysql.dll and mysqlu.dll directly by the -server. This way, client programs doesn't need to have the dll's in -the current libpath. - - -Documentation -------------- -Documentation is provided in separate files. You can use either -the PDF documentation (requires Adobe Acrobat Reader) or the -INF documentation (requires OS/2 view or NewView). - -The PDF documentation is found in - - MYSQL-3-23-??-PDF.WPI - -and the INF documentation is found in - - MYSQL-3-23-28-INF.WPI - -The latest documentation in other formats can always be downloaded from -http://www.mysql.com. However this documentation may not fully apply to -this port. -The INF documentation could contain errors because of semi-automatic -translation from texi original. Also it is not updated as the latest PDF -manual (sorry, but conversion from texi to ipf requires quite a lot of -work). -To install the manuals, their WPI must be placed in the same directory -of the main WPI package: once the main package installation is started, -new install options will be available (inf or pdf manual). - - -Support -------- -Since MySQL is a OpenSource freeware product there are no -formal support options available. - -Please subscribe to mysql2 at www.yahoogroups.com to get in contact -with other users using this port. - -http://www.yahoogroups.com/group/mysql2 - -This newsgroup/mailinglist is the official "home" of this port. - - -Donations ---------- -Since this software is ported for free, donations are welcome! -You can get also an extended support, which is not free and subject to -custom rates. -Ask in the mailing list for details. -At least, a post card is welcome! - - -Know problems -------------- -alter_table.test and show_check are failing, reporting a different status -message: actually seems only a different text, no bugs in table checking. - - -Apache/2 + PHP --------------- -To avoid problems with different socket when you use PHP and Apache -webserver, get the PHP4 module from the Apache Server for OS/2 homepage -http://silk.apana.org.au/apache/ - - -Developing MySQL ----------------- -If you want to help us develop MySQL for OS2/eComStation please join -the mysql2 mailinglist at www.egroups.com and ask for help to set up -your environment! - -All questions that are specific to the OS2/eComStation version should -be posted to this list! Please remember to include all relevant -information that may help solve your problem. - - -Building MySQL (VAC++ 4) ------------------------- -Place zlib-1.1.4 at the same level of mysql-3.23.50 -Place ufc lib at the same level of mysql-3.23.50 - -Add the following files: - include\config-os2.h - include\mysql_version.h - mysys\my_os2*.* -Get the following files from Windows source distribution: - strings\ctype_extra_sources.c - libmysql\dll.c - -Apply file and patches found in the src\ directory (if exists). -Create the following subdirectories - - bin\ - bin\test - lib\ - obj\ - obj\zlib - -Build os2\MySQL-Client.icc project first. -Then os2\MySQL-Util.icc; last is os2\MySQL-Sql.icc - diff --git a/os2/build-all.cmd b/os2/build-all.cmd deleted file mode 100644 index 23558946c79..00000000000 --- a/os2/build-all.cmd +++ /dev/null @@ -1,10 +0,0 @@ - -mkdir ..\bin -mkdir ..\bin\test -mkdir ..\lib -mkdir ..\obj -mkdir ..\obj\zlib - -vacbld MySQL-Client.icc -showprogress=10 -showwarning >> build-all.log -vacbld MySQL-Sql.icc -showprogress=10 -showwarning >> build-all.log -vacbld MySQL-Util.icc -showprogress=10 -showwarning >> build-all.log diff --git a/os2/include/Makefile.am b/os2/include/Makefile.am deleted file mode 100644 index fcea89a2aa7..00000000000 --- a/os2/include/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2002 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -## Process this file with automake to create Makefile.in - -EXTRA_DIST = config.h pwd.h sgtty.h termio.h -SUBDIRS = sys - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/os2/include/config.h b/os2/include/config.h deleted file mode 100644 index bb1e3d9bb0f..00000000000 --- a/os2/include/config.h +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include - -#undef HAVE_POSIX_SIGNALS -#undef HAVE_BSD_SIGNALS -#define TERMIO_TTY_DRIVER - -#define ScreenCols() 80 -#define ScreenRows() 25 - -#define tputs(a,b,c) puts(a) -#define kbhit _kbhit -//#define _read_kbd(a, b, c) _kbhit() diff --git a/os2/include/pwd.h b/os2/include/pwd.h deleted file mode 100644 index ec283586db2..00000000000 --- a/os2/include/pwd.h +++ /dev/null @@ -1 +0,0 @@ -/* dummy */ diff --git a/os2/include/sgtty.h b/os2/include/sgtty.h deleted file mode 100644 index ec283586db2..00000000000 --- a/os2/include/sgtty.h +++ /dev/null @@ -1 +0,0 @@ -/* dummy */ diff --git a/os2/include/sys/Makefile.am b/os2/include/sys/Makefile.am deleted file mode 100644 index 8379d3baa39..00000000000 --- a/os2/include/sys/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2002 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -## Process this file with automake to create Makefile.in - -EXTRA_DIST = file.h - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/os2/include/sys/file.h b/os2/include/sys/file.h deleted file mode 100644 index ec283586db2..00000000000 --- a/os2/include/sys/file.h +++ /dev/null @@ -1 +0,0 @@ -/* dummy */ diff --git a/os2/include/termio.h b/os2/include/termio.h deleted file mode 100644 index cad88caccf9..00000000000 --- a/os2/include/termio.h +++ /dev/null @@ -1,156 +0,0 @@ -/* sys/termio.h (emx+gcc) */ - -#ifndef _SYS_TERMIO_H -#define _SYS_TERMIO_H - -#if defined (__cplusplus) -extern "C" { -#endif - -/* Request codes */ - -#if !defined (TCGETA) -#define TCGETA 1 -#define TCSETA 2 -#define TCSETAW 3 -#define TCSETAF 4 -#define TCFLSH 5 -#define TCSBRK 6 -#define TCXONC 7 -#endif - -/* c_cc indexes */ - -#if !defined (VINTR) /* Symbols common to termio.h and termios.h */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VEOL 5 -#define VMIN 6 -#define VTIME 7 -#endif - -#define NCC 8 /* Number of the above */ - -/* c_iflag, emx ignores most of the following bits */ - -#if !defined (IGNBRK) /* Symbols common to termio.h and termios.h */ -#define IGNBRK 0x0001 -#define BRKINT 0x0002 -#define IGNPAR 0x0004 -#define PARMRK 0x0008 -#define INPCK 0x0010 -#define ISTRIP 0x0020 -#define INLCR 0x0040 -#define IGNCR 0x0080 -#define ICRNL 0x0100 -#define IUCLC 0x0200 -#define IXON 0x0400 -#define IXANY 0x0800 -#define IXOFF 0x1000 -#define IDELETE 0x8000 /* Extension (emx) */ -#endif - -/* c_oflag, emx ignores all of the following bits */ - -#if !defined (OPOST) /* Symbols common to termio.h and termios.h */ -#define OPOST 0x0001 -#endif -#define OLCUC 0x0002 -#define ONLCR 0x0004 -#define OCRNL 0x0008 -#define ONOCR 0x0010 -#define ONLRET 0x0020 -#define OFILL 0x0040 -#define OFDEL 0x0080 -#define NLDLY 0x0100 /* Mask */ -#define NL0 0x0000 -#define NL1 0x0100 -#define CRDLY 0x0600 /* Mask */ -#define CR0 0x0000 -#define CR1 0x0200 -#define CR2 0x0400 -#define CR3 0x0600 -#define TABDLY 0x1800 /* Mask */ -#define TAB0 0x0000 -#define TAB1 0x0800 -#define TAB2 0x1000 -#define TAB3 0x1800 -#define BSDLY 0x2000 /* Mask */ -#define BS0 0x0000 -#define BS1 0x2000 -#define VTDLY 0x4000 /* Mask */ -#define VT0 0x0000 -#define VT1 0x4000 -#define FFDLY 0x8000 /* Mask */ -#define FF0 0x0000 -#define FF1 0x8000 - -/* c_cflag, emx ignores all of the following bits */ - -#if !defined (CBAUD) -#define CBAUD 0x000f /* Mask */ -#endif -#if !defined (B0) /* Symbols common to termio.h and termios.h */ -#define B0 0x0000 -#define B50 0x0001 -#define B75 0x0002 -#define B110 0x0003 -#define B134 0x0004 -#define B150 0x0005 -#define B200 0x0006 -#define B300 0x0007 -#define B600 0x0008 -#define B1200 0x0009 -#define B1800 0x000a -#define B2400 0x000b -#define B4800 0x000c -#define B9600 0x000d -#define B19200 0x000e -#define B38400 0x000f -#define CSIZE 0x0030 /* Mask */ -#define CS5 0x0000 -#define CS6 0x0010 -#define CS7 0x0020 -#define CS8 0x0030 -#define CSTOPB 0x0040 -#define CREAD 0x0080 -#define PARENB 0x0100 -#define PARODD 0x0200 -#define HUPCL 0x0400 -#define CLOCAL 0x0800 -#define LOBLK 0x1000 -#endif - -/* c_lflag, emx ignores some of the following bits */ - -#if !defined (ISIG) /* Symbols common to termio.h and termios.h */ -#define ISIG 0x0001 -#define ICANON 0x0002 -#define XCASE 0x0004 -#define ECHO 0x0008 -#define ECHOE 0x0010 -#define ECHOK 0x0020 -#define ECHONL 0x0040 -#define NOFLSH 0x0080 -#define IDEFAULT 0x8000 /* Extension (emx) */ -#endif - - -struct termio -{ - unsigned int c_iflag; - unsigned int c_oflag; - unsigned int c_cflag; - unsigned int c_lflag; - unsigned int c_line; - unsigned char c_cc[NCC]; -}; - -#if defined (__cplusplus) -} -#endif - -#endif /* not _SYS_TERMIO_H */ diff --git a/os2/mysql-inf.wis b/os2/mysql-inf.wis deleted file mode 100644 index 55259567a2e..00000000000 --- a/os2/mysql-inf.wis +++ /dev/null @@ -1,15 +0,0 @@ -#include "mysql.ih" - -> - - -This is not an installable archive. - -Please download and install the main archive: - - mysql-<$MySQL-Ver>-bld1.wpi - - - - - \ No newline at end of file diff --git a/os2/mysql.wis b/os2/mysql.wis deleted file mode 100644 index 50207a0c499..00000000000 --- a/os2/mysql.wis +++ /dev/null @@ -1,127 +0,0 @@ -#include "mysql.ih" - -> - - -This package will install MySQL for OS/2 SQL engine - - -This package will install MySQL for OS/2 sdk - - -This package will install MySQL for OS/2 documentation - - -This package will install MySQL for OS/2 documentation - - -This package will install MySQL for OS/2 test suite - - - - - - - - - - -~Next - - -ReadMe.txt - - - - -~I agree - -By pressing the "I agree" button, you agree to all terms and conditions to the below licence agreement. - -license.htm - - - - - - -~Next - -Please select the packages which are to be installed. You may change the target paths for the packages. - - - - - - -I~nstall - -Press "Install" to begin installing this archive. - - - - diff --git a/os2/mysqlalt.wis b/os2/mysqlalt.wis deleted file mode 100644 index 55259567a2e..00000000000 --- a/os2/mysqlalt.wis +++ /dev/null @@ -1,15 +0,0 @@ -#include "mysql.ih" - -> - - -This is not an installable archive. - -Please download and install the main archive: - - mysql-<$MySQL-Ver>-bld1.wpi - - - - - \ No newline at end of file diff --git a/os2/rint.cmd b/os2/rint.cmd deleted file mode 100644 index 522eff166bf..00000000000 --- a/os2/rint.cmd +++ /dev/null @@ -1,4 +0,0 @@ -REM -DLONG_DOUBLE -REM -DFLOAT -REM none -> double -gcc -Zomf -c -x assembler-with-cpp rint.s diff --git a/os2/rint.obj b/os2/rint.obj deleted file mode 100644 index 1231f093327af8218a33e9eb1d4582f7a635cdcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 334 zcmZqRV&Evs%q!8$Ps;M>U}I=l$n4>>YgzyU16zn|M2N8wn~P(Jqp=aIQ*f}c5vPhu zaHOx3zfUl`ib_aifNL;|v%iZg3rGz!Pz9Tds}oQGhyu#8xcNASu(`Mg`G*D+&tPX* zsl&j;&e#NEF)%Q5Fs^~HSU4G1fmq@UtXzx}A!2OYjLT**G4MppVq@U_&-|Y$U;+;V zBO_}($gKvqps>t=k1isQ&+)*6E_cly);mh3T$~ z3dhYqASOfe5thRfChS`v%D}?FAmG5rq5uR8yozcJqTCnR)fR9uun01+3Ia`M(4Nb| i;KC@tc!H^C{ZthOkR1>p3S$6ikRUwln7Wx57>WUzDoz0a diff --git a/os2/rint.s b/os2/rint.s deleted file mode 100644 index 7f6569ed72c..00000000000 --- a/os2/rint.s +++ /dev/null @@ -1,32 +0,0 @@ -/ rint.s (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes - -#include - -#define FUNC MATHSUFFIX2(rint) - - .globl LABEL(FUNC) - - .text - - ALIGN - -/ double _rint (double x) - -#define cw1 0(%esp) -#define cw2 2(%esp) -/define ret_addr 4(%esp) -#define x 8(%esp) - -LABEL(FUNC): - PROFILE_NOFRAME - subl $4, %esp - fstcww cw1 - movw cw1, %ax - andw $0xf3ff, %ax /* round to nearest or even */ - movw %ax, cw2 - fldcww cw2 - FLD x /* x */ - frndint - fldcww cw1 - addl $4, %esp - EPILOGUE(FUNC) diff --git a/scripts/fill_help_tables.sql b/scripts/fill_help_tables.sql index 9f527c288e9..d32dfaac408 100644 --- a/scripts/fill_help_tables.sql +++ b/scripts/fill_help_tables.sql @@ -1,3 +1,18 @@ +-- Copyright (C) 2005 MySQL AB +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; version 2 of the License. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -- fill_help_tables.sql - this file is a placeholder to satisfy build dependencies - -- it will be replaced with the appropriate content by the Boostrap script that -- creates the official source distribution. diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 93a78037843..cafd550f839 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2000-2006 MySQL AB +# Copyright (c) 2000, 2010, 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 diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index 34134ccd977..c1d01a0342d 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2006 MySQL AB +# Copyright (c) 2006, 2010, 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 diff --git a/scripts/make_win_src_distribution_old.sh b/scripts/make_win_src_distribution_old.sh index f319bad6d55..68a29d1d59f 100644 --- a/scripts/make_win_src_distribution_old.sh +++ b/scripts/make_win_src_distribution_old.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2003-2006 MySQL AB +# Copyright (c) 2003, 2010, 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 @@ -19,7 +19,7 @@ # new CMake build was added. The new build obsoletes this script, Unix # and Windows share the same source TAR/ZIP. # Also note that the old build from source created by this script is -# no longer tested by MySQL AB and may not work. Please use the new +# no longer tested by Oracle and may not work. Please use the new # CMake based build. # Terminate loudly on error, we don't want partial package diff --git a/scripts/mysql_fix_extensions.sh b/scripts/mysql_fix_extensions.sh index 6d4e017f678..74a47fdf4a1 100644 --- a/scripts/mysql_fix_extensions.sh +++ b/scripts/mysql_fix_extensions.sh @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright (C) 2001 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # This is a utility for MySQL. It is not needed by any standard part # of MySQL. diff --git a/scripts/mysql_prepare_privilege_tables_for_5.sql b/scripts/mysql_prepare_privilege_tables_for_5.sql index a9b6d43aee0..5101ac3c6fb 100644 --- a/scripts/mysql_prepare_privilege_tables_for_5.sql +++ b/scripts/mysql_prepare_privilege_tables_for_5.sql @@ -1,3 +1,17 @@ +-- Copyright (C) 2003 MySQL AB +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; version 2 of the License. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA use mysql; diff --git a/scripts/mysql_setpermission.sh b/scripts/mysql_setpermission.sh index 9b49345175a..d2a5a00cd3e 100644 --- a/scripts/mysql_setpermission.sh +++ b/scripts/mysql_setpermission.sh @@ -1,5 +1,23 @@ #!/usr/bin/perl ## Emacs, this is -*- perl -*- mode? :-) + +# Copyright (C) 2000, 2007 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + ## ## Permission setter for MySQL ## diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql index aca87b01bc3..f3c1a0f7c61 100644 --- a/scripts/mysql_system_tables.sql +++ b/scripts/mysql_system_tables.sql @@ -1,3 +1,18 @@ +-- Copyright (C) 2007, 2008 MySQL AB, 2009 Sun Microsystems, Inc. +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; version 2 of the License. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -- -- The system tables of MySQL Server -- diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql index b70a8a13f6e..e934ff927cb 100644 --- a/scripts/mysql_system_tables_data.sql +++ b/scripts/mysql_system_tables_data.sql @@ -1,3 +1,18 @@ +-- Copyright (C) 2007, 2008 MySQL AB +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; version 2 of the License. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -- -- The inital data for system tables of MySQL Server -- diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index cfd03b7c45d..b390aa33385 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -1,3 +1,18 @@ +# Copyright (C) 2003, 2007 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # This part converts any old privilege tables to privilege tables suitable # for current version of MySQL diff --git a/scripts/mysql_tableinfo.sh b/scripts/mysql_tableinfo.sh index c90c410ca78..9bbb78a700e 100644 --- a/scripts/mysql_tableinfo.sh +++ b/scripts/mysql_tableinfo.sh @@ -1,5 +1,22 @@ #!/usr/bin/perl +# Copyright (C) 2002, 2007 MySQL AB +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + use strict; use Getopt::Long; use DBI; diff --git a/scripts/mysql_test_data_timezone.sql b/scripts/mysql_test_data_timezone.sql index e52df2149f2..6bf28148e5e 100644 --- a/scripts/mysql_test_data_timezone.sql +++ b/scripts/mysql_test_data_timezone.sql @@ -1,3 +1,18 @@ +-- Copyright (C) 2007 MySQL AB +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; version 2 of the License. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES ('MET', 1), ('UTC', 2), ('Universal', 2), ('Europe/Moscow',3), ('leap/Europe/Moscow',4), ('Japan', 5); INSERT INTO time_zone (Time_zone_id, Use_leap_seconds) VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N'); INSERT INTO time_zone_transition (Time_zone_id, Transition_time, Transition_type_id) VALUES (1, -1693706400, 0) ,(1, -1680483600, 1) ,(1, -1663455600, 2) ,(1, -1650150000, 3) ,(1, -1632006000, 2) ,(1, -1618700400, 3) ,(1, -938905200, 2) ,(1, -857257200, 3) ,(1, -844556400, 2) ,(1, -828226800, 3) ,(1, -812502000, 2) ,(1, -796777200, 3) ,(1, 228877200, 2) ,(1, 243997200, 3) ,(1, 260326800, 2) ,(1, 276051600, 3) ,(1, 291776400, 2) ,(1, 307501200, 3) ,(1, 323830800, 2) ,(1, 338950800, 3) ,(1, 354675600, 2) ,(1, 370400400, 3) ,(1, 386125200, 2) ,(1, 401850000, 3) ,(1, 417574800, 2) ,(1, 433299600, 3) ,(1, 449024400, 2) ,(1, 465354000, 3) ,(1, 481078800, 2) ,(1, 496803600, 3) ,(1, 512528400, 2) ,(1, 528253200, 3) ,(1, 543978000, 2) ,(1, 559702800, 3) ,(1, 575427600, 2) ,(1, 591152400, 3) ,(1, 606877200, 2) ,(1, 622602000, 3) ,(1, 638326800, 2) ,(1, 654656400, 3) ,(1, 670381200, 2) ,(1, 686106000, 3) ,(1, 701830800, 2) ,(1, 717555600, 3) ,(1, 733280400, 2) ,(1, 749005200, 3) ,(1, 764730000, 2) ,(1, 780454800, 3) ,(1, 796179600, 2) ,(1, 811904400, 3) ,(1, 828234000, 2) ,(1, 846378000, 3) ,(1, 859683600, 2) ,(1, 877827600, 3) ,(1, 891133200, 2) ,(1, 909277200, 3) ,(1, 922582800, 2) ,(1, 941331600, 3) ,(1, 954032400, 2) ,(1, 972781200, 3) ,(1, 985482000, 2) ,(1, 1004230800, 3) ,(1, 1017536400, 2) ,(1, 1035680400, 3) ,(1, 1048986000, 2) ,(1, 1067130000, 3) ,(1, 1080435600, 2) ,(1, 1099184400, 3) ,(1, 1111885200, 2) ,(1, 1130634000, 3) ,(1, 1143334800, 2) ,(1, 1162083600, 3) ,(1, 1174784400, 2) ,(1, 1193533200, 3) ,(1, 1206838800, 2) ,(1, 1224982800, 3) ,(1, 1238288400, 2) ,(1, 1256432400, 3) ,(1, 1269738000, 2) ,(1, 1288486800, 3) ,(1, 1301187600, 2) ,(1, 1319936400, 3) ,(1, 1332637200, 2) ,(1, 1351386000, 3) ,(1, 1364691600, 2) ,(1, 1382835600, 3) ,(1, 1396141200, 2) ,(1, 1414285200, 3) ,(1, 1427590800, 2) ,(1, 1445734800, 3) ,(1, 1459040400, 2) ,(1, 1477789200, 3) ,(1, 1490490000, 2) ,(1, 1509238800, 3) ,(1, 1521939600, 2) ,(1, 1540688400, 3) ,(1, 1553994000, 2) ,(1, 1572138000, 3) ,(1, 1585443600, 2) ,(1, 1603587600, 3) ,(1, 1616893200, 2) ,(1, 1635642000, 3) ,(1, 1648342800, 2) ,(1, 1667091600, 3) ,(1, 1679792400, 2) ,(1, 1698541200, 3) ,(1, 1711846800, 2) ,(1, 1729990800, 3) ,(1, 1743296400, 2) ,(1, 1761440400, 3) ,(1, 1774746000, 2) ,(1, 1792890000, 3) ,(1, 1806195600, 2) ,(1, 1824944400, 3) ,(1, 1837645200, 2) ,(1, 1856394000, 3) ,(1, 1869094800, 2) ,(1, 1887843600, 3) ,(1, 1901149200, 2) ,(1, 1919293200, 3) ,(1, 1932598800, 2) ,(1, 1950742800, 3) ,(1, 1964048400, 2) ,(1, 1982797200, 3) ,(1, 1995498000, 2) ,(1, 2014246800, 3) ,(1, 2026947600, 2) ,(1, 2045696400, 3) ,(1, 2058397200, 2) ,(1, 2077146000, 3) ,(1, 2090451600, 2) ,(1, 2108595600, 3) ,(1, 2121901200, 2) ,(1, 2140045200, 3) ,(3, -1688265000, 2) ,(3, -1656819048, 1) ,(3, -1641353448, 2) ,(3, -1627965048, 3) ,(3, -1618716648, 1) ,(3, -1596429048, 3) ,(3, -1593829848, 5) ,(3, -1589860800, 4) ,(3, -1542427200, 5) ,(3, -1539493200, 6) ,(3, -1525323600, 5) ,(3, -1522728000, 4) ,(3, -1491188400, 7) ,(3, -1247536800, 4) ,(3, 354920400, 5) ,(3, 370728000, 4) ,(3, 386456400, 5) ,(3, 402264000, 4) ,(3, 417992400, 5) ,(3, 433800000, 4) ,(3, 449614800, 5) ,(3, 465346800, 8) ,(3, 481071600, 9) ,(3, 496796400, 8) ,(3, 512521200, 9) ,(3, 528246000, 8) ,(3, 543970800, 9) ,(3, 559695600, 8) ,(3, 575420400, 9) ,(3, 591145200, 8) ,(3, 606870000, 9) ,(3, 622594800, 8) ,(3, 638319600, 9) ,(3, 654649200, 8) ,(3, 670374000, 10) ,(3, 686102400, 11) ,(3, 695779200, 8) ,(3, 701812800, 5) ,(3, 717534000, 4) ,(3, 733273200, 9) ,(3, 748998000, 8) ,(3, 764722800, 9) ,(3, 780447600, 8) ,(3, 796172400, 9) ,(3, 811897200, 8) ,(3, 828226800, 9) ,(3, 846370800, 8) ,(3, 859676400, 9) ,(3, 877820400, 8) ,(3, 891126000, 9) ,(3, 909270000, 8) ,(3, 922575600, 9) ,(3, 941324400, 8) ,(3, 954025200, 9) ,(3, 972774000, 8) ,(3, 985474800, 9) ,(3, 1004223600, 8) ,(3, 1017529200, 9) ,(3, 1035673200, 8) ,(3, 1048978800, 9) ,(3, 1067122800, 8) ,(3, 1080428400, 9) ,(3, 1099177200, 8) ,(3, 1111878000, 9) ,(3, 1130626800, 8) ,(3, 1143327600, 9) ,(3, 1162076400, 8) ,(3, 1174777200, 9) ,(3, 1193526000, 8) ,(3, 1206831600, 9) ,(3, 1224975600, 8) ,(3, 1238281200, 9) ,(3, 1256425200, 8) ,(3, 1269730800, 9) ,(3, 1288479600, 8) ,(3, 1301180400, 9) ,(3, 1319929200, 8) ,(3, 1332630000, 9) ,(3, 1351378800, 8) ,(3, 1364684400, 9) ,(3, 1382828400, 8) ,(3, 1396134000, 9) ,(3, 1414278000, 8) ,(3, 1427583600, 9) ,(3, 1445727600, 8) ,(3, 1459033200, 9) ,(3, 1477782000, 8) ,(3, 1490482800, 9) ,(3, 1509231600, 8) ,(3, 1521932400, 9) ,(3, 1540681200, 8) ,(3, 1553986800, 9) ,(3, 1572130800, 8) ,(3, 1585436400, 9) ,(3, 1603580400, 8) ,(3, 1616886000, 9) ,(3, 1635634800, 8) ,(3, 1648335600, 9) ,(3, 1667084400, 8) ,(3, 1679785200, 9) ,(3, 1698534000, 8) ,(3, 1711839600, 9) ,(3, 1729983600, 8) ,(3, 1743289200, 9) ,(3, 1761433200, 8) ,(3, 1774738800, 9) ,(3, 1792882800, 8) ,(3, 1806188400, 9) ,(3, 1824937200, 8) ,(3, 1837638000, 9) ,(3, 1856386800, 8) ,(3, 1869087600, 9) ,(3, 1887836400, 8) ,(3, 1901142000, 9) ,(3, 1919286000, 8) ,(3, 1932591600, 9) ,(3, 1950735600, 8) ,(3, 1964041200, 9) ,(3, 1982790000, 8) ,(3, 1995490800, 9) ,(3, 2014239600, 8) ,(3, 2026940400, 9) ,(3, 2045689200, 8) ,(3, 2058390000, 9) ,(3, 2077138800, 8) ,(3, 2090444400, 9) ,(3, 2108588400, 8) ,(3, 2121894000, 9) ,(3, 2140038000, 8) ,(4, -1688265000, 2) ,(4, -1656819048, 1) ,(4, -1641353448, 2) ,(4, -1627965048, 3) ,(4, -1618716648, 1) ,(4, -1596429048, 3) ,(4, -1593829848, 5) ,(4, -1589860800, 4) ,(4, -1542427200, 5) ,(4, -1539493200, 6) ,(4, -1525323600, 5) ,(4, -1522728000, 4) ,(4, -1491188400, 7) ,(4, -1247536800, 4) ,(4, 354920409, 5) ,(4, 370728010, 4) ,(4, 386456410, 5) ,(4, 402264011, 4) ,(4, 417992411, 5) ,(4, 433800012, 4) ,(4, 449614812, 5) ,(4, 465346812, 8) ,(4, 481071612, 9) ,(4, 496796413, 8) ,(4, 512521213, 9) ,(4, 528246013, 8) ,(4, 543970813, 9) ,(4, 559695613, 8) ,(4, 575420414, 9) ,(4, 591145214, 8) ,(4, 606870014, 9) ,(4, 622594814, 8) ,(4, 638319615, 9) ,(4, 654649215, 8) ,(4, 670374016, 10) ,(4, 686102416, 11) ,(4, 695779216, 8) ,(4, 701812816, 5) ,(4, 717534017, 4) ,(4, 733273217, 9) ,(4, 748998018, 8) ,(4, 764722818, 9) ,(4, 780447619, 8) ,(4, 796172419, 9) ,(4, 811897219, 8) ,(4, 828226820, 9) ,(4, 846370820, 8) ,(4, 859676420, 9) ,(4, 877820421, 8) ,(4, 891126021, 9) ,(4, 909270021, 8) ,(4, 922575622, 9) ,(4, 941324422, 8) ,(4, 954025222, 9) ,(4, 972774022, 8) ,(4, 985474822, 9) ,(4, 1004223622, 8) ,(4, 1017529222, 9) ,(4, 1035673222, 8) ,(4, 1048978822, 9) ,(4, 1067122822, 8) ,(4, 1080428422, 9) ,(4, 1099177222, 8) ,(4, 1111878022, 9) ,(4, 1130626822, 8) ,(4, 1143327622, 9) ,(4, 1162076422, 8) ,(4, 1174777222, 9) ,(4, 1193526022, 8) ,(4, 1206831622, 9) ,(4, 1224975622, 8) ,(4, 1238281222, 9) ,(4, 1256425222, 8) ,(4, 1269730822, 9) ,(4, 1288479622, 8) ,(4, 1301180422, 9) ,(4, 1319929222, 8) ,(4, 1332630022, 9) ,(4, 1351378822, 8) ,(4, 1364684422, 9) ,(4, 1382828422, 8) ,(4, 1396134022, 9) ,(4, 1414278022, 8) ,(4, 1427583622, 9) ,(4, 1445727622, 8) ,(4, 1459033222, 9) ,(4, 1477782022, 8) ,(4, 1490482822, 9) ,(4, 1509231622, 8) ,(4, 1521932422, 9) ,(4, 1540681222, 8) ,(4, 1553986822, 9) ,(4, 1572130822, 8) ,(4, 1585436422, 9) ,(4, 1603580422, 8) ,(4, 1616886022, 9) ,(4, 1635634822, 8) ,(4, 1648335622, 9) ,(4, 1667084422, 8) ,(4, 1679785222, 9) ,(4, 1698534022, 8) ,(4, 1711839622, 9) ,(4, 1729983622, 8) ,(4, 1743289222, 9) ,(4, 1761433222, 8) ,(4, 1774738822, 9) ,(4, 1792882822, 8) ,(4, 1806188422, 9) ,(4, 1824937222, 8) ,(4, 1837638022, 9) ,(4, 1856386822, 8) ,(4, 1869087622, 9) ,(4, 1887836422, 8) ,(4, 1901142022, 9) ,(4, 1919286022, 8) ,(4, 1932591622, 9) ,(4, 1950735622, 8) ,(4, 1964041222, 9) ,(4, 1982790022, 8) ,(4, 1995490822, 9) ,(4, 2014239622, 8) ,(4, 2026940422, 9) ,(4, 2045689222, 8) ,(4, 2058390022, 9) ,(4, 2077138822, 8) ,(4, 2090444422, 9) ,(4, 2108588422, 8) ,(4, 2121894022, 9) ,(4, 2140038022, 8) ,(5, -1009875600, 1); diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh index 0153a3afa7c..4e208e6c16e 100644 --- a/scripts/mysqlaccess.sh +++ b/scripts/mysqlaccess.sh @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright (C) 2000, 2007 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # **************************** package MySQLaccess; #use strict; diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index a6330055f99..87eb35a52fc 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -1,5 +1,22 @@ #!/usr/bin/perl +# Copyright (C) 2000, 2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + use Getopt::Long; use POSIX qw(strftime getcwd); diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh index 009745fd896..d1bb23370b7 100644 --- a/scripts/mysqldumpslow.sh +++ b/scripts/mysqldumpslow.sh @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright (C) 2000, 2007 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + # mysqldumpslow - parse and summarize the MySQL slow query log # Original version by Tim Bunce, sometime in 2000. diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index 21fca0c0848..30359f4bb29 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -1,5 +1,22 @@ #!/usr/bin/perl +# Copyright (C) 2000, 2008 MySQL AB, 2009 Sun Microsystems, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library 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 +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA + use strict; use Getopt::Long; use Data::Dumper; diff --git a/server-tools/instance-manager/options.cc b/server-tools/instance-manager/options.cc index 9eb148c4e3b..7c80b2e8b23 100644 --- a/server-tools/instance-manager/options.cc +++ b/server-tools/instance-manager/options.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2006 MySQL AB +/* Copyright (C) 2003-2007 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -185,7 +185,7 @@ static void usage() { version(); - printf("Copyright (C) 2003, 2004 MySQL AB\n" + printf("Copyright (C) 2003-2007 MySQL AB, 2009 Sun Microsystems, Inc.\n" "This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n" "and you are welcome to modify and redistribute it under the GPL license\n"); printf("Usage: %s [OPTIONS] \n", my_progname); diff --git a/sql/field.cc b/sql/field.cc index b61e5fd2d79..0b74f9e5a65 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index ef671ac7f9d..f59c7f0a4da 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (C) 2000-2007 MySQL AB, 2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -446,7 +446,7 @@ int main(int argc,char **argv) printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n"); printf("\ -/* Copyright (C) 2001-2004 MySQL AB\n\ +/* Copyright (C) 2000-2007 MySQL AB, 2008 Sun Microsystems, Inc.\n\ \n\ This program is free software; you can redistribute it and/or modify\n\ it under the terms of the GNU General Public License as published by\n\ diff --git a/sql/item.h b/sql/item.h index 31d501dc5c3..49adcc6c516 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 5c2fb9857d5..60c8cbdad45 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 233922fe2f8..3c9e976d0c3 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/sql/item_func.cc b/sql/item_func.cc index cb0d6bdbe5f..579ef44b14f 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/sql/item_func.h b/sql/item_func.h index 47a13559e90..96af2602821 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 1822a7ced56..44d1378839b 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2002, 2010, 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 diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 244ea4c34b6..43102213b9b 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/sql/message.h b/sql/message.h index 0e7c282d5a1..f2a2de5a8fb 100644 --- a/sql/message.h +++ b/sql/message.h @@ -1,3 +1,18 @@ +/* Copyright 2008 Sun Microsystems, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + /* To change or add messages mysqld writes to the Windows error log, run mc.exe message.mc diff --git a/sql/mysqld.cc b/sql/mysqld.cc index bda4e796ce2..5f84d15588d 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 1d1871e27a8..ddd57c8fb9a 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2010, 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 @@ -15,9 +15,9 @@ /* This file is the net layer API for the MySQL client/server protocol, - which is a tightly coupled, proprietary protocol owned by MySQL AB. + which is a tightly coupled, proprietary protocol owned by Oracle. Any re-implementations of this protocol must also be under GPL - unless one has got an license from MySQL AB stating otherwise. + unless one has got an license from Oracle stating otherwise. */ /* diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 35d1216387c..e62fff8329c 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (c) 2000, 2010, 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 diff --git a/sql/set_var.cc b/sql/set_var.cc index 16a22f129e6..9c327504577 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2002, 2010, 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 diff --git a/sql/set_var.h b/sql/set_var.h index 9945c69cac0..2c9745163e9 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2006 MySQL AB +/* Copyright (c) 2002, 2010, 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 diff --git a/sql/share/charsets/languages.html b/sql/share/charsets/languages.html index 6d1a8aafc5c..76af973113e 100644 --- a/sql/share/charsets/languages.html +++ b/sql/share/charsets/languages.html @@ -1,4 +1,20 @@ #!/bin/sh + +# Copyright (C) 2003 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + #
     (
     echo "DROP TABLE lang;"
    diff --git a/sql/sql_base.cc b/sql/sql_base.cc
    index 88d1e8879d1..4a1d3a96ef8 100644
    --- a/sql/sql_base.cc
    +++ b/sql/sql_base.cc
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 2000-2006 MySQL AB
    +/* Copyright (c) 2000, 2010, 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
    diff --git a/sql/sql_class.h b/sql/sql_class.h
    index c195c8be864..2f4af15c02d 100644
    --- a/sql/sql_class.h
    +++ b/sql/sql_class.h
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 2000-2006 MySQL AB
    +/* Copyright (c) 2000, 2010, 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
    diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
    index b730e2585ae..1bd68e5424f 100644
    --- a/sql/sql_parse.cc
    +++ b/sql/sql_parse.cc
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 2000-2003 MySQL AB
    +/* Copyright (c) 2000, 2010, 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
    diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
    index 9815acfe815..9492b2ae180 100644
    --- a/sql/sql_prepare.cc
    +++ b/sql/sql_prepare.cc
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 1995-2002 MySQL AB
    +/* Copyright (c) 2002, 2010, 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
    diff --git a/sql/sql_select.cc b/sql/sql_select.cc
    index 53a6b699022..904610b9031 100644
    --- a/sql/sql_select.cc
    +++ b/sql/sql_select.cc
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 2000-2006 MySQL AB
    +/* Copyright (c) 2000, 2010, 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
    diff --git a/sql/sql_select.h b/sql/sql_select.h
    index 346d98aae58..a885507446e 100644
    --- a/sql/sql_select.h
    +++ b/sql/sql_select.h
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 2000-2006 MySQL AB
    +/* Copyright (c) 2000, 2010, 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
    diff --git a/sql/sql_show.cc b/sql/sql_show.cc
    index 1075e7f76d1..56f0ce78c8c 100644
    --- a/sql/sql_show.cc
    +++ b/sql/sql_show.cc
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 2000-2004 MySQL AB
    +/* Copyright (c) 2000, 2010, 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
    diff --git a/sql/sql_update.cc b/sql/sql_update.cc
    index 8d666c771ec..661f3465696 100644
    --- a/sql/sql_update.cc
    +++ b/sql/sql_update.cc
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 2000-2006 MySQL AB
    +/* Copyright (c) 2000, 2010, 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
    diff --git a/sql/table.h b/sql/table.h
    index 0a89db8bbff..33bee9f659d 100644
    --- a/sql/table.h
    +++ b/sql/table.h
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 2000-2006 MySQL AB
    +/* Copyright (c) 2000, 2010, 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
    diff --git a/strings/strtod.c b/strings/strtod.c
    index 5fe59d10bd2..4817be6fac0 100644
    --- a/strings/strtod.c
    +++ b/strings/strtod.c
    @@ -1,3 +1,25 @@
    +/* Copyright (C) 2000, 2007 MySQL AB
    +
    +   This program is free software; you can redistribute it and/or modify
    +   it under the terms of the GNU General Public License as published by
    +   the Free Software Foundation; version 2 of the License.
    +
    +   This program is distributed in the hope that it will be useful,
    +   but WITHOUT ANY WARRANTY; without even the implied warranty of
    +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +   GNU General Public License for more details.
    +
    +   You should have received a copy of the GNU General Public License
    +   along with this program; if not, write to the Free Software
    +   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
    +
    +/*
    +    strnmov(dst,src,length) moves length characters, or until end, of src to
    +    dst and appends a closing NUL to dst if src is shorter than length.
    +    The result is a pointer to the first NUL in dst, or is dst+n if dst was
    +    truncated.
    +*/
    +
     /*
       An alternative implementation of "strtod()" that is both
       simplier, and thread-safe.
    diff --git a/support-files/MacOSX/Description.plist.sh b/support-files/MacOSX/Description.plist.sh
    index 03212dfdeff..a41e5891ecc 100644
    --- a/support-files/MacOSX/Description.plist.sh
    +++ b/support-files/MacOSX/Description.plist.sh
    @@ -1,5 +1,21 @@
     
     
    +
     
     
     	IFPkgDescriptionDeleteWarning
    diff --git a/support-files/MacOSX/Info.plist.sh b/support-files/MacOSX/Info.plist.sh
    index 7df9c5ac710..c6ec1edeac4 100644
    --- a/support-files/MacOSX/Info.plist.sh
    +++ b/support-files/MacOSX/Info.plist.sh
    @@ -1,5 +1,21 @@
     
     
    +
     
     
     	CFBundleGetInfoString
    diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am
    index 3f11107d714..4ee5b90263c 100644
    --- a/support-files/MacOSX/Makefile.am
    +++ b/support-files/MacOSX/Makefile.am
    @@ -1,11 +1,11 @@
     # Copyright (C) 2003-2006 MySQL AB
     #
    -# This library is free software; you can redistribute it and/or
    +# This program is free software; you can redistribute it and/or
     # modify it under the terms of the GNU Library General Public
     # License as published by the Free Software Foundation; version 2
     # of the License.
     #
    -# This library is distributed in the hope that it will be useful,
    +# 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
     # Library General Public License for more details.
    diff --git a/support-files/MacOSX/MySQLCOM b/support-files/MacOSX/MySQLCOM
    index 9be5edb56f7..4d55fb44ec0 100755
    --- a/support-files/MacOSX/MySQLCOM
    +++ b/support-files/MacOSX/MySQLCOM
    @@ -1,4 +1,20 @@
     #!/bin/sh
    +
    +# Copyright (C) 2003, 2004 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # /Library/StartupItems/MySQLCOM/MySQLCOM
     #
    diff --git a/support-files/MacOSX/StartupItem.Description.plist b/support-files/MacOSX/StartupItem.Description.plist
    index e8ceb1ee062..1e0d975e0f2 100644
    --- a/support-files/MacOSX/StartupItem.Description.plist
    +++ b/support-files/MacOSX/StartupItem.Description.plist
    @@ -1,5 +1,21 @@
     
     
    +
     
     
     	IFPkgDescriptionDeleteWarning
    diff --git a/support-files/MacOSX/StartupItem.Info.plist b/support-files/MacOSX/StartupItem.Info.plist
    index f403fbe7e84..7e348c4adec 100644
    --- a/support-files/MacOSX/StartupItem.Info.plist
    +++ b/support-files/MacOSX/StartupItem.Info.plist
    @@ -1,5 +1,21 @@
     
     
    +
     
     
     	CFBundleGetInfoString
    diff --git a/support-files/MacOSX/StartupItem.postinstall b/support-files/MacOSX/StartupItem.postinstall
    index f6f6f46f211..ddbd9732a5c 100755
    --- a/support-files/MacOSX/StartupItem.postinstall
    +++ b/support-files/MacOSX/StartupItem.postinstall
    @@ -1,4 +1,20 @@
     #!/bin/sh
    +
    +# Copyright (C) 2003 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # postinstall script for the MySQL Startup Item Installation package
     #
    diff --git a/support-files/MacOSX/StartupParameters.plist.sh b/support-files/MacOSX/StartupParameters.plist.sh
    index f5620c73f5f..35bc5a4f647 100644
    --- a/support-files/MacOSX/StartupParameters.plist.sh
    +++ b/support-files/MacOSX/StartupParameters.plist.sh
    @@ -1,5 +1,21 @@
     
     
    +
     
     
     	Description
    diff --git a/support-files/MacOSX/mwar-wrapper b/support-files/MacOSX/mwar-wrapper
    index 4bc5153e7ef..53624931b3b 100755
    --- a/support-files/MacOSX/mwar-wrapper
    +++ b/support-files/MacOSX/mwar-wrapper
    @@ -1,5 +1,20 @@
     #!/bin/sh
     
    +# Copyright (C) 2005 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     # This script can only create a library, not take it apart
     # again to AR files
     
    diff --git a/support-files/MacOSX/mwcc-wrapper b/support-files/MacOSX/mwcc-wrapper
    index 914578aca1d..162b2e24479 100755
    --- a/support-files/MacOSX/mwcc-wrapper
    +++ b/support-files/MacOSX/mwcc-wrapper
    @@ -1,5 +1,20 @@
     #!/bin/sh
     
    +# Copyright (C) 2005 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     if [ -z "$CWINSTALL" ] ; then
         echo "ERROR: You need to source 'mwvars' to set CWINSTALL and other variables"
         exit 1
    diff --git a/support-files/MacOSX/postflight.sh b/support-files/MacOSX/postflight.sh
    index 451eb65e0d7..1e55c542c89 100644
    --- a/support-files/MacOSX/postflight.sh
    +++ b/support-files/MacOSX/postflight.sh
    @@ -1,4 +1,22 @@
     #!/bin/sh
    +
    +# Copyright (C) 2003, 2005 MySQL AB
    +#
    +# This program is free software; you can redistribute it and/or
    +# modify it under the terms of the GNU Library 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
    +# Library General Public License for more details.
    +#
    +# You should have received a copy of the GNU Library General Public
    +# License along with this library; if not, write to the Free
    +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
    +# MA 02111-1307, USA
    +
     #
     # postflight - this script will be executed after the MySQL PKG
     # installation has been performed.
    diff --git a/support-files/MacOSX/preflight.sh b/support-files/MacOSX/preflight.sh
    index 700d0640a9e..a214008cf52 100644
    --- a/support-files/MacOSX/preflight.sh
    +++ b/support-files/MacOSX/preflight.sh
    @@ -1,4 +1,22 @@
     #!/bin/sh
    +
    +# Copyright (C) 2003, 2005 MySQL AB
    +#
    +# This program is free software; you can redistribute it and/or
    +# modify it under the terms of the GNU Library 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
    +# Library General Public License for more details.
    +#
    +# You should have received a copy of the GNU Library General Public
    +# License along with this library; if not, write to the Free
    +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
    +# MA 02111-1307, USA
    +
     #
     # preflight - this script will be executed before the MySQL PKG
     # installation will be performed.
    diff --git a/support-files/Makefile.am b/support-files/Makefile.am
    index 4cb8bb4645d..7371a6a53a2 100644
    --- a/support-files/Makefile.am
    +++ b/support-files/Makefile.am
    @@ -1,11 +1,11 @@
     # Copyright (C) 2000-2006 MySQL AB, 2008-2010 Sun Microsystems, Inc.
     #
    -# This library is free software; you can redistribute it and/or
    +# This program is free software; you can redistribute it and/or
     # modify it under the terms of the GNU Library General Public
     # License as published by the Free Software Foundation; version 2
     # of the License.
     #
    -# This library is distributed in the hope that it will be useful,
    +# 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
     # Library General Public License for more details.
    diff --git a/support-files/RHEL4-SElinux/Makefile.am b/support-files/RHEL4-SElinux/Makefile.am
    index 52292136877..960a1fea554 100644
    --- a/support-files/RHEL4-SElinux/Makefile.am
    +++ b/support-files/RHEL4-SElinux/Makefile.am
    @@ -1,11 +1,11 @@
     # Copyright (C) 2000-2001, 2003-2006 MySQL AB
     #
    -# This library is free software; you can redistribute it and/or
    +# This program is free software; you can redistribute it and/or
     # modify it under the terms of the GNU Library General Public
     # License as published by the Free Software Foundation; version 2
     # of the License.
     #
    -# This library is distributed in the hope that it will be useful,
    +# 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
     # Library General Public License for more details.
    diff --git a/support-files/RHEL4-SElinux/mysql.fc b/support-files/RHEL4-SElinux/mysql.fc
    index 0db0ccf6e68..b44795e6f8c 100644
    --- a/support-files/RHEL4-SElinux/mysql.fc
    +++ b/support-files/RHEL4-SElinux/mysql.fc
    @@ -1,3 +1,18 @@
    +# Copyright (C) 2007 MySQL AB
    +#
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +#
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +#
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     # MySQL Database Server
     
     #
    diff --git a/support-files/RHEL4-SElinux/mysql.te b/support-files/RHEL4-SElinux/mysql.te
    index b050fa7b1a6..922389305ea 100644
    --- a/support-files/RHEL4-SElinux/mysql.te
    +++ b/support-files/RHEL4-SElinux/mysql.te
    @@ -1,3 +1,17 @@
    +# Copyright (C) 2007 MySQL AB
    +#
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +#
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +#
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     
     policy_module(mysql,1.0.0)
     
    diff --git a/support-files/SCO/INSTALL.sh b/support-files/SCO/INSTALL.sh
    deleted file mode 100755
    index 979f33f3f06..00000000000
    --- a/support-files/SCO/INSTALL.sh
    +++ /dev/null
    @@ -1,29 +0,0 @@
    -#!/bin/sh
    -
    -# search & check GNU patch
    -PATCH="gpatch"
    -$PATCH --version || PATCH="patch"
    -$PATCH --version || exit
    -
    -
    -if /usr/bin/test ! -e PKG/stamp-pre ; then
    -  grep VERSION configure | head -1 | sed 's/VERSION=//' > ./PKG/version
    -  touch PKG/stamp-pre
    -fi
    -
    -if /usr/bin/test ! -e PKG/stamp-patch ; then
    - ${PATCH} -p0 < ./PKG/patch
    - touch PKG/stamp-patch
    -fi
    -
    -if /usr/bin/test ! -e PKG/stamp-compile ; then
    -sh ./PKG/compile.sh ujis
    -touch PKG/stamp-compile
    -
    -sh ./PKG/doc.sh ujis
    -
    -fi
    -
    -
    -cd PKG
    -sh mkpkg.sh ujis
    diff --git a/support-files/SCO/compile.sh b/support-files/SCO/compile.sh
    deleted file mode 100644
    index 5281ccde02d..00000000000
    --- a/support-files/SCO/compile.sh
    +++ /dev/null
    @@ -1,102 +0,0 @@
    -#!/bin/sh
    -# GNU ncurses
    -
    -# search & check GNU make
    -GMAKE="gmake"
    -$GMAKE --version || GMAKE="make"
    -$GMAKE --version || exit
    -
    -MAKE=$GMAKE
    -export MAKE
    -
    -CC=gcc
    -CFLAGS="-O6 -fomit-frame-pointer"
    -CXX=gcc
    -CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors  -fno-exceptions -fno-rtti"
    -# LDFLAGS="-static"
    -LD=gcc
    -
    -export CC
    -export CXX
    -export LD
    -export CFLAGS
    -export CXXFLAGS
    -# export LDFLAGS
    -# Solaris don't have libpthread.a.
    -
    -if [ "x$1" = "x" ]; then
    -  echo " please set character set"
    -  exit
    -fi
    -
    -CHAR="$1"
    -case "$1" in
    - [uU]*)
    -   CHAR=ujis
    -   ;;
    - [sS]*)
    -   CHAR=sjis
    -   ;;
    -esac
    - 
    -#---------------
    -P=`pwd`
    -
    -if [ -f Makefile ] ; then
    -    ${GMAKE} distclean
    -fi
    -
    -for i in bin sbin include man share/doc/mysql mysql-data
    -do
    -  /usr/bin/mkdir -p PKG/tmp-${CHAR}/usr/local/${i}
    -done
    -/usr/bin/mkdir -p PKG/tmp-${CHAR}/etc/init.d
    -
    -#----------------------------
    -./configure \
    -   --prefix=/usr/local \
    -   --libexecdir=/usr/local/sbin \
    -   --sbindir=/usr/local/sbin \
    -   --localstatedir=/usr/local/mysql-data \
    -   --with-charset=${CHAR} \
    -   --with-extra-charsets=all \
    -   --with-raid \
    -   --without-docs \
    -   --without-bench \
    -   --without-perl \
    -   --with-gcc \
    -   --with-mysqld-ldflags="-static" \
    -   --with-client-ldflags="-static" \
    -   --with-named-curses-libs=/usr/local/lib/libncurses.a \
    -   --with-mysqld-user=mysql
    -
    -#   --with-berkeley-db-includes=/usr/local/include/db3 \
    -#   --with-berkeley-db-libs=/usr/local/lib/libdb3.a \
    -#   --with-low-memory
    -
    -${GMAKE}
    -${GMAKE} install DESTDIR=${P}/PKG/tmp-${CHAR}
    -
    -v=`grep '^SHARED_LIB_VERSION' configure.in | sed 's@SHARED_LIB_VERSION@@' | sed -e 's@=@@' -e 's@:@ @g' | awk '{print $1}'`
    -km="libmysqlclient.so.$v"
    -export km
    -
    -(cd ${P}/PKG/tmp-${CHAR}/usr/local/lib/mysql/ ; \
    -  for i in libmysqlclient* ; do \
    -    if /usr/bin/test ! -L $i ; then \
    -        mv $i ../ ; ln -sf ../$i ; \
    -    fi ; \
    -  done ; \
    -  k=`ls libmysqlclient.so.*.*.*` ; \
    -  cd .. ; \
    -  if /usr/bin/test ! -z libmysqlclient.so ; then \
    -      ln -sf $k libmysqlclient.so ;
    -  fi ; \
    -  if /usr/bin/test ! -z $km ; then \
    -      ln -sf $k $km ;
    -  fi ; \
    -)
    -
    -#
    -(cd ${P}/PKG/tmp-${CHAR}/usr/local/bin ; strip * )
    -(cd ${P}/PKG/tmp-${CHAR}/usr/local/sbin ; strip * )
    diff --git a/support-files/SCO/doc.sh b/support-files/SCO/doc.sh
    deleted file mode 100644
    index 9ef17166a6f..00000000000
    --- a/support-files/SCO/doc.sh
    +++ /dev/null
    @@ -1,17 +0,0 @@
    -#!/bin/sh
    -
    -CHAR="$1"
    -case "$1" in 
    - [uU]*) 
    -   CHAR=ujis 
    -   ;; 
    - [sS]*) 
    -   CHAR=sjis 
    -   ;; 
    -esac 
    -
    -cp -r Docs/* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/
    -cp INSTALL-SOURCE* COPYING* MIRRORS README* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/
    -
    -cd PKG/tmp-${CHAR}/usr/local/share/doc/mysql/
    -gzip *.txt *.texi *.info *.pdf
    diff --git a/support-files/SCO/mkpkg.sh b/support-files/SCO/mkpkg.sh
    deleted file mode 100644
    index 5a38113138d..00000000000
    --- a/support-files/SCO/mkpkg.sh
    +++ /dev/null
    @@ -1,47 +0,0 @@
    -#!/bin/sh
    -
    -if [ "x$1" = "x" ]; then
    -  echo " please set charset"
    -  exit
    -fi
    -
    -CHAR="$1"
    -case "$1" in
    - [uU]*)
    -   CHAR=ujis ; CH=uj
    -   ;;
    - [sS]*)
    -   CHAR=sjis ; CH=sj
    -   ;;
    -esac
    -
    -#-------------------
    -DIR=`pwd`
    -
    -VERSION=`cat version`
    -
    -T=`uname -p`
    -
    -sed -e "s/@CHAR1@/${CH}/" \
    -	 -e "s/@CHAR2@/${CHAR}/" \
    -	-e "s/@VERSION@/${VERSION}/" \
    -	-e "s/@TYPE@/${T}/" \
    -	pkginfo.ini > pkginfo.${CHAR}
    -
    -sed -e "s,@DIR@,${DIR},g" \
    -	-e "s,@PKGINFO@,${DIR}/pkginfo.${CHAR}," \
    -	prototype.ini > prototype.${CHAR}
    -
    -INIT="tmp-${CHAR}/etc/init.d/mysql"
    -cp ../support-files/mysql.server $INIT
    -chmod 755 $INIT
    -
    -(cd tmp-${CHAR}; \
    -chown root etc usr ; \
    -chgrp sys etc usr ;\
    -chmod 755 usr etc; \
    -chgrp sys etc/init.d ; \
    -chmod 755 etc/init.d ; \
    -find . -print|pkgproto >> ../prototype.${CHAR})
    -
    -pkgmk -o -f prototype.${CHAR} -r ${DIR}/tmp-${CHAR}
    diff --git a/support-files/SCO/patch b/support-files/SCO/patch
    deleted file mode 100644
    index 373eb8518c6..00000000000
    --- a/support-files/SCO/patch
    +++ /dev/null
    @@ -1,96 +0,0 @@
    ---- scripts/safe_mysqld.sh.orig	Sat Sep  2 17:28:26 2000
    -+++ scripts/safe_mysqld.sh	Sat Sep  2 17:31:19 2000
    -@@ -89,10 +89,10 @@
    - 
    - 
    - NOHUP_NICENESS=`nohup nice`
    --if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice --1 echo foo > /dev/null 2>&1; then
    -+if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice -1 echo foo > /dev/null 2>&1; then
    -   NOHUP_NICENESS="nohup"
    - else
    --  NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup"
    -+  NOHUP_NICENESS="nice -$NOHUP_NICENESS nohup"
    - fi
    - 
    - export MYSQL_UNIX_PORT
    -@@ -163,7 +163,8 @@
    -     # The only thing is ps x => redhat 5 gives warnings when using ps -x.
    -     # kill -9 is used or the process won't react on the kill.
    -     numofproces=`ps xa | grep -v "grep" | grep -c $ledir/mysqld`
    --    echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log
    -+    echo | tee -a $err_log
    -+    echo "Number of processes running now: $numofproces" | tee -a $err_log
    -     I=1
    -     while test "$I" -le "$numofproces"
    -     do 
    -@@ -185,4 +186,6 @@
    -   echo "`date +'%y%m%d %H:%M:%S  mysqld restarted'`" | tee -a $err_log
    - done
    - 
    --echo -e "`date +'%y%m%d %H:%M:%S  mysqld ended\n'`" | tee -a $err_log
    -+echo | tee -a $err_log
    -+echo "`date +'%y%m%d %H:%M:%S  mysqld ended'`" | tee -a $err_log
    -+echo | tee -a $err_log
    ---- support-files/mysql.server.sh.orig	Sat Sep  2 17:35:56 2000
    -+++ support-files/mysql.server.sh	Sat Sep  2 17:36:35 2000
    -@@ -23,6 +23,9 @@
    - mysql_daemon_user=@MYSQLD_USER@
    - export PATH
    - 
    -+## your options...
    -+OPT=""
    -+
    - mode=$1
    - 
    - if test -w /             # determine if we should look at the root config file
    -@@ -82,8 +85,9 @@
    -     then
    -       # Give extra arguments to mysqld with the my.cnf file. This script may
    -       # be overwritten at next upgrade.
    --      $bindir/safe_mysqld \
    --	--user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file  &
    -+      $bindir/safe_mysqld $OPT \
    -+	--user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file &
    -+# --log=$log_file  &
    -     else
    -       echo "Can't execute $bindir/safe_mysqld"
    -     fi
    ---- configure.orig	Sat Sep  2 17:54:03 2000
    -+++ configure	Sat Sep  2 17:54:18 2000
    -@@ -202,7 +202,7 @@
    -   --with-charset=CHARSET  use CHARSET by default (one of: big5 cp1251 cp1257
    -                           croat czech danish dec8 dos estonia euc_kr gb2312 gbk
    -                           german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
    --                          latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr
    -+                          latin1 latin2 swe7 usa7 win1250 win1251ukr
    -                           ujis sjis tis620; default is latin1)"
    - ac_help="$ac_help
    -   --with-extra-charsets=cs1,cs2
    -@@ -8843,7 +8843,7 @@
    - 
    - # Choose a character set
    - 
    --CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
    -+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620"
    - DEFAULT_CHARSET=latin1
    - 
    - # Check whether --with-charset or --without-charset was given.
    ---- configure.in.orig	Sat Sep  2 17:53:57 2000
    -+++ configure.in	Sat Sep  2 17:54:36 2000
    -@@ -1517,14 +1517,14 @@
    - dnl or other special handling, you must also create
    - dnl strings/ctype-$charset_name.c
    - 
    --CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620"
    -+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620"
    - DEFAULT_CHARSET=latin1
    - 
    - AC_ARG_WITH(charset,
    -   [  --with-charset=CHARSET  use CHARSET by default (one of: big5 cp1251 cp1257
    -                           croat czech danish dec8 dos estonia euc_kr gb2312 gbk
    -                           german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
    --                          latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr
    -+                          latin1 latin2 swe7 usa7 win1250 win1251ukr
    -                           ujis sjis tis620; default is latin1)],
    -   [default_charset="$withval"],
    -   [default_charset="$DEFAULT_CHARSET"])
    diff --git a/support-files/SCO/pkginfo.ini b/support-files/SCO/pkginfo.ini
    deleted file mode 100644
    index 13b8b6adb09..00000000000
    --- a/support-files/SCO/pkginfo.ini
    +++ /dev/null
    @@ -1,8 +0,0 @@
    -PKG=MySQL
    -NAME=MySQL
    -ARCH=@TYPE@
    -VERSION=@VERSION@
    -CATEGORY=utility
    -VENDOR=TcX DataKonsult AB, Detron HB and MySQL AB
    -BASEDIR=/
    -CLASSES=none
    diff --git a/support-files/SCO/postinstall b/support-files/SCO/postinstall
    deleted file mode 100644
    index 2e199b9af82..00000000000
    --- a/support-files/SCO/postinstall
    +++ /dev/null
    @@ -1,30 +0,0 @@
    -#!/bin/sh
    -
    -PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
    -LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
    -export PATH
    -export LD_LIBRARY_PATH
    -
    -D0="/usr/local/mysql-data"
    -D="${D0}/mysql"
    -
    -DOFIX=0
    -
    -if /usr/bin/test ! -f ${D}/tables_priv.frm -a -d ${D} ; then
    -  DOFIX=1
    -fi
    -
    -if [ ! -d ${D} ]; then
    -  DOFIX=2
    -  /usr/local/bin/mysql_install_db
    -fi
    -
    -  chown -R mysql $D0
    -  chgrp -R mysql $D0
    -
    -if /usr/bin/test $DOFIX -eq 1 ; then
    -  /etc/init.d/mysql start
    -  /usr/local/bin/mysql_fix_privilege_tables
    -else
    -  /etc/init.d/mysql start || true
    -fi
    diff --git a/support-files/SCO/preinstall b/support-files/SCO/preinstall
    deleted file mode 100644
    index c1175561a99..00000000000
    --- a/support-files/SCO/preinstall
    +++ /dev/null
    @@ -1,21 +0,0 @@
    -#!/bin/sh
    -
    -PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
    -LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
    -export PATH
    -export LD_LIBRARY_PATH
    -
    -if /usr/bin/test -x /etc/init.d/mysql ; then
    - /etc/init.d/mysql stop || true
    -fi
    -
    -#----- user check
    -P=`grep mysql /etc/passwd`
    -G=`grep mysql /etc/group`
    -
    -if /usr/bin/test "x$G" = "x" ; then
    -  /usr/sbin/groupadd mysql
    -fi
    -if /usr/bin/test "x$P" = "x" ; then
    -  /usr/sbin/useradd -g mysql -d /usr/local/mysql-data -s /bin/false mysql  
    -fi
    diff --git a/support-files/SCO/preremove b/support-files/SCO/preremove
    deleted file mode 100644
    index a89648431c1..00000000000
    --- a/support-files/SCO/preremove
    +++ /dev/null
    @@ -1,25 +0,0 @@
    -#!/bin/sh
    -
    -PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
    -LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
    -export PATH
    -export LD_LIBRARY_PATH
    -
    -pid=`/usr/bin/ps -e | /usr/bin/grep mysqld |  /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
    -[ "$pid" != "" ] && /usr/local/bin/mysqladmin shutdown
    -
    -#---
    -#/usr/ucb/echo -n "Remove DATA Directory (All data expire) [Y/N]? "
    -#read I
    -I=No
    -
    -case "$I" in
    -Y*|y*)
    -	/usr/ucb/echo -n "Removing MySQL DATA ALL..."
    -	rm -rf /usr/local/mysql-data
    -	echo "done."
    -	;;
    -*)
    -	echo "not purge DATA directory"
    -	;;
    -esac;
    diff --git a/support-files/SCO/prototype.ini b/support-files/SCO/prototype.ini
    deleted file mode 100644
    index ca88bb67a90..00000000000
    --- a/support-files/SCO/prototype.ini
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -i pkginfo=@PKGINFO@
    -i postinstall=@DIR@/postinstall
    -i preinstall=@DIR@/preinstall
    -i preremove=@DIR@/preremove
    diff --git a/support-files/SCO/version b/support-files/SCO/version
    deleted file mode 100644
    index f9dc296b71b..00000000000
    --- a/support-files/SCO/version
    +++ /dev/null
    @@ -1 +0,0 @@
    -3.23.23-beta
    diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
    index 6c959daf754..bad66c77687 100644
    --- a/support-files/compiler_warnings.supp
    +++ b/support-files/compiler_warnings.supp
    @@ -1,3 +1,18 @@
    +# Copyright (C) 2007 MySQL AB
    +#
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +#
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +#
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # This file contains compiler warnings that can
     # be ignored for various reasons.
    diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
    index 6bf5fca60ab..3195318878c 100644
    --- a/support-files/mysql.spec.sh
    +++ b/support-files/mysql.spec.sh
    @@ -1,4 +1,4 @@
    -# Copyright (C) 2000-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
    +# Copyright (c) 2000, 2010, 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
    diff --git a/tests/Makefile.am b/tests/Makefile.am
    index 1c39a3630dd..8d5e7fb213b 100644
    --- a/tests/Makefile.am
    +++ b/tests/Makefile.am
    @@ -1,11 +1,11 @@
     # Copyright (C) 2000-2006 MySQL AB
     #
    -# This library is free software; you can redistribute it and/or
    +# This program is free software; you can redistribute it and/or
     # modify it under the terms of the GNU Library General Public
     # License as published by the Free Software Foundation; version 2
     # of the License.
     #
    -# This library is distributed in the hope that it will be useful,
    +# 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
     # Library General Public License for more details.
    diff --git a/tests/big_record.pl b/tests/big_record.pl
    index fbe94e3540f..77d1e613193 100755
    --- a/tests/big_record.pl
    +++ b/tests/big_record.pl
    @@ -1,5 +1,20 @@
     #!/usr/bin/perl
     
    +# Copyright (C) 2000, 2003 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     # This is a test with stores big records in a blob.
     # Note that for the default test the mysql server should have been
     # started with at least 'mysqld -O max_allowed_packet=30M' and you should have
    diff --git a/tests/drop_test.pl b/tests/drop_test.pl
    index 9dcadf45c2e..272c4029e0f 100755
    --- a/tests/drop_test.pl
    +++ b/tests/drop_test.pl
    @@ -1,4 +1,20 @@
     #!/usr/bin/perl -w
    +
    +# Copyright (C) 2000 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # This is a test with uses processes to insert, select and drop tables.
     #
    diff --git a/tests/export.pl b/tests/export.pl
    index 29f0d1af8ff..d543ede8697 100755
    --- a/tests/export.pl
    +++ b/tests/export.pl
    @@ -1,5 +1,20 @@
     #!/usr/bin/perl
     
    +# Copyright (C) 2000, 2001 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     # This is a test with uses two processes to a database.
     # The other inserts records in two tables, the other does a lot of joins
     # on these.
    diff --git a/tests/fork2_test.pl b/tests/fork2_test.pl
    index 19fab5a67d6..64e3e060b09 100755
    --- a/tests/fork2_test.pl
    +++ b/tests/fork2_test.pl
    @@ -1,5 +1,20 @@
     #!/usr/bin/perl -w
     
    +# Copyright (C) 2000, 2001 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     # This is a test with uses 5 processes to insert, update and select from
     # two tables.
     # One inserts records in the tables, one updates some record in it and
    diff --git a/tests/fork_big.pl b/tests/fork_big.pl
    index c72eb59946b..9b45cb43f8e 100755
    --- a/tests/fork_big.pl
    +++ b/tests/fork_big.pl
    @@ -1,4 +1,20 @@
     #!/usr/bin/perl -w
    +
    +# Copyright (C) 2001 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # This is a test with uses many processes to test a MySQL server.
     #
    diff --git a/tests/fork_big2.pl b/tests/fork_big2.pl
    index 567cfafa176..b866998b3b4 100644
    --- a/tests/fork_big2.pl
    +++ b/tests/fork_big2.pl
    @@ -1,4 +1,20 @@
     #!/usr/bin/perl -w
    +
    +# Copyright (C) 2002, 2005 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # This is a test with uses many processes to test a MySQL server.
     #
    diff --git a/tests/grant.pl b/tests/grant.pl
    index 4f2bd1a61cb..368ce0b3254 100755
    --- a/tests/grant.pl
    +++ b/tests/grant.pl
    @@ -1,4 +1,20 @@
     #!/usr/bin/perl
    +
    +# Copyright (C) 2000, 2005 MySQL AB, 2009 Sun Microsystems, Inc.
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # Testing of grants.
     # Note that this will delete all table and column grants !
    diff --git a/tests/index_corrupt.pl b/tests/index_corrupt.pl
    index 19bf54f5d11..fa4c8151277 100755
    --- a/tests/index_corrupt.pl
    +++ b/tests/index_corrupt.pl
    @@ -1,4 +1,20 @@
     #!/usr/bin/perl -w
    +
    +# Copyright (C) 2005 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # This is a test for a key cache bug (bug #10167)
     # To expose the bug mysqld should be started with --key-buffer-size=64K
    diff --git a/tests/insert_and_repair.pl b/tests/insert_and_repair.pl
    index 1c7186bb651..00ab20f051b 100755
    --- a/tests/insert_and_repair.pl
    +++ b/tests/insert_and_repair.pl
    @@ -1,4 +1,20 @@
     #!/usr/bin/perl -w
    +
    +# Copyright (C) 2000, 2001 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # This is a test of insert and repair/check.
     #
    diff --git a/tests/lock_test.pl b/tests/lock_test.pl
    index 5daeeddad8e..a40bec681f6 100755
    --- a/tests/lock_test.pl
    +++ b/tests/lock_test.pl
    @@ -1,5 +1,20 @@
     #!/usr/bin/perl
     
    +# Copyright (C) 2000 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     # This is a test with uses two processes to a database.
     # The other inserts records in two tables, the other does a lot of joins
     # on these.
    diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
    index 43a418c8300..82199781d74 100644
    --- a/tests/mysql_client_test.c
    +++ b/tests/mysql_client_test.c
    @@ -1,4 +1,4 @@
    -/* Copyright (C) 2003-2004 MySQL AB
    +/* Copyright (c) 2002, 2010, 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
    diff --git a/tests/pmail.pl b/tests/pmail.pl
    index 02d5d60ac0f..38905832069 100755
    --- a/tests/pmail.pl
    +++ b/tests/pmail.pl
    @@ -1,4 +1,20 @@
     #!/usr/bin/perl -w
    +
    +# Copyright (C) 2000, 2005 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #                                  
     # Prints mails to standard output  
     #                                  
    diff --git a/tests/rename_test.pl b/tests/rename_test.pl
    index edf3216a62f..23fc33c9095 100755
    --- a/tests/rename_test.pl
    +++ b/tests/rename_test.pl
    @@ -1,4 +1,20 @@
     #!/usr/bin/perl -w
    +
    +# Copyright (C) 2000, 2001 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # This is a test with uses processes to insert, select and drop tables.
     #
    diff --git a/tests/table_types.pl b/tests/table_types.pl
    index 4dbcdcb975c..23d26215abe 100755
    --- a/tests/table_types.pl
    +++ b/tests/table_types.pl
    @@ -1,5 +1,19 @@
     #!/usr/bin/perl
    -#
    +
    +# Copyright (C) 2000, 2003 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     
     use DBI;
     use Benchmark;
    diff --git a/tests/test_delayed_insert.pl b/tests/test_delayed_insert.pl
    index c7a8f0ca4b7..5046c4fb580 100755
    --- a/tests/test_delayed_insert.pl
    +++ b/tests/test_delayed_insert.pl
    @@ -1,5 +1,20 @@
     #!/usr/bin/perl -w
     
    +# Copyright (C) 2000, 2001 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     # This is a test for INSERT DELAYED
     #
     
    diff --git a/tests/truncate.pl b/tests/truncate.pl
    index 57b50cf96b6..85e826fd4cd 100755
    --- a/tests/truncate.pl
    +++ b/tests/truncate.pl
    @@ -1,4 +1,20 @@
     #!/usr/bin/perl -w
    +
    +# Copyright (C) 2002 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
     #
     # This is a test with uses many processes to test a MySQL server.
     #
    diff --git a/win/create_manifest.js b/win/create_manifest.js
    index dbdd83588c5..d7b790fd0f8 100755
    --- a/win/create_manifest.js
    +++ b/win/create_manifest.js
    @@ -1,3 +1,18 @@
    +/* Copyright (C) 2007, 2008 MySQL AB
    +
    +   This program is free software; you can redistribute it and/or modify
    +   it under the terms of the GNU General Public License as published by
    +   the Free Software Foundation; version 2 of the License.
    +
    +   This program is distributed in the hope that it will be useful,
    +   but WITHOUT ANY WARRANTY; without even the implied warranty of
    +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +   GNU General Public License for more details.
    +
    +   You should have received a copy of the GNU General Public License
    +   along with this program; if not, write to the Free Software
    +   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
    +
     /* 
       manifest.js - Writes a custom XML manifest for each executable/library
       5 command line options must be supplied: 
    diff --git a/win/mysql_manifest.cmake b/win/mysql_manifest.cmake
    index 0d429e438d6..a824457b5a7 100755
    --- a/win/mysql_manifest.cmake
    +++ b/win/mysql_manifest.cmake
    @@ -1,3 +1,17 @@
    +# Copyright (C) 2007 MySQL AB
    +# 
    +# This program is free software; you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation; version 2 of the License.
    +# 
    +# This program is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +# 
    +# You should have received a copy of the GNU General Public License
    +# along with this program; if not, write to the Free Software
    +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     
     # - MYSQL_EMBED_MANIFEST(target_name required_privs)
     # Create a manifest for target_name.  Set the execution level to require_privs
    
    From 22639a066cde7b18133f81ca8c0528e115c08677 Mon Sep 17 00:00:00 2001
    From: unknown 
    Date: Wed, 29 Dec 2010 11:52:57 +0800
    Subject: [PATCH 20/20] Bug #50914  	mysqlbinlog not handling drop of
     current default database
    
    mysqlbinlog only prints "use $database" statements to its output stream
    when the active default database changes between events. This will cause
    "No Database Selected" error when dropping and recreating that database.
    
    To fix the problem, we clear print_event_info->db when printing an event
    of CREATE/DROP/ALTER database statements, so that the Query_log_event
    after such statements will be printed with the use 'db' anyway except
    transaction keywords.
    
    mysql-test/r/mysqlbinlog.result:
      Test result for Bug#50914.
    mysql-test/t/mysqlbinlog.test:
      Added test to verify if the approach of the mysqlbinlog prints
      "use $database" statements to its output stream will cause
      "No Database Selected" error when dropping and recreating
      that database.
    sql/log_event.cc:
      Updated code to clear print_event_info->db when printing an event
      of CREATE/DROP/ALTER database statements, so that the Query_log_event
      after such statements will be printed with the use 'db' anyway except
      transaction keywords.
    ---
     mysql-test/r/mysqlbinlog.result | 20 ++++++++++++++++++++
     mysql-test/t/mysqlbinlog.test   | 27 +++++++++++++++++++++++++++
     sql/log_event.cc                |  7 ++++++-
     3 files changed, 53 insertions(+), 1 deletion(-)
    
    diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
    index 69d19b5e87f..1f2e1ed67e0 100644
    --- a/mysql-test/r/mysqlbinlog.result
    +++ b/mysql-test/r/mysqlbinlog.result
    @@ -638,3 +638,23 @@ ROLLBACK /* added by mysqlbinlog */;
     /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
     End of 5.0 tests
     End of 5.1 tests
    +RESET MASTER;
    +CREATE DATABASE test1;
    +USE test1;
    +CREATE TABLE t1(id int);
    +DROP DATABASE test1;
    +CREATE DATABASE test1;
    +USE test1;
    +CREATE TABLE t1(id int);
    +DROP TABLE t1;
    +DROP DATABASE test1;
    +FLUSH LOGS;
    +show binlog events in 'master-bin.000002' from ;
    +Log_name	Pos	Event_type	Server_id	End_log_pos	Info
    +master-bin.000002	#	Query	#	#	CREATE DATABASE test1
    +master-bin.000002	#	Query	#	#	use `test1`; CREATE TABLE t1(id int)
    +master-bin.000002	#	Query	#	#	DROP DATABASE test1
    +master-bin.000002	#	Query	#	#	CREATE DATABASE test1
    +master-bin.000002	#	Query	#	#	use `test1`; CREATE TABLE t1(id int)
    +master-bin.000002	#	Query	#	#	use `test1`; DROP TABLE t1
    +master-bin.000002	#	Query	#	#	DROP DATABASE test1
    diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
    index 783708cc3b2..d5dd3052269 100644
    --- a/mysql-test/t/mysqlbinlog.test
    +++ b/mysql-test/t/mysqlbinlog.test
    @@ -474,3 +474,30 @@ diff_files $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn $MYSQLTEST_VARDIR/tmp/mysqlbin
     # Cleanup for this part of test
     remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty;
     remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn;
    +
    +#
    +# BUG#50914
    +# This test verifies if the approach of the mysqlbinlog prints
    +# "use $database" statements to its output stream will cause
    +# "No Database Selected" error when dropping and recreating
    +# that database.
    +#
    +RESET MASTER;
    +CREATE DATABASE test1;
    +USE test1;
    +CREATE TABLE t1(id int);
    +DROP DATABASE test1;
    +CREATE DATABASE test1;
    +USE test1;
    +CREATE TABLE t1(id int);
    +DROP TABLE t1;
    +DROP DATABASE test1;
    +let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1);
    +FLUSH LOGS;
    +
    +let $MYSQLD_DATADIR= `SELECT @@datadir`;
    +exec $MYSQL_BINLOG $MYSQLD_DATADIR/$master_binlog | $MYSQL test 2>&1;
    +
    +let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
    +source include/show_binlog_events.inc;
    +
    diff --git a/sql/log_event.cc b/sql/log_event.cc
    index eb7c9c30567..0b938df1987 100644
    --- a/sql/log_event.cc
    +++ b/sql/log_event.cc
    @@ -2894,7 +2894,12 @@ void Query_log_event::print_query_header(IO_CACHE* file,
                     error_code);
       }
     
    -  if (!(flags & LOG_EVENT_SUPPRESS_USE_F) && db)
    +  if ((flags & LOG_EVENT_SUPPRESS_USE_F))
    +  {
    +    if (!is_trans_keyword())
    +      print_event_info->db[0]= '\0';
    +  }
    +  else if (db)
       {
         different_db= memcmp(print_event_info->db, db, db_len + 1);
         if (different_db)